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

Method Index

 o addListModelListener(ListModelListener)
Adds the specified list model listener to receive list model events from this list model.
 o addSelection(int, int)
Changes the selection to be the set union of the current selection and indices in the specified range.
 o getColumnCount()
Returns the number of columns in the list.
 o getColumnWidths()
Returns the column widths of the list.
 o getItem(int, int)
Returns the item associated with the specified index (row) and column.
 o getItemCount()
Returns the number of items in the list.
 o getItems(int)
Returns the items associated with the specified column index.
 o getRowItems(int)
Returns the items associated with the specified row index.
 o getSelectedCount()
Returns the number of selected rows.
 o getSelectedIndexes()
Returns the indices of the selected rows.
 o isIndexSelected(int)
Checks if the row at the specified index is selected.
 o removeListModelListener(ListModelListener)
Removes the specified list model listener so it no longer receives list model events from this list model.
 o removeSelection(int, int)
Changes the selection to be the set difference of the current selection and indices in the specified range.
 o replaceItems(int, int, Object[][])
Replaces the items in the specified range with the specified items.
 o setColumnWidths(int[])
Sets the column widths of the list to the specified widths.
 o setItem(int, int, Object)
Sets the item associated with the specified index (row) and column to the specified value.
 o setSelection(int, int)
Changes the selection to be the specified range.

Methods

 o 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.
 o 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.
 o getColumnCount
 public abstract int getColumnCount()
Returns the number of columns in the list.

 o getColumnWidths
 public abstract int[] getColumnWidths()
Returns the column widths of the list.

 o setColumnWidths
 public abstract void setColumnWidths(int colWidths[])
Sets the column widths of the list to the specified widths.

Parameters:
colWidths - the column widths.
 o getItemCount
 public abstract int getItemCount()
Returns the number of items in the list.

 o 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.
 o 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.
 o 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.
 o 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.
 o 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.
 o getSelectedCount
 public abstract int getSelectedCount()
Returns the number of selected rows.

 o 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.
 o getSelectedIndexes
 public abstract int[] getSelectedIndexes()
Returns the indices of the selected rows.

Returns:
an array of the indices of the selected rows.
 o 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.
 o 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.
 o 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