|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnet.jinx.action.input.robot.AbstractControl
net.jinx.action.input.robot.ButtonControl
public abstract class ButtonControl
ButtonControl is an AbstractControl extension that converts it's input
values to a boolean state. It can be in either a pressed or released state.
API Stability: Alpha.
| Field Summary |
|---|
| Fields inherited from interface net.jinx.action.input.robot.Control |
|---|
TYPE_AXIS, TYPE_BUTTON, TYPE_SLIDER, TYPE_TOGGLE |
| Constructor Summary | |
|---|---|
protected |
ButtonControl(java.lang.String name)
Constructs a new ButtonControl with the given name. |
| Method Summary | |
|---|---|
boolean |
isOn()
Determines if this ButtonControl is currently on. |
boolean |
isPressed()
Determines if this ButtonControl is currently pressed. |
protected abstract void |
pressed()
Called when the state has changed from released to pressed. |
protected abstract void |
released()
Called when the state has changed from pressed to released. |
void |
setValue(float value)
Rounds value to either zero or one. |
protected void |
valueChange()
Calls pressed() or released() according to whether or not isPressed() returns true. |
| Methods inherited from class net.jinx.action.input.robot.AbstractControl |
|---|
getName, getType, getValue |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
protected ButtonControl(java.lang.String name)
name - the name to use for this Control.| Method Detail |
|---|
public void setValue(float value)
setValue in interface ControlsetValue in class AbstractControlvalue - the new value.public boolean isPressed()
public boolean isOn()
protected void valueChange()
valueChange in class AbstractControlprotected abstract void pressed()
protected abstract void released()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||