public class LayerManagerPanel extends AbstractFeaturePanel implements LayerManager, javax.swing.event.TreeModelListener
panel
controller, featureID
Constructor and Description |
---|
LayerManagerPanel(Registry registry) |
Modifier and Type | Method and Description |
---|---|
void |
addGroup(LayerPath pathToGroup) |
void |
addLayer(Layer layer,
LayerPath pathToParent) |
void |
addLayer(LayerNode layerNode,
LayerPath pathToParent) |
boolean |
containsPath(LayerPath pathToGroup) |
protected void |
createLayer(LayerNode layerNode) |
protected LayerTreeNode |
createPath(LayerPath path) |
void |
enableGroupSelection(LayerPath path,
boolean tf)
Enables or disables the ability to select a group as a whole and therby enable or disable all layers in that
group.
|
void |
expandGroup(java.lang.String groupName)
Expands the display of the group so that all layers are visibly listed.
|
void |
expandPath(LayerPath path) |
Layer |
findLayerByTitle(java.lang.String layerTitle,
java.lang.String groupTitle) |
java.lang.String |
getDefaultGroupName() |
LayerPath |
getDefaultGroupPath()
Returns a path to the group node of the default layer group, which is the group holding the base layers.
|
Layer |
getLayerFromPath(LayerPath path)
Returns the layer at the end of a specified path.
|
protected LayerTreeModel |
getModel() |
LayerNode |
getNode(LayerPath path) |
protected void |
handleGroupSelection(LayerTreeNode group,
LayerList layerList) |
protected void |
handleLayerSelection(LayerTreeNode treeNode,
LayerList layerList) |
void |
initialize(Controller controller) |
protected boolean |
insertAfterPreviousSibling(LayerTreeNode treeNode,
LayerList layerList) |
protected boolean |
insertBeforeSubsequentSibling(LayerTreeNode treeNode,
LayerList layerList) |
boolean |
isOn() |
boolean |
isTwoState()
Indicates whether the feature can be either on or off, without any other states.
|
protected void |
performSmartInsertion(LayerTreeNode treeNode,
LayerList layerList) |
void |
redraw() |
void |
removeLayer(Layer layer) |
void |
removeLayer(LayerNode layerNode) |
void |
removeLayer(LayerPath path) |
void |
removeLayers(LayerList layerList) |
void |
scrollToLayer(Layer layer) |
void |
selectLayer(Layer layer,
boolean tf) |
void |
treeNodesChanged(javax.swing.event.TreeModelEvent event) |
void |
treeNodesInserted(javax.swing.event.TreeModelEvent event) |
void |
treeNodesRemoved(javax.swing.event.TreeModelEvent event) |
void |
treeStructureChanged(javax.swing.event.TreeModelEvent event) |
void |
turnOn(boolean tf) |
protected void |
updateGroupSelection(LayerTreeNode groupNode) |
protected void |
updateGroupSelections() |
getDialogControls, getJPanel
actionPerformed, addToToolBar, doActionPerformed, doPropertyChange, getController, getFeatureID, getName, getStringValue, isInitialized, propertyChange, register, setMenuAccellerator
addPropertyChangeListener, clone, firePropertyChange, getKeys, getPropertyChangeListeners, getValue, isEnabled, putValue, removePropertyChangeListener, setEnabled
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getFeatureID, getName
isInitialized
public LayerManagerPanel(Registry registry)
public void addGroup(LayerPath pathToGroup)
addGroup
in interface LayerManager
public void addLayer(Layer layer, LayerPath pathToParent)
addLayer
in interface LayerManager
public boolean containsPath(LayerPath pathToGroup)
containsPath
in interface LayerManager
protected void createLayer(LayerNode layerNode)
protected LayerTreeNode createPath(LayerPath path)
public void enableGroupSelection(LayerPath path, boolean tf)
LayerManager
enableGroupSelection
in interface LayerManager
path
- the path to the group.tf
- true if group selection should be allowed, false if group selection should not be allowed.public void expandGroup(java.lang.String groupName)
LayerManager
expandGroup
in interface LayerManager
groupName
- the name of the group.public void expandPath(LayerPath path)
expandPath
in interface LayerManager
public Layer findLayerByTitle(java.lang.String layerTitle, java.lang.String groupTitle)
findLayerByTitle
in interface LayerManager
public java.lang.String getDefaultGroupName()
public LayerPath getDefaultGroupPath()
LayerManager
getDefaultGroupPath
in interface LayerManager
public Layer getLayerFromPath(LayerPath path)
LayerManager
getLayerFromPath
in interface LayerManager
path
- the path to the layer.protected LayerTreeModel getModel()
public LayerNode getNode(LayerPath path)
getNode
in interface LayerManager
protected void handleGroupSelection(LayerTreeNode group, LayerList layerList)
protected void handleLayerSelection(LayerTreeNode treeNode, LayerList layerList)
public void initialize(Controller controller)
initialize
in interface Initializable
initialize
in class AbstractFeaturePanel
protected boolean insertAfterPreviousSibling(LayerTreeNode treeNode, LayerList layerList)
protected boolean insertBeforeSubsequentSibling(LayerTreeNode treeNode, LayerList layerList)
public boolean isOn()
isOn
in interface Feature
isOn
in class AbstractFeature
public boolean isTwoState()
Feature
isTwoState
in interface Feature
isTwoState
in class AbstractFeature
protected void performSmartInsertion(LayerTreeNode treeNode, LayerList layerList)
public void redraw()
redraw
in interface LayerManager
public void removeLayer(Layer layer)
removeLayer
in interface LayerManager
public void removeLayer(LayerNode layerNode)
public void removeLayer(LayerPath path)
removeLayer
in interface LayerManager
public void removeLayers(LayerList layerList)
removeLayers
in interface LayerManager
public void scrollToLayer(Layer layer)
scrollToLayer
in interface LayerManager
public void selectLayer(Layer layer, boolean tf)
selectLayer
in interface LayerManager
public void treeNodesChanged(javax.swing.event.TreeModelEvent event)
treeNodesChanged
in interface javax.swing.event.TreeModelListener
public void treeNodesInserted(javax.swing.event.TreeModelEvent event)
treeNodesInserted
in interface javax.swing.event.TreeModelListener
public void treeNodesRemoved(javax.swing.event.TreeModelEvent event)
treeNodesRemoved
in interface javax.swing.event.TreeModelListener
public void treeStructureChanged(javax.swing.event.TreeModelEvent event)
treeStructureChanged
in interface javax.swing.event.TreeModelListener
public void turnOn(boolean tf)
turnOn
in interface Feature
turnOn
in class AbstractFeature
protected void updateGroupSelection(LayerTreeNode groupNode)
protected void updateGroupSelections()