List.
The peer interfaces are intended only for use in porting
the AWT. They are not intended for use by application
developers, and developers should not implement peers
nor invoke any of the peer methods directly on the peer
instances.
| Modifier and Type | Method and Description |
|---|---|
| public void | |
| public void | delItems(int
the first item to be deleted start, int the last item to be deleted end)Deletes items from the list. |
| public void | |
| public Dimension | Returns: the minimum size of the listthe number of rows rows)Returns the minimum size for a list with the specified number of rows. |
| public Dimension | Returns: the preferred size of the listthe number of rows rows)Returns the preferred size for a list with the specified number of rows. |
| public int[] | Returns: the indices of the list items that are currently selectedReturns the indices of the list items that are currently selected. |
| public void | makeVisible(int
the index of the item to make visible index)Makes sure that the item at the specified |
| public void | |
| public void | |
| public void | setMultipleMode(boolean
true for multiple selection mode,
false for single selection modeToggles multiple selection mode on or off. |
| add | back to summary |
|---|---|
| public void add(String item, int index) Adds an item to the list at the specified index.
| |
| delItems | back to summary |
|---|---|
| public void delItems(int start, int end) Deletes items from the list. All items from start to end should are deleted, including the item at the start and end indices.
| |
| deselect | back to summary |
|---|---|
| public void deselect(int index) De-selects the item at the specified
| |
| getMinimumSize | back to summary |
|---|---|
| public Dimension getMinimumSize(int rows) Returns the minimum size for a list with the specified number of rows.
| |
| getPreferredSize | back to summary |
|---|---|
| public Dimension getPreferredSize(int rows) Returns the preferred size for a list with the specified number of rows.
| |
| getSelectedIndexes | back to summary |
|---|---|
| public int[] getSelectedIndexes() Returns the indices of the list items that are currently selected. The returned array is not required to be a copy, the callers of this method already make sure it is not modified.
| |
| makeVisible | back to summary |
|---|---|
| public void makeVisible(int index) Makes sure that the item at the specified
| |
| removeAll | back to summary |
|---|---|
| public void removeAll() Removes all items from the list.
| |
| select | back to summary |
|---|---|
| public void select(int index) Selects the item at the specified
| |
| setMultipleMode | back to summary |
|---|---|
| public void setMultipleMode(boolean m) Toggles multiple selection mode on or off.
| |