Package com.kheops.jmap.client.layers
Class LayerTreeGroup
java.lang.Object
com.kheops.jmap.metadata.LocalizedObject
com.kheops.jmap.client.layers.AbstractLayerTreeNode
com.kheops.jmap.client.layers.LayerTreeGroup
- All Implemented Interfaces:
Serializable
,Cloneable
,TreeNode
- Direct Known Subclasses:
LayerTreeGroup.TreeRoot
- See Also:
-
Nested Class Summary
-
Field Summary
Fields inherited from class com.kheops.jmap.client.layers.AbstractLayerTreeNode
VISIBILITY_MIXED, VISIBILITY_NO, VISIBILITY_YES
-
Constructor Summary
ConstructorDescriptionLayerTreeGroup
(String name, int id, boolean visible) LayerTreeGroup
(String name, int id, boolean visible, AbstractLayerTreeNode[] layerNodes) -
Method Summary
Modifier and TypeMethodDescriptionboolean
accept
(LayerTreeVisitor visitor) void
addLayerNode
(AbstractLayerTreeNode layerNode) children()
clone()
This method will create a clone of the LayerTreeGroup.boolean
getChildAt
(int index) int
getDescription
(Locale locale) getHierarchyPathToLayer
(LayerTreeGroup layerTreeGroup, int layerId, Locale locale) Recursively seek the path to a layerint
getLayerTreeNode
(int nodeId) getLayerTreeNode
(String nodeName) int
void
getTreeVisibility
(LayerVisibilitySet layerVisibility) boolean
isLeaf()
boolean
removeLayerNode
(int nodeId) Removes the layer node corresponding to the specified id from the tree.boolean
removeLayerNode
(AbstractLayerTreeNode layerNode) Removes the specified layer node from the tree.void
removeTranslationsOtherThan
(Locale[] locales) Removes anyLocale
from this object that are not in the specifiedlocales
.boolean
replaceLayerNode
(AbstractLayerTreeNode oldLayerNode, AbstractLayerTreeNode newLayerNode) Removes the specified layer node from the tree.void
setDescription
(String description, Locale locale) void
Methods inherited from class com.kheops.jmap.client.layers.AbstractLayerTreeNode
getId, getName, getParent, isNamed, isVisible, setVisible, toString
Methods inherited from class com.kheops.jmap.metadata.LocalizedObject
getAvailableLocales, getTranslation, isTranslationExists, setTranslation, updateTranslations
-
Constructor Details
-
LayerTreeGroup
public LayerTreeGroup() -
LayerTreeGroup
-
LayerTreeGroup
-
-
Method Details
-
addLayerNode
-
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
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
- Specified by:
getName
in classAbstractLayerTreeNode
-
setName
-
getDescription
-
setDescription
-
getAllowsChildren
public boolean getAllowsChildren()- Specified by:
getAllowsChildren
in interfaceTreeNode
-
getChildAt
- Specified by:
getChildAt
in interfaceTreeNode
-
getChildCount
public int getChildCount()- Specified by:
getChildCount
in interfaceTreeNode
-
getIndex
-
children
-
isLeaf
public boolean isLeaf() -
getTreeVisibility
- Specified by:
getTreeVisibility
in classAbstractLayerTreeNode
-
getTreeVisibility
public int getTreeVisibility()- Specified by:
getTreeVisibility
in classAbstractLayerTreeNode
-
getLayerTreeNode
-
getLayerTreeNode
-
accept
- Specified by:
accept
in classAbstractLayerTreeNode
-
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. -
removeTranslationsOtherThan
Description copied from class:LocalizedObject
Removes anyLocale
from this object that are not in the specifiedlocales
.locales[0]
should be the default language- Overrides:
removeTranslationsOtherThan
in classLocalizedObject
- Parameters:
locales
-
-