|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.swfm.mica.core.MiDragAndDropBehavior
This class implements the MiiDragAndDropBehavior interface. At the present time it only supports the specification of the events involved. Common effects will implemented in a future release.
For example, if it so desired that a treeList widget is to be a drag and drop source and that the end-user should not have to hold down the shift key while dragging items out of the treelist then one might have:
// Assume that the items in the tree list will have called // their setIsDragAndDropSource(true) methods... MiTreeList treeList = new MiTreeList(28, false); MiDragAndDropBehavior dndBehavior = new MiDragAndDropBehavior(); dndBehavior.setDragAndCopyPickUpEvent( new MiEvent(MiEvent.Mi_LEFT_MOUSE_START_DRAG_EVENT, 0, 0)); dndBehavior.setDragAndCopyDragEvent( new MiEvent(MiEvent.Mi_LEFT_MOUSE_DRAG_EVENT, 0, 0)); dndBehavior.setDragAndCopyCancelEvent( new MiEvent(MiEvent.Mi_KEY_EVENT, MiEvent.Mi_ESC_KEY, 0)); dndBehavior.setDragAndCopyDropEvent( new MiEvent(MiEvent.Mi_LEFT_MOUSE_UP_EVENT, 0, 0)); treeList.setDragAndDropBehavior(dndBehavior);
| Constructor Summary | |
MiDragAndDropBehavior()
Constructs a new MiDragAndDropBehavior. |
|
| Method Summary | |
java.lang.Object |
getDataToExport()
Gets the data to be exported during the drop operation for parts with this behavior. |
MiEvent |
getDragAndCopyCancelEvent()
Gets the event that will cancel a drag-and-copy operation. |
MiEvent |
getDragAndCopyDragEvent()
Gets the event that will move a part during a drag-and-copy operation. |
MiEvent |
getDragAndCopyDropEvent()
Gets the event that will complete a drag-and-copy operation. |
MiEvent |
getDragAndCopyPickUpEvent()
Gets the event that will 'pick up' a part to start a drag-and-copy operation. |
MiEvent |
getDragAndCutCancelEvent()
Gets the event that will cancel a drag-and-cut operation. |
MiEvent |
getDragAndCutDragEvent()
Gets the event that will move a part during a drag-and-cut operation. |
MiEvent |
getDragAndCutDropEvent()
Gets the event that will complete a drag-and-cut operation. |
MiEvent |
getDragAndCutPickUpEvent()
Gets the event that will 'pick up' a part to start a drag-and-cut operation. |
MiPart |
getDraggingLook()
Gets the appearance to be used during the drag operation for parts with this behavior. |
boolean |
getDragsReferenceNotCopy()
|
boolean |
getKeepLookCompletelyWithinRootWindow()
|
boolean |
getSnapLookCenterToCursor()
|
MiEditor |
getTargetEditor()
|
MiParts |
getValidTargets()
Gets the valid targets for drag and drop for parts with this behavior. |
boolean |
isDefaultBehaviorForParts()
|
boolean |
isOpaqueDragAndDropTarget()
Gets whether, if the part with this behavior rejects a drop, the parent of the part can then be inquired as to whether it wants the drop. |
boolean |
isPartDragAndDropSource(MiPart part)
|
boolean |
isPartDragAndDropTarget(MiPart part)
|
void |
setDataToExport(java.lang.Object data)
|
void |
setDragAndCopyCancelEvent(MiEvent event)
Sets the event that will cancel a drag-and-copy operation. |
void |
setDragAndCopyDragEvent(MiEvent event)
Sets the event that will move a part during a drag-and-copy operation. |
void |
setDragAndCopyDropEvent(MiEvent event)
Sets the event that will complete a drag-and-copy operation. |
void |
setDragAndCopyPickUpEvent(MiEvent event)
Sets the event that will 'pick up' a part to start a drag-and-copy operation. |
void |
setDragAndCutCancelEvent(MiEvent event)
Sets the event that will cancel a drag-and-cut operation. |
void |
setDragAndCutDragEvent(MiEvent event)
Sets the event that will move a part during a drag-and-cut operation. |
void |
setDragAndCutDropEvent(MiEvent event)
Sets the event that will complete a drag-and-cut operation. |
void |
setDragAndCutPickUpEvent(MiEvent event)
Sets the event that will 'pick up' a part to start a drag-and-cut operation. |
void |
setDraggingLook(MiPart look)
|
void |
setDragsReferenceNotCopy(boolean flag)
|
void |
setIsDefaultBehaviorForParts(boolean flag)
|
void |
setIsOpaqueDragAndDropTarget(boolean flag)
Sets whether, if the part with this behavior rejects a drop, the parent of the part can then be inquired as to whether it wants the drop. |
void |
setKeepLookCompletelyWithinRootWindow(boolean flag)
|
void |
setSnapLookCenterToCursor(boolean flag)
|
void |
setTargetEditor(MiEditor editor)
|
void |
setValidTargets(MiParts targets)
Sets the valid targets for drag and drop for parts with this behavior. |
| Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public MiDragAndDropBehavior()
| Method Detail |
public void setIsDefaultBehaviorForParts(boolean flag)
public boolean isDefaultBehaviorForParts()
isDefaultBehaviorForParts in interface MiiDragAndDropBehaviorpublic void setDragsReferenceNotCopy(boolean flag)
public boolean getDragsReferenceNotCopy()
getDragsReferenceNotCopy in interface MiiDragAndDropBehaviorpublic void setSnapLookCenterToCursor(boolean flag)
public boolean getSnapLookCenterToCursor()
getSnapLookCenterToCursor in interface MiiDragAndDropBehaviorpublic void setKeepLookCompletelyWithinRootWindow(boolean flag)
public boolean getKeepLookCompletelyWithinRootWindow()
getKeepLookCompletelyWithinRootWindow in interface MiiDragAndDropBehaviorpublic boolean isPartDragAndDropSource(MiPart part)
isPartDragAndDropSource in interface MiiDragAndDropBehaviorpublic boolean isPartDragAndDropTarget(MiPart part)
isPartDragAndDropTarget in interface MiiDragAndDropBehaviorpublic void setValidTargets(MiParts targets)
MiiDragAndDropBehavior
setValidTargets in interface MiiDragAndDropBehaviortargets - the valid targets or nullpublic MiParts getValidTargets()
MiiDragAndDropBehavior
getValidTargets in interface MiiDragAndDropBehaviorpublic void setDataToExport(java.lang.Object data)
public java.lang.Object getDataToExport()
MiiDragAndDropBehavior
getDataToExport in interface MiiDragAndDropBehaviorpublic void setDraggingLook(MiPart look)
public MiPart getDraggingLook()
MiiDragAndDropBehavior
getDraggingLook in interface MiiDragAndDropBehaviorpublic void setTargetEditor(MiEditor editor)
public MiEditor getTargetEditor()
getTargetEditor in interface MiiDragAndDropBehaviorpublic boolean isOpaqueDragAndDropTarget()
isOpaqueDragAndDropTarget in interface MiiDragAndDropBehaviorsetIsOpaqueDragAndDropTargetpublic void setIsOpaqueDragAndDropTarget(boolean flag)
flag - true if cannot drop on part(s)
underneath the part assigned this
behaviorisOpaqueDragAndDropTargetpublic void setDragAndCopyPickUpEvent(MiEvent event)
event - the pickup eventpublic void setDragAndCopyDragEvent(MiEvent event)
event - the drag eventpublic void setDragAndCopyCancelEvent(MiEvent event)
event - the cancel eventpublic void setDragAndCopyDropEvent(MiEvent event)
event - the drop eventpublic MiEvent getDragAndCopyPickUpEvent()
getDragAndCopyPickUpEvent in interface MiiDragAndDropBehaviorpublic MiEvent getDragAndCopyDragEvent()
getDragAndCopyDragEvent in interface MiiDragAndDropBehaviorpublic MiEvent getDragAndCopyCancelEvent()
getDragAndCopyCancelEvent in interface MiiDragAndDropBehaviorpublic MiEvent getDragAndCopyDropEvent()
getDragAndCopyDropEvent in interface MiiDragAndDropBehaviorpublic void setDragAndCutPickUpEvent(MiEvent event)
event - the pickup eventpublic void setDragAndCutDragEvent(MiEvent event)
event - the drag eventpublic void setDragAndCutCancelEvent(MiEvent event)
event - the cancel eventpublic void setDragAndCutDropEvent(MiEvent event)
event - the drop eventpublic MiEvent getDragAndCutPickUpEvent()
getDragAndCutPickUpEvent in interface MiiDragAndDropBehaviorpublic MiEvent getDragAndCutDragEvent()
getDragAndCutDragEvent in interface MiiDragAndDropBehaviorpublic MiEvent getDragAndCutCancelEvent()
getDragAndCutCancelEvent in interface MiiDragAndDropBehaviorpublic MiEvent getDragAndCutDropEvent()
getDragAndCutDropEvent in interface MiiDragAndDropBehavior
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||