|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.metamatrix.toolbox.ui.widget.transfer.AbstractDragAndDropController
com.metamatrix.toolbox.ui.widget.transfer.AbstractTreeNodeDragAndDropController
public abstract class AbstractTreeNodeDragAndDropController
Field Summary | |
---|---|
protected boolean |
allowsDropsBetweenNodes
|
protected boolean |
allowsDropsWithinNodes
|
protected static int |
dragNdx
|
protected static TreeNode |
dragParent
|
protected boolean |
dragSrc
|
protected static int |
dropNdx
|
protected static TreeNode |
dropParent
|
protected boolean |
dropTarget
|
protected static boolean |
validDragSrc
|
protected static boolean |
validDropTarget
|
protected TreeView |
view
|
protected boolean |
willDropAboveTarget
|
protected boolean |
willDropBelowTarget
|
protected boolean |
willDropOnTarget
|
protected static TransferableTreeNode |
xferable
|
Constructor Summary | |
---|---|
protected |
AbstractTreeNodeDragAndDropController(boolean allowsDropsWithinNodes,
boolean allowsDropsBetweenNodes)
|
Method Summary | |
---|---|
protected boolean |
addNode()
|
boolean |
allowsDropsBetweenNodes()
|
boolean |
allowsDropsWithinNodes()
|
protected void |
constructAbstractTreeNodeDragAndDropController(boolean allowsDropsWithinNodes,
boolean allowsDropsBetweenNodes)
|
void |
dragDropEnd(java.awt.dnd.DragSourceDropEvent event)
Sets drag-in-progress indicator to false. |
void |
dragEnter(java.awt.dnd.DropTargetDragEvent event)
Accepts TreeNode move & copy operations. |
void |
dragExit(java.awt.dnd.DragSourceEvent event)
Does nothing. |
void |
dragExit(java.awt.dnd.DropTargetEvent event)
Does nothing. |
void |
dragOver(java.awt.dnd.DragSourceDragEvent event)
Sets the cursor to reflect whether the node under the mouse is a legal drop target. |
void |
dragOver(java.awt.dnd.DropTargetDragEvent event)
Resets the will-drop-xxx-target and is-valid-drop-target indicators to false, resets the drop target to null. |
void |
drop(java.awt.dnd.DropTargetDropEvent event)
Moves or copies the dragged node to the drop location determined in the dragOver(DropTargetDragEvent) method. |
protected int |
getDefaultAllowedDragActions()
Gets the default allowed drag actions. |
protected int |
getDefaultAllowedDropActions()
Gets the default allowed drop actions. |
static int |
getDragIndex()
|
static TreeNode |
getDragParent()
|
static int |
getDropIndex()
|
static TreeNode |
getDropParent()
|
protected static TransferableTreeNode |
getTransferable()
|
protected TreeView |
getTreeView()
|
protected boolean |
getValidDragSource(java.awt.datatransfer.DataFlavor[] flavors)
|
protected boolean |
getValidDropTarget()
Retrieves whether the current component beneath the cursor is a valid drop target. |
protected boolean |
isDragCandidate(java.util.List dragNode)
|
protected boolean |
isDragSource()
|
protected boolean |
isDropTarget()
|
protected boolean |
isTreeNodeFlavor(java.awt.datatransfer.DataFlavor flavor)
|
protected static boolean |
isValidDragSource()
|
protected boolean |
moveNode()
|
void |
setAllowsDropsBetweenNodes(boolean allowsDropsBetweenNodes)
|
void |
setAllowsDropsWithinNodes(boolean allowsDropsWithinNodes)
|
protected void |
setDropNode(TreeNode dropNode,
boolean betweenNodes)
|
protected void |
setTreeView(TreeView view)
|
protected void |
setValidDropTarget(boolean valid)
Sets whether the current component beneath the cursor is a valid drop target. |
void |
setWillDropAboveTarget(boolean aboveTarget)
Sets whether a drop at the current mouse position will occur above the current drop target. |
void |
setWillDropBelowTarget(boolean belowTarget)
Sets whether a drop at the current mouse position will occur below the current drop target. |
void |
setWillDropOnTarget(boolean onTarget)
Sets whether a drop at the current mouse position will occur on the current drop target. |
protected void |
startDrag(java.awt.dnd.DragGestureEvent event,
java.util.List dragNode)
Begins drag operations, saving reference to node being dragged. |
protected void |
startDrag(java.awt.dnd.DragGestureEvent event,
TreeNode dragNode)
Begins drag operations, saving reference to node being dragged. |
protected boolean |
transferNode()
|
boolean |
willDropAboveTarget()
Returns whether a drop at the current mouse position will occur above the current drop target. |
boolean |
willDropBelowTarget()
Returns whether a drop at the current mouse position will occur below the current drop target. |
boolean |
willDropOnTarget()
Returns whether a drop at the current mouse position will occur on the current drop target. |
Methods inherited from class com.metamatrix.toolbox.ui.widget.transfer.AbstractDragAndDropController |
---|
constructAbstractDragAndDropController, debug, dragEnter, dragGestureRecognized, dropActionChanged, dropActionChanged, getActualDropAction, getAllowedDragActions, getAllowedDropActions, getComponent, getDragSource, getDropTarget, isDragging, setAllowedDragActions, setAllowedDropActions, setComponent, setDragSource, setDropTarget |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface com.metamatrix.toolbox.ui.widget.transfer.DragAndDropController |
---|
getAllowedDragActions, getAllowedDropActions, getComponent, getDragSource, getDropTarget, isDragging, setAllowedDragActions, setAllowedDropActions, setComponent |
Field Detail |
---|
protected static transient TreeNode dragParent
protected static transient TreeNode dropParent
protected static transient int dropNdx
protected static transient int dragNdx
protected static transient TransferableTreeNode xferable
protected static transient boolean validDragSrc
protected static transient boolean validDropTarget
protected boolean allowsDropsWithinNodes
protected boolean allowsDropsBetweenNodes
protected TreeView view
protected transient boolean dragSrc
protected transient boolean dropTarget
protected boolean willDropAboveTarget
protected boolean willDropBelowTarget
protected boolean willDropOnTarget
Constructor Detail |
---|
protected AbstractTreeNodeDragAndDropController(boolean allowsDropsWithinNodes, boolean allowsDropsBetweenNodes)
Method Detail |
---|
public static int getDragIndex()
public static TreeNode getDragParent()
public static int getDropIndex()
public static TreeNode getDropParent()
protected static TransferableTreeNode getTransferable()
protected static boolean isValidDragSource()
protected boolean addNode()
public boolean allowsDropsBetweenNodes()
public boolean allowsDropsWithinNodes()
protected void constructAbstractTreeNodeDragAndDropController(boolean allowsDropsWithinNodes, boolean allowsDropsBetweenNodes)
public void dragDropEnd(java.awt.dnd.DragSourceDropEvent event)
AbstractDragAndDropController
dragDropEnd
in interface java.awt.dnd.DragSourceListener
dragDropEnd
in class AbstractDragAndDropController
event
- Not usedpublic void dragEnter(java.awt.dnd.DropTargetDragEvent event)
dragEnter
in interface java.awt.dnd.DropTargetListener
dragEnter
in class AbstractDragAndDropController
public void dragExit(java.awt.dnd.DragSourceEvent event)
AbstractDragAndDropController
dragExit
in interface java.awt.dnd.DragSourceListener
dragExit
in class AbstractDragAndDropController
public void dragExit(java.awt.dnd.DropTargetEvent event)
AbstractDragAndDropController
dragExit
in interface java.awt.dnd.DropTargetListener
dragExit
in class AbstractDragAndDropController
public void dragOver(java.awt.dnd.DragSourceDragEvent event)
dragOver
in interface java.awt.dnd.DragSourceListener
dragOver
in class AbstractDragAndDropController
public void dragOver(java.awt.dnd.DropTargetDragEvent event)
dragOver
in interface java.awt.dnd.DropTargetListener
dragOver
in class AbstractDragAndDropController
event
- Not usedpublic void drop(java.awt.dnd.DropTargetDropEvent event)
drop
in interface java.awt.dnd.DropTargetListener
drop
in class AbstractDragAndDropController
protected int getDefaultAllowedDragActions()
getDefaultAllowedDragActions
in class AbstractDragAndDropController
protected int getDefaultAllowedDropActions()
getDefaultAllowedDropActions
in class AbstractDragAndDropController
protected TreeView getTreeView()
protected boolean getValidDragSource(java.awt.datatransfer.DataFlavor[] flavors)
protected boolean getValidDropTarget()
protected boolean isDragSource()
protected boolean isDropTarget()
protected boolean isTreeNodeFlavor(java.awt.datatransfer.DataFlavor flavor)
protected boolean moveNode()
public void setAllowsDropsBetweenNodes(boolean allowsDropsBetweenNodes)
public void setAllowsDropsWithinNodes(boolean allowsDropsWithinNodes)
protected void setDropNode(TreeNode dropNode, boolean betweenNodes)
protected void setTreeView(TreeView view)
public void setWillDropAboveTarget(boolean aboveTarget)
aboveTarget
- True if the drop will occur above the current drop target.public void setWillDropBelowTarget(boolean belowTarget)
belowTarget
- True if the drop will occur below the current drop target.public void setWillDropOnTarget(boolean onTarget)
onTarget
- True if the drop will occur on the current drop target.protected void setValidDropTarget(boolean valid)
valid
- True if the drop target is validprotected void startDrag(java.awt.dnd.DragGestureEvent event, TreeNode dragNode)
protected void startDrag(java.awt.dnd.DragGestureEvent event, java.util.List dragNode)
protected boolean isDragCandidate(java.util.List dragNode)
protected boolean transferNode()
public boolean willDropAboveTarget()
willDropAboveTarget
in interface TreeNodeDragAndDropController
public boolean willDropBelowTarget()
willDropBelowTarget
in interface TreeNodeDragAndDropController
public boolean willDropOnTarget()
willDropOnTarget
in interface TreeNodeDragAndDropController
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |