public class IlvSDMDragSource extends Object implements DragGestureListener, DragSourceListener, Serializable
IlvSDMDragSource
handles the "drag"
part of drag-and-drop interactions between SDM engines.
To enable drag-and-drop between two SDM engines,
create an IlvSDMDragSource
associated with
one engine and an IlvSDMDropTarget
associated with
the other engine.Constructor and Description |
---|
IlvSDMDragSource(IlvSDMEngine engine,
IlvManagerView view)
Creates a new drag source associated with the specified
engine and the specified view.
|
Modifier and Type | Method and Description |
---|---|
void |
dragDropEnd(DragSourceDropEvent e)
Implementation of
DragGestureListener . |
void |
dragEnter(DragSourceDragEvent e)
Implementation of
DragGestureListener . |
void |
dragExit(DragSourceEvent e)
Implementation of
DragGestureListener . |
void |
dragGestureRecognized(DragGestureEvent event)
Implementation of
DragGestureListener . |
void |
dragOver(DragSourceDragEvent e)
Implementation of
DragGestureListener . |
void |
dropActionChanged(DragSourceDragEvent e)
Implementation of
DragGestureListener . |
IlvSDMEngine |
getEngine()
Returns the SDM engine with which this drag source
is associated.
|
IlvManagerView |
getView()
Returns the manager view with which this drag source
is associated.
|
boolean |
isEnabled()
Returns the flag indicating whether the drag source is enabled.
|
void |
setEnabled(boolean enabled)
Enables or disables the drag source.
|
public IlvSDMDragSource(IlvSDMEngine engine, IlvManagerView view)
engine
- The SDM engine.view
- The manager view from which objects will be dragged.public IlvSDMEngine getEngine()
public IlvManagerView getView()
public void setEnabled(boolean enabled)
enabled
- If true
,
the drag source is enabled. Otherwise, no drag can be
initiated.public boolean isEnabled()
public void dragGestureRecognized(DragGestureEvent event)
DragGestureListener
.
If isDragAllowed()
is true
,
this method starts dragging the selected object.dragGestureRecognized
in interface DragGestureListener
event
- The event.public void dragDropEnd(DragSourceDropEvent e)
DragGestureListener
.
This method deselects the dragged object.dragDropEnd
in interface DragSourceListener
e
- The event.public void dragEnter(DragSourceDragEvent e)
DragGestureListener
.
This method does nothing.dragEnter
in interface DragSourceListener
e
- The event.public void dragExit(DragSourceEvent e)
DragGestureListener
.
This method does nothing.dragExit
in interface DragSourceListener
e
- The event.public void dragOver(DragSourceDragEvent e)
DragGestureListener
.
This method does nothing.dragOver
in interface DragSourceListener
e
- The event.public void dropActionChanged(DragSourceDragEvent e)
DragGestureListener
.
This method does nothing.dropActionChanged
in interface DragSourceListener
e
- The event.© Copyright 2024 Rogue Wave Software, Inc., a Perforce company.. All Rights Reserved.