| org.cougaar.tools.csmart.ui.tree.DNDTree org.cougaar.tools.csmart.ui.viewer.OrganizerTree
Constructor Summary | |
public | OrganizerTree(DefaultTreeModel model) Construct a tree from which objects can be dragged and dropped,
and which is used to represent the workspace containing experiments,
societies, recipes, etc. |
OrganizerTree | public OrganizerTree(DefaultTreeModel model)(Code) | | Construct a tree from which objects can be dragged and dropped,
and which is used to represent the workspace containing experiments,
societies, recipes, etc.
Parameters: model - the model for the tree |
addElement | public int addElement(Transferable t, DefaultMutableTreeNode target, DefaultMutableTreeNode before)(Code) | | Add the dragged element to the drop site.
If the dragged element has children, they are moved as well.
If the before argument is null, then the dragged element
is dropped at the end of the target's children.
Parameters: t - the transferable for the dragged element Parameters: target - where to drop the element Parameters: before - optional, drop the element before this node in the target |
isDraggable | public boolean isDraggable(Object o)(Code) | | The object is draggable if it's not root and it's not
inside an experiment.
Parameters: o - test if this object can be dragged |
isDroppable | public int isDroppable(DataFlavor[] possibleFlavors, DefaultMutableTreeNode target)(Code) | | Allows drop if target is either root or a folder;
allows any source as long as it's from this tree.
Parameters: possibleFlavors - possible flavors of the source Parameters: target - where the source will be dropped |
makeDraggableObject | public Transferable makeDraggableObject(Object o)(Code) | | Make a transferable object from the specified object.
The specified object must be a DefaultMutableTreeNode .
Parameters: o - the object to drag |
setSelection | public void setSelection(TreeNode treeNode)(Code) | | Set the selection in the tree to be the specified tree node.
Parameters: treeNode - the tree node to select |
supportsMultiDrag | protected boolean supportsMultiDrag()(Code) | | Overwrites DNDTree supportsMultiDrag to support multi-drag.
boolean returns true |
|
|