|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.awt.dnd.DropTarget
ptolemy.vergil.basic.EditorDropTarget
This class provides drag-and-drop support. When this drop target receives a transferable object containing a ptolemy entity, it creates a new instance of the object, and adds it to the given graph. If the drop location falls on top of an icon associated with an instance of NamedObj, then the object is deposited inside that instance (so the instance becomes its container). Otherwise, the object is deposited inside the model associated with the target graph. In either case, if the target container implements the DropListener interface, then it is informed of the drop by calling its dropped() method.
Sometimes, you will want to disable the feature that a drop onto a NamedObj results in the dropped object being placed inside that NamedObj. To disable this feature, call setDropIntoEnabled() with a false argument.
| Red (johnr) |
| Red (eal) |
| Nested Class Summary |
| Nested classes inherited from class java.awt.dnd.DropTarget |
java.awt.dnd.DropTarget.DropTargetAutoScroller |
| Constructor Summary | |
EditorDropTarget(JGraph graph)
Construct a new graph target to operate on the given JGraph. |
|
| Method Summary | |
boolean |
isDropIntoEnabled()
Return true if the feature is enabled that a a drop onto an instance of NamedObj results in that NamedObj containing the dropped object. |
void |
setDropIntoEnabled(boolean enabled)
If the argument is false, then disable the feature that a a drop onto an instance of NamedObj results in that NamedObj containing the dropped object. |
| Methods inherited from class java.awt.dnd.DropTarget |
addDropTargetListener, addNotify, clearAutoscroll, createDropTargetAutoScroller, createDropTargetContext, dragEnter, dragExit, dragOver, drop, dropActionChanged, getComponent, getDefaultActions, getDropTargetContext, getFlavorMap, initializeAutoscrolling, isActive, removeDropTargetListener, removeNotify, setActive, setComponent, setDefaultActions, setFlavorMap, updateAutoscroll |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public EditorDropTarget(JGraph graph)
graph - The diva graph panel.| Method Detail |
public boolean isDropIntoEnabled()
public void setDropIntoEnabled(boolean enabled)
enabled - False to disable the drop into feature.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||