public class GOptionGroup extends Object
Constructor and Description |
---|
GOptionGroup()
Use this constructor to create an option group.
|
GOptionGroup(PApplet theApplet)
Deprecated.
|
Modifier and Type | Method and Description |
---|---|
boolean |
addOption(GOption option)
INTERNAL USE ONLY
|
boolean |
addOption(int pos,
GOption option)
Add a new Option at the given position
|
int |
deselectedIndex()
INTERNAL USE ONLY
Return the index of the option that has just been deselected
|
GOption |
deselectedOption()
INTERNAL USE ONLY
Return the option that has just been deselected
|
String |
deselectedText()
INTERNAL USE ONLY
Return the text of the option that has just been deselected
|
GOption |
get(int index)
INTERNAL USE ONLY
|
ArrayList<GOption> |
getOptions() |
GOption |
removeOption(GOption option)
Remove an existing option
|
GOption |
removeOption(int index)
Remove an option at the given position
|
GOption |
removeOption(String optText)
Remove an option based on the option's text (this ignores case)
|
int |
selectedIndex()
INTERNAL USE ONLY
|
GOption |
selectedOption()
INTERNAL USE ONLY
Return the option that has just been selected
|
String |
selectedText()
INTERNAL USE ONLY
|
void |
setEnabled(boolean enable)
Enable or disable all the options in this group
|
void |
setSelected(GOption option)
Make this option the selected one
|
void |
setSelected(int index)
If index is in range make this one selected
|
void |
setSelected(String optText)
Set option selected based on the option text (this case insensitive)
|
int |
size()
Get the number of options in this GOptionGroup
|
public GOptionGroup()
public GOptionGroup(PApplet theApplet)
theApplet
- public void setEnabled(boolean enable)
enable
- public GOption get(int index)
index
- public boolean addOption(GOption option)
option
- public boolean addOption(int pos, GOption option)
pos
- option
- public GOption removeOption(GOption option)
option
- public GOption removeOption(int index)
index
- public GOption removeOption(String optText)
optText
- public void setSelected(GOption option)
option
- public void setSelected(int index)
index
- public void setSelected(String optText)
optText
- the text of the option to selectpublic GOption selectedOption()
public GOption deselectedOption()
public int selectedIndex()
public int deselectedIndex()
public String selectedText()
public String deselectedText()
public int size()
Processing library guicomponents by Peter Lager. (C) 2012