javax.swing.plaf.metal

Class MetalIconFactory.TreeControlIcon

public static class MetalIconFactory.TreeControlIcon extends Object implements Icon, Serializable

A tree control icon. This icon can be in one of two states: expanded and collapsed.
Field Summary
protected booleanisLight
?
Constructor Summary
TreeControlIcon(boolean isCollapsed)
Creates a new icon.
Method Summary
intgetIconHeight()
Returns the height of the icon, in pixels.
intgetIconWidth()
Returns the width of the icon, in pixels.
voidpaintIcon(Component c, Graphics g, int x, int y)
Paints the icon at the location (x, y).
voidpaintMe(Component c, Graphics g, int x, int y)
Simply calls {@link #paintIcon(Component, Graphics, int, int)}.

Field Detail

isLight

protected boolean isLight
???.

Constructor Detail

TreeControlIcon

public TreeControlIcon(boolean isCollapsed)
Creates a new icon.

Parameters: isCollapsed a flag that controls whether the icon is in the collapsed state or the expanded state.

Method Detail

getIconHeight

public int getIconHeight()
Returns the height of the icon, in pixels.

Returns: The height of the icon.

getIconWidth

public int getIconWidth()
Returns the width of the icon, in pixels.

Returns: The width of the icon.

paintIcon

public void paintIcon(Component c, Graphics g, int x, int y)
Paints the icon at the location (x, y).

Parameters: c the component. g the graphics device. x the x coordinate. y the y coordinate.

paintMe

public void paintMe(Component c, Graphics g, int x, int y)
Simply calls {@link #paintIcon(Component, Graphics, int, int)}.

Parameters: c the component. g the graphics device. x the x coordinate. y the y coordinate.