JavaTM 2 Platform
Standard Ed. 6

类 javax.swing.JLabel
的使用

使用 JLabel 的软件包
javax.swing 提供一组“轻量级”(全部是 Java 语言)组件,尽量让这些组件在所有平台上的工作方式都相同。 
javax.swing.plaf.basic 提供了根据基本外观构建的用户界面对象。 
javax.swing.plaf.metal 提供根据 Java 外观(曾经代称为 Metal)构建的用户界面对象,Java 外观是默认外观。 
javax.swing.table 提供用于处理 javax.swing.JTable 的类和接口。 
javax.swing.tree 提供处理 javax.swing.JTree 的类和接口。 
 

javax.swingJLabel 的使用
 

javax.swingJLabel 的子类
 class DefaultListCellRenderer
          呈现列表中的一个项。
static class DefaultListCellRenderer.UIResource
          实现 UIResource 的 DefaultListCellRenderer 的子类。
 

javax.swing.plaf.basicJLabel 的使用
 

javax.swing.plaf.basicJLabel 的子类
 class BasicComboBoxRenderer
          ComboBox 渲染器 警告:此类的序列化对象将与以后的 Swing 版本不兼容。
static class BasicComboBoxRenderer.UIResource
          实现 UIResource 的 BasicComboBoxRenderer 的子类。
 

参数类型为 JLabeljavax.swing.plaf.basic 中的方法
protected  void BasicLabelUI.installComponents(JLabel c)
           
protected  void BasicLabelUI.installDefaults(JLabel c)
           
protected  void BasicLabelUI.installKeyboardActions(JLabel l)
           
protected  void BasicLabelUI.installListeners(JLabel c)
           
protected  String BasicLabelUI.layoutCL(JLabel label, FontMetrics fontMetrics, String text, Icon icon, Rectangle viewR, Rectangle iconR, Rectangle textR)
          将调用转发到 SwingUtilities.layoutCompoundLabel()。
protected  void BasicLabelUI.paintDisabledText(JLabel l, Graphics g, String s, int textX, int textY)
          利用 background.lighter() 将 clippedText 绘制在 textX、textY 处,然后利用 background.darker() 向右下移动一个像素。
protected  void BasicLabelUI.paintEnabledText(JLabel l, Graphics g, String s, int textX, int textY)
          利用标签的前景色将 clippedText 绘制在 textX、textY 处。
protected  void BasicLabelUI.uninstallComponents(JLabel c)
           
protected  void BasicLabelUI.uninstallDefaults(JLabel c)
           
protected  void BasicLabelUI.uninstallKeyboardActions(JLabel c)
           
protected  void BasicLabelUI.uninstallListeners(JLabel c)
           
 

javax.swing.plaf.metalJLabel 的使用
 

javax.swing.plaf.metalJLabel 的子类
protected  class MetalFileChooserUI.FileRenderer
           
 class MetalFileChooserUI.FilterComboBoxRenderer
          呈现不同的类型大小和风格。
 

参数类型为 JLabeljavax.swing.plaf.metal 中的方法
protected  void MetalLabelUI.paintDisabledText(JLabel l, Graphics g, String s, int textX, int textY)
          只绘制文本灰度 (Label.disabledForeground),而不是使用标签前景色。
 

javax.swing.tableJLabel 的使用
 

javax.swing.tableJLabel 的子类
 class DefaultTableCellRenderer
          呈现(显示) JTable 中每个单元格的标准类。
static class DefaultTableCellRenderer.UIResource
          DefaultTableCellRenderer 的一个子类,它实现 UIResource
 

javax.swing.treeJLabel 的使用
 

javax.swing.treeJLabel 的子类
 class DefaultTreeCellRenderer
          显示树中的条目。
 


JavaTM 2 Platform
Standard Ed. 6

提交错误或意见

版权所有 2008 Sun Microsystems, Inc. 保留所有权利。请遵守GNU General Public License, version 2 only