| |
|
| org.cougaar.tools.csmart.ui.tree.DNDTree org.cougaar.tools.csmart.ui.tree.ConsoleDNDTree
ConsoleDNDTree | public class ConsoleDNDTree extends DNDTree (Code) | | Provides method definitions for abstract methods in DNDTree.
Encapsulates all information specific to the drag-and-drop
trees in the Console tool, leaving DNDTree as the generic
drag-and-drop tree class.
|
addElement | public int addElement(Transferable transferable, DefaultMutableTreeNode target, DefaultMutableTreeNode before)(Code) | | Adds dropped object to this tree; called by drop method.
Object is either a ConsoleTreeObject or a DefaultMutableTreeNode
depending on whether the user is dragging a leaf or a node.
Returns true if successful.
This handles the tree and the CSMARTConsole class handles
notifying the configurable components.
|
isDraggable | public boolean isDraggable(Object selected)(Code) | | Return true if object can be dragged and false otherwise.
|
isDroppable | protected int isDroppable(DataFlavor[] flavors, DefaultMutableTreeNode target)(Code) | | The node being dropped contains either a NodeComponent or AgentComponent.
Uses ConsoleTreeObject class to enforce these rules:
no component type can be dropped on itself
nodes can't be dropped on the "Unassigned Agents" tree root
nodes can't be dropped on agents
agents can't be dropped on hosts (they have to be dropped on nodes)
agents can't be dropped on the "Unassigned Nodes" tree root.
|
makeDraggableObject | public Transferable makeDraggableObject(Object o)(Code) | | Make a draggable object from a DefaultMutableTreeNode.
|
supportsMultiDrag | protected boolean supportsMultiDrag()(Code) | | |
|
|
|