|
TsBiff 1.3 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object | +--ts.ui.WindowManager
A window manager singelton, that can handle any number of Windows. This manager handles window move and resize only. A window resize is conducted iff the mouse cursor is over the resize hotspot. This hotspot is always placed in the lower right corner by the manager, for every window it handles. A window move is conducted iff the mouse is pressed in the window, and then dragged (except in the hotspot area, of course). Be sure to leave some space in the window for the window itself, i.e. don't fill the window with components that grab mouse events.
The Windows managed by this class, should use lightweight components, at least in the area of the hotspot. If not, the peer component (e.g. a Panel) could grab the mouse event.
| Field Summary | |
static int[] |
RESIZE_SPOT
Window hotspot width and height. |
| Method Summary | |
static void |
deregister(java.awt.Window w)
Remove listeners for a Window. |
static WindowManager |
getInstance()
Returns the instance of the window manager singleton. |
void |
mouseClicked(java.awt.event.MouseEvent e)
Left empty. |
void |
mouseDragged(java.awt.event.MouseEvent e)
Resize or reposition the window to a new size or a new location based on the difference between trackPoint and the current mouse coordinates. |
void |
mouseEntered(java.awt.event.MouseEvent e)
Left empty. |
void |
mouseExited(java.awt.event.MouseEvent e)
Left empty. |
void |
mouseMoved(java.awt.event.MouseEvent e)
Change the mouse cursor if it's over a resize hotspot |
void |
mousePressed(java.awt.event.MouseEvent e)
Sets trackPoint if the left mouse button was pressed. |
void |
mouseReleased(java.awt.event.MouseEvent e)
Notify the layout manager in case we did a resize. |
static void |
register(java.awt.Window w)
Register listeners for a window. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
public static final int[] RESIZE_SPOT
| Method Detail |
public static WindowManager getInstance()
public static void register(java.awt.Window w)
w - Window to register for.public static void deregister(java.awt.Window w)
w - Window to deregister for.public void mousePressed(java.awt.event.MouseEvent e)
mousePressed in interface java.awt.event.MouseListenere - The mouse event.public void mouseDragged(java.awt.event.MouseEvent e)
mouseDragged in interface java.awt.event.MouseMotionListenerpublic void mouseReleased(java.awt.event.MouseEvent e)
mouseReleased in interface java.awt.event.MouseListenerpublic void mouseMoved(java.awt.event.MouseEvent e)
mouseMoved in interface java.awt.event.MouseMotionListenerpublic void mouseClicked(java.awt.event.MouseEvent e)
mouseClicked in interface java.awt.event.MouseListenerpublic void mouseEntered(java.awt.event.MouseEvent e)
mouseEntered in interface java.awt.event.MouseListenerpublic void mouseExited(java.awt.event.MouseEvent e)
mouseExited in interface java.awt.event.MouseListener
|
TsBiff 1.3 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||