- java.lang.Object
-
- javax.swing.plaf.metal.MetalIconFactory.TreeControlIcon
-
- All Implemented Interfaces:
-
Serializable,Icon
- Enclosing class:
- MetalIconFactory
public static class MetalIconFactory.TreeControlIcon extends Object implements Icon, Serializable
警告:此类的序列化对象与将来的Swing版本不兼容。 当前的序列化支持适用于运行相同版本的Swing的应用程序之间的短期存储或RMI。 从1.4开始,支持所有JavaBeans的长期存储已被添加到
java.beans包中。 请参阅XMLEncoder。- 另请参见:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field 描述 protected booleanisLight如果true图标折叠。
-
构造方法摘要
构造方法 Constructor 描述 TreeControlIcon(boolean isCollapsed)构造一个TreeControlIcon的实例。
-
方法摘要
所有方法 接口方法 具体的方法 Modifier and Type 方法 描述 intgetIconHeight()返回图标的高度。intgetIconWidth()返回图标的宽度。voidpaintIcon(Component c, Graphics g, int x, int y)在指定位置绘制图标。voidpaintMe(Component c, Graphics g, int x, int y)TreeControlIcon。
-
-
-
方法详细信息
-
paintIcon
public void paintIcon(Component c, Graphics g, int x, int y)
描述从接口Icon复制在指定位置绘制图标。 图标实现可以使用Component参数来获取对绘画有用的属性,例如前景色或背景色。
-
paintMe
public void paintMe(Component c, Graphics g, int x, int y)
TreeControlIcon。- 参数
-
c- 一个组件 -
g-实例Graphics -
x- 一个X坐标 -
y- 一个Y坐标
-
getIconWidth
public int getIconWidth()
描述从接口Icon复制返回图标的宽度。- Specified by:
-
getIconWidth在接口Icon - 结果
- int指定图标的固定宽度。
-
getIconHeight
public int getIconHeight()
描述从接口Icon复制返回图标的高度。- Specified by:
-
getIconHeight在接口Icon - 结果
- 一个int指定图标的固定高度。
-
-