All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class jp.kyasu.awt.List

java.lang.Object
   |
   +----java.awt.Component
           |
           +----java.awt.Container
                   |
                   +----jp.kyasu.awt.KContainer
                           |
                           +----jp.kyasu.awt.EventProxyContainer
                                   |
                                   +----jp.kyasu.awt.List

public class List
extends EventProxyContainer
implements ItemSelectable, ActionListener, ItemListener
The List component presents the user with a scrolling list of text items. The list can be set up so that the user can choose either one item or multiple items.

A List is an MVC-based component. The model of the List is a TextListModel object, the view of the List is a TextListView object, and the controller of the List is a TextListController object.

A List emits a ListActionEvent and a ListItemEvent.

Version:
12 Dec 1998
Author:
Kazuki YASUMATSU
See Also:
ListModel, TextListModel, TextListView, TextListController, ListActionEvent, ListItemEvent

Variable Index

 o MULTIPLE_SELECTIONS
Allows AWT style multiple selections.
 o SHIFT_MULTIPLE_SELECTIONS
Allows Windows style multiple selections.
 o SINGLE_SELECTION
Allows single selection.

Constructor Index

 o List()
Creates a new scrolling list.
 o List(int)
Creates a new scrolling list initialized with the specified number of visible lines.
 o List(int, boolean)
Creates a new scrolling list initialized to display the specified number of rows.
 o List(int, boolean, int)
Creates a new scrolling list initialized to display the specified number of rows, multipleMode, and scroll bar visibility..
 o List(RichTextStyle, int)
Creates a new scrolling list with the specified style and number of rows.
 o List(RichTextStyle, int, boolean)
Creates a new scrolling list with the specified style, number of rows, and multipleMode.
 o List(RichTextStyle, int, boolean, int)
Creates a new scrolling list with the specified style, number of rows, multipleMode, and scroll bar visibility.
 o List(TextListModel, int)
Creates a new scrolling list with the specified model and number of rows.
 o List(TextListModel, int, boolean)
Creates a new scrolling list with the specified model, number of rows, and multipleMode.
 o List(TextListModel, int, boolean, int)
Creates a new scrolling list with the specified model, number of rows, multipleMode, and scroll bar visibility.
 o List(TextListModel, int, boolean, int, VBorder)
Creates a new scrolling list with the specified model, number of rows, multipleMode, scroll bar visibility, and border visual.

Method Index

 o actionPerformed(ActionEvent)
Invoked when an action occurs.
 o add(String)
Adds the specified item to the end of scrolling list.
 o add(String, int)
Adds the specified item to the the scrolling list.
 o add(Text)
Adds the specified text item to the end of scrolling list.
 o add(Text, int)
Adds the specified item to the scrolling list.
 o addActionListener(ActionListener)
Adds the specified action listener to receive action events from this list.
 o addItem(String)
Adds the specified item to the end of scrolling list.
 o addItem(String, int)
Adds the specified item to the the scrolling list.
 o addItem(Text)
Adds the specified text item to the end of scrolling list.
 o addItem(Text, int)
Adds the specified text item to the scrolling list.
 o addItemListener(ItemListener)
Adds the specified item listener to receive item events from this list.
 o addTextItem(Text)
Adds the specified text item to the end of the scrolling list.
 o addTextItem(Text, int)
Adds the specified text item to the end of the scrolling list.
 o allowsMultipleSelections()
Deprecated.
 o clear()
Deprecated.
 o countItems()
Deprecated.
 o delItem(int)
Removes the item at the specified position from this list.
 o delItems(int, int)
Deprecated.
 o deselect(int)
Deselects the item at the specified index.
 o getController()
Returns the controller of this list.
 o getItem(int)
Returns the item associated with the specified index.
 o getItemCount()
Returns the number of items in the list.
 o getItems()
Returns the items in the list.
 o getMinimumSize()
Returns the minimum size of this scrolling list.
 o getMinimumSize(int)
Returns the minumum dimensions for a list with the specified number of rows.
 o getModel()
Returns the model of this list.
 o getPopupMenu()
Returns the popup menu of this list.
 o getPreferredSize()
Returns the preferred size of this scrolling list.
 o getPreferredSize(int)
Returns the preferred dimensions for a list with the specified number of rows.
 o getRows()
Get the number of visible lines in this list.
 o getScrollbarThickness()
Returns the thickness of the scroll bar.
 o getSelectedIndex()
Gets the index of the selected item on the list,
 o getSelectedIndexes()
Gets the selected indexes on the list.
 o getSelectedItem()
Get the selected item on this scrolling list.
 o getSelectedItems()
Get the selected items on this scrolling list.
 o getSelectedObjects()
Returns the selected items on the list in an array of Objects.
 o getSelectedTextItem()
Get the selected text item on this scrolling list.
 o getSelectedTextItems()
Get the selected text items on this scrolling list.
 o getSelectionBackground()
Returns the selection background color.
 o getSelectionForeground()
Returns the selection foreground color.
 o getSelectionMode()
Returns the selection mode.
 o getTextItem(int)
Returns the text item associated with the specified index.
 o getTextItems()
Returns the text items in the list.
 o getView()
Returns the view of this list.
 o getVisibleIndex()
Gets the index of the item that was last made visible by the method makeVisible.
 o isClickToFocus()
Tests if the list requests the focus when the mouse is clicked.
 o isDeselectionEnabled()
Tests if the deselection is enabled when the selection mode is a single selection.
 o isIndexSelected(int)
Determines if the specified item in this scrolling list is selected.
 o isMouseFocus()
Tests if the list requests the focus when the mouse enters the list.
 o isMultipleMode()
Determines whether this list allows multiple selections.
 o isSelected(int)
Deprecated.
 o itemStateChanged(ItemEvent)
Invoked when an item's state has been changed.
 o makeVisible(int)
Makes the item at the specified index visible.
 o minimumSize(int)
Deprecated.
 o preferredSize(int)
Deprecated.
 o remove(int)
Remove the item at the specified position from this scrolling list.
 o remove(int, int)
Remove the items at the specified row range.
 o remove(int[])
Remove the items at the specified row indices.
 o remove(String)
Removes the first occurrence of an item from the list.
 o removeActionListener(ActionListener)
Removes the specified action listener so that it no longer receives action events from this list.
 o removeAll()
Removes all items from this list.
 o removeItemListener(ItemListener)
Removes the specified item listener so that it no longer receives item events from this list.
 o removeSelectedIndexes()
Remove the items at the indices of the selected rows.
 o replaceItem(String, int)
Replaces the item at the specified index in the scrolling list with the new string.
 o replaceItem(Text, int)
Replaces the item at the specified index in the scrolling list with the new text.
 o replaceTextItem(Text, int)
Replaces the item at the specified index in the scrolling list with the new text.
 o select(int)
Selects the item at the specified index in the scrolling list.
 o select(String)
Sets the selected item in this list to be the item whose name is equal to the specified string.
 o setBackground(Color)
Sets the background color of this list.
 o setClickToFocus()
Makes the list request the focus when the mouse is clicked.
 o setCursor(Cursor)
Sets the cursor of this list.
 o setDeselectionEnabled(boolean)
Makes the deselection enabled when the selection mode is a single selection.
 o setEnabled(boolean)
Enables or disables this list.
 o setFont(Font)
Sets the font of this list.
 o setForeground(Color)
Sets the foreground color of this list.
 o setItems(String[])
Sets the items of the list to the specified string items.
 o setItems(Text[])
Sets the items of the list to the specified text items.
 o setMouseFocus()
Makes the list request the focus when the mouse enters the list.
 o setMultipleMode(boolean)
Sets the flag that determines whether this list allows multiple selections.
 o setMultipleSelections(boolean)
Deprecated.
 o setPopupMenu(PopupMenu)
Sets the popup menu of this list.
 o setRows(int)
Sets the number of visible lines in this list.
 o setScrollbarThickness(int)
Sets the thickness of the scroll bar.
 o setSelectionBackground(Color)
Sets the selection background color.
 o setSelectionForeground(Color)
Sets the selection foreground color.
 o setSelectionMode(int)
Sets the selection mode.
 o setTextItems(Text[])
Sets the items of the list to the specified text items.

Variables

 o SINGLE_SELECTION
 public static final int SINGLE_SELECTION
Allows single selection.

 o MULTIPLE_SELECTIONS
 public static final int MULTIPLE_SELECTIONS
Allows AWT style multiple selections.

 o SHIFT_MULTIPLE_SELECTIONS
 public static final int SHIFT_MULTIPLE_SELECTIONS
Allows Windows style multiple selections.

Constructors

 o List
 public List()
Creates a new scrolling list. Initially there are no visible lines, and only one item can be selected from the list.

 o List
 public List(int rows)
Creates a new scrolling list initialized with the specified number of visible lines. By default, multiple selections are not allowed.

Parameters:
rows - the number of items to show.
 o List
 public List(int rows,
             boolean multipleMode)
Creates a new scrolling list initialized to display the specified number of rows. If the value of multipleMode is true, then the user can select multiple items from the list. If it is false, only one item at a time can be selected.

Parameters:
rows - the number of items to show.
multipleMode - if true, then multiple selections are allowed; otherwise, only one item can be selected at a time.
 o List
 public List(int rows,
             boolean multipleMode,
             int scrollbars)
Creates a new scrolling list initialized to display the specified number of rows, multipleMode, and scroll bar visibility..

Parameters:
rows - the number of items to show.
multipleMode - if true, then multiple selections are allowed; otherwise, only one item can be selected at a time.
scrollbars - a constant that determines what scrollbars are created to view the list.
 o List
 public List(RichTextStyle richTextStyle,
             int rows)
Creates a new scrolling list with the specified style and number of rows.

Parameters:
richTextStyle - the style of the text list model.
rows - the number of items to show.
 o List
 public List(RichTextStyle richTextStyle,
             int rows,
             boolean multipleMode)
Creates a new scrolling list with the specified style, number of rows, and multipleMode.

Parameters:
richTextStyle - the style of the text list model.
rows - the number of items to show.
multipleMode - if true, then multiple selections are allowed; otherwise, only one item can be
 o List
 public List(RichTextStyle richTextStyle,
             int rows,
             boolean multipleMode,
             int scrollbars)
Creates a new scrolling list with the specified style, number of rows, multipleMode, and scroll bar visibility.

Parameters:
richTextStyle - the style of the text list model.
rows - the number of items to show.
multipleMode - if true, then multiple selections are allowed; otherwise, only one item can be
scrollbars - a constant that determines what scrollbars are created to view the list.
 o List
 public List(TextListModel textListModel,
             int rows)
Creates a new scrolling list with the specified model and number of rows.

Parameters:
textListModel - the text list model.
rows - the number of items to show.
 o List
 public List(TextListModel textListModel,
             int rows,
             boolean multipleMode)
Creates a new scrolling list with the specified model, number of rows, and multipleMode.

Parameters:
textListModel - the text list model.
rows - the number of items to show.
multipleMode - if true, then multiple selections are allowed; otherwise, only one item can be
 o List
 public List(TextListModel textListModel,
             int rows,
             boolean multipleMode,
             int scrollbars)
Creates a new scrolling list with the specified model, number of rows, multipleMode, and scroll bar visibility.

Parameters:
textListModel - the text list model.
rows - the number of items to show.
multipleMode - if true, then multiple selections are allowed; otherwise, only one item can be
scrollbars - a constant that determines what scrollbars are created to view the list.
 o List
 public List(TextListModel textListModel,
             int rows,
             boolean multipleMode,
             int scrollbars,
             VBorder border)
Creates a new scrolling list with the specified model, number of rows, multipleMode, scroll bar visibility, and border visual.

Parameters:
textListModel - the text list model.
rows - the number of items to show.
multipleMode - if true, then multiple selections are allowed; otherwise, only one item can be
scrollbars - a constant that determines what scrollbars are created to view the list.
border - the border visual of the list.

Methods

 o addItemListener
 public synchronized void addItemListener(ItemListener l)
Adds the specified item listener to receive item events from this list.

Parameters:
l - the item listener.
 o removeItemListener
 public synchronized void removeItemListener(ItemListener l)
Removes the specified item listener so that it no longer receives item events from this list.

Parameters:
l - the item listener.
 o addActionListener
 public synchronized void addActionListener(ActionListener l)
Adds the specified action listener to receive action events from this list. Action events occur when a user double-clicks on a list item.

Parameters:
l - the action listener.
 o removeActionListener
 public synchronized void removeActionListener(ActionListener l)
Removes the specified action listener so that it no longer receives action events from this list. Action events occur when a user double-clicks on a list item.

Parameters:
l - the action listener.
 o itemStateChanged
 public void itemStateChanged(ItemEvent e)
Invoked when an item's state has been changed.

See Also:
ItemListener
 o actionPerformed
 public void actionPerformed(ActionEvent e)
Invoked when an action occurs.

See Also:
ActionListener
 o setForeground
 public synchronized void setForeground(Color c)
Sets the foreground color of this list.

Overrides:
setForeground in class Component
 o setBackground
 public synchronized void setBackground(Color c)
Sets the background color of this list.

Overrides:
setBackground in class Component
 o setFont
 public synchronized void setFont(Font f)
Sets the font of this list.

Overrides:
setFont in class Component
 o setCursor
 public synchronized void setCursor(Cursor c)
Sets the cursor of this list.

Overrides:
setCursor in class Component
 o setEnabled
 public synchronized void setEnabled(boolean b)
Enables or disables this list.

Overrides:
setEnabled in class KContainer
 o getItemCount
 public int getItemCount()
Returns the number of items in the list.

Returns:
the number of items in the list.
See Also:
getItem
 o countItems
 public int countItems()
Note: countItems() is deprecated. As of JDK version 1.1, replaced by getItemCount().

 o getItem
 public String getItem(int index)
Returns the item associated with the specified index.

Parameters:
index - the position of the item.
Returns:
an item that is associated with the specified index.
See Also:
getItemCount
 o getItems
 public String[] getItems()
Returns the items in the list.

Returns:
a string array containing items of the list.
 o add
 public void add(String item)
Adds the specified item to the end of scrolling list.

Parameters:
item - the item to be added.
 o addItem
 public void addItem(String item)
Adds the specified item to the end of scrolling list.

 o add
 public void add(String item,
                 int index)
Adds the specified item to the the scrolling list. The index is zero-based. If value of the index is -1 then the item is added to the end. If value of the index is greater than the number of items in the list, the item is added at the end.

Parameters:
item - the item to be added.
index - the position at which to add the item.
 o addItem
 public synchronized void addItem(String item,
                                  int index)
Adds the specified item to the the scrolling list. The index is zero-based. If value of the index is -1 then the item is added to the end. If value of the index is greater than the number of items in the list, the item is added at the end.

Parameters:
item - the item to be added.
index - the position at which to add the item.
 o replaceItem
 public synchronized void replaceItem(String newValue,
                                      int index)
Replaces the item at the specified index in the scrolling list with the new string.

Parameters:
newValue - a new string to replace an existing item.
index - the position of the item to replace.
 o removeAll
 public synchronized void removeAll()
Removes all items from this list.

Overrides:
removeAll in class Container
See Also:
remove, delItems
 o clear
 public void clear()
Note: clear() is deprecated. As of JDK version 1.1, replaced by removeAll().

 o remove
 public synchronized void remove(String item)
Removes the first occurrence of an item from the list.

Parameters:
item - the item to remove from the list.
 o remove
 public synchronized void remove(int position)
Remove the item at the specified position from this scrolling list.

Parameters:
position - the index of the item to delete.
Overrides:
remove in class Container
See Also:
add
 o delItem
 public void delItem(int position)
Removes the item at the specified position from this list.

 o delItems
 public synchronized void delItems(int start,
                                   int end)
Note: delItems() is deprecated. As of JDK version 1.1,

 o getSelectedIndex
 public synchronized int getSelectedIndex()
Gets the index of the selected item on the list,

Returns:
the index of the selected item, or -1 if no item is selected, or if more that one item is selected.
 o getSelectedIndexes
 public synchronized int[] getSelectedIndexes()
Gets the selected indexes on the list.

Returns:
an array of the selected indexes of this scrolling list.
 o getSelectedItem
 public synchronized String getSelectedItem()
Get the selected item on this scrolling list.

Returns:
the selected item on the list, or null if no item is selected.
 o getSelectedItems
 public synchronized String[] getSelectedItems()
Get the selected items on this scrolling list.

Returns:
an array of the selected items on this scrolling list.
 o getSelectedObjects
 public Object[] getSelectedObjects()
Returns the selected items on the list in an array of Objects.

See Also:
ItemSelectable
 o select
 public synchronized void select(int index)
Selects the item at the specified index in the scrolling list.

Parameters:
index - the position of the item to select.
 o deselect
 public synchronized void deselect(int index)
Deselects the item at the specified index.

If the item at the specified index is not selected, or if the index is out of range, then the operation is ignored.

Parameters:
index - the position of the item to deselect.
 o isIndexSelected
 public boolean isIndexSelected(int index)
Determines if the specified item in this scrolling list is selected.

Parameters:
index - the item to be checked.
Returns:
true if the specified item has been selected; false otherwise.
 o isSelected
 public boolean isSelected(int index)
Note: isSelected() is deprecated. As of JDK version 1.1, replaced by isIndexSelected(int).

 o getRows
 public int getRows()
Get the number of visible lines in this list.

Returns:
the number of visible lines in this scrolling list.
See Also:
setRows
 o setRows
 public void setRows(int rows)
Sets the number of visible lines in this list.

Parameters:
rows - the number of visible lines in this scrolling list.
See Also:
getRows
 o isMultipleMode
 public boolean isMultipleMode()
Determines whether this list allows multiple selections.

Returns:
true if this list allows multiple selections; false otherwise.
See Also:
setMultipleMode, getSelectionMode, setSelectionMode
 o allowsMultipleSelections
 public boolean allowsMultipleSelections()
Note: allowsMultipleSelections() is deprecated. As of JDK version 1.1, replaced by isMultipleMode().

 o setMultipleMode
 public synchronized void setMultipleMode(boolean b)
Sets the flag that determines whether this list allows multiple selections.

Parameters:
b - if true then multiple selections are allowed; otherwise, only one item from the list can be selected at once.
See Also:
isMultipleMode, getSelectionMode, setSelectionMode
 o setMultipleSelections
 public void setMultipleSelections(boolean b)
Note: setMultipleSelections() is deprecated. As of JDK version 1.1, replaced by setMultipleMode(boolean).

 o getVisibleIndex
 public int getVisibleIndex()
Gets the index of the item that was last made visible by the method makeVisible.

Returns:
the index of the item that was last made visible.
See Also:
makeVisible
 o makeVisible
 public synchronized void makeVisible(int index)
Makes the item at the specified index visible.

Parameters:
index - the position of the item.
See Also:
getVisibleIndex
 o getPreferredSize
 public Dimension getPreferredSize(int rows)
Returns the preferred dimensions for a list with the specified number of rows.

Parameters:
rows - number of rows in the list.
Returns:
the preferred dimensions for displaying this scrolling list.
 o preferredSize
 public Dimension preferredSize(int rows)
Note: preferredSize() is deprecated. As of JDK version 1.1, replaced by getPreferredSize(int).

 o getPreferredSize
 public Dimension getPreferredSize()
Returns the preferred size of this scrolling list.

Returns:
the preferred dimensions for displaying this scrolling list.
Overrides:
getPreferredSize in class KContainer
 o getMinimumSize
 public Dimension getMinimumSize(int rows)
Returns the minumum dimensions for a list with the specified number of rows.

Parameters:
rows - number of rows in the list.
Returns:
the minimum dimensions for displaying this scrolling list.
 o minimumSize
 public Dimension minimumSize(int rows)
Note: minimumSize() is deprecated. As of JDK version 1.1, replaced by getMinimumSize(int).

 o getMinimumSize
 public Dimension getMinimumSize()
Returns the minimum size of this scrolling list.

Returns:
the minimum dimensions needed to display this scrolling list.
Overrides:
getMinimumSize in class KContainer
 o select
 public synchronized void select(String item)
Sets the selected item in this list to be the item whose name is equal to the specified string. If more than one item matches (is equal to) the specified string, the one with the smallest index is selected.

Parameters:
item - the specified string
 o getModel
 public TextListModel getModel()
Returns the model of this list.

 o getView
 public TextListView getView()
Returns the view of this list.

 o getController
 public TextListController getController()
Returns the controller of this list.

 o getSelectionForeground
 public Color getSelectionForeground()
Returns the selection foreground color.

See Also:
setSelectionForeground
 o setSelectionForeground
 public synchronized void setSelectionForeground(Color c)
Sets the selection foreground color.

See Also:
getSelectionForeground
 o getSelectionBackground
 public Color getSelectionBackground()
Returns the selection background color.

See Also:
setSelectionBackground
 o setSelectionBackground
 public synchronized void setSelectionBackground(Color c)
Sets the selection background color.

See Also:
getSelectionBackground
 o getPopupMenu
 public PopupMenu getPopupMenu()
Returns the popup menu of this list.

See Also:
setPopupMenu
 o setPopupMenu
 public synchronized void setPopupMenu(PopupMenu menu)
Sets the popup menu of this list.

See Also:
getPopupMenu
 o isClickToFocus
 public boolean isClickToFocus()
Tests if the list requests the focus when the mouse is clicked.

Returns:
true if the list requests the focus when the mouse is clicked, false if the list requests the focus when the mouse enters the view.
See Also:
isMouseFocus
 o isMouseFocus
 public boolean isMouseFocus()
Tests if the list requests the focus when the mouse enters the list.

See Also:
isClickToFocus
 o setClickToFocus
 public void setClickToFocus()
Makes the list request the focus when the mouse is clicked.

See Also:
isClickToFocus, setMouseFocus
 o setMouseFocus
 public void setMouseFocus()
Makes the list request the focus when the mouse enters the list.

See Also:
isMouseFocus, setClickToFocus
 o isDeselectionEnabled
 public boolean isDeselectionEnabled()
Tests if the deselection is enabled when the selection mode is a single selection.

See Also:
setDeselectionEnabled
 o setDeselectionEnabled
 public synchronized void setDeselectionEnabled(boolean b)
Makes the deselection enabled when the selection mode is a single selection.

See Also:
isDeselectionEnabled
 o getSelectionMode
 public int getSelectionMode()
Returns the selection mode.

See Also:
setSelectionMode, SINGLE_SELECTION, MULTIPLE_SELECTIONS, SHIFT_MULTIPLE_SELECTIONS
 o setSelectionMode
 public synchronized void setSelectionMode(int mode)
Sets the selection mode.

See Also:
getSelectionMode, SINGLE_SELECTION, MULTIPLE_SELECTIONS, SHIFT_MULTIPLE_SELECTIONS
 o setItems
 public synchronized void setItems(String items[])
Sets the items of the list to the specified string items.

 o setItems
 public void setItems(Text items[])
Sets the items of the list to the specified text items.

 o setTextItems
 public synchronized void setTextItems(Text items[])
Sets the items of the list to the specified text items.

 o getTextItem
 public Text getTextItem(int index)
Returns the text item associated with the specified index.

Parameters:
index - the position of the item.
Returns:
a text item that is associated with the specified index.
 o getTextItems
 public Text[] getTextItems()
Returns the text items in the list.

Returns:
a text array containing items of the list.
 o add
 public void add(Text item)
Adds the specified text item to the end of scrolling list.

Parameters:
item - the text item to be added.
 o addItem
 public void addItem(Text item)
Adds the specified text item to the end of scrolling list.

 o add
 public void add(Text item,
                 int index)
Adds the specified item to the scrolling list. The index is zero-based. If value of the index is -1 then the item is added to the end. If value of the index is greater than the number of items in the list, the item is added at the end.

Parameters:
item - the text item to be added.
index - the position at which to add the item.
 o addItem
 public void addItem(Text item,
                     int index)
Adds the specified text item to the scrolling list. The index is zero-based. If value of the index is -1 then the item is added to the end. If value of the index is greater than the number of items in the list, the item is added at the end.

Parameters:
item - the text item to be added.
index - the position at which to add the item.
 o addTextItem
 public void addTextItem(Text item)
Adds the specified text item to the end of the scrolling list.

Parameters:
item - the text item to be added.
 o addTextItem
 public synchronized void addTextItem(Text item,
                                      int index)
Adds the specified text item to the end of the scrolling list. The index is zero-based. If value of the index is -1 then the item is added to the end. If value of the index is greater than the number of items in the list, the item is added at the end.

Parameters:
item - the text item to be added.
index - the position at which to add the item.
 o replaceItem
 public void replaceItem(Text newValue,
                         int index)
Replaces the item at the specified index in the scrolling list with the new text.

Parameters:
newValue - a new text to replace an existing item.
index - the position of the item to replace.
 o replaceTextItem
 public synchronized void replaceTextItem(Text newValue,
                                          int index)
Replaces the item at the specified index in the scrolling list with the new text.

Parameters:
newValue - a new text to replace an existing item.
index - the position of the item to replace.
 o getSelectedTextItem
 public synchronized Text getSelectedTextItem()
Get the selected text item on this scrolling list.

Returns:
the selected item on the list, or null if no item is selected.
 o getSelectedTextItems
 public synchronized Text[] getSelectedTextItems()
Get the selected text items on this scrolling list.

Returns:
an array of the selected items on this scrolling list.
 o remove
 public synchronized void remove(int start,
                                 int end)
Remove the items at the specified row range.

Parameters:
start - the starting row position, inclusive.
end - the ending row position, inclusive.
 o remove
 public synchronized void remove(int indices[])
Remove the items at the specified row indices.

Parameters:
indices - the row indices to be removed.
 o removeSelectedIndexes
 public synchronized void removeSelectedIndexes()
Remove the items at the indices of the selected rows.

 o getScrollbarThickness
 public int getScrollbarThickness()
Returns the thickness of the scroll bar.

See Also:
setScrollbarThickness
 o setScrollbarThickness
 public synchronized void setScrollbarThickness(int thickness)
Sets the thickness of the scroll bar.

See Also:
setScrollbarThickness

All Packages  Class Hierarchy  This Package  Previous  Next  Index