Method Summary |
|
public synchronized SList | addItemListener(ItemListener listener) Adds the specified item listener to receive item events from
this list. |
public void | addSelectionInterval(int anchor, int lead) Set the selection to be the union of the specified interval with current
selection. |
public void | clearSelection() Clears the selection - after calling this method isSelectionEmpty()
will return true. |
protected ListSelectionModel | createSelectionModel() Returns an instance of DefaultListSelectionModel. |
public int | getAnchorSelectionIndex() Returns the first index argument from the most recent addSelectionInterval
or setSelectionInterval call. |
public Object | getElementAt(int index) Returns the nth item in the list. |
public int | getElementCount() Returns the number of items in the list. |
public int | getLeadSelectionIndex() Returns the second index argument from the most recent addSelectionInterval
or setSelectionInterval call. |
public int | getMaxSelectionIndex() Returns the largest selected cell index. |
public int | getMinSelectionIndex() Returns the lisSelectionModelallest selected cell index. |
public ListModel | getModel() Returns the data model that holds the list of items displayed
by the SList component. |
public int | getSelectedIndex() A convenience method that returns the first selected index. |
public int[] | getSelectedIndices() Return an array of all of the selected indices in increasing
order. |
public Object | getSelectedValue() A convenience method that returns the first selected value
or null, if the selection is empty. |
public Object[] | getSelectedValues() Return an array of the values for the selected cells. |
public int | getSelectionMode() Returns whether single-item or multiple-item selections are allowed. |
public ListSelectionModel | getSelectionModel() Returns the value of the current selection model. |
public Class | getUIClass() Returns the name of the L&F class that renders this component. |
public int | getVisibleRowCount() Return the preferred number of visible rows. |
public boolean | isSelectedIndex(int index) Returns true if the specified index is selected. |
public boolean | isSelectionEmpty() |
public synchronized SList | removeItemListener(ItemListener listener) Removes the specified item listener so that it no longer
receives item events from this list. |
public void | removeSelectionInterval(int index0, int index1) Set the selection to be the set difference of the specified interval
and the current selection. |
public SList | setListData(Object[] array) A convenience method that constructs a ListModel from an array of Objects
and then applies setModel to it. |
public SList | setListData(Vector vector) A convenience method that constructs a ListModel from a Vector
and then applies setModel to it. |
public SList | setModel(ListModel model) Sets the model that represents the contents or "value" of the
list and clears the list selection after notifying PropertyChangeListeners. |
public SList | setSelectedIndex(int index) Select a single cell. |
public SList | setSelectedIndices(int[] indices) Select a set of cells. |
public SList | setSelectionInterval(int anchor, int lead) Select the specified interval. |
public SList | setSelectionMode(int selectionMode) Determines whether single-item or multiple-item
selections are allowed.
The following selectionMode values are allowed:
-
SINGLE_SELECTION
Only one list index can be selected at a time. |
public SComponent | setValueAsText(String text) Set the value as Text. |
public SList | setVisibleRowCount(int visibleRowCount) Set the preferred number of rows in the list that can be displayed
without a scollbar, as determined by the nearest JViewport ancestor,
if any. |