org.gnu.gtk

Class SimpleList

public class SimpleList extends Widget

Deprecated: This class is part of the java-gnome 2.x family of libraries, which, due to their inefficiency and complexity, are no longer being maintained and have been abandoned by the java-gnome project. This class may in the future have an equivalent in java-gnome 4.0, try looking for org.gnome.gtk.SimpleList. You should be aware that there is a considerably different API in the new library: the architecture is completely different and most notably internals are no longer exposed to public view.

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
voidadd(String text, int position)
Adds a new element at the given position
voidaddEnd(String text)
Adds an element to the end of the list
voidaddStart(String text)
Adds an element to the start of the list
String[]getEntries()
booleangetSelected(int index)
Returns true if the element at index is selected
String[]getSelected()
intgetSize()
Returns the number of items in the list
StringgetValue(int position)
Returns the string at the given position
voidremove(int position)
Removes the element at the given position
voidremove(String val)
Remove the given element.
voidselect(int index)
Selects the element at index
voidsetEditable(boolean setting)
Sets whether the user may edit the cell contents directly.
voidsetSelectable(SelectionMode setting)
Sets how many of the elements can be selected.

Constructor Detail

SimpleList

public SimpleList()

Deprecated: Superceeded by java-gnome 4.0; a method along these lines may well exist in the new bindings, but if it does it likely has a different name or signature due to the shift to an algorithmic mapping of the underlying native libraries.

Constructs a SimpleList object.

Method Detail

add

public void add(String text, int position)

Deprecated: Superceeded by java-gnome 4.0; a method along these lines may well exist in the new bindings, but if it does it likely has a different name or signature due to the shift to an algorithmic mapping of the underlying native libraries.

Adds a new element at the given position

Parameters: text The text of the new element position The position in which it should be placed. 0 is at the start of the list.

addEnd

public void addEnd(String text)

Deprecated: Superceeded by java-gnome 4.0; a method along these lines may well exist in the new bindings, but if it does it likely has a different name or signature due to the shift to an algorithmic mapping of the underlying native libraries.

Adds an element to the end of the list

Parameters: text The text of the element

addStart

public void addStart(String text)

Deprecated: Superceeded by java-gnome 4.0; a method along these lines may well exist in the new bindings, but if it does it likely has a different name or signature due to the shift to an algorithmic mapping of the underlying native libraries.

Adds an element to the start of the list

Parameters: text the text of the element

getEntries

public String[] getEntries()

getSelected

public boolean getSelected(int index)

Deprecated: Superceeded by java-gnome 4.0; a method along these lines may well exist in the new bindings, but if it does it likely has a different name or signature due to the shift to an algorithmic mapping of the underlying native libraries.

Returns true if the element at index is selected

getSelected

public String[] getSelected()

getSize

public int getSize()

Deprecated: Superceeded by java-gnome 4.0; a method along these lines may well exist in the new bindings, but if it does it likely has a different name or signature due to the shift to an algorithmic mapping of the underlying native libraries.

Returns the number of items in the list

getValue

public String getValue(int position)

Deprecated: Superceeded by java-gnome 4.0; a method along these lines may well exist in the new bindings, but if it does it likely has a different name or signature due to the shift to an algorithmic mapping of the underlying native libraries.

Returns the string at the given position

Parameters: position The position in the list to investigate

Returns: The value of the cell at that position

remove

public void remove(int position)

Deprecated: Superceeded by java-gnome 4.0; a method along these lines may well exist in the new bindings, but if it does it likely has a different name or signature due to the shift to an algorithmic mapping of the underlying native libraries.

Removes the element at the given position

remove

public void remove(String val)

Deprecated: Superceeded by java-gnome 4.0; a method along these lines may well exist in the new bindings, but if it does it likely has a different name or signature due to the shift to an algorithmic mapping of the underlying native libraries.

Remove the given element. This iterates over the elements contained in the list until a matching element is found.

select

public void select(int index)

Deprecated: Superceeded by java-gnome 4.0; a method along these lines may well exist in the new bindings, but if it does it likely has a different name or signature due to the shift to an algorithmic mapping of the underlying native libraries.

Selects the element at index

setEditable

public void setEditable(boolean setting)

Deprecated: Superceeded by java-gnome 4.0; a method along these lines may well exist in the new bindings, but if it does it likely has a different name or signature due to the shift to an algorithmic mapping of the underlying native libraries.

Sets whether the user may edit the cell contents directly.

setSelectable

public void setSelectable(SelectionMode setting)

Deprecated: Superceeded by java-gnome 4.0; a method along these lines may well exist in the new bindings, but if it does it likely has a different name or signature due to the shift to an algorithmic mapping of the underlying native libraries.

Sets how many of the elements can be selected.