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
Nested Classes -
Field Summary
Fields inherited from class com.kheops.jmap.client.layers.AbstractLayerTreeNode
VISIBILITY_MIXED, VISIBILITY_NO, VISIBILITY_YES -
Constructor Summary
ConstructorsConstructorDescriptionLayerTreeGroup(String name, int id, boolean visible) LayerTreeGroup(String name, int id, boolean visible, AbstractLayerTreeNode[] layerNodes) -
Method Summary
Modifier and TypeMethodDescriptionbooleanaccept(LayerTreeVisitor visitor) voidaddLayerNode(AbstractLayerTreeNode layerNode) children()clone()This method will create a clone of the LayerTreeGroup.booleangetChildAt(int index) intgetDescription(Locale locale) getHierarchyPathToLayer(LayerTreeGroup layerTreeGroup, int layerId, Locale locale) Recursively seek the path to a layerintgetLayerTreeNode(int nodeId) getLayerTreeNode(String nodeName) intvoidgetTreeVisibility(LayerVisibilitySet layerVisibility) booleanisLeaf()booleanremoveLayerNode(int nodeId) Removes the layer node corresponding to the specified id from the tree.booleanremoveLayerNode(AbstractLayerTreeNode layerNode) Removes the specified layer node from the tree.voidremoveTranslationsOtherThan(Locale[] locales) Removes anyLocalefrom this object that are not in the specifiedlocales.booleanreplaceLayerNode(AbstractLayerTreeNode oldLayerNode, AbstractLayerTreeNode newLayerNode) Removes the specified layer node from the tree.voidsetDescription(String description, Locale locale) voidMethods inherited from class com.kheops.jmap.client.layers.AbstractLayerTreeNode
getId, getName, getParent, isNamed, isVisible, setVisible, toStringMethods 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:
getNamein classAbstractLayerTreeNode
-
setName
-
getDescription
-
setDescription
-
getAllowsChildren
public boolean getAllowsChildren()- Specified by:
getAllowsChildrenin interfaceTreeNode
-
getChildAt
- Specified by:
getChildAtin interfaceTreeNode
-
getChildCount
public int getChildCount()- Specified by:
getChildCountin interfaceTreeNode
-
getIndex
-
children
-
isLeaf
public boolean isLeaf() -
getTreeVisibility
- Specified by:
getTreeVisibilityin classAbstractLayerTreeNode
-
getTreeVisibility
public int getTreeVisibility()- Specified by:
getTreeVisibilityin classAbstractLayerTreeNode
-
getLayerTreeNode
-
getLayerTreeNode
-
accept
- Specified by:
acceptin 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:LocalizedObjectRemoves anyLocalefrom this object that are not in the specifiedlocales.locales[0]should be the default language- Overrides:
removeTranslationsOtherThanin classLocalizedObject- Parameters:
locales-
-