|
||||||||||
| 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)
ZEventHandlersetActive in interface ZEventHandleredu.umd.cs.jazz.event.ZEventHandleractive - True to make this event handler activepublic boolean isActive()
isActive in interface ZEventHandlerpublic void mousePressed(ZMouseEvent e1)
ZMouseListenermousePressed in interface ZMouseListenerpublic void mouseReleased(ZMouseEvent e1)
ZMouseListenermouseReleased in interface ZMouseListenerpublic void mouseClicked(ZMouseEvent e1)
ZMouseListenermouseClicked in interface ZMouseListenerpublic void mouseExited(ZMouseEvent e1)
ZMouseListenermouseExited in interface ZMouseListenerpublic void mouseEntered(ZMouseEvent e1)
ZMouseListenermouseEntered in interface ZMouseListenerpublic void mouseMoved(ZMouseEvent e1)
ZMouseMotionListenermouseMoved in interface ZMouseMotionListenerpublic void mouseDragged(ZMouseEvent e1)
ZMouseMotionListenermouseDragged in interface ZMouseMotionListener
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||