Class DAGExpandCollapseManager
- All Implemented Interfaces:
- ExpandCollapseManager
 An ExpandCollapseManager specialized for Directed Acyclic Graphs. It
 works correctly only when all connections are directed (and of course nodes
 form an acyclic graph). It's supposed to be used with
 InternalLayoutContext.
 
When a node is collapsed, all its outgoing connections are hidden and these successors that have no visible incoming nodes are pruned. When a node is expanded, all its successors are unpruned and connections pointing to them are shown.
 NOTE: A Graph using this manager should use
 DefaultSubgraph, which doesn't show any information about subgraphs
 in the graph. That's because for this manager it doesn't matter which
 subgraph a node belongs to (each pruning creates a new subgraph). Also, this
 manager adds a label to each collapsed node showing number of its successors.
 
Graph.- Since:
- 1.14
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionbooleancanCollapse(LayoutContext context, NodeLayout node) Checks if given node can be collapsed.booleancanExpand(LayoutContext context, NodeLayout node) Checks if given node can be expanded.voidinitExpansion(LayoutContext context2) Initializes the expansion state of all nodes in given layout context.voidsetExpanded(LayoutContext context, NodeLayout node, boolean expanded) Changes the expanded state of given node.
- 
Constructor Details- 
DAGExpandCollapseManagerpublic DAGExpandCollapseManager()
 
- 
- 
Method Details- 
initExpansionDescription copied from interface:ExpandCollapseManagerInitializes 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.- Specified by:
- initExpansionin interface- ExpandCollapseManager
- Parameters:
- context2- the context to initialize
 
- 
canCollapseDescription copied from interface:ExpandCollapseManagerChecks if given node can be collapsed.- Specified by:
- canCollapsein interface- ExpandCollapseManager
- Parameters:
- context- context containing the node
- node- node to check
 
- 
canExpandDescription copied from interface:ExpandCollapseManagerChecks if given node can be expanded.- Specified by:
- canExpandin interface- ExpandCollapseManager
- Parameters:
- context- context containing the node
- node- node to check
 
- 
setExpandedDescription copied from interface:ExpandCollapseManagerChanges 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.- Specified by:
- setExpandedin interface- ExpandCollapseManager
- Parameters:
- context- context in which to perform the operation
- node- node to expand or collapse
- expanded- true to expand, false to collapse
 
 
-