|
|||||||||||
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
Provides objects for maintaining mouse button and position state, and event out nodes initialized with immutable views of the state objects. Upon receiving a mouse input this sensor should update the corresponding state object and then invoke send() on the corresponding event out node to send an immutable state snapshot.
Constructor Summary | |
AbstractMouseSensor()
Creates an instance. |
Method Summary | |
protected abstract void |
addedSensorTarget(SpaceNode target)
Called by the system when a non-duplicate target is added, after updating the graphic map. |
void |
addMouseTarget(SpaceNode target)
Updates the graphic-to-target map, then calls addTargetSpace(). |
protected StateSet |
getButtonState()
Returns a reference to the object maintaining button state. |
protected java.util.Map |
getGraphicMap()
Returns an immutable view of the graphic (Object) to target (SpaceNode) map. |
StateSetField.EventOut |
getMouseButtonsOut()
Sends an immutable view of getButtonState(). |
Point3Field.EventOut |
getMouseMoveOut()
Sends an immutable view of getMovePoint(). |
protected Point3 |
getMovePoint()
Returns a reference to the object maintaining movement position. |
protected abstract void |
removedSensorTarget(SpaceNode target)
Called by the system when a non-missing target is removed, after updating the graphic map. |
void |
removeMouseTarget(SpaceNode target)
Updates the graphic-to-target map, then calls removeTargetSpace(). |
Methods inherited from class gumbo.util.AbstractDisposable |
dispose, implDispose, isDisposed |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface gumbo.graphic.input.MouseSensor |
getMouseActiveOut, getMouseCaptureOut, getMouseEnableIn, getMouseOverOut, getMouseSpaceOut |
Methods inherited from interface gumbo.util.Disposable |
dispose, isDisposed |
Constructor Detail |
public AbstractMouseSensor()
Method Detail |
protected StateSet getButtonState()
protected Point3 getMovePoint()
protected java.util.Map getGraphicMap()
protected abstract void addedSensorTarget(SpaceNode target)
target
- Reference to the target. Never null.protected abstract void removedSensorTarget(SpaceNode target)
target
- Reference to the target. Never null.public final void addMouseTarget(SpaceNode target)
addMouseTarget
in interface MouseSensor
target
- Reference to the target. Never null.
Duplicates are ignored.public final void removeMouseTarget(SpaceNode target)
removeMouseTarget
in interface MouseSensor
target
- Reference to the target. Never null.
Missing are ignored.public final StateSetField.EventOut getMouseButtonsOut()
getMouseButtonsOut
in interface MouseSensor
public final Point3Field.EventOut getMouseMoveOut()
getMouseMoveOut
in interface MouseSensor
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |