|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface DirectRemoteRelocator
A simplified version of RemoteRelocator
. This direct remote relocator
assumes that the correct mouse buttons are always pressed. A client
can initiate a drag & drop operation by calling init
.
Then the client has to call at least one time drag
, before
he can invoke drop
to let the dragged Dockable
fall down. A client can cancel
the operation at any time.
Note that only one operation is supported at once. Note also that there is
no guarantee, that a drag & drop operation is executed successfully.
Method Summary | |
---|---|
void |
cancel()
Cancels the current drag & drop operation. |
void |
drag(int x,
int y,
boolean always)
Gives a feedback to the user, that a Dockable is moved around. |
void |
drop(int x,
int y)
Stops a dnd-operation either by dropping the Dockable
(if possible) or by canceling the operation. |
void |
init(int x,
int y,
int dx,
int dy)
This method starts a drag & drop operation. |
Method Detail |
---|
void init(int x, int y, int dx, int dy)
x
- the x-coordinate on the screen, where the (simulated) event occurredy
- the y-coordinate on the screen, where the (simulated) event occurreddx
- the x-coordinate of the mouse on the simulated Component which sent the event, 0 is a good default-value.dy
- the y-coordinate of the mouse on the simulated Component which sent the event, 0 is a good default-value.void drag(int x, int y, boolean always)
Dockable
is moved around.
x
- the x-coordinate on the screen, where the (simulated) event occurredy
- the y-coordinate on the screen, where the (simulated) event occurredalways
- true
if a call to this method should always
result in a drag-event, false
if the restrictions of the
DockRelocator
should be respected. A restriction might be, that
the location of the mouse must have a minimal distance to the initial
location of the mouse.DockRelocator.getDragDistance()
void drop(int x, int y)
Dockable
(if possible) or by canceling the operation.
x
- the x-coordinate on the screen, where the (simulated) event occurredy
- the y-coordinate on the screen, where the (simulated) event occurredvoid cancel()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |