|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--gumbo.util.AbstractDisposable | +--gumbo.graphic.input.AbstractMouseSensor | +--gumbo.graphic.input.impl.swing.SwingMouseSensor
An AWT/Swing 2D mouse sensor. Sensor targets must have a Component graphic. Senses mouse events when the mouse is over or captured (a mouse button went down while over and is still down whether, or not the mouse is still over the target).
The initial button state should be output when the mouse is over a target when the sensor becomes active. Unfortunately, AWT (at least on Windows) allows detection of a mouse button being down, but not the subsequent release of the button since the release event is sent to the capture target, which may not be a sensor target. As such, this sensor does not output the initial button state when the mouse enters a sensor target.
Constructor Summary | |
SwingMouseSensor()
Creates an instance with a single DisplaySpace sensor target. |
Method Summary | |
protected void |
addedSensorTarget(SpaceNode target)
Throws an exception if target graphic not a Component. |
BooleanField.EventOut |
getMouseActiveOut()
Sends an event when the sensor starts or stops being active on a given sensor target. |
BooleanField.EventOut |
getMouseCaptureOut()
Sends an event when the sensor target captures or releases the mouse inputs (movement and buttons). |
BooleanField.EventIn |
getMouseEnableIn()
Enables/disables this sensor. |
CollectionField.EventOut |
getMouseEnteredKeysOut()
Sends an event containing the state (KeyboardSensors.KEY_???) of the keyboard modifier keys when a critical event occurs (new sensor target space, button change), before other outputs. |
BooleanField.EventOut |
getMouseOverOut()
Sends an event when the mouse enters or exists a sensor target area. |
BooleanField.EventIn |
getMousePickActiveIn()
If going true while this sensor is active, resends the mouse position and buttons. |
SpaceNodeField.EventOut |
getMouseSpaceOut()
Sends an event when the sensor starts being active in a new sensor target space. |
protected void |
implDispose()
Called by dispose() before the disposed flag is set, when it is time for subclasses to dispose themselves. |
protected void |
removedSensorTarget(SpaceNode target)
Called by the system when a non-missing target is removed, after updating the graphic map. |
Methods inherited from class gumbo.graphic.input.AbstractMouseSensor |
addMouseTarget, getButtonState, getGraphicMap, getMouseButtonsOut, getMouseMoveOut, getMovePoint, removeMouseTarget |
Methods inherited from class gumbo.util.AbstractDisposable |
dispose, isDisposed |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface gumbo.util.Disposable |
dispose, isDisposed |
Constructor Detail |
public SwingMouseSensor()
Method Detail |
public CollectionField.EventOut getMouseEnteredKeysOut()
public BooleanField.EventIn getMousePickActiveIn()
protected void addedSensorTarget(SpaceNode target)
addedSensorTarget
in class AbstractMouseSensor
target
- Reference to the target. Never null.protected void removedSensorTarget(SpaceNode target)
AbstractMouseSensor
removedSensorTarget
in class AbstractMouseSensor
target
- Reference to the target. Never null.public BooleanField.EventIn getMouseEnableIn()
MouseSensor
public BooleanField.EventOut getMouseOverOut()
MouseSensor
public BooleanField.EventOut getMouseCaptureOut()
MouseSensor
public SpaceNodeField.EventOut getMouseSpaceOut()
MouseSensor
public BooleanField.EventOut getMouseActiveOut()
MouseSensor
protected void implDispose()
AbstractDisposable
implDispose
in class AbstractDisposable
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |