- java.lang.Object
 -  
      
- javax.swing.plaf.ComponentUI
 -  
        
- javax.swing.plaf.ListUI
 
 
 
-  
       
- 已知直接子类:
 -  
         
BasicListUI,MultiListUI 
public abstract class ListUI extends ComponentUI
JList可插拔外观委托。 
-  
        
       
-  
             
构造方法摘要
构造方法 构造器 描述 ListUI() 
-  
             
方法摘要
所有方法 实例方法 抽象方法 变量和类型 方法 描述 abstract RectanglegetCellBounds(JList<?> list, int index1, int index2)返回给定列表坐标系中的边界矩形,用于由两个索引指定的单元格范围。abstract PointindexToLocation(JList<?> list, int index)返回列表坐标系中指定项的给定JList中的原点。abstract intlocationToIndex(JList<?> list, Point location)返回最接近列表坐标系中给定位置的指定JList中的单元JList。-  
               
声明方法的类 javax.swing.plaf.ComponentUI
contains, createUI, getAccessibleChild, getAccessibleChildrenCount, getBaseline, getBaselineResizeBehavior, getMaximumSize, getMinimumSize, getPreferredSize, installUI, paint, uninstallUI, update 
 -  
               
 
 -  
             
 
-  
        
       
-  
             
方法详细信息
-  
locationToIndex
public abstract int locationToIndex(JList<?> list, Point location)
返回最接近列表坐标系中给定位置的指定JList中的单元JList。 要确定单元格是否实际包含指定的位置,请将该点与单元格的边界进行比较,如getCellBounds。 如果列表的模型为空,则此方法返回-1。- 参数
 -  
              
list- 该列表 -  
              
location- 该点的坐标 - 结果
 - 
               最接近给定位置的单元 
              
-1,或-1 - 异常
 -  
              
NullPointerException- 如果location为空 
 
-  
indexToLocation
public abstract Point indexToLocation(JList<?> list, int index)
返回列表坐标系中指定项的给定JList中的原点。 如果索引无效,则返回null。- 参数
 -  
              
list- 该列表 -  
              
index- 单元index引 - 结果
 - 
               细胞的起源,或 
              
null 
 
-  
getCellBounds
public abstract Rectangle getCellBounds(JList<?> list, int index1, int index2)
返回给定列表坐标系中的边界矩形,用于由两个索引指定的单元格范围。 索引可以按任何顺序提供。如果较小的索引位于列表的单元格范围之外,则此方法返回
null。 如果较小的索引有效,但较大的索引在列表的范围之外,则返回第一个索引的边界。 否则,返回有效范围的边界。- 参数
 -  
              
list- 列表 -  
              
index1- 范围中的第一个索引 -  
              
index2- 范围内的第二个索引 - 结果
 - 
               the bounding rectangle for the range of cells, or 
              
null 
 
 -  
 
 -