|
JavaTM Platform Standard Ed. 6 |
|||||||||
| 上一个类 下一个类 | 框架 无框架 | |||||||||
| 摘要: 嵌套 | 字段 | 构造方法 | 方法 | 详细信息: 字段 | 构造方法 | 方法 | |||||||||
java.lang.Objectjavax.swing.plaf.ComponentUI
javax.swing.plaf.ListUI
public abstract class ListUI
JList 的可插入外观代理。
| 构造方法摘要 | |
|---|---|
ListUI()
|
|
| 方法摘要 | |
|---|---|
abstract Rectangle |
getCellBounds(JList list,
int index1,
int index2)
返回给定列表坐标系统中的有界矩形,单元的范围由两个索引指定。 |
abstract Point |
indexToLocation(JList list,
int index)
返回列表坐标系统中给定 JList 中指定项的原点。 |
abstract int |
locationToIndex(JList list,
Point location)
返回指定 JList 中与列表坐标系统中给定位置最接近的单元索引。 |
| 从类 javax.swing.plaf.ComponentUI 继承的方法 |
|---|
contains, createUI, getAccessibleChild, getAccessibleChildrenCount, getBaseline, getBaselineResizeBehavior, getMaximumSize, getMinimumSize, getPreferredSize, installUI, paint, uninstallUI, update |
| 从类 java.lang.Object 继承的方法 |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| 构造方法详细信息 |
|---|
public ListUI()
| 方法详细信息 |
|---|
public abstract int locationToIndex(JList list,
Point location)
JList 中与列表坐标系统中给定位置最接近的单元索引。要确定该单元是否真正包含指定位置,可比较该点与单元的边界,单元的边界通过 getCellBounds 提供。如果列表的模式为空,则此方法返回 -1。
list - 列表location - 点的坐标
-1
NullPointerException - 如果 location 为 null
public abstract Point indexToLocation(JList list,
int index)
JList 中指定项的原点。如果索引无效,则返回 null 。
list - 列表index - 单元索引
null
public abstract Rectangle getCellBounds(JList list,
int index1,
int index2)
如果较小索引超出单元的列表范围,则此方法返回 null。如果较小索引有效,但较大索引超出列表范围,则只返回第一个索引的边界。否则,返回有效范围的边界。
list - 列表index1 - 范围内第一个索引index2 - 范围内第二个索引
null
|
JavaTM Platform Standard Ed. 6 |
|||||||||
| 上一个类 下一个类 | 框架 无框架 | |||||||||
| 摘要: 嵌套 | 字段 | 构造方法 | 方法 | 详细信息: 字段 | 构造方法 | 方法 | |||||||||
版权所有 2007 Sun Microsystems, Inc. 保留所有权利。 请遵守许可证条款。另请参阅文档重新分发政策。