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.


Variable Index

 o DOWN
Passed to constructor to create arrow pointing down
 o ICON_DISABLED_COLOR
The resource ArrowIcon.iconDisabledColor or <componentName>.iconDisabledColor is the color which the icon will be painted in on disabled Components.
 o ICON_ENABLED_COLOR
The resource ArrowIcon.iconEnabledColor or <componentName>.iconEnabledColor is the color which the icon will be painted in on enabled Components.
 o ICON_HEIGHT
The resource ArrowIcon.iconHeight or <componentName>.iconHeight is an Integer specifying the height of the arrow in points.
 o ICON_WIDTH
The resource ArrowIcon.iconWidth or <componentName>.iconWidth is an Integer specifying the width of the arrow in points.
 o LEFT
Passed to constructor to create arrow pointing left
 o RIGHT
Passed to constructor to create arrow pointing right
 o UP
Passed to constructor to create arrow pointing up

Constructor Index

 o ArrowIcon(ResourceStack, int)
Constructor
 o ArrowIcon(ResourceStack, String, int)
Constructor

Method Index

 o getIconHeight()
Gets height of icon
 o getIconWidth()
Gets width of icon.
 o paintIcon(Component, Graphics, int, int)
Draw the arrow icon proportional to the component c it is in.
 o setDisabledColor(Color)
Set the color to be used to draw the disabled arrow.
 o setEnabledColor(Color)
Set the color to be used to draw the enabled arrow.
 o setIconHeight(int)
Sets height of icon
 o setIconWidth(int)
Sets width of icon.

Variables

 o UP
 public static final int UP
Passed to constructor to create arrow pointing up

 o DOWN
 public static final int DOWN
Passed to constructor to create arrow pointing down

 o RIGHT
 public static final int RIGHT
Passed to constructor to create arrow pointing right

 o LEFT
 public static final int LEFT
Passed to constructor to create arrow pointing left

 o 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.

 o 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.

 o 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.

 o 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.

Constructors

 o 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.
 o 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.

Methods

 o 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.
 o 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.
 o 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.
 o getIconWidth
 public int getIconWidth()
Gets width of icon.

 o getIconHeight
 public int getIconHeight()
Gets height of icon

 o setIconWidth
 public void setIconWidth(int width)
Sets width of icon.

Parameters:
width - Width of icon.
 o setIconHeight
 public void setIconHeight(int height)
Sets height of icon

Parameters:
height - Height of icon.

All Packages  Class Hierarchy  This Package  Previous  Next  Index