public interface DirectRemoteRelocator extends BasicRemoteRelocator
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.| Modifier and Type | Method and Description |
|---|---|
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.Prepares for a drop-event. |
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.
|
setShowImageWindow, setTitlevoid 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()
Copyright © 2017 Docking Frames. All rights reserved.