All Packages Class Hierarchy This Package Previous Next Index
Interface jp.kyasu.awt.ListModel
- public interface ListModel
The model interface for an object that acts as a list model.
- Version:
- 18 Dec 1997
- Author:
- Kazuki YASUMATSU
- See Also:
- ListModelEvent, ListModelListener
-
addListModelListener(ListModelListener)
- Adds the specified list model listener to receive list model events
from this list model.
-
addSelection(int, int)
- Changes the selection to be the set union of the current selection
and indices in the specified range.
-
getColumnCount()
- Returns the number of columns in the list.
-
getColumnWidths()
- Returns the column widths of the list.
-
getItem(int, int)
- Returns the item associated with the specified index (row) and column.
-
getItemCount()
- Returns the number of items in the list.
-
getItems(int)
- Returns the items associated with the specified column index.
-
getRowItems(int)
- Returns the items associated with the specified row index.
-
getSelectedCount()
- Returns the number of selected rows.
-
getSelectedIndexes()
- Returns the indices of the selected rows.
-
isIndexSelected(int)
- Checks if the row at the specified index is selected.
-
removeListModelListener(ListModelListener)
- Removes the specified list model listener so it no longer receives
list model events from this list model.
-
removeSelection(int, int)
- Changes the selection to be the set difference of the current
selection and indices in the specified range.
-
replaceItems(int, int, Object[][])
- Replaces the items in the specified range with the specified items.
-
setColumnWidths(int[])
- Sets the column widths of the list to the specified widths.
-
setItem(int, int, Object)
- Sets the item associated with the specified index (row) and column
to the specified value.
-
setSelection(int, int)
- Changes the selection to be the specified range.
addListModelListener
public abstract void addListModelListener(ListModelListener listener)
- Adds the specified list model listener to receive list model events
from this list model.
- Parameters:
- listener - the list model listener.
removeListModelListener
public abstract void removeListModelListener(ListModelListener listener)
- Removes the specified list model listener so it no longer receives
list model events from this list model.
- Parameters:
- listener - the list model listener.
getColumnCount
public abstract int getColumnCount()
- Returns the number of columns in the list.
getColumnWidths
public abstract int[] getColumnWidths()
- Returns the column widths of the list.
setColumnWidths
public abstract void setColumnWidths(int colWidths[])
- Sets the column widths of the list to the specified widths.
- Parameters:
- colWidths - the column widths.
getItemCount
public abstract int getItemCount()
- Returns the number of items in the list.
getItem
public abstract Object getItem(int index,
int column)
- Returns the item associated with the specified index (row) and column.
- Parameters:
- index - the row position of the item.
- column - the column position of the item.
- Returns:
- an item that is associated with the specified index and column.
setItem
public abstract void setItem(int index,
int column,
Object value)
- Sets the item associated with the specified index (row) and column
to the specified value.
- Parameters:
- index - the row position of the item.
- column - the column position of the item.
- value - the new value.
getRowItems
public abstract Object[] getRowItems(int index)
- Returns the items associated with the specified row index.
- Parameters:
- index - the row position of the items.
- Returns:
- an item that is associated with the specified row index.
getItems
public abstract Object[] getItems(int column)
- Returns the items associated with the specified column index.
- Parameters:
- column - the column position of the items.
- Returns:
- an item that is associated with the specified column.
replaceItems
public abstract void replaceItems(int begin,
int end,
Object items[][])
- Replaces the items in the specified range with the specified items.
- Parameters:
- begin - the beginning index to replace, inclusive.
- end - the ending index to replace, exclusive.
- items - the replacement row by column items.
getSelectedCount
public abstract int getSelectedCount()
- Returns the number of selected rows.
isIndexSelected
public abstract boolean isIndexSelected(int index)
- Checks if the row at the specified index is selected.
- Parameters:
- index - the row position to be checked.
- Returns:
-
true
if the specified row has been selected;
false
otherwise.
getSelectedIndexes
public abstract int[] getSelectedIndexes()
- Returns the indices of the selected rows.
- Returns:
- an array of the indices of the selected rows.
setSelection
public abstract int[][] setSelection(int start,
int end)
- Changes the selection to be the specified range.
- Parameters:
- start - the starting index to select, inclusive.
- end - the ending index to select, inclusive.
- Returns:
- an array of the indices of the added items and an array of
the indices of removed items, or
null
if the
selection has not been changed.
addSelection
public abstract int[] addSelection(int start,
int end)
- Changes the selection to be the set union of the current selection
and indices in the specified range.
- Parameters:
- start - the starting index to select, inclusive.
- end - the ending index to select, inclusive.
- Returns:
- an array of the indices of the added items, or
null
if the selection has not been changed.
removeSelection
public abstract int[] removeSelection(int start,
int end)
- Changes the selection to be the set difference of the current
selection and indices in the specified range.
- Parameters:
- start - the starting index to select, inclusive.
- end - the ending index to select, inclusive.
- Returns:
- an array of the indices of the removed items, or
null
if the selection has not been changed.
All Packages Class Hierarchy This Package Previous Next Index