java.lang.Object
sky.monome.behavior.StaticBehavior
sky.monome.behavior.Member<T>
sky.monome.behavior.AbstractRadio<T>
- Type Parameters:
T
- Type of the associated radio group.
- All Implemented Interfaces:
- Behavior
- Direct Known Subclasses:
- OptionalRadio, Radio, SequencerRadio
public abstract class AbstractRadio<T extends AbstractRadio.AbstractRadioGroup<?,T>>
- extends Member<T>
Behavior that creates mutual selections/unselections, like radio fields in a form.
A radio behavior is associated to a radio group. The radio group is responsible for ensuring the unity of the selection inside the group.
- Author:
- PJ Skyman
Field Summary |
protected T |
radioGroup
Deprecated. Since SkyMonome v1.1, this field is not used anymore.
Please use the field group instead. |
Fields inherited from class sky.monome.behavior.Member |
group |
Constructor Summary |
AbstractRadio(T radioGroup)
Constructs a radio behavior associated to the specified radio group. |
Method Summary |
T |
getGroup()
Deprecated. With a radio, it is recommended to use the
getRadioGroup() method instead of this one. |
T |
getRadioGroup()
Returns the radio group associated to this radio behavior. |
protected void |
off()
Sets the led state of the registered led/button couple off. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
radioGroup
@Deprecated
protected final T extends AbstractRadio.AbstractRadioGroup<?,T> radioGroup
- Deprecated. Since SkyMonome v1.1, this field is not used anymore.
Please use the field
group
instead. - Associated radio group.
AbstractRadio
public AbstractRadio(T radioGroup)
- Constructs a radio behavior associated to the specified radio group.
- Parameters:
radioGroup
- Radio group that will be associated to this radio behavior.
off
protected void off()
throws MonomeException
- Sets the led state of the registered led/button couple off.
This method should only be called by radio groups when a radio button is pressed.
- Throws:
MonomeException
- When the led state can't be modified.
getRadioGroup
public T getRadioGroup()
- Returns the radio group associated to this radio behavior.
- Returns:
- The radio group associated to this radio behavior.
getGroup
@Deprecated
public T getGroup()
- Deprecated. With a radio, it is recommended to use the
getRadioGroup()
method instead of this one.
- Returns the group associated to this member behavior.
- Overrides:
getGroup
in class Member<T extends AbstractRadio.AbstractRadioGroup<?,T>>
- Returns:
- The group associated to this member behavior.