FileDocCategorySizeDatePackage
ListUI.javaAPI DocJava SE 5 API1728Fri Aug 26 14:58:02 BST 2005javax.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.
version
1.12 12/19/03
author
Hans Muller

Fields Summary
Constructors Summary
Methods Summary
public abstract java.awt.RectanglegetCellBounds(javax.swing.JList list, int index1, int index2)
Returns the bounds of the specified item in JList coordinates, null if index isn't valid.

param
index The index of the JList cell.
return
The bounds of the index'th cell.

public abstract java.awt.PointindexToLocation(javax.swing.JList list, int index)
Returns the origin of the specified item in JList coordinates, null if index isn't valid.

param
index The index of the JList cell.
return
The origin of the index'th cell.

public abstract intlocationToIndex(javax.swing.JList list, java.awt.Point location)
Convert a point in JList coordinates to the closest index of the cell at that location. To determine if the cell actually contains the specified location use a combination of this method and getCellBounds. Returns -1 if the model is empty.

param
location The JList relative coordinates of the cell
return
The index of the cell at location, or -1.