|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectcom.tensegrity.gui.swing.control.tree.strategy.AbstractTreeStrategy
com.tensegrity.gui.swing.control.tree.strategy.AbstractVisualGraphTreeStrategy
This abstract class offers another abstract layer above the
AbstractTreeStrategy abstract class it extends in order to provide more
default methods implementation that can be used for concrete "strategies"
associated to VisualGraphs.
It also implements the VisualGraphListener interface and these abstract class
should be extended by all concrete strategy implementation associated to
VisualGraphs.
The default Comparator return by the getComparator
factory method uses the VisualGraphObjectTreeNode Ids in order
to compare the different Tree Nodes.
AbstractTreeStrategy,
VisualGraphListener,
TreeOutliner,
DefaultVisualGraphTreeStrategy| Field Summary | |
static java.lang.String |
DOCUMENT_TYPE_KEY
represents the type of Document this strategy is associated to. |
static int |
VISUAL_EDGE_TREE_NODE
represents a tree node for visual edges |
static int |
VISUAL_NODE_TREE_NODE
represents a tree node for visual nodes |
static int |
VISUAL_SUBGRAPH_TREE_NODE
represents a tree node for visual subgraphs |
| Constructor Summary | |
protected |
AbstractVisualGraphTreeStrategy(UIManager uiManager)
Initializes instances of this class with the passed UIManager |
protected |
AbstractVisualGraphTreeStrategy(UIManager uiManager,
TreeOutliner tree)
Initializes instances of this class with the passed UIManager and TreeOutliner instances |
| Method Summary | |
void |
addNode(javax.swing.tree.DefaultMutableTreeNode parent,
javax.swing.tree.DefaultMutableTreeNode node)
Override addNode in order to keep documentIdNodeMap up to
date. |
java.util.Comparator |
getComparator(boolean asc)
Default implementation. |
javax.swing.tree.DefaultMutableTreeNode |
getNewTreeNode(int subClassType,
java.lang.Object documentObject)
Possible values for subClassType are: AbstractVisualGraphTreeStrategy.VISUAL_EDGE_TREE_NODE AbstractVisualGraphTreeStrategy.VISUAL_NODE_TREE_NODE AbstractVisualGraphTreeStrategy.VISUAL_SUBGRAPH_TREE_NODE |
| Methods inherited from class com.tensegrity.gui.swing.control.tree.strategy.AbstractTreeStrategy |
findNodeByID, getActiveDocument, getDocumentIdNodeMap, getDocumentModelMap, getIdNodeMap, getModel, getRoot, getTree, getUIManager, initializeModel, removeModel, setActiveDocument, setModel, setTree, updateNode |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface com.tensegrity.graph.event.VisualGraphListener |
isolatedVisualEdgeAdded, isolatedVisualEdgeRemoved, layout, visualEdgeAdded, visualEdgeAttachRejected, visualEdgeRemoved, visualEdgeSplit, visualNodeAdded, visualNodeDeleteEdgeCascade, visualNodeRemoved |
| Methods inherited from interface com.tensegrity.gui.swing.control.tree.strategy.TreeStrategy |
getParentIndex, removeNode |
| Field Detail |
public static final int VISUAL_EDGE_TREE_NODE
public static final int VISUAL_NODE_TREE_NODE
public static final int VISUAL_SUBGRAPH_TREE_NODE
public static final java.lang.String DOCUMENT_TYPE_KEY
| Constructor Detail |
protected AbstractVisualGraphTreeStrategy(UIManager uiManager,
TreeOutliner tree)
Initializes instances of this class with the passed UIManager and TreeOutliner instances
uiManager - the application UIManager.tree - the TreeOutliner to which this
strategy is applied.protected AbstractVisualGraphTreeStrategy(UIManager uiManager)
Initializes instances of this class with the passed UIManager
uiManager - the application UIManager.| Method Detail |
public void addNode(javax.swing.tree.DefaultMutableTreeNode parent,
javax.swing.tree.DefaultMutableTreeNode node)
documentIdNodeMap up to
date.
addNode in interface TreeStrategyaddNode in class AbstractTreeStrategyTreeStrategy.addNode(javax.swing.tree.DefaultMutableTreeNode, javax.swing.tree.DefaultMutableTreeNode)
public javax.swing.tree.DefaultMutableTreeNode getNewTreeNode(int subClassType,
java.lang.Object documentObject)
getNewTreeNode in interface TreeStrategysubClassType - To be defined will implementing this method. This parameter
should allow distinguishing possible subClasses of
DefaultMutableTreeNode required by the caller.documentObject - This is the object located on the active document for which a
TreeNode is required.
TreeStrategy.getNewTreeNode(int, java.lang.Object),
VisualEdgeTreeNode,
VisualNodeTreeNode,
VisualSubgraphTreeNodepublic java.util.Comparator getComparator(boolean asc)
Default implementation. Returns the default instance of Comparator that can be used in order to sort VisualNodes
getComparator in interface OutlinerStrategyasc - True if an ascending sorting is required, false if a descending sorting
is required.
ComparatorOutlinerStrategy.getComparator(boolean)
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||