visman::components::visman_core::LayerList
Overview
interface LayerList extends Observable
Represents a hierarchical collection of layers and their visibility states.
Layers are organized in a tree structure, allowing nested groups of layers.
Operation Index
- getPolicy
-
Returns the policy that defines how this layer list behaves
(e.g.
- setPolicy
-
Sets the behavior policy of this layer list.
- getTreeRoot
-
Returns the root node of the layer hierarchy.
- asTree
-
Returns all top-level layers in the hierarchy.
- addLayerAt
-
Adds a new layer under the specified parent path.
- removeLayerAt
-
Removes a layer identified by its full path.
- setLayerVisibilityAt
-
Changes the visibility state of a layer identified by its path.
- getLayerVisibilityAt
-
Returns the visibility state of a layer identified by its path.
- moveLayer
-
Moves a layer (including its subtree) to a new parent in the hierarchy.
- renameLayer
-
Renames a layer node.
Operations
Returns the policy that defines how this layer list behaves
(e.g. include list, exclude list).
Return Value
The current ListPolicy of this layer list.
Sets the behavior policy of this layer list.
Parameters
- p
-
The new ListPolicy to apply.
Returns the root node of the layer hierarchy.
The root itself is typically an internal container node.
Return Value
The root LayerNode of the hierarchy.
Returns all top-level layers in the hierarchy.
This is useful for building tree views in user interfaces.
Return Value
A sequence of root-level LayerNode objects.
Adds a new layer under the specified parent path.
An empty parentPath means the layer is added at the root level.
Parameters
- parentPath
-
Path to the parent layer.
- name
-
Name of the new layer.
- visible
-
Initial visibility state.
Exceptions
- InvalidName
-
If the layer name does not meet naming rules.
- DuplicateEntity
-
If a sibling layer with the same name already exists.
Removes a layer identified by its full path.
All child layers are removed recursively.
Parameters
- path
-
Full path of the layer to remove.
Exceptions
- InvalidName
-
If no layer with the given path exists.
void setLayerVisibilityAt(LayerPath path, bool visible) throws InvalidName
Changes the visibility state of a layer identified by its path.
Parameters
- path
-
Full path of the layer.
- visible
-
New visibility state.
Exceptions
- InvalidName
-
If no layer with the given path exists.
Returns the visibility state of a layer identified by its path.
Parameters
- path
-
Full path of the layer.
Return Value
True if visible, false if hidden.
Exceptions
- InvalidName
-
If no layer with the given path exists.
Moves a layer (including its subtree) to a new parent in the hierarchy.
Parameters
- path
-
Full path of the layer to move.
- newParentPath
-
Path of the new parent layer.
Exceptions
- InvalidName
-
If either path does not exist.
- DuplicateEntity
-
If the target parent already contains a child with the same name.
Renames a layer node. Only the last path segment (the node itself)
is renamed; its parent hierarchy remains unchanged.
Parameters
- path
-
Full path of the layer to rename.
- newName
-
The new name for the layer.
Exceptions
- InvalidName
-
If the path does not exist or the name is invalid.
- DuplicateEntity
-
If a sibling layer with the new name already exists.