|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.ObjectcontrolP5.ControllerGroup
controlP5.ControlGroup
controlP5.RadioButton
public class RadioButton
a radio button implementation.
Constructor Summary | |
---|---|
RadioButton(ControlP5 theControlP5,
ControllerGroup theParent,
java.lang.String theName,
int theX,
int theY)
a radioButton is a list of toggles that can be turned on or off. |
Method Summary | |
---|---|
void |
activate(int theIndex)
deactivate the currently active radio button and make a new radio button active. |
void |
activate(java.lang.String theRadioButtonName)
|
Toggle |
addItem(java.lang.String theName,
float theValue)
add items to a radioButton/checkBox. |
Toggle |
addItem(Toggle theToggle,
float theValue)
add items to a radioButton/checkBox. |
void |
controlEvent(ControlEvent theEvent)
controlEvent is called whenever a radioButton item is (de-)activated. |
void |
deactivate(int theIndex)
deactivate a radio button. |
void |
deactivate(java.lang.String theRadioButtonName)
deactivate a RadioButton and set the value of the radio controller to the default value (-1). |
void |
deactivateAll()
deactivate all radioButton items. |
Toggle |
getItem(int theIndex)
get an item from the list of toggles by index. |
boolean |
getState(int theIndex)
get the state of a checkBox item - which can be true (for on) and false (for off). |
boolean |
getState(java.lang.String theRadioButtonName)
get the state of a checkBox item - which can be true (for on) and false (for off). |
void |
removeItem(java.lang.String theName)
remove an item from the radioButton/checkBox list. |
void |
setItemHeight(int theItemHeight)
set the height of a radioButton/checkBox item. |
void |
setItemsPerRow(int theValue)
items for a radioButton or a checkBox are organized in columns and rows. |
void |
setItemWidth(int theItemWidth)
set the width of a radioButton/checkBox item. |
void |
setSpacingColumn(int theSpacing)
set the (pixel) spacing between columns. |
void |
setSpacingRow(int theSpacing)
set the (pixel) spacing between rows. |
void |
toggle(int theIndex)
|
void |
updateLayout()
|
Methods inherited from class controlP5.ControlGroup |
---|
activateEvent, addCloseButton, addToXMLElement, arrayValue, getBackgroundHeight, hideBar, isBarVisible, mousePressed, removeCloseButton, setBackgroundColor, setBackgroundHeight, setBarHeight, showBar, stringValue, value |
Methods inherited from class controlP5.ControllerGroup |
---|
absolutePosition, add, addCanvas, addDrawable, captionLabel, close, color, continuousUpdateEvents, controller, draw, getAsXML, getColor, getTab, getWindow, hide, id, init, isMoveable, isOpen, isUpdate, isVisible, isXMLsavable, keyEvent, moveTo, moveTo, moveTo, moveTo, moveTo, moveTo, moveTo, name, open, position, remove, remove, remove, removeCanvas, setColorActive, setColorBackground, setColorForeground, setColorLabel, setColorValue, setGroup, setGroup, setId, setLabel, setMousePressed, setMoveable, setOpen, setPosition, setTab, setTab, setTab, setUpdate, setVisible, show, update, updateAbsolutePosition, updateEvents, updateInternalEvents, valueLabel |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public RadioButton(ControlP5 theControlP5, ControllerGroup theParent, java.lang.String theName, int theX, int theY)
theControlP5
- theParent
- theName
- theX
- theY
- Method Detail |
---|
public Toggle addItem(java.lang.String theName, float theValue)
theName
- theValue
-
public Toggle addItem(Toggle theToggle, float theValue)
theToggle
- theValue
-
public void removeItem(java.lang.String theName)
theName
- public void setItemHeight(int theItemHeight)
theItemHeight
- public void setItemWidth(int theItemWidth)
theItemWidth
- public Toggle getItem(int theIndex)
theIndex
-
public boolean getState(int theIndex)
theIndex
-
public boolean getState(java.lang.String theRadioButtonName)
theRadioButtonName
-
public void updateLayout()
public void setItemsPerRow(int theValue)
theValue
- public void setSpacingColumn(int theSpacing)
theSpacing
- public void setSpacingRow(int theSpacing)
theSpacing
- public void deactivateAll()
public void activate(int theIndex)
theIndex
- public void deactivate(int theIndex)
theIndex
- public void activate(java.lang.String theRadioButtonName)
public void deactivate(java.lang.String theRadioButtonName)
theRadioButtonName
- public void toggle(int theIndex)
public void controlEvent(ControlEvent theEvent)
controlEvent
in interface ControlListener
controlEvent
in class ControlGroup
theEvent
- ControlEvent
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |