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

Constructor Index

 o DefaultTextListModel()
Constructs a one column text list model with the default rich text style.
 o DefaultTextListModel(int, int[])
Constructs a text list model with the specified number of columns and column widths.
 o DefaultTextListModel(int, int[], RichTextStyle)
Constructs a text list model with the specified number of columns, column widths, and rich text style.
 o DefaultTextListModel(int[])
Constructs a text list model with the specified column widths.
 o DefaultTextListModel(RichTextStyle)
Constructs a one column text list model with the specified rich text style.

Method Index

 o addListModelListener(ListModelListener)
Adds the specified list model listener to receive list model events from this text 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 in 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 getTextList()
Returns the text list of this text list model.
 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 text 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.
 o setTextStyle(TextStyle)
Sets the text style of this text list model.

Constructors

 o DefaultTextListModel
 public DefaultTextListModel()
Constructs a one column text list model with the default rich text style.

 o DefaultTextListModel
 public DefaultTextListModel(RichTextStyle richTextStyle)
Constructs a one column text list model with the specified rich text style.

Parameters:
richTextStyle - the rich text style.
 o DefaultTextListModel
 public DefaultTextListModel(int colWidths[])
Constructs a text list model with the specified column widths.

Parameters:
colWidths - the column widths.
 o 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.
 o 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.

Methods

 o getTextList
 public TextList getTextList()
Returns the text list of this text list model.

Returns:
the text list.
 o setTextStyle
 public void setTextStyle(TextStyle textStyle)
Sets the text style of this text list model.

Parameters:
textStyle - the text style.
 o 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.
 o 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.
 o getColumnCount
 public int getColumnCount()
Returns the number of columns in the list.

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

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

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

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

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

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