|
| Components |
|
| |||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||||||
java.lang.Object | +--com.sas.swing.visuals.ArrowIcon
ArrowIcon is used by the SpinButton to paint the up/down
arrows on the buttons. ArrowIcon implements Icon so it can be used on any
AbstractButton. The constructor for the ArrowIcon can take a direction
that the arrow is supposed to be painted in, using the SwingConstants
NORTH, SOUTH, WEST, and EAST as valid values. Also, you can set whether the arrow should be painted
pressed (just translates the arrow down and to the right 1 pixel). This functionality is added as
a convenience to the user if they want a more visual appearance of the button being pressed. The default
direction the Arrow faces is down (south).
Icon,
SpinBox,
| Field Summary | |
protected int |
arrowDirection
|
protected boolean |
pressed
|
| Constructor Summary | |
ArrowIcon()
Default constructor, creates a arrow facing down (south). |
|
ArrowIcon(boolean pressed)
Creates a arrow facing down (south), and if pressed is true, the arrow will be moved down and to the right one pixel. |
|
ArrowIcon(int direction)
Creates a arrow facing in the direction specified. |
|
ArrowIcon(int direction,
boolean pressed)
Creates a arrow facing in the direction specified. |
|
| Method Summary | |
int |
getDirection()
Returns the SwingConstants representing the direction the arrow is facing. |
int |
getIconHeight()
Stubbed to statify the interface. |
int |
getIconWidth()
Stubbed to statify the interface. |
boolean |
isPressed()
Returns whether the arrow is to be painted in pressed mode, that is, move the arrow down and to the right one pixel. |
void |
paintIcon(Component c,
Graphics g,
int x,
int y)
Paints the arrow in the specified direction. |
void |
setDirection(int newValue)
Sets the direction the arrow is to face when painted. |
void |
setPressed(boolean newValue)
Sets whether the arrow is to be painted in pressed mode, that is, move the arrow down and to the right one pixel. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
protected int arrowDirection
protected boolean pressed
| Constructor Detail |
public ArrowIcon()
SwingConstantspublic ArrowIcon(int direction)
direction - The direction the arrow is to faceSwingConstantspublic ArrowIcon(boolean pressed)
pressed - true to have the arrow moved down and to the right one pixel, false otherwiseSwingConstants
public ArrowIcon(int direction,
boolean pressed)
direction - The direction the arrow is to facepressed - true to have the arrow moved down and to the right one pixel, false otherwiseSwingConstants| Method Detail |
public void setDirection(int newValue)
newValue - The direction the arrow is to faceSwingConstantspublic int getDirection()
SwingConstantspublic void setPressed(boolean newValue)
newValue - true to have the arrow moved down and to the right one pixel, false otherwisepublic boolean isPressed()
public void paintIcon(Component c,
Graphics g,
int x,
int y)
paintIcon in interface Iconpublic int getIconWidth()
getIconWidth in interface Iconpublic int getIconHeight()
getIconHeight in interface Icon
|
| Components |
|
| |||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||||||