This documentation differs from the official API.
Jadeite adds
extra features to the API including:
variable font sizes,
constructions examples,
placeholders for classes and methods, and auto-generated “See Also” links.
Additionally it
is missing some items found in standard Javadoc documentation, including:
generics type information,
“Deprecated” tags and comments,
“See Also” links,
along with other minor differences.
Please send any questions or feedback to
bam@cs.cmu.edu.
javax.swing.plaf
class ListUI
- Direct Known Subclasses:
- BasicListUI, MultiListUI
public abstract class ListUI
extends ComponentUI
The {@code JList} pluggable look and feel delegate.
Method Summary |
abstract Rectangle |
Returns the bounding rectangle, in the given list's coordinate system,
for the range of cells specified by the two indices.
|
abstract Point |
Returns the origin in the given , of the specified item,
in the list's coordinate system.
|
abstract int |
Returns the cell index in the specified closest to the
given location in the list's coordinate system.
|
Methods inherited from class javax.swing.plaf.ComponentUI |
contains, createUI, getAccessibleChild, getAccessibleChildrenCount, getBaseline, getBaselineResizeBehavior, getMaximumSize, getMinimumSize, getPreferredSize, installUI, paint, uninstallUI, update |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ListUI
public ListUI()
-
getCellBounds
public abstract Rectangle getCellBounds(JList list,
int index1,
int index2)
-
Returns the bounding rectangle, in the given list's coordinate system,
for the range of cells specified by the two indices.
The indices can be supplied in any order.
If the smaller index is outside the list's range of cells, this method
returns {@code null}. If the smaller index is valid, but the larger
index is outside the list's range, the bounds of just the first index
is returned. Otherwise, the bounds of the valid range is returned.
- Parameters:
list
- the list
index1
- the first index in the range
index2
- the second index in the range
- Returns:
- the bounding rectangle for the range of cells, or {@code null}
indexToLocation
public abstract Point indexToLocation(JList list,
int index)
-
Returns the origin in the given {@code JList}, of the specified item,
in the list's coordinate system.
Returns {@code null} if the index isn't valid.
- Parameters:
list
- the list
index
- the cell index
- Returns:
- the origin of the cell, or {@code null}
locationToIndex
public abstract int locationToIndex(JList list,
Point location)
-
Returns the cell index in the specified {@code JList} closest to the
given location in the list's coordinate system. To determine if the
cell actually contains the specified location, compare the point against
the cell's bounds, as provided by {@code getCellBounds}.
This method returns {@code -1} if the list's model is empty.
- Parameters:
list
- the list
location
- the coordinates of the point
- Returns:
- the cell index closest to the given location, or {@code -1}
This documentation differs from the official API.
Jadeite adds
extra features to the API including:
variable font sizes,
constructions examples,
placeholders for classes and methods, and auto-generated “See Also” links.
Additionally it
is missing some items found in standard Javadoc documentation, including:
generics type information,
“Deprecated” tags and comments,
“See Also” links,
along with other minor differences.
Please send any questions or feedback to
bam@cs.cmu.edu.
This page displays the
Jadeite version of the documention, which is derived from the offical documentation that contains this copyright notice:
The official Sun™ documentation can be found here at
http://java.sun.com/javase/6/docs/api/.