All Packages Class Hierarchy This Package Previous Next Index
Class jp.kyasu.awt.DefaultTextListModel
java.lang.Object
|
+----jp.kyasu.awt.DefaultTextListModel
- public class DefaultTextListModel
- extends Object
- implements TextListModel, Serializable
The DefaultTextListModel
class is a default implementation
of the TextListModel
interface.
- Version:
- 12 Dec 1998
- Author:
- Kazuki YASUMATSU
-
DefaultTextListModel()
- Constructs a one column text list model with the default rich text
style.
-
DefaultTextListModel(int, int[])
- Constructs a text list model with the specified number of columns
and column widths.
-
DefaultTextListModel(int, int[], RichTextStyle)
- Constructs a text list model with the specified number of columns,
column widths, and rich text style.
-
DefaultTextListModel(int[])
- Constructs a text list model with the specified column widths.
-
DefaultTextListModel(RichTextStyle)
- Constructs a one column text list model with the specified rich text
style.
-
addListModelListener(ListModelListener)
- Adds the specified list model listener to receive list model events
from this text 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 in 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.
-
getTextList()
- Returns the text list of this text list model.
-
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 text 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.
-
setTextStyle(TextStyle)
- Sets the text style of this text list model.
DefaultTextListModel
public DefaultTextListModel()
- Constructs a one column text list model with the default rich text
style.
DefaultTextListModel
public DefaultTextListModel(RichTextStyle richTextStyle)
- Constructs a one column text list model with the specified rich text
style.
- Parameters:
- richTextStyle - the rich text style.
DefaultTextListModel
public DefaultTextListModel(int colWidths[])
- Constructs a text list model with the specified column widths.
- Parameters:
- colWidths - the column widths.
DefaultTextListModel
public DefaultTextListModel(int columns,
int colWidths[])
- Constructs a text list model with the specified number of columns
and column widths.
- Parameters:
- columns - the number of columns.
- colWidths - the column widths.
DefaultTextListModel
public DefaultTextListModel(int columns,
int colWidths[],
RichTextStyle richTextStyle)
- Constructs a text list model with the specified number of columns,
column widths, and rich text style.
- Parameters:
- columns - the number of columns.
- colWidths - the column widths.
- richTextStyle - the rich text style.
getTextList
public TextList getTextList()
- Returns the text list of this text list model.
- Returns:
- the text list.
setTextStyle
public void setTextStyle(TextStyle textStyle)
- Sets the text style of this text list model.
- Parameters:
- textStyle - the text style.
addListModelListener
public void addListModelListener(ListModelListener listener)
- Adds the specified list model listener to receive list model events
from this text list model.
- Parameters:
- listener - the list model listener.
removeListModelListener
public void removeListModelListener(ListModelListener listener)
- Removes the specified list model listener so it no longer receives
list model events from this text list model.
- Parameters:
- listener - the list model listener.
getColumnCount
public int getColumnCount()
- Returns the number of columns in the list.
getColumnWidths
public int[] getColumnWidths()
- Returns the column widths of the list.
setColumnWidths
public synchronized void setColumnWidths(int colWidths[])
- Sets the column widths of the list to the specified widths.
- Parameters:
- colWidths - the column widths.
getItemCount
public int getItemCount()
- Returns the number of items in the list.
getItem
public 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 synchronized 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 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 Object[] getItems(int column)
- Returns the items in the specified column index.
- Parameters:
- column - the column position of the items.
- Returns:
- items in the specified column.
replaceItems
public synchronized 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 int getSelectedCount()
- Returns the number of selected rows.
isIndexSelected
public 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 int[] getSelectedIndexes()
- Returns the indices of the selected rows.
- Returns:
- an array of the indices of the selected rows.
setSelection
public synchronized 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 synchronized 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 synchronized 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