|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.threerings.opengl.gui.Component
com.threerings.opengl.gui.Container
com.threerings.opengl.gui.List
public class List
Displays a list of selectable entries and fires an ActionEvent when the selected value
changes. Each entry is displayed as a string obtained by calling Object.toString() on the
supplied values.
| Field Summary |
|---|
| Fields inherited from class com.threerings.opengl.gui.Component |
|---|
DEFAULT, DISABLED, HOVER |
| Fields inherited from interface com.threerings.opengl.gui.Selectable |
|---|
SELECT |
| Constructor Summary | |
|---|---|
List(GlContext ctx)
Creates an empty list. |
|
List(GlContext ctx,
Object[] values)
Creates a list and populates it with the supplied values. |
|
| Method Summary | |
|---|---|
void |
addValue(Object value)
Adds a value to the list. |
Object |
getSelected()
Get the selected item, if any. |
int |
getSelectedIndex()
Get the index of the selected item, or -1. |
Object |
getSelectedValue()
Deprecated. |
boolean |
removeValue(Object value)
Removes a value from the list, if it is present. |
void |
setSelected(Object value)
Set the selected item. |
void |
setSelectedIndex(int index)
Set the index of the selected item. |
void |
setSelectedValue(Object value)
Deprecated. |
void |
setValues(Object[] values)
Sets the list's values. |
| Methods inherited from class com.threerings.opengl.gui.Container |
|---|
add, add, add, add, getComponent, getComponentCount, getComponentIndex, getHitComponent, getLayoutManager, remove, remove, removeAll, replace, setAlpha, setEnabled, setHoverable, setLayoutManager, validate |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public List(GlContext ctx)
public List(GlContext ctx,
Object[] values)
| Method Detail |
|---|
public void setValues(Object[] values)
public void addValue(Object value)
public boolean removeValue(Object value)
public Object getSelected()
Selectable
getSelected in interface Selectable<Object>public void setSelected(Object value)
Selectable
setSelected in interface Selectable<Object>public int getSelectedIndex()
Selectable
getSelectedIndex in interface Selectable<Object>public void setSelectedIndex(int index)
Selectable
setSelectedIndex in interface Selectable<Object>@Deprecated public Object getSelectedValue()
@Deprecated public void setSelectedValue(Object value)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||