|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.gnu.glib.Struct
org.gnu.glib.GObject
org.gnu.gtk.GtkObject
org.gnu.gtk.Widget
org.gnu.gtk.SimpleList
public class SimpleList
This is a widget which contains a list of strings. It is a wrapper class for
the more powerful set of tree and list objects, described at TreeView
.
Constructor Summary | |
---|---|
SimpleList()
Constructs a SimpleList object. |
Method Summary | |
---|---|
void |
add(java.lang.String text,
int position)
Adds a new element at the given position |
void |
addEnd(java.lang.String text)
Adds an element to the end of the list |
void |
addStart(java.lang.String text)
Adds an element to the start of the list |
java.lang.String[] |
getEntries()
|
java.lang.String[] |
getSelected()
|
boolean |
getSelected(int index)
Returns true if the element at index is selected |
int |
getSize()
Returns the number of items in the list |
java.lang.String |
getValue(int position)
Returns the string at the given position |
void |
remove(int position)
Removes the element at the given position |
void |
remove(java.lang.String val)
Remove the given element. |
void |
select(int index)
Selects the element at index |
void |
setEditable(boolean setting)
Sets whether the user may edit the cell contents directly. |
void |
setSelectable(SelectionMode setting)
Sets how many of the elements can be selected. |
Methods inherited from class org.gnu.gtk.GtkObject |
---|
destroy, sink |
Methods inherited from class org.gnu.glib.Struct |
---|
equals, getHandle, getNullHandle, hashCode |
Methods inherited from class java.lang.Object |
---|
getClass, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public SimpleList()
Method Detail |
---|
public void addStart(java.lang.String text)
text
- the text of the elementpublic void addEnd(java.lang.String text)
text
- The text of the elementpublic void add(java.lang.String text, int position)
text
- The text of the new elementposition
- The position in which it should be placed. 0 is at the start
of the list.public java.lang.String getValue(int position)
position
- The position in the list to investigate
public boolean getSelected(int index)
index
is selected
public void select(int index)
index
public void setSelectable(SelectionMode setting)
public void remove(int position)
public void remove(java.lang.String val)
public void setEditable(boolean setting)
public int getSize()
public java.lang.String[] getSelected()
public java.lang.String[] getEntries()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |