Interface ExpandCollapseManager
- All Known Implementing Classes:
DAGExpandCollapseManager
public interface ExpandCollapseManager
A manager that controls expanding and collapsing nodes in a Graph.
- Since:
- 2.0
-
Method Summary
Modifier and TypeMethodDescriptionboolean
canCollapse
(LayoutContext context, NodeLayout node) Checks if given node can be collapsed.boolean
canExpand
(LayoutContext context, NodeLayout node) Checks if given node can be expanded.void
initExpansion
(LayoutContext context) Initializes the expansion state of all nodes in given layout context.void
setExpanded
(LayoutContext context, NodeLayout node, boolean expanded) Changes the expanded state of given node.
-
Method Details
-
initExpansion
Initializes the expansion state of all nodes in given layout context. The receiver can initialize its internal state related to the layout context and add its listeners if necessary.- Parameters:
context
- the context to initialize
-
setExpanded
Changes the expanded state of given node. It prunes/unprunes nodes and hides/shows connections in the graph according to its policy. If requested operation cannot be currently performed on the node, it does nothing.- Parameters:
context
- context in which to perform the operationnode
- node to expand or collapseexpanded
- true to expand, false to collapse
-
canExpand
Checks if given node can be expanded.- Parameters:
context
- context containing the nodenode
- node to check
-
canCollapse
Checks if given node can be collapsed.- Parameters:
context
- context containing the nodenode
- node to check
-