public static class DefaultSplitDividerStrategy.Handler extends MouseAdapter implements MouseListener, MouseMotionListener, AWTEventListener, DockHierarchyListener
DefaultSplitDividerStrategy.Handler is responsible for handling the needs of one SplitDockStation.| Constructor and Description |
|---|
Handler(SplitDockStation station)
Creates a new strategy that will monitor
station. |
| Modifier and Type | Method and Description |
|---|---|
protected void |
checkMousePositionAsync()
Asynchronously checks the current position of the mouse and updates the cursor
if necessary.
|
void |
controllerChanged(DockHierarchyEvent event)
Invoked whenever the controller of
dockable has changed |
void |
destroy()
Disposes all resources that are used by this handler.
|
void |
eventDispatched(AWTEvent event)
AWT event listener.
|
Component |
getContainer()
Gets the
Component with which this strategy was initialized. |
protected Divideable |
getDividerNode(int x,
int y)
Gets the node whose divider contains
x, y. |
SplitDockStation |
getStation()
Gets the station which is monitored by this strategy
|
void |
hierarchyChanged(DockHierarchyEvent event)
Called when the path of the observed
Dockable has been changed. |
void |
install(Component container) |
void |
mouseDragged(MouseEvent e) |
void |
mouseExited(MouseEvent e) |
void |
mouseMoved(MouseEvent e) |
void |
mousePressed(MouseEvent e) |
void |
mouseReleased(MouseEvent e) |
void |
paint(Graphics g)
Paints a line at the current location of the divider.
|
protected void |
repaint(int x,
int y,
int width,
int height)
Repaints parts of the
base component. |
protected void |
setCursor(Cursor cursor)
Changes the cursor of
the base component. |
protected void |
setDivider(Divideable node,
double divider)
Called if the divider of
node needs to be changed. |
mouseClicked, mouseEntered, mouseWheelMovedclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitmouseClicked, mouseEnteredpublic Handler(SplitDockStation station)
station.station - the station to monitorpublic SplitDockStation getStation()
public void install(Component container)
public void hierarchyChanged(DockHierarchyEvent event)
DockHierarchyListenerDockable has been changed.hierarchyChanged in interface DockHierarchyListenerevent - the new pathpublic void controllerChanged(DockHierarchyEvent event)
DockHierarchyListenerdockable has changedcontrollerChanged in interface DockHierarchyListenerevent - the current path and controllerpublic void eventDispatched(AWTEvent event)
eventDispatched in interface AWTEventListenerevent - AWTEventpublic Component getContainer()
Component with which this strategy was initialized.install(Component)public void destroy()
protected void setCursor(Cursor cursor)
the base component. Subclasses may override this
method to use custom cursors.cursor - the cursor to set, may be nullprotected void repaint(int x,
int y,
int width,
int height)
base component.x - x coordinatey - y coordinatewidth - the width of the are to repaintheight - the height of the are to repaintprotected Divideable getDividerNode(int x, int y)
x, y.x - the x coordinatey - the y coordinatex, yprotected void checkMousePositionAsync()
public void mousePressed(MouseEvent e)
mousePressed in interface MouseListenermousePressed in class MouseAdapterpublic void mouseDragged(MouseEvent e)
mouseDragged in interface MouseMotionListenermouseDragged in class MouseAdapterpublic void mouseReleased(MouseEvent e)
mouseReleased in interface MouseListenermouseReleased in class MouseAdapterprotected void setDivider(Divideable node, double divider)
node needs to be changed.node - the node whose divider changesdivider - the new dividerpublic void mouseMoved(MouseEvent e)
mouseMoved in interface MouseMotionListenermouseMoved in class MouseAdapterpublic void mouseExited(MouseEvent e)
mouseExited in interface MouseListenermouseExited in class MouseAdapterpublic void paint(Graphics g)
g - the Graphics used to paintCopyright © 2017 Docking Frames. All rights reserved.