|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.Objectjavax.swing.event.MouseInputAdapter
com.imagero.gui.flowin.FloatingWindowDragHandler
FloatingWindowDragHandler.
Mouse handler for FloatingWindow.
| Field Summary | |
static int |
DRAG_OVER_DELAY
if docking condition is true then window is docked after specified delay |
static int |
DRAG_OVER_DOCK
immediately docking - not supported (!) |
static int |
DRAG_OVER_SHOW_ARMED
if docking condition is true then just "armed" state is shown |
| Constructor Summary | |
FloatingWindowDragHandler(FloatingWindow floatingWindow)
create new FloatingWindowDragHandler for FloatingWindow |
|
| Method Summary | |
protected boolean |
canDock()
check if FloatingWindow can be docked (e.g. bounding rectangle of FloatingWindow's window intersects with bounding rectangle of one of anchors) |
protected void |
createTimer()
create timer for delayed docking of FloatingWindow |
void |
dockWindow(java.awt.Container anchor,
java.lang.Object constraints)
|
int |
getDockDelay()
|
protected int |
getState()
get current state of FloatingWindow Simple example showing how to determine if FloatingWindow is in docked state now: if((getState() & FloatingWindow.DOCKED) == FloatingWindow.DOCKED) { //take appropriate action } |
void |
mouseDragged(java.awt.event.MouseEvent e)
Invoked when a mouse button is pressed on a component and then dragged. |
void |
mousePressed(java.awt.event.MouseEvent e)
Invoked when a mouse button has been pressed on a component. |
void |
mouseReleased(java.awt.event.MouseEvent e)
Invoked when a mouse button has been released on a component. |
void |
setDockDelay(int dockDelay)
|
| Methods inherited from class javax.swing.event.MouseInputAdapter |
mouseClicked, mouseEntered, mouseExited, mouseMoved |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
public static final int DRAG_OVER_DELAY
public static final int DRAG_OVER_DOCK
public static final int DRAG_OVER_SHOW_ARMED
| Constructor Detail |
public FloatingWindowDragHandler(FloatingWindow floatingWindow)
floatingWindow - FloatingWindow| Method Detail |
protected boolean canDock()
protected void createTimer()
public void dockWindow(java.awt.Container anchor,
java.lang.Object constraints)
public int getDockDelay()
protected int getState()
if((getState() & FloatingWindow.DOCKED) == FloatingWindow.DOCKED) {
//take appropriate action
}
FloatingWindow.DOCKED,
FloatingWindow.FREE,
FloatingWindow.INTERN,
FloatingWindow.DRAGGING,
FloatingWindow.INVISIBLEpublic void mouseDragged(java.awt.event.MouseEvent e)
java.awt.event.MouseMotionListenerMOUSE_DRAGGED events will continue to be
delivered to the component where the drag originated until the
mouse button is released (regardless of whether the mouse position
is within the bounds of the component).
Due to platform-dependent Drag&Drop implementations,
MOUSE_DRAGGED events may not be delivered during a native
Drag&Drop operation.
public void mousePressed(java.awt.event.MouseEvent e)
java.awt.event.MouseListener
public void mouseReleased(java.awt.event.MouseEvent e)
java.awt.event.MouseListener
public void setDockDelay(int dockDelay)
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||