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.
-
ListUI()
-
-
getCellBounds(JList, int, int)
-
Returns the bounds of the specified item in JList
coordinates, null if index isn't valid.
-
indexToLocation(JList, int)
-
Returns the origin of the specified item in JList
coordinates, null if index isn't valid.
-
locationToIndex(JList, Point)
-
Convert a point in JList coordinates to the index
of the cell at that location.
ListUI
public ListUI()
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.
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.
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