All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class com.sun.java.swing.plaf.ListUI

java.lang.Object
   |
   +----com.sun.java.swing.plaf.ComponentUI
           |
           +----com.sun.java.swing.plaf.ListUI

public abstract class ListUI
extends ComponentUI
The JList pluggable look and feel delegate. This interface adds methods that allow the JList component to map locations, e.g. mouse coordinates, to list cells and from cell indices to the bounds of the cell.


Constructor Index

 o ListUI()

Method Index

 o getCellBounds(JList, int, int)
Returns the bounds of the specified item in JList coordinates, null if index isn't valid.
 o indexToLocation(JList, int)
Returns the origin of the specified item in JList coordinates, null if index isn't valid.
 o locationToIndex(JList, Point)
Convert a point in JList coordinates to the index of the cell at that location.

Constructors

 o ListUI
 public ListUI()

Methods

 o locationToIndex
 public abstract int locationToIndex(JList list,
                                     Point location)
Convert a point in JList coordinates to the index of the cell at that location. Returns -1 if there's no cell the specified location.

Parameters:
location - The JList relative coordinates of the cell
Returns:
The index of the cell at location, or -1.
 o indexToLocation
 public abstract Point indexToLocation(JList list,
                                       int index)
Returns the origin of the specified item in JList coordinates, null if index isn't valid.

Parameters:
index - The index of the JList cell.
Returns:
The origin of the index'th cell.
 o getCellBounds
 public abstract Rectangle getCellBounds(JList list,
                                         int index1,
                                         int index2)
Returns the bounds of the specified item in JList coordinates, null if index isn't valid.

Parameters:
index - The index of the JList cell.
Returns:
The bounds of the index'th cell.

All Packages  Class Hierarchy  This Package  Previous  Next  Index