|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectedu.umd.cs.piccolox.pswing.PSwingEventHandler
public class PSwingEventHandler
Event handler to send MousePressed, MouseReleased, MouseMoved, MouseClicked, and MouseDragged events on Swing components within a PCanvas.
Constructor Summary | |
---|---|
PSwingEventHandler(PSwingCanvas canvas)
Constructs a new PSwingEventHandler for the given canvas. |
|
PSwingEventHandler(PSwingCanvas canvas,
edu.umd.cs.piccolo.PNode listenNode)
Constructs a new PSwingEventHandler for the given canvas, and a node that will receive the mouse events. |
Method Summary | |
---|---|
(package private) void |
dispatchEvent(PSwingEvent pSwingMouseEvent,
edu.umd.cs.piccolo.event.PInputEvent aEvent)
Determines if any Swing components in Piccolo should receive the given MouseEvent and forwards the event to that component. |
boolean |
isActive()
Returns if this event handler is active. |
void |
processEvent(edu.umd.cs.piccolo.event.PInputEvent aEvent,
int type)
Process a piccolo event and (if active) dispatch the corresponding Swing event. |
(package private) void |
setActive(boolean active)
Sets whether this event handler can fire events. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public PSwingEventHandler(PSwingCanvas canvas, edu.umd.cs.piccolo.PNode listenNode)
canvas
- the canvas associated with this PSwingEventHandler.node
- the node the mouse listeners will be attached to.public PSwingEventHandler(PSwingCanvas canvas)
Method Detail |
---|
void setActive(boolean active)
active
- public boolean isActive()
void dispatchEvent(PSwingEvent pSwingMouseEvent, edu.umd.cs.piccolo.event.PInputEvent aEvent)
pSwingMouseEvent
- aEvent
- public void processEvent(edu.umd.cs.piccolo.event.PInputEvent aEvent, int type)
processEvent
in interface edu.umd.cs.piccolo.event.PInputEventListener
aEvent
- type
-
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |