public interface ListModel
ListModelEvent,
ListModelListener| 修飾子とタイプ | メソッドと説明 |
|---|---|
void |
addListModelListener(ListModelListener listener)
Adds the specified list model listener to receive list model events
from this list model.
|
int[] |
addSelection(int start,
int end)
Changes the selection to be the set union of the current selection
and indices in the specified range.
|
int |
getColumnCount()
Returns the number of columns in the list.
|
int[] |
getColumnWidths()
Returns the column widths of the list.
|
java.lang.Object |
getItem(int index,
int column)
Returns the item associated with the specified index (row) and column.
|
int |
getItemCount()
Returns the number of items in the list.
|
java.lang.Object[] |
getItems(int column)
Returns the items associated with the specified column index.
|
java.lang.Object[] |
getRowItems(int index)
Returns the items associated with the specified row index.
|
int |
getSelectedCount()
Returns the number of selected rows.
|
int[] |
getSelectedIndexes()
Returns the indices of the selected rows.
|
boolean |
isIndexSelected(int index)
Checks if the row at the specified index is selected.
|
void |
removeListModelListener(ListModelListener listener)
Removes the specified list model listener so it no longer receives
list model events from this list model.
|
int[] |
removeSelection(int start,
int end)
Changes the selection to be the set difference of the current
selection and indices in the specified range.
|
void |
replaceItems(int begin,
int end,
java.lang.Object[][] items)
Replaces the items in the specified range with the specified items.
|
void |
setColumnWidths(int[] colWidths)
Sets the column widths of the list to the specified widths.
|
void |
setItem(int index,
int column,
java.lang.Object value)
Sets the item associated with the specified index (row) and column
to the specified value.
|
int[][] |
setSelection(int start,
int end)
Changes the selection to be the specified range.
|
void addListModelListener(ListModelListener listener)
listener - the list model listener.void removeListModelListener(ListModelListener listener)
listener - the list model listener.int getColumnCount()
int[] getColumnWidths()
void setColumnWidths(int[] colWidths)
colWidths - the column widths.int getItemCount()
java.lang.Object getItem(int index,
int column)
index - the row position of the item.column - the column position of the item.void setItem(int index,
int column,
java.lang.Object value)
index - the row position of the item.column - the column position of the item.value - the new value.java.lang.Object[] getRowItems(int index)
index - the row position of the items.java.lang.Object[] getItems(int column)
column - the column position of the items.void replaceItems(int begin,
int end,
java.lang.Object[][] items)
begin - the beginning index to replace, inclusive.end - the ending index to replace, exclusive.items - the replacement row by column items.int getSelectedCount()
boolean isIndexSelected(int index)
index - the row position to be checked.true if the specified row has been selected;
false otherwise.int[] getSelectedIndexes()
int[][] setSelection(int start,
int end)
start - the starting index to select, inclusive.end - the ending index to select, inclusive.null if the
selection has not been changed.int[] addSelection(int start,
int end)
start - the starting index to select, inclusive.end - the ending index to select, inclusive.null if the selection has not been changed.int[] removeSelection(int start,
int end)
start - the starting index to select, inclusive.end - the ending index to select, inclusive.null if the selection has not been changed.