public class DefaultPortableViewToc extends JPanel implements PortableViewToc, LayerListener, TreeSelectionListener
Default implementation of PortableViewToc
JPanel.AccessibleJPanel
JComponent.AccessibleJComponent
Container.AccessibleAWTContainer
Component.AccessibleAWTComponent, Component.BaselineResizeBehavior, Component.BltBufferStrategy, Component.FlipBufferStrategy
accessibleContext, listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
Constructor and Description |
---|
DefaultPortableViewToc() |
Modifier and Type | Method and Description |
---|---|
void |
activationChanged(LayerEvent e)
Called when the activation of a layer has changed.
|
void |
addActiveLayerChangeListener(ActiveLayerChangeEventListener alcel)
Adds a active layer change listener.
|
void |
addLayerActionListener(LayerActionEventListener lel)
Adds a layer action listener.
|
void |
addLegendActionListener(LegendActionEventListener lel)
Adds a legend action listener.
|
void |
attachTo(PortableViewViewer viewer) |
void |
clearSelection()
Clears current layer selection
|
void |
drawValueChanged(LayerEvent e)
Called when a draw value of a layer has changed.
|
void |
editionChanged(LayerEvent e)
Called when the edition of a layer has changed.
|
FLayer |
getActiveLayer() |
JComponent |
getComponent() |
TOCFactory |
getFactory() |
Manager |
getManager()
Returns a reference to the
Manager which manages this server. |
MapContext |
getMapContext() |
DynObject |
getParameters()
Gets the parameters that were used to instantiate this TOC.
|
FLayer[] |
getSelectedLayers() |
JComponent |
getSwingComponent() |
PortableViewViewer |
getViewer() |
void |
hideAll()
Hides as much as possible the graphic representation of the TOC (for
example, collapses all
the nodes to hide all layer details except the list of layers itself)
|
void |
hideAllLegends()
Collapses all graphic representation of layer legends
|
void |
hideLegend(FLayer lyr)
Makes layer legend details not visible
|
void |
invokeAction(FLayer lyr,
String action)
Invokes a certain action on a certain layer
|
void |
nameChanged(LayerEvent e)
Called when the name of a layer has changed.
|
protected void |
processTreeMouseEvent(MouseEvent e) |
void |
removeActiveLayerChangeListener(ActiveLayerChangeEventListener alcel)
Removes a active layer change listener
|
void |
removeLayerActionListener(LayerActionEventListener lel)
Removes a layer action listener
|
void |
removeLegendActionListener(LegendActionEventListener lel)
Removes a legend action listener
|
void |
selectLayer(FLayer lyr)
Add a layer to the set of selected layers
|
void |
setActiveLayer(FLayer lyr)
Sets a layer as active (exclusively: the number of active layers must be
0 or 1)
|
void |
setImageProvider(PortableViewTocImageProvider imageProvider)
Sets the image provider for TOC tree elements
|
void |
show(FLayer lyr,
boolean detailed)
Makes the name and representation of a certain layer visible in the TOC.
|
void |
showAll()
Expands fully the graphic representation of the TOC (for example, expands
all
the nodes to show all layer details)
|
void |
showAllLegends()
Expands all graphic representation of layer legends
|
void |
showLegend(FLayer lyr)
Makes layer legend details visible
|
void |
unselectLayer(FLayer lyr)
Removes a layer from the set of selected layers
|
void |
valueChanged(TreeSelectionEvent e) |
void |
visibilityChanged(LayerEvent e)
Called when the visibility of a layer has changed.
|
getAccessibleContext, getUI, getUIClassID, paramString, setUI, updateUI
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
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
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, getPeer, 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, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, setSize, show, show, size, toString, transferFocus, transferFocusBackward, transferFocusUpCycle
public void setImageProvider(PortableViewTocImageProvider imageProvider)
PortableViewToc
setImageProvider
in interface PortableViewToc
public JComponent getSwingComponent()
getSwingComponent
in interface PortableViewSwingComponent
public FLayer[] getSelectedLayers()
getSelectedLayers
in interface TOC
public void attachTo(PortableViewViewer viewer)
attachTo
in interface PortableViewToc
public PortableViewViewer getViewer()
getViewer
in interface PortableViewToc
public DynObject getParameters()
TOC
getParameters
in interface TOC
public TOCFactory getFactory()
getFactory
in interface TOC
public JComponent getComponent()
getComponent
in interface TOC
public MapContext getMapContext()
getMapContext
in interface TOC
public void showAll()
TOC
public void hideAll()
TOC
public void showAllLegends()
TOC
showAllLegends
in interface TOC
public void hideAllLegends()
TOC
hideAllLegends
in interface TOC
public void show(FLayer lyr, boolean detailed)
TOC
public void showLegend(FLayer lyr)
TOC
showLegend
in interface TOC
lyr
- layer whose legend details must be shownpublic void hideLegend(FLayer lyr)
TOC
hideLegend
in interface TOC
lyr
- layer whose legend details must be hiddenpublic void selectLayer(FLayer lyr)
TOC
selectLayer
in interface TOC
lyr
- layer which must be selected (not exclusively)public void unselectLayer(FLayer lyr)
TOC
unselectLayer
in interface TOC
lyr
- layer which must be unselectedpublic void clearSelection()
TOC
clearSelection
in interface TOC
public void setActiveLayer(FLayer lyr)
TOC
setActiveLayer
in interface TOC
lyr
- layer to be set as active or null to have 0 layers activepublic FLayer getActiveLayer()
getActiveLayer
in interface TOC
public void invokeAction(FLayer lyr, String action)
TOC
invokeAction
in interface TOC
lyr
- the layer on which the action will be performedaction
- the action to be performedpublic void addLegendActionListener(LegendActionEventListener lel)
TOC
addLegendActionListener
in interface TOC
lel
- new legend action listenerpublic void removeLegendActionListener(LegendActionEventListener lel)
TOC
removeLegendActionListener
in interface TOC
lel
- legend action listener to be removedpublic void addLayerActionListener(LayerActionEventListener lel)
TOC
addLayerActionListener
in interface TOC
lel
- new layer action listenerpublic void removeLayerActionListener(LayerActionEventListener lel)
TOC
removeLayerActionListener
in interface TOC
lel
- layer action listener to be removedpublic void addActiveLayerChangeListener(ActiveLayerChangeEventListener alcel)
TOC
addActiveLayerChangeListener
in interface TOC
alcel
- new active layer change listenerpublic void removeActiveLayerChangeListener(ActiveLayerChangeEventListener alcel)
TOC
removeActiveLayerChangeListener
in interface TOC
alcel
- active layer change listener to be removedpublic Manager getManager()
Service
Manager
which manages this server.getManager
in interface Service
Manager
public void visibilityChanged(LayerEvent e)
LayerListener
Called when the visibility of a layer has changed.
visibilityChanged
in interface LayerListener
e
- a visibility changed layer event objectpublic void activationChanged(LayerEvent e)
LayerListener
Called when the activation of a layer has changed.
activationChanged
in interface LayerListener
e
- an activation changed layer event objectpublic void nameChanged(LayerEvent e)
LayerListener
Called when the name of a layer has changed.
nameChanged
in interface LayerListener
e
- a name changed layer event objectpublic void editionChanged(LayerEvent e)
LayerListener
Called when the edition of a layer has changed.
editionChanged
in interface LayerListener
e
- an edition changed layer event objectpublic void drawValueChanged(LayerEvent e)
LayerListener
Called when a draw value of a layer has changed.
drawValueChanged
in interface LayerListener
e
- an edition changed layer event objectprotected void processTreeMouseEvent(MouseEvent e)
public void valueChanged(TreeSelectionEvent e)
valueChanged
in interface TreeSelectionListener