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 TypeClassDescriptionclass
class
Nested classes/interfaces inherited from class javax.swing.JPanel
JPanel.AccessibleJPanel
Nested classes/interfaces inherited from class javax.swing.JComponent
JComponent.AccessibleJComponent
Nested classes/interfaces inherited from class java.awt.Container
Container.AccessibleAWTContainer
Nested classes/interfaces inherited from class java.awt.Component
Component.AccessibleAWTComponent, Component.BaselineResizeBehavior, Component.BltBufferStrategy, Component.FlipBufferStrategy
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected JMenuItem
protected JLayerSelection
The currently focused layer.protected JMenuItem
protected GeoDialog
protected Map
Hash of Layers to Panelsprotected ReflectMultiListener
protected MapPanel
The MapPanel.protected JMenuItem
protected Modifiable
My parent who holds the modified state.protected List<JLayerSelectorTreePanel.JLayerSelectionNode>
protected JCheckBoxMenuItem
protected Window
The Parent Component containing me.protected JFrame
The Parent Frame for instantiating dialogs.protected PropertyChangeSupport
protected JPopupMenu
protected AbstractButton
protected AbstractButton
protected AbstractButton
protected AbstractButton
protected AbstractButton
protected AbstractButton
protected AbstractButton
protected AbstractButton
protected AbstractButton
protected AbstractButton
protected AbstractButton
protected AbstractButton
protected AbstractButton
protected JMenu
protected JLabel
protected JTree
protected JMenu
protected JPanel
protected JPanel
protected JMenuItem
protected DefaultMutableTreeNode
protected JScrollPane
protected JMenu
Fields inherited from class javax.swing.JComponent
listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW
Fields inherited from class java.awt.Component
accessibleContext, BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
Fields 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 TypeMethodDescriptionvoid
addLayer()
void
addSelection
(JLayerSelection ls, DefaultMutableTreeNode parentNode) void
apply()
protected void
buildControls
(boolean okcancelEnabled, boolean addMenuToFrame) protected void
buildMenus
(boolean okcancelEnabled, boolean addMenuToFrame) void
cancel()
boolean
canOpen()
protected void
void
closing()
void
collapse()
protected MouseListener
protected void
void
expand()
protected void
protected void
void
getDisplayUnitsString
(int unitSystem) This method allows the retrieves the units string for a given units systemint
getSelectionNodeFor
(JLayerSelection selection) getSelectionNodeFor
(DefaultMutableTreeNode parent, JLayerSelection selection) protected List<JLayerSelection>
void
boolean
boolean
boolean
isFirstNode
(JLayerSelection layerSelection) boolean
isLastNode
(JLayerSelection layerSelection) protected boolean
isLocked()
boolean
isOnTop()
void
void
void
void
void
void
void
void
void
void
void
ok()
protected void
paintMap()
void
pathSelected
(Object obj) void
void
protected void
protected void
void
void
void
void
reset()
void
void
setAlwaysOnTop
(boolean b) void
void
setDisplayScaleFactor
(int paramId, double scale) Sets a scaling factor to use when displaying the data.void
setDisplayUnitsSystem
(int unitSystem) Sets the current Unit System for this objectvoid
setGlyphVector
(List list) void
setLegendVisible
(DefaultMutableTreeNode node, boolean show) void
setMapPanel
(MapPanel panel) protected void
setMenuState
(TreePath path) void
void
setParentForDialogs
(JFrame parentFrame) void
setRootnodeText
(String text) void
void
void
void
Methods inherited from class javax.swing.JPanel
getAccessibleContext, getUI, getUIClassID, paramString, setUI, updateUI
Methods 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, update
Methods 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, validateTree
Methods 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
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods 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:
propertyChange
in interfacePropertyChangeListener
-
pathSelected
-
update
- Specified by:
update
in interfaceJLayerSelectionParent
-
getNumberOfGlyphs
public int getNumberOfGlyphs() -
setLegendVisible
- Specified by:
setLegendVisible
in interfaceJLayerSelectionParent
-
setModifiedLayerSelection
- Specified by:
setModifiedLayerSelection
in interfaceJLayerSelectionParent
-
setSelectedNode
-
setCurrentLayer
- Specified by:
setCurrentLayer
in 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:
moveCurrentLayerTop
in interfaceJLayerSelectionParent
-
moveCurrentLayerBottom
public void moveCurrentLayerBottom()- Specified by:
moveCurrentLayerBottom
in interfaceJLayerSelectionParent
-
moveCurrentLayerUp
public void moveCurrentLayerUp()- Specified by:
moveCurrentLayerUp
in interfaceJLayerSelectionParent
-
moveCurrentLayerDown
public void moveCurrentLayerDown()- Specified by:
moveCurrentLayerDown
in 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:
collapse
in interfaceJLayerSelectionParent
-
expand
public void expand()- Specified by:
expand
in interfaceJLayerSelectionParent
-
setAlwaysOnTop
public void setAlwaysOnTop(boolean b) -
isOnTop
public boolean isOnTop() -
setWindowOnTop
public void setWindowOnTop() -
setMenuState
-
removeAttributeSetListeners
protected void removeAttributeSetListeners() -
isExpanded
- Specified by:
isExpanded
in interfaceJLayerSelectionParent
-
nodeChanged
- Specified by:
nodeChanged
in interfaceJLayerSelectionParent
-
nodeChanged
- Specified by:
nodeChanged
in 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:
isConfigurationLocked
in interfaceJLayerSelectionParent
-
canOpen
public boolean canOpen() -
closing
public void closing() -
mapGlyphsChanged
public void mapGlyphsChanged()- Specified by:
mapGlyphsChanged
in interfaceMapGlyphListener
-
geoDialog
public void geoDialog() -
modeChanged
public void modeChanged() -
getDisplayUnitsString
Description copied from interface:UnitsComponent
This method allows the retrieves the units string for a given units system- Specified by:
getDisplayUnitsString
in interfaceUnitsComponent
- See Also:
-
setDisplayUnitsSystem
public void setDisplayUnitsSystem(int unitSystem) Description copied from interface:UnitsComponent
Sets the current Unit System for this object- Specified by:
setDisplayUnitsSystem
in interfaceUnitsComponent
-
setDisplayScaleFactor
public void setDisplayScaleFactor(int paramId, double scale) Description copied from interface:UnitsComponent
Sets a scaling factor to use when displaying the data.- Specified by:
setDisplayScaleFactor
in 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:
isFirstNode
in interfaceJLayerSelectionParent
- Parameters:
layerSelection
-- Returns:
- See Also:
-
isLastNode
- Specified by:
isLastNode
in interfaceJLayerSelectionParent
- Parameters:
layerSelection
-- Returns:
- See Also:
-
getSelectionNodeFor
- Specified by:
getSelectionNodeFor
in interfaceJLayerSelectionParent
-
getSelectionNodeFor
protected JLayerSelectorTreePanel.JLayerSelectionNode getSelectionNodeFor(DefaultMutableTreeNode parent, JLayerSelection selection) -
setParentForDialogs
- Parameters:
parentFrame
-
-