public abstract class ListUI extends ComponentUI
JList
代表。
Constructor and Description |
---|
ListUI() |
Modifier and Type | Method and Description |
---|---|
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 接近给定位置的细胞指数。
|
contains, createUI, getAccessibleChild, getAccessibleChildrenCount, getBaseline, getBaselineResizeBehavior, getMaximumSize, getMinimumSize, getPreferredSize, installUI, paint, uninstallUI, update
public abstract int locationToIndex(JList list, Point location)
JList
接近给定位置的细胞指数。确定细胞实际上包含了指定位置,比较细胞的边界点,由
getCellBounds
。如果列表是空的模型,此方法返回
-1
。
list
-列表
location
-的点的坐标
-1
NullPointerException
-如果
location
是空的
public abstract Point indexToLocation(JList list, int index)
JList
,指定的项,在列表中的坐标系统。返回
null
如果索引无效。
list
-列表
index
-细胞指数
null
Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.