public abstract class DragGestureRecognizer extends Object implements Serializable
Modifier and Type | Field and Description |
---|---|
protected Component |
component |
protected DragGestureListener |
dragGestureListener |
protected DragSource |
dragSource |
protected ArrayList<InputEvent> |
events |
protected int |
sourceActions |
Modifier | Constructor and Description |
---|---|
protected |
DragGestureRecognizer(DragSource ds) |
protected |
DragGestureRecognizer(DragSource ds,
Component c) |
protected |
DragGestureRecognizer(DragSource ds,
Component c,
int sa) |
protected |
DragGestureRecognizer(DragSource ds,
Component c,
int sa,
DragGestureListener dgl) |
Modifier and Type | Method and Description |
---|---|
void |
addDragGestureListener(DragGestureListener dgl)
Register a new DragGestureListener.
|
protected void |
appendEvent(InputEvent e) |
protected void |
fireDragGestureRecognized(int dragAction,
Point p)
Fires a
DragGestureEvent to the DragGestureListener
associated with this object, if there is one. |
Component |
getComponent() |
DragSource |
getDragSource() |
int |
getSourceActions() |
InputEvent |
getTriggerEvent() |
protected abstract void |
registerListeners() |
void |
removeDragGestureListener(DragGestureListener dgl) |
void |
resetRecognizer()
Resets the recognizer.
|
void |
setComponent(Component c) |
void |
setSourceActions(int sa) |
protected abstract void |
unregisterListeners() |
protected DragSource dragSource
protected transient DragGestureListener dragGestureListener
protected int sourceActions
protected ArrayList<InputEvent> events
protected DragGestureRecognizer(DragSource ds, Component c, int sa, DragGestureListener dgl)
protected DragGestureRecognizer(DragSource ds, Component c, int sa)
protected DragGestureRecognizer(DragSource ds, Component c)
protected DragGestureRecognizer(DragSource ds)
protected abstract void registerListeners()
protected abstract void unregisterListeners()
public DragSource getDragSource()
public Component getComponent()
public void setComponent(Component c)
public int getSourceActions()
public void setSourceActions(int sa)
public InputEvent getTriggerEvent()
public void resetRecognizer()
public void addDragGestureListener(DragGestureListener dgl) throws TooManyListenersException
TooManyListenersException
- If a DragGestureListener has already
been added.public void removeDragGestureListener(DragGestureListener dgl)
protected void fireDragGestureRecognized(int dragAction, Point p)
DragGestureEvent
to the DragGestureListener
associated with this object, if there is one.protected void appendEvent(InputEvent e)