All Packages Class Hierarchy This Package Previous Next Index
Class com.sgi.sysadm.ui.ArrowIcon
java.lang.Object
|
+----com.sgi.sysadm.ui.ArrowIcon
- public class ArrowIcon
- extends Object
- implements Icon
ArrowIcon extends Icon. A common usage would be to pass it
to JButton. It draws the arrow proportionally within the component.
For example,
JButton button = new JButton(new ArrowIcon(rs, ArrowIcon.UP));
will create a button with an arrow icon pointing up.
-
DOWN
- Passed to constructor to create arrow pointing down
-
ICON_DISABLED_COLOR
- The resource ArrowIcon.iconDisabledColor or
<componentName>.iconDisabledColor is the color which the
icon will be painted in on disabled Components.
-
ICON_ENABLED_COLOR
- The resource ArrowIcon.iconEnabledColor or
<componentName>.iconEnabledColor is the color which the
icon will be painted in on enabled Components.
-
ICON_HEIGHT
- The resource ArrowIcon.iconHeight or
<componentName>.iconHeight is an Integer specifying the
height of the arrow in points.
-
ICON_WIDTH
- The resource ArrowIcon.iconWidth or
<componentName>.iconWidth is an Integer specifying the
width of the arrow in points.
-
LEFT
- Passed to constructor to create arrow pointing left
-
RIGHT
- Passed to constructor to create arrow pointing right
-
UP
- Passed to constructor to create arrow pointing up
-
ArrowIcon(ResourceStack, int)
- Constructor
-
ArrowIcon(ResourceStack, String, int)
- Constructor
-
getIconHeight()
- Gets height of icon
-
getIconWidth()
- Gets width of icon.
-
paintIcon(Component, Graphics, int, int)
-
Draw the arrow icon proportional to the component c it is in.
-
setDisabledColor(Color)
- Set the color to be used to draw the disabled arrow.
-
setEnabledColor(Color)
- Set the color to be used to draw the enabled arrow.
-
setIconHeight(int)
- Sets height of icon
-
setIconWidth(int)
- Sets width of icon.
UP
public static final int UP
- Passed to constructor to create arrow pointing up
DOWN
public static final int DOWN
- Passed to constructor to create arrow pointing down
RIGHT
public static final int RIGHT
- Passed to constructor to create arrow pointing right
LEFT
public static final int LEFT
- Passed to constructor to create arrow pointing left
ICON_WIDTH
public static final String ICON_WIDTH
- The resource ArrowIcon.iconWidth or
<componentName>.iconWidth is an Integer specifying the
width of the arrow in points.
ICON_HEIGHT
public static final String ICON_HEIGHT
- The resource ArrowIcon.iconHeight or
<componentName>.iconHeight is an Integer specifying the
height of the arrow in points.
ICON_ENABLED_COLOR
public static final String ICON_ENABLED_COLOR
- The resource ArrowIcon.iconEnabledColor or
<componentName>.iconEnabledColor is the color which the
icon will be painted in on enabled Components.
ICON_DISABLED_COLOR
public static final String ICON_DISABLED_COLOR
- The resource ArrowIcon.iconDisabledColor or
<componentName>.iconDisabledColor is the color which the
icon will be painted in on disabled Components.
ArrowIcon
public ArrowIcon(ResourceStack rs,
String componentName,
int arrowDirection)
- Constructor
- Parameters:
- rs - Resource Stack needed for color of arrow
which is retrieved from a SysadmUI
(unless overridden by client).
- componentName - Prefix for looking up resources.
- arrowDirection - Takes an int which should be one of following
constants : ArrowIcon.UP, ArrowIcon.DOWN,
ArrowIcon.RIGHT, and ArrowIcon.LEFT.
ArrowIcon
public ArrowIcon(ResourceStack rs,
int arrowDirection)
- Constructor
- Parameters:
- rs - Resource Stack needed for color of arrow
which is retrieved from a SysadmUI
(unless overridden by client).
- arrowDirection - Takes an int which should be one of following
constants : ArrowIcon.UP, ArrowIcon.DOWN,
ArrowIcon.RIGHT, and ArrowIcon.LEFT.
paintIcon
public void paintIcon(Component c,
Graphics g,
int x,
int y)
- Draw the arrow icon proportional to the component c it is in.
- Parameters:
- c - Component in which the icon is being drawn.
- g - Graphics context.
- x - x coordinate to start drawing from. This value is
not used by the method.
- y - y coordinate to start drawing from. This value is
not used by the method.
setEnabledColor
public void setEnabledColor(Color color)
- Set the color to be used to draw the enabled arrow.
- Parameters:
- color - color to be used to draw the enabled arrow.
setDisabledColor
public void setDisabledColor(Color color)
- Set the color to be used to draw the disabled arrow.
- Parameters:
- color - color to be used to draw the disabled arrow.
getIconWidth
public int getIconWidth()
- Gets width of icon.
getIconHeight
public int getIconHeight()
- Gets height of icon
setIconWidth
public void setIconWidth(int width)
- Sets width of icon.
- Parameters:
- width - Width of icon.
setIconHeight
public void setIconHeight(int height)
- Sets height of icon
- Parameters:
- height - Height of icon.
All Packages Class Hierarchy This Package Previous Next Index