Class DefaultViewPanel
java.lang.Object
java.awt.Component
java.awt.Container
javax.swing.JComponent
javax.swing.JPanel
org.gvsig.app.project.documents.view.gui.AbstractViewPanel
org.gvsig.app.project.documents.view.gui.DefaultViewPanel
- All Implemented Interfaces:
ImageObserver,MenuContainer,PropertyChangeListener,Serializable,EventListener,Accessible,org.gvsig.andami.ui.mdiManager.IWindow,org.gvsig.andami.ui.mdiManager.IWindowListener,org.gvsig.andami.ui.mdiManager.IWindowTransform,org.gvsig.andami.ui.mdiManager.SingletonWindow,IDocumentWindow,IView,org.gvsig.tools.observer.Observer,org.gvsig.tools.swing.api.Component,org.gvsig.tools.util.PropertiesSupport
public class DefaultViewPanel
extends AbstractViewPanel
implements org.gvsig.tools.observer.Observer, org.gvsig.tools.util.PropertiesSupport
Class View. This class represents the gvSIG specific internal window where the maps are displayed and where the events coming from the user are captured.
It is composed by three main visual areas:
- Map control: the map area located in the right area of the window. It takes up the biggest part of the window.
- Table of contents (TOC): is a list of layers displayed in the view. The TOC is located on the left-top corner of the View and is the place where the user can modify the order, the legends, the visibility and other properties of the layers.
- Map overview: is a small MapControl located in the left-bottom corner of the View where the user can put some layers which summarizes the view. It is used to make the navigation easier and faster.
- Author:
- 2005- Vicente Caballero, 2009- Joaquin del Cerro
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class org.gvsig.app.project.documents.view.gui.AbstractViewPanel
AbstractViewPanel.ViewExceptionListener, AbstractViewPanel.ViewSplitPaneNested classes/interfaces inherited from class javax.swing.JPanel
JPanel.AccessibleJPanelNested classes/interfaces inherited from class javax.swing.JComponent
JComponent.AccessibleJComponentNested classes/interfaces inherited from class java.awt.Container
Container.AccessibleAWTContainerNested classes/interfaces inherited from class java.awt.Component
Component.AccessibleAWTComponent, Component.BaselineResizeBehavior, Component.BltBufferStrategy, Component.FlipBufferStrategy -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected org.gvsig.app.project.documents.view.gui.DefaultViewPanel.ResponseAdapterprotected booleanFields inherited from class org.gvsig.app.project.documents.view.gui.AbstractViewPanel
isPalette, logger, m_MapControl, m_MapLoc, m_TOC, m_viewInfo, mapControlExceptionListener, modelo, movp, tempMainSplit, tempSplitToc, viewInformationArea, windowLayoutFields inherited from class javax.swing.JComponent
listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOWFields inherited from class java.awt.Component
accessibleContext, BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENTFields inherited from interface java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddConsoleListener(String prefix, org.gvsig.utils.console.ResponseListener listener) voidfocusConsole(String text) org.gvsig.utils.console.JConsolestatic ColorReturns the current default view background color defined which is the color defined when the user does not define any other onestatic ColorReturns the current default map overview background color defined which is the color defined when the user does not define any other onegetProperty(String name) voidprotected voidinitComponents(org.gvsig.fmap.mapcontext.MapContext mapContext) protected voidinitialize(org.gvsig.fmap.mapcontext.MapContext mapContext) Create the internal componentes and populate the window with them.voidremoveConsoleListener(org.gvsig.utils.console.ResponseListener listener) voidrestore()static voidsetDefaultBackColor(Color color) static voidSets the default map overview background color that will be used in subsequent projects.static voidsetDisableConsole(boolean disable) voidsetDocument(Document document) voidsetModel(ViewDocument model) voidsetProperty(String name, Object value) voidvoidvoidvoidvoidMethods inherited from class org.gvsig.app.project.documents.view.gui.AbstractViewPanel
asJComponent, getImage, getMapControl, getMapOverview, getModel, getProjection, getTOC, getViewDocument, getViewInformationArea, getWindowInfo, getWindowLayout, getWindowModel, initialize, isPalette, propertyChange, repaintMap, setProjection, setWindowLayoutMethods inherited from class javax.swing.JPanel
getAccessibleContext, getUI, getUIClassID, paramString, setUI, updateUIMethods inherited from class javax.swing.JComponent
addAncestorListener, addNotify, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBaseline, getBaselineResizeBehavior, getBorder, getBounds, getClientProperty, getComponentGraphics, getComponentPopupMenu, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getFontMetrics, getGraphics, getHeight, getInheritsPopupMenu, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPopupLocation, getPreferredSize, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, hide, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingForPrint, isPaintingOrigin, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintComponent, paintImmediately, paintImmediately, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyBinding, processKeyEvent, processMouseEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setComponentPopupMenu, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setEnabled, setFocusTraversalKeys, setFont, setForeground, setInheritsPopupMenu, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setTransferHandler, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, updateMethods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, addImpl, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, getMousePosition, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusCycleRoot, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setLayout, transferFocusDownCycle, validate, validateTreeMethods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, createImage, createImage, createVolatileImage, createVolatileImage, disableEvents, dispatchEvent, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getForeground, getGraphicsConfiguration, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isPreferredSizeSet, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, requestFocus, requestFocus, requestFocusInWindow, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setMixingCutoutShape, setName, setSize, setSize, show, show, size, toString, transferFocus, transferFocusBackward, transferFocusUpCycle
-
Field Details
-
consoleResponseAdapter
protected org.gvsig.app.project.documents.view.gui.DefaultViewPanel.ResponseAdapter consoleResponseAdapter -
isShowConsole
protected boolean isShowConsole
-
-
Constructor Details
-
DefaultViewPanel
public DefaultViewPanel()Creates a new View object. Before being used, the object must be initialized.- See Also:
-
DefaultViewPanel
-
-
Method Details
-
initialize
protected void initialize(org.gvsig.fmap.mapcontext.MapContext mapContext) Create the internal componentes and populate the window with them. If the layout properties were set using thesetWindowData(WindowData)method, the window will be populated according to this properties.- Parameters:
mapContext-
-
setDocument
- Specified by:
setDocumentin interfaceIDocumentWindow
-
getDocument
- Specified by:
getDocumentin interfaceIDocumentWindow
-
setModel
-
getConsolePanel
public org.gvsig.utils.console.JConsole getConsolePanel() -
addConsoleListener
-
removeConsoleListener
public void removeConsoleListener(org.gvsig.utils.console.ResponseListener listener) -
focusConsole
-
hideConsole
public void hideConsole() -
showConsole
public void showConsole() -
getProperty
- Specified by:
getPropertyin interfaceorg.gvsig.tools.util.PropertiesSupport
-
setProperty
- Specified by:
setPropertyin interfaceorg.gvsig.tools.util.PropertiesSupport
-
getProperties
- Specified by:
getPropertiesin interfaceorg.gvsig.tools.util.PropertiesSupport
-
initComponents
protected void initComponents(org.gvsig.fmap.mapcontext.MapContext mapContext) -
windowActivated
public void windowActivated()- Specified by:
windowActivatedin interfaceorg.gvsig.andami.ui.mdiManager.IWindowListener- Overrides:
windowActivatedin classAbstractViewPanel
-
windowClosed
public void windowClosed()- Specified by:
windowClosedin interfaceorg.gvsig.andami.ui.mdiManager.IWindowListener- Overrides:
windowClosedin classAbstractViewPanel- See Also:
-
toPalette
public void toPalette()- Specified by:
toPalettein interfaceorg.gvsig.andami.ui.mdiManager.IWindowTransform- Overrides:
toPalettein classAbstractViewPanel
-
restore
public void restore()- Specified by:
restorein interfaceorg.gvsig.andami.ui.mdiManager.IWindowTransform- Overrides:
restorein classAbstractViewPanel
-
setDefaultMapOverViewBackColor
Sets the default map overview background color that will be used in subsequent projects.- Parameters:
color-
-
getDefaultMapOverViewBackColor
Returns the current default map overview background color defined which is the color defined when the user does not define any other one- Returns:
- java.awt.Color
-
getDefaultBackColor
Returns the current default view background color defined which is the color defined when the user does not define any other one- Returns:
- java.awt.Color
-
setDefaultBackColor
- Parameters:
color-
-
getWindowProfile
- Specified by:
getWindowProfilein interfaceorg.gvsig.andami.ui.mdiManager.IWindow
-
update
- Specified by:
updatein interfaceorg.gvsig.tools.observer.Observer
-
setDisableConsole
public static void setDisableConsole(boolean disable)
-