org.zaval.lw
Class LwCursorManager
java.lang.Object
|
+--org.zaval.lw.LwCursorManager
- All Implemented Interfaces:
- java.util.EventListener, LwManager, LwMouseListener, LwMouseMotionListener
- public class LwCursorManager
- extends java.lang.Object
- implements LwManager, LwMouseListener, LwMouseMotionListener
This manager is used to support mouse cursor changing for a lightweight
component. To support the mouse cursor changing there are two ways :
-
The light weight component has to implement the Cursorable interface.
From the moment the manager will use the implementation to get current cursor type.
-
The manager provides the
setCursorType method to define the mouse
cursorable interface that will resolve a cursor type for the component.
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
LwCursorManager
public LwCursorManager()
dispose
public void dispose()
- Description copied from interface:
LwManager
- Disposes the manager. The method is supposed to be used for disposing different manager related structures
to free system resources. The method is invoked by LwVCL core when the manager ends its "live".
- Specified by:
dispose in interface LwManager
mouseEntered
public void mouseEntered(LwMouseEvent e)
- Description copied from interface:
LwMouseListener
- Invoked when the mouse enters a light weight component.
- Specified by:
mouseEntered in interface LwMouseListener
- Following copied from interface:
org.zaval.lw.event.LwMouseListener
- Parameters:
e - the specified mouse event.
mouseExited
public void mouseExited(LwMouseEvent e)
- Description copied from interface:
LwMouseListener
- Invoked when the mouse exits a light weight component.
- Specified by:
mouseExited in interface LwMouseListener
- Following copied from interface:
org.zaval.lw.event.LwMouseListener
- Parameters:
e - the specified mouse event.
endDragged
public void endDragged(LwMouseEvent e)
- Description copied from interface:
LwMouseMotionListener
- Invoked when the mouse ends dragged.
- Specified by:
endDragged in interface LwMouseMotionListener
- Following copied from interface:
org.zaval.lw.event.LwMouseMotionListener
- Parameters:
e - the specified mouse event.
mouseMoved
public void mouseMoved(LwMouseEvent e)
- Description copied from interface:
LwMouseMotionListener
- Invoked when the mouse pointer has been moved on a light weight component
(with no buttons no down).
- Specified by:
mouseMoved in interface LwMouseMotionListener
- Following copied from interface:
org.zaval.lw.event.LwMouseMotionListener
- Parameters:
e - the specified mouse event.
startDragged
public void startDragged(LwMouseEvent e)
- Description copied from interface:
LwMouseMotionListener
- Invoked when the mouse starts dragged.
- Specified by:
startDragged in interface LwMouseMotionListener
- Following copied from interface:
org.zaval.lw.event.LwMouseMotionListener
- Parameters:
e - the specified mouse event.
mouseDragged
public void mouseDragged(LwMouseEvent e)
- Description copied from interface:
LwMouseMotionListener
- Invoked when a mouse button is pressed on a component and then dragged.
Mouse drag events will continue to be delivered to the component where
the first originated until the mouse button is released (regardless of
whether the mouse position is within the bounds of the component).
- Specified by:
mouseDragged in interface LwMouseMotionListener
- Following copied from interface:
org.zaval.lw.event.LwMouseMotionListener
- Parameters:
e - the specified mouse event.
mouseClicked
public void mouseClicked(LwMouseEvent e)
- Description copied from interface:
LwMouseListener
- Invoked when the mouse button has been clicked on a light weight component.
- Specified by:
mouseClicked in interface LwMouseListener
- Following copied from interface:
org.zaval.lw.event.LwMouseListener
- Parameters:
e - the specified mouse event.
mousePressed
public void mousePressed(LwMouseEvent e)
- Description copied from interface:
LwMouseListener
- Invoked when the mouse button has been pressed on a light weight component.
- Specified by:
mousePressed in interface LwMouseListener
- Following copied from interface:
org.zaval.lw.event.LwMouseListener
- Parameters:
e - the specified mouse event.
mouseReleased
public void mouseReleased(LwMouseEvent e)
- Description copied from interface:
LwMouseListener
- Invoked when the mouse button has been released on a light weight component.
- Specified by:
mouseReleased in interface LwMouseListener
- Following copied from interface:
org.zaval.lw.event.LwMouseListener
- Parameters:
e - the specified mouse event.
setCursorable
public void setCursorable(LwComponent target,
Cursorable c)
- Sets the specified cursorable interface for the given component. To set the default cursor
type for the component use
null as the cursorable interface. The interface
points the manager what cursor type should be set for the specified component.
- Parameters:
target - the component.c - the specified cursorable interface.
getCursorable
public Cursorable getCursorable(LwComponent target)
- Gets the current cursorable interface for the given component.
- Parameters:
target - the given component.- Returns:
- a current cursor type.
getCursorType
public int getCursorType()
- Gets the current cursor type.
- Returns:
- a current cursor type.
|