Save This Page
Home » openjdk-7 » java » awt » peer » [javadoc | source]
java.awt.peer
public interface: ListPeer [javadoc | source]

All Implemented Interfaces:
    ComponentPeer

The peer interface for 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.
Method from java.awt.peer.ListPeer Summary:
add,   delItems,   deselect,   getMinimumSize,   getPreferredSize,   getSelectedIndexes,   makeVisible,   removeAll,   select,   setMultipleMode
Method from java.awt.peer.ListPeer Detail:
 public  void add(String item,
    int index)
    Adds an item to the list at the specified index.
 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.
 public  void deselect(int index)
    De-selects the item at the specified {@code index}.
 public Dimension getMinimumSize(int rows)
    Returns the minimum size for a list with the specified number of rows.
 public Dimension getPreferredSize(int rows)
    Returns the preferred size for a list with the specified number of rows.
 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.
 public  void makeVisible(int index)
    Makes sure that the item at the specified {@code index} is visible, by scrolling the list or similar.
 public  void removeAll()
    Removes all items from the list.
 public  void select(int index)
    Selects the item at the specified {@code index}.
 public  void setMultipleMode(boolean m)
    Toggles multiple selection mode on or off.