|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--gishur.gui2.DrawAtom | +--gishur.gui2.DrawObject | +--gishur.gui2.InputHandler | +--gishur.gui2.handler.MouseHandler
Field Summary | |
static int |
ACTIVATE_ELEMENTS
If set, activation of elements is enabled. |
static int |
MOVE_ELEMENTS
If set, translation of elements is enabled. |
Fields inherited from class gishur.gui2.DrawAtom |
BLOCK_REPAINT, MARK_RECALC, MARK_REPAINT, MARK_SIZE, REPAINT, UNBLOCK_REPAINT, USER_STATES_FIRST, USER_STATES_MASK |
Constructor Summary | |
MouseHandler()
Default constructor. |
|
MouseHandler(DrawAtom drw)
Constructs a new MouseHandler which watches the given element (and all of its members for mouseovers). |
Method Summary | |
boolean |
activationEnabled()
Returns true , if this MouseHandler
activates the top level elements itself. |
void |
add(InputHandler drw)
Adds the InputHandler drw at the end of the layer. |
void |
add(InputHandler drw,
boolean enable)
Adds the InputHandler drw at the end of the layer. |
void |
clear()
Removes all member DrawObject s from this layer. |
SimpleList |
elements()
Returns the list of the elements to watch for Mouse overs. |
protected void |
filterEvent(java.awt.AWTEvent e)
Filters events for this InputHandler and all of its members.
|
void |
insert(InputHandler p,
InputHandler drw)
Inserts the InputHandler drw in the layer
before p .
|
void |
insert(InputHandler p,
InputHandler drw,
boolean enable)
Inserts the InputHandler drw in the layer
before p . |
protected void |
onConsumedEvent(java.awt.event.InputEvent e)
Processes consumed InputEvents . |
protected void |
onConsumedEvent(java.awt.event.MouseEvent e)
|
java.lang.String |
overElement()
Returns the element name under the mouse cursor. |
DrawAtom |
overObject()
Returns the DrawAtom (of the hierachy of watched
DrawAtoms under the mouse cursor. |
protected void |
processMouseEvent(java.awt.event.MouseEvent e)
Processes mouse events. |
protected void |
processMouseMotionEvent(java.awt.event.MouseEvent e)
Processes mouse motion events. |
void |
refresh()
Refreshes the mouse-over list. |
void |
remove(InputHandler drw)
Removes the given InputHandler from this layer. |
boolean |
setActivation(boolean activation)
Sets the activation support for top level elements. |
boolean |
setTransformation(boolean transformation)
Sets the transformation support for top level elements. |
boolean |
transformationEnabled()
Returns true , if this MouseHandler
can transform top level elements itself. |
Methods inherited from class gishur.gui2.DrawObject |
addDrawDependency, addPainter, blockRepaint, checkState, checkStateCleared, child, clearCache, clearState, dependency, dirty, disableEvents, draw, draw, enableEvents, ensureRecalculate, findPainter, firstPainter, fullscreen, hide, hide, insert, levelMask, levelUsed, locate, makeDirty, makeDirty, next, next, nextPainter, parent, prepeareRenderContext, prev, prev, processDrawEvent, propertyReader, recalculate, remove, removeDrawDependency, repaint, screenTransformation, setFullscreen, setPaintBeforeMembers, setScreenTransformation, setState, show, show, state, state, unblockRepaint, unblockRepaint, visible |
Methods inherited from class gishur.gui2.DrawAtom |
addProperties, collectHits, dispatchEvent, displayManager, drawComponent, getBounds, getLocalProperty, getProperty, getProperty, getRequiredProperty, processMessage, properties, removeProperty, sendEvent, sendMessage, setBounds, setPropertiesTo, setProperty, setProperty, setProperty, setProperty, toString, toString, toStringDetail, toTreeString |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
public static final int ACTIVATE_ELEMENTS
public static final int MOVE_ELEMENTS
Constructor Detail |
public MouseHandler()
public MouseHandler(DrawAtom drw)
drw
- element to watch for mouseoverMethod Detail |
public SimpleList elements()
DrawAtom
will
be respected.SimpleList
that contains all watched elementsprotected void filterEvent(java.awt.AWTEvent e)
this
InputHandler and all of its members.
This method should call InputHandler.sendEvent(java.awt.AWTEvent)
in order to process events
through this
InputHandler
and all of its members.filterEvent
in class InputHandler
e
- the source event. The event mask must be enabled in order to filter
that type of eventsprotected void onConsumedEvent(java.awt.event.InputEvent e)
InputEvents
. In order to process the events
further, call InputHandler.sendEvent(java.awt.AWTEvent)
.onConsumedEvent
in class InputHandler
e
- consumed InputEvent
.protected void processMouseEvent(java.awt.event.MouseEvent e)
processMouseEvent
in class InputHandler
e
- the event.protected void processMouseMotionEvent(java.awt.event.MouseEvent e)
processMouseMotionEvent
in class InputHandler
e
- the event.protected void onConsumedEvent(java.awt.event.MouseEvent e)
public final boolean activationEnabled()
true
, if this
MouseHandler
activates the top level elements itself.true
, if activation is enabledpublic boolean setActivation(boolean activation)
activation
- if true
, if this
MouseHandler
activates the top level elements itself.public final boolean transformationEnabled()
true
, if this
MouseHandler
can transform top level elements itself.true
, if transformation is enabledpublic boolean setTransformation(boolean transformation)
transformation
- if true
, if this
MouseHandler
transforms the top level elements itself.public void refresh()
public DrawAtom overObject()
DrawAtom
(of the hierachy of watched
DrawAtoms
under the mouse cursor.DrawAtom
under the mouse cursor.public java.lang.String overElement()
public void add(InputHandler drw)
InputHandler
drw
at the end of the layer.drw
- InputHandler to addpublic void insert(InputHandler p, InputHandler drw)
InputHandler
drw
in the layer
before p
.
The inserted element will be made enabled via InputHandler.enable()
.p
- group member to insert before or null
to add
at the end of the layerdrw
- InputHandler to insertpublic void add(InputHandler drw, boolean enable)
InputHandler
drw
at the end of the layer.drw
- InputHandler to addenable
- if true
, the element will be enabled
via InputHandler.enable()
else it will be disabled via
InputHandler.disable()
public void insert(InputHandler p, InputHandler drw, boolean enable)
InputHandler
drw
in the layer
before p
.p
- layer member to insert before or null
to add
at the end of the layerdrw
- InputHandler to insertenable
- if true
, the element will be enabled
via InputHandler.enable()
else it will be disabled via
InputHandler.disable()
public void remove(InputHandler drw)
InputHandler
from this layer. If the specified
InputHandler
has members, all members were removed first. Insertion
of the InputHandler
inserts only the InputHandler
-
without its members.drw
- InputHandler
to removepublic void clear()
DrawObject
s from this
layer.clear
in class DrawObject
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |