|
JavaTM 2 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 2 Platform Standard Ed. 6 |
|||||||||
| 上一個類別 下一個類別 | 框架 無框架 | |||||||||
| 摘要: 巢狀 | 欄位 | 建構子 | 方法 | 詳細資訊: 欄位 | 建構子 | 方法 | |||||||||
版權所有 2008 Sun Microsystems, Inc. 保留所有權利。請遵守GNU General Public License, version 2 only。