Class LayerTreeGroup

All Implemented Interfaces:
Serializable, Cloneable, TreeNode
Direct Known Subclasses:
LayerTreeGroup.TreeRoot

public class LayerTreeGroup extends AbstractLayerTreeNode implements Cloneable
See Also:
  • Constructor Details

    • LayerTreeGroup

      public LayerTreeGroup()
    • LayerTreeGroup

      public LayerTreeGroup(String name, int id, boolean visible)
    • LayerTreeGroup

      public LayerTreeGroup(String name, int id, boolean visible, AbstractLayerTreeNode[] layerNodes)
  • Method Details

    • addLayerNode

      public void addLayerNode(AbstractLayerTreeNode layerNode)
    • replaceLayerNode

      public boolean replaceLayerNode(AbstractLayerTreeNode oldLayerNode, AbstractLayerTreeNode newLayerNode)
      Removes the specified layer node from the tree.
      Parameters:
      oldLayerNode - the layer node to remove.
      newLayerNode - the layer node to add.
      Returns:
      whether the removal was successful.
    • removeLayerNode

      public boolean removeLayerNode(AbstractLayerTreeNode layerNode)
      Removes the specified layer node from the tree.
      Parameters:
      layerNode - the layer node to remove.
      Returns:
      whether the removal was successful.
    • removeLayerNode

      public boolean removeLayerNode(int nodeId)
      Removes the layer node corresponding to the specified id from the tree.
      Parameters:
      nodeId - the layer id to remove.
      Returns:
      whether the removal was successful.
    • getHierarchyPathToLayer

      public List<String> getHierarchyPathToLayer(LayerTreeGroup layerTreeGroup, int layerId, Locale locale)
      Recursively seek the path to a layer
    • getName

      public String getName(Locale locale)
      Specified by:
      getName in class AbstractLayerTreeNode
    • setName

      public void setName(String name, Locale locale)
    • getDescription

      public String getDescription(Locale locale)
    • setDescription

      public void setDescription(String description, Locale locale)
    • getAllowsChildren

      public boolean getAllowsChildren()
      Specified by:
      getAllowsChildren in interface TreeNode
    • getChildAt

      public TreeNode getChildAt(int index)
      Specified by:
      getChildAt in interface TreeNode
    • getChildCount

      public int getChildCount()
      Specified by:
      getChildCount in interface TreeNode
    • getIndex

      public int getIndex(TreeNode node)
      Specified by:
      getIndex in interface TreeNode
    • children

      public Enumeration children()
      Specified by:
      children in interface TreeNode
    • isLeaf

      public boolean isLeaf()
      Specified by:
      isLeaf in interface TreeNode
    • getTreeVisibility

      public void getTreeVisibility(LayerVisibilitySet layerVisibility)
      Specified by:
      getTreeVisibility in class AbstractLayerTreeNode
    • getTreeVisibility

      public int getTreeVisibility()
      Specified by:
      getTreeVisibility in class AbstractLayerTreeNode
    • getLayerTreeNode

      public AbstractLayerTreeNode getLayerTreeNode(int nodeId)
    • getLayerTreeNode

      public AbstractLayerTreeNode getLayerTreeNode(String nodeName)
    • accept

      public boolean accept(LayerTreeVisitor visitor)
      Specified by:
      accept in class AbstractLayerTreeNode
    • clone

      public Object clone()
      This method will create a clone of the LayerTreeGroup. Note: This will not clone the children of the LayerTreeGroup, but only the LayerTreeGroup itself, the LayerTreeGroup content has to be added manually.
      Overrides:
      clone in class Object
    • removeTranslationsOtherThan

      public void removeTranslationsOtherThan(Locale[] locales)
      Description copied from class: LocalizedObject
      Removes any Locale from this object that are not in the specified locales. locales[0] should be the default language
      Overrides:
      removeTranslationsOtherThan in class LocalizedObject
      Parameters:
      locales -