|
JavaTM 2 Platform Standard Ed. 5.0 |
|||||||||
| 上一个类 下一个类 | 框架 无框架 | |||||||||
| 摘要: 嵌套 | 字段 | 构造方法 | 方法 | 详细信息: 字段 | 构造方法 | 方法 | |||||||||
java.lang.Objectjavax.swing.plaf.ComponentUI
javax.swing.plaf.ListUI
public abstract class ListUI
JList 的可插入外观代理。此接口添加了一些允许 JList 组件将位置(如鼠标坐标)映射到列表单元格以及从单元格索引映射到单元格边界的方法。
| 构造方法摘要 | |
|---|---|
ListUI()
|
|
| 方法摘要 | |
|---|---|
abstract Rectangle |
getCellBounds(JList list,
int index1,
int index2)
返回在 JList 坐标中指定项的边界,如果索引无效,则返回 null。 |
abstract Point |
indexToLocation(JList list,
int index)
返回在 JList 坐标中指定项的原点,如果索引无效,则返回 null。 |
abstract int |
locationToIndex(JList list,
Point location)
将 JList 坐标中的点转换为位于此位置上的单元格的最接近索引。 |
| 从类 javax.swing.plaf.ComponentUI 继承的方法 |
|---|
contains, createUI, getAccessibleChild, getAccessibleChildrenCount, 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。
location - 单元格的 JList 相对坐标
public abstract Point indexToLocation(JList list,
int index)
index - JList 单元格的索引。
public abstract Rectangle getCellBounds(JList list,
int index1,
int index2)
index - JList 单元格的索引。
|
JavaTM 2 Platform Standard Ed. 5.0 |
|||||||||
| 上一个类 下一个类 | 框架 无框架 | |||||||||
| 摘要: 嵌套 | 字段 | 构造方法 | 方法 | 详细信息: 字段 | 构造方法 | 方法 | |||||||||
版权所有 2004 Sun Microsystems, Inc. 保留所有权利。 请遵守许可证条款。另请参阅文档重新分发政策。