Package hec.map
Class JLayerSelectorTreePanel
java.lang.Object
java.awt.Component
java.awt.Container
javax.swing.JComponent
javax.swing.JPanel
hec.map.JLayerSelectorTreePanel
- All Implemented Interfaces:
MapGlyphListener,JLayerSelectionParent,ImageObserver,MenuContainer,PropertyChangeListener,Serializable,EventListener,Accessible,UnitsComponent
public class JLayerSelectorTreePanel
extends JPanel
implements JLayerSelectionParent, MapGlyphListener, UnitsComponent, PropertyChangeListener
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionclassclassNested 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 JMenuItemprotected JLayerSelectionThe currently focused layer.protected JMenuItemprotected GeoDialogprotected MapHash of Layers to Panelsprotected ReflectMultiListenerprotected MapPanelThe MapPanel.protected JMenuItemprotected ModifiableMy parent who holds the modified state.protected List<JLayerSelectorTreePanel.JLayerSelectionNode>protected JCheckBoxMenuItemprotected WindowThe Parent Component containing me.protected JFrameThe Parent Frame for instantiating dialogs.protected PropertyChangeSupportprotected JPopupMenuprotected AbstractButtonprotected AbstractButtonprotected AbstractButtonprotected AbstractButtonprotected AbstractButtonprotected AbstractButtonprotected AbstractButtonprotected AbstractButtonprotected AbstractButtonprotected AbstractButtonprotected AbstractButtonprotected AbstractButtonprotected AbstractButtonprotected JMenuprotected JLabelprotected JTreeprotected JMenuprotected JPanelprotected JPanelprotected JMenuItemprotected DefaultMutableTreeNodeprotected JScrollPaneprotected JMenuFields 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
ConstructorsConstructorDescriptionJLayerSelectorTreePanel(JFrame parentForDialogs, Modifiable modifiableParent, Window parentForClosing, boolean okcancelEnabled, MapPanel panel) JLayerSelectorTreePanel(JFrame parentForDialogs, Modifiable modifiableParent, Window parentForClosing, boolean okcancelEnabled, MapPanel panel, boolean addMenuToFrame) -
Method Summary
Modifier and TypeMethodDescriptionvoidaddLayer()voidaddSelection(JLayerSelection ls, DefaultMutableTreeNode parentNode) voidapply()protected voidbuildControls(boolean okcancelEnabled, boolean addMenuToFrame) protected voidbuildMenus(boolean okcancelEnabled, boolean addMenuToFrame) voidcancel()booleancanOpen()protected voidvoidclosing()voidcollapse()protected MouseListenerprotected voidvoidexpand()protected voidprotected voidvoidgetDisplayUnitsString(int unitSystem) This method allows the retrieves the units string for a given units systemintgetSelectionNodeFor(JLayerSelection selection) getSelectionNodeFor(DefaultMutableTreeNode parent, JLayerSelection selection) protected List<JLayerSelection>voidbooleanbooleanbooleanisFirstNode(JLayerSelection layerSelection) booleanisLastNode(JLayerSelection layerSelection) protected booleanisLocked()booleanisOnTop()voidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidok()protected voidpaintMap()voidpathSelected(Object obj) voidvoidprotected voidprotected voidvoidvoidvoidvoidreset()voidvoidsetAlwaysOnTop(boolean b) voidvoidsetDisplayScaleFactor(int paramId, double scale) Sets a scaling factor to use when displaying the data.voidsetDisplayUnitsSystem(int unitSystem) Sets the current Unit System for this objectvoidsetGlyphVector(List list) voidsetLegendVisible(DefaultMutableTreeNode node, boolean show) voidsetMapPanel(MapPanel panel) protected voidsetMenuState(TreePath path) voidvoidsetParentForDialogs(JFrame parentFrame) voidsetRootnodeText(String text) voidvoidvoidvoidMethods 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, transferFocusUpCycleMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface hec.map.JLayerSelectionParent
repaint
-
Field Details
-
ROOTNODE
-
_mapPanel
The MapPanel. -
_parentForDialogs
The Parent Frame for instantiating dialogs. -
_parentForClosing
The Parent Component containing me. For making me invisible. -
_modifiableParent
My parent who holds the modified state. Should be either a JLayerSelector or LayerConfigMode. -
_currentLayer
The currently focused layer. -
_layersHash
Hash of Layers to Panels -
_nodesList
-
layersTree
-
panelLayerButtons
-
buttonTop
-
buttonBottom
-
buttonUp
-
buttonDown
-
buttonRemove
-
buttonImportImage
-
buttonReset
-
buttonResetToolbars
-
buttonAdd
-
buttonToolbar
-
propertiesMenuItem
-
label1
-
panelButtons
-
buttonOK
-
buttonApply
-
buttonCancel
-
_collapseMenuItem
-
_expandMenuItem
-
viewMenu
-
editMenu
-
mapsMenu
-
_onTopMenuItem
-
scrollPaneLayers
-
_viewPopup
-
_listener
-
_geoDialog
-
_propertyChangeSupport
-
-
Constructor Details
-
JLayerSelectorTreePanel
public JLayerSelectorTreePanel(JFrame parentForDialogs, Modifiable modifiableParent, Window parentForClosing, boolean okcancelEnabled, MapPanel panel, boolean addMenuToFrame) -
JLayerSelectorTreePanel
public JLayerSelectorTreePanel(JFrame parentForDialogs, Modifiable modifiableParent, Window parentForClosing, boolean okcancelEnabled, MapPanel panel)
-
-
Method Details
-
buildControls
protected void buildControls(boolean okcancelEnabled, boolean addMenuToFrame) -
createDefaultMouseListener
-
buildMenus
protected void buildMenus(boolean okcancelEnabled, boolean addMenuToFrame) -
createImportImageAction
-
propertyChange
- Specified by:
propertyChangein interfacePropertyChangeListener
-
pathSelected
-
update
- Specified by:
updatein interfaceJLayerSelectionParent
-
getNumberOfGlyphs
public int getNumberOfGlyphs() -
setLegendVisible
- Specified by:
setLegendVisiblein interfaceJLayerSelectionParent
-
setModifiedLayerSelection
- Specified by:
setModifiedLayerSelectionin interfaceJLayerSelectionParent
-
setSelectedNode
-
setCurrentLayer
- Specified by:
setCurrentLayerin interfaceJLayerSelectionParent
-
setGlyphVector
-
addSelection
public JLayerSelectorTreePanel.JLayerSelectionNode addSelection(JLayerSelection ls, DefaultMutableTreeNode parentNode) -
removeSelection
-
removeAllSelections
protected void removeAllSelections() -
getSelections
-
getSelectedLayerSelectionNode
- Returns:
- the selected LayerSelectionNode or null
-
getMapPanel
- Returns:
-
setMapPanel
-
apply
public void apply() -
moveSelectionUp
public void moveSelectionUp() -
moveSelectionDown
public void moveSelectionDown() -
moveCurrentLayerTop
public void moveCurrentLayerTop()- Specified by:
moveCurrentLayerTopin interfaceJLayerSelectionParent
-
moveCurrentLayerBottom
public void moveCurrentLayerBottom()- Specified by:
moveCurrentLayerBottomin interfaceJLayerSelectionParent
-
moveCurrentLayerUp
public void moveCurrentLayerUp()- Specified by:
moveCurrentLayerUpin interfaceJLayerSelectionParent
-
moveCurrentLayerDown
public void moveCurrentLayerDown()- Specified by:
moveCurrentLayerDownin interfaceJLayerSelectionParent
-
addLayer
public void addLayer() -
importImage
public void importImage() -
removeCurrentLayer
public void removeCurrentLayer() -
resetToolbars
public void resetToolbars() -
reset
public void reset() -
properties
public void properties() -
toolbarAction
public void toolbarAction() -
collapse
public void collapse()- Specified by:
collapsein interfaceJLayerSelectionParent
-
expand
public void expand()- Specified by:
expandin interfaceJLayerSelectionParent
-
setAlwaysOnTop
public void setAlwaysOnTop(boolean b) -
isOnTop
public boolean isOnTop() -
setWindowOnTop
public void setWindowOnTop() -
setMenuState
-
removeAttributeSetListeners
protected void removeAttributeSetListeners() -
isExpanded
- Specified by:
isExpandedin interfaceJLayerSelectionParent
-
nodeChanged
- Specified by:
nodeChangedin interfaceJLayerSelectionParent
-
nodeChanged
- Specified by:
nodeChangedin interfaceJLayerSelectionParent
-
cancel
public void cancel() -
ok
public void ok() -
closeChildDialogs
protected void closeChildDialogs() -
isLocked
protected boolean isLocked() -
displayViewPopup
-
setRootnodeText
-
fireNodeToggleEvent
-
paintMap
protected void paintMap() -
fireLayerSelectionPanelEvent
-
removeLayerSelectionEventListener
-
addLayerSelectionEventListener
-
isConfigurationLocked
public boolean isConfigurationLocked()- Specified by:
isConfigurationLockedin interfaceJLayerSelectionParent
-
canOpen
public boolean canOpen() -
closing
public void closing() -
mapGlyphsChanged
public void mapGlyphsChanged()- Specified by:
mapGlyphsChangedin interfaceMapGlyphListener
-
geoDialog
public void geoDialog() -
modeChanged
public void modeChanged() -
getDisplayUnitsString
Description copied from interface:UnitsComponentThis method allows the retrieves the units string for a given units system- Specified by:
getDisplayUnitsStringin interfaceUnitsComponent- See Also:
-
setDisplayUnitsSystem
public void setDisplayUnitsSystem(int unitSystem) Description copied from interface:UnitsComponentSets the current Unit System for this object- Specified by:
setDisplayUnitsSystemin interfaceUnitsComponent
-
setDisplayScaleFactor
public void setDisplayScaleFactor(int paramId, double scale) Description copied from interface:UnitsComponentSets a scaling factor to use when displaying the data.- Specified by:
setDisplayScaleFactorin interfaceUnitsComponent- Parameters:
paramId- This is the identifier of the paramater to scale. If the data is not of this type then it is ignoredscale- This is the scaling factor *to* be multiplied to the value when it is rendered
-
isFirstNode
- Specified by:
isFirstNodein interfaceJLayerSelectionParent- Parameters:
layerSelection-- Returns:
- See Also:
-
isLastNode
- Specified by:
isLastNodein interfaceJLayerSelectionParent- Parameters:
layerSelection-- Returns:
- See Also:
-
getSelectionNodeFor
- Specified by:
getSelectionNodeForin interfaceJLayerSelectionParent
-
getSelectionNodeFor
protected JLayerSelectorTreePanel.JLayerSelectionNode getSelectionNodeFor(DefaultMutableTreeNode parent, JLayerSelection selection) -
setParentForDialogs
- Parameters:
parentFrame-
-