public class LayerManagerPanel extends AbstractFeaturePanel implements LayerManager, TreeModelListener
panel
controller, featureID
changeSupport, enabled
ACCELERATOR_KEY, ACTION_COMMAND_KEY, DEFAULT, DISPLAYED_MNEMONIC_INDEX_KEY, LARGE_ICON_KEY, LONG_DESCRIPTION, MNEMONIC_KEY, NAME, SELECTED_KEY, SHORT_DESCRIPTION, SMALL_ICON
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(String groupName)
Expands the display of the group so that all layers are visibly listed.
|
void |
expandPath(LayerPath path) |
Layer |
findLayerByTitle(String layerTitle,
String groupTitle) |
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(TreeModelEvent event) |
void |
treeNodesInserted(TreeModelEvent event) |
void |
treeNodesRemoved(TreeModelEvent event) |
void |
treeStructureChanged(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
addPropertyChangeListener, getValue, isEnabled, putValue, removePropertyChangeListener, setEnabled
actionPerformed
propertyChange
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(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(String layerTitle, String groupTitle)
findLayerByTitle
in interface LayerManager
public 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(TreeModelEvent event)
treeNodesChanged
in interface TreeModelListener
public void treeNodesInserted(TreeModelEvent event)
treeNodesInserted
in interface TreeModelListener
public void treeNodesRemoved(TreeModelEvent event)
treeNodesRemoved
in interface TreeModelListener
public void treeStructureChanged(TreeModelEvent event)
treeStructureChanged
in interface TreeModelListener
public void turnOn(boolean tf)
turnOn
in interface Feature
turnOn
in class AbstractFeature
protected void updateGroupSelection(LayerTreeNode groupNode)
protected void updateGroupSelections()