public class LayerManagerPanel extends AbstractFeaturePanel implements LayerManager, TreeModelListener
panelcontroller, featureIDchangeSupport, enabledACCELERATOR_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, getJPanelactionPerformed, addToToolBar, doActionPerformed, doPropertyChange, getController, getFeatureID, getName, getStringValue, isInitialized, propertyChange, register, setMenuAccelleratoraddPropertyChangeListener, clone, firePropertyChange, getKeys, getPropertyChangeListeners, getValue, isEnabled, putValue, removePropertyChangeListener, setEnabledequals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetFeatureID, getNameisInitializedaddPropertyChangeListener, getValue, isEnabled, putValue, removePropertyChangeListener, setEnabledactionPerformedpropertyChangepublic LayerManagerPanel(Registry registry)
public void addGroup(LayerPath pathToGroup)
addGroup in interface LayerManagerpublic void addLayer(Layer layer, LayerPath pathToParent)
addLayer in interface LayerManagerpublic boolean containsPath(LayerPath pathToGroup)
containsPath in interface LayerManagerprotected void createLayer(LayerNode layerNode)
protected LayerTreeNode createPath(LayerPath path)
public void enableGroupSelection(LayerPath path, boolean tf)
LayerManagerenableGroupSelection in interface LayerManagerpath - 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)
LayerManagerexpandGroup in interface LayerManagergroupName - the name of the group.public void expandPath(LayerPath path)
expandPath in interface LayerManagerpublic Layer findLayerByTitle(String layerTitle, String groupTitle)
findLayerByTitle in interface LayerManagerpublic String getDefaultGroupName()
public LayerPath getDefaultGroupPath()
LayerManagergetDefaultGroupPath in interface LayerManagerpublic Layer getLayerFromPath(LayerPath path)
LayerManagergetLayerFromPath in interface LayerManagerpath - the path to the layer.protected LayerTreeModel getModel()
public LayerNode getNode(LayerPath path)
getNode in interface LayerManagerprotected void handleGroupSelection(LayerTreeNode group, LayerList layerList)
protected void handleLayerSelection(LayerTreeNode treeNode, LayerList layerList)
public void initialize(Controller controller)
initialize in interface Initializableinitialize in class AbstractFeaturePanelprotected boolean insertAfterPreviousSibling(LayerTreeNode treeNode, LayerList layerList)
protected boolean insertBeforeSubsequentSibling(LayerTreeNode treeNode, LayerList layerList)
public boolean isOn()
isOn in interface FeatureisOn in class AbstractFeaturepublic boolean isTwoState()
FeatureisTwoState in interface FeatureisTwoState in class AbstractFeatureprotected void performSmartInsertion(LayerTreeNode treeNode, LayerList layerList)
public void redraw()
redraw in interface LayerManagerpublic void removeLayer(Layer layer)
removeLayer in interface LayerManagerpublic void removeLayer(LayerNode layerNode)
public void removeLayer(LayerPath path)
removeLayer in interface LayerManagerpublic void removeLayers(LayerList layerList)
removeLayers in interface LayerManagerpublic void scrollToLayer(Layer layer)
scrollToLayer in interface LayerManagerpublic void selectLayer(Layer layer, boolean tf)
selectLayer in interface LayerManagerpublic void treeNodesChanged(TreeModelEvent event)
treeNodesChanged in interface TreeModelListenerpublic void treeNodesInserted(TreeModelEvent event)
treeNodesInserted in interface TreeModelListenerpublic void treeNodesRemoved(TreeModelEvent event)
treeNodesRemoved in interface TreeModelListenerpublic void treeStructureChanged(TreeModelEvent event)
treeStructureChanged in interface TreeModelListenerpublic void turnOn(boolean tf)
turnOn in interface FeatureturnOn in class AbstractFeatureprotected void updateGroupSelection(LayerTreeNode groupNode)
protected void updateGroupSelections()