|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--edu.umd.cs.jazz.event.ZSwingEventHandler
Event handler to send MousePressed, MouseReleased, MouseMoved, MouseClicked, and MouseDragged events on Swing components within a ZCanvas
ZMouseAdapter
,
ZMouseEvent
,
ZMouseListener
,
ZMouseMotionListener
Field Summary | |
protected boolean |
active
True when event handlers are set active. |
protected ZNode |
listenNode
The node to listen to for events. |
Constructor Summary | |
ZSwingEventHandler(ZCanvas canvas)
Constructs a new ZSwingEventHandler for the given canvas. |
|
ZSwingEventHandler(ZCanvas canvas,
ZNode node)
Constructs a new ZSwingEventHandler for the given canvas, and a node that will recieve the mouse events. |
Method Summary | |
boolean |
isActive()
Determines if this event handler is active. |
void |
mouseClicked(ZMouseEvent e1)
Invoked when the mouse has been clicked on a component. |
void |
mouseDragged(ZMouseEvent e1)
Invoked when a mouse button is pressed on a node and then dragged. |
void |
mouseEntered(ZMouseEvent e1)
Invoked when the mouse enters a component. |
void |
mouseExited(ZMouseEvent e1)
Invoked when the mouse exits a component. |
void |
mouseMoved(ZMouseEvent e1)
Invoked when the mouse button has been moved on a node (with no buttons no down). |
void |
mousePressed(ZMouseEvent e1)
Invoked when a mouse button has been pressed on a component. |
void |
mouseReleased(ZMouseEvent e1)
Invoked when a mouse button has been released on a component. |
void |
setActive(boolean active)
Specifies whether this event handler is active or not. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected ZNode listenNode
protected boolean active
Constructor Detail |
public ZSwingEventHandler(ZCanvas canvas, ZNode node)
canvas
- the canvas associated with this ZSwingEventHandler.node
- the node the mouse listeners will be attached to.public ZSwingEventHandler(ZCanvas canvas)
Method Detail |
public void setActive(boolean active)
ZEventHandler
setActive
in interface ZEventHandler
edu.umd.cs.jazz.event.ZEventHandler
active
- True to make this event handler activepublic boolean isActive()
isActive
in interface ZEventHandler
public void mousePressed(ZMouseEvent e1)
ZMouseListener
mousePressed
in interface ZMouseListener
public void mouseReleased(ZMouseEvent e1)
ZMouseListener
mouseReleased
in interface ZMouseListener
public void mouseClicked(ZMouseEvent e1)
ZMouseListener
mouseClicked
in interface ZMouseListener
public void mouseExited(ZMouseEvent e1)
ZMouseListener
mouseExited
in interface ZMouseListener
public void mouseEntered(ZMouseEvent e1)
ZMouseListener
mouseEntered
in interface ZMouseListener
public void mouseMoved(ZMouseEvent e1)
ZMouseMotionListener
mouseMoved
in interface ZMouseMotionListener
public void mouseDragged(ZMouseEvent e1)
ZMouseMotionListener
mouseDragged
in interface ZMouseMotionListener
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |