Package adams.gui.flow.tree
Class TreeNodeCollection
- java.lang.Object
-
- adams.gui.core.DragAndDropTreeNodeCollection<Node>
-
- adams.gui.flow.tree.TreeNodeCollection
-
- All Implemented Interfaces:
Transferable
,Serializable
,Iterable<Node>
,Collection<Node>
public class TreeNodeCollection extends DragAndDropTreeNodeCollection<Node>
Node collection for the flow editor.- Version:
- $Revision$
- Author:
- fracpete (fracpete at waikato dot ac dot nz)
- See Also:
- Serialized Form
-
-
Field Summary
-
Fields inherited from class adams.gui.core.DragAndDropTreeNodeCollection
m_Nodes
-
-
Constructor Summary
Constructors Constructor Description TreeNodeCollection(Node[] nodes)
Initializes the collection with all the nodes.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static TreeNodeCollection
fromTransferable(Tree tree, Transferable t)
Recreates the node collection from a transferable string.Transferable
toTransferable()
Turns the node/userObject into a transferable string.-
Methods inherited from class adams.gui.core.DragAndDropTreeNodeCollection
add, addAll, clear, contains, containsAll, getTransferData, getTransferDataFlavors, isDataFlavorSupported, isEmpty, iterator, remove, removeAll, retainAll, size, toArray, toArray
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface java.util.Collection
equals, hashCode, parallelStream, removeIf, spliterator, stream, toArray
-
-
-
-
Constructor Detail
-
TreeNodeCollection
public TreeNodeCollection(Node[] nodes)
Initializes the collection with all the nodes.- Parameters:
nodes
- the nodes for the collection
-
-
Method Detail
-
toTransferable
public Transferable toTransferable()
Turns the node/userObject into a transferable string. Uses the ClipboardActorContainer class to wrap around the actors from the nodes.- Overrides:
toTransferable
in classDragAndDropTreeNodeCollection<Node>
- Returns:
- the generated string
- See Also:
ClipboardActorContainer
-
fromTransferable
public static TreeNodeCollection fromTransferable(Tree tree, Transferable t)
Recreates the node collection from a transferable string.- Parameters:
tree
- the tree the node collection is fort
- the transferable to use- Returns:
- the node collection, null in case of an error
-
-