Class SwingDragger
java.lang.Object
com.inductiveautomation.snap.swing.SwingDragger
- All Implemented Interfaces:
- DragSourceListener,- DragSourceMotionListener,- EventListener
A class to manage dragging.
- 
Nested Class SummaryNested Classes
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionprotected voidCreates new drag source listener.protected TransferableCreates a transferable for DragItem.static TransferablecreateTransferable(Object anItem) Creates a transferable for given object.voiddragDropEnd(DragSourceDropEvent anEvent) DragSourceListener method.voiddragEnter(DragSourceDragEvent anEvent) DragSourceListener method.voiddragExit(DragSourceEvent anEvent) DragSourceListener method.voiddragMouseMoved(DragSourceDragEvent anEvent) DragSourceMotionListener method.voiddragOver(DragSourceDragEvent anEvent) DragSourceListener method.voiddropActionChanged(DragSourceDragEvent anEvent) DragSourceListener method.static SwingDraggerReturns the currently active dragger.protected JComponentReturns the component.Returns the DragGestureEvent.Returns the image to be dragged.protected PointReturns the drag image offset point.Returns the point that the drag image should be dragged by.Returns the item really being dragged.<T> TgetDragItem(Class<T> aClass) Returns the drag item as given class.Returns the drag item as string.Returns the DragSource.Returns the optional DragSourceListener.Sets the transferable.voidsetDragGestureEvent(DragGestureEvent anEvent) Sets the DragGestureEvent.voidsetDragImage(Image anImage) Sets the image to be dragged.voidsetDragImageFromString(String aString, Font aFont) Sets the drag image from given string and font.voidsetDragImagePoint(double anX, double aY) Returns the point that the drag image should be dragged by.voidsetDragImagePoint(Point aPoint) Returns the point that the drag image should be dragged by.voidsetDragItem(Object anItem) Sets the item really being dragged.voidsetDragSourceListener(DragSourceListener aListener) Sets an optional DragSourceListener.voidsetTransferable(Transferable aTrans) Sets the transferable.voidsetTransferable(String aString) Sets the transferable from string.voidStarts the drag.
- 
Constructor Details- 
SwingDraggerpublic SwingDragger()
 
- 
- 
Method Details- 
getDragItemReturns the item really being dragged.
- 
setDragItemSets the item really being dragged.
- 
getDragItemReturns the drag item as given class.
- 
getDragItemStringReturns the drag item as string.
- 
getDragGestureEventReturns the DragGestureEvent.
- 
setDragGestureEventSets the DragGestureEvent.
- 
getDragImageReturns the image to be dragged.
- 
setDragImageSets the image to be dragged.
- 
setDragImageFromStringSets the drag image from given string and font.
- 
getDragImagePointReturns the point that the drag image should be dragged by.
- 
setDragImagePointReturns the point that the drag image should be dragged by.
- 
setDragImagePointpublic void setDragImagePoint(double anX, double aY) Returns the point that the drag image should be dragged by.
- 
getDragImageOffsetReturns the drag image offset point.
- 
getTransferableSets the transferable.
- 
setTransferableSets the transferable.
- 
setTransferableSets the transferable from string.
- 
createTransferableCreates a transferable for DragItem.
- 
createTransferableCreates a transferable for given object.
- 
getDragSourceListenerReturns the optional DragSourceListener.
- 
setDragSourceListenerSets an optional DragSourceListener.
- 
getComponentReturns the component.
- 
getDragSourceReturns the DragSource.
- 
startDragpublic void startDrag()Starts the drag.
- 
getActiveDraggerReturns the currently active dragger.
- 
createDragWindowprotected void createDragWindow()Creates new drag source listener.
- 
dragEnterDragSourceListener method.- Specified by:
- dragEnterin interface- DragSourceListener
 
- 
dragMouseMovedDragSourceMotionListener method.- Specified by:
- dragMouseMovedin interface- DragSourceMotionListener
 
- 
dragDropEndDragSourceListener method.- Specified by:
- dragDropEndin interface- DragSourceListener
 
- 
dragOverDragSourceListener method.- Specified by:
- dragOverin interface- DragSourceListener
 
- 
dragExitDragSourceListener method.- Specified by:
- dragExitin interface- DragSourceListener
 
- 
dropActionChangedDragSourceListener method.- Specified by:
- dropActionChangedin interface- DragSourceListener
 
 
-