Class tea.set.ArrowButton
All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class tea.set.ArrowButton

java.lang.Object
   |
   +----java.awt.Component
           |
           +----java.awt.Canvas
                   |
                   +----tea.set.ImageButton
                           |
                           +----tea.set.ArrowButton

public class ArrowButton
extends ImageButton
ArrowButton is a special image button that displays an arrow. There are eight types of arrows supported: UP, LEFT, DOWN, and RIGHT are arrows pointing to respective directions. A double arrow version of these four: DOUBLE_UP, DOUBLE_LEFT, DOUBLE_DOWN, DOUBLE_RIGHT display two arrows inside the button pointing to the respective direction.
See Also:
ImageButton

Variable Index

 o DOUBLE_DOWN
Double down arrow button style.
 o DOUBLE_LEFT
Double left arrow button style.
 o DOUBLE_RIGHT
Double right arrow button style.
 o DOUBLE_UP
Double up arrow button style.
 o DOWN
Down arrow button style.
 o LEFT
Left arrow button style.
 o RIGHT
Right arrow button style.
 o UP
Up arrow button style.

Constructor Index

 o ArrowButton(int)
Construct an ArrowButton with the specified style.
 o ArrowButton(int, int)
Construct an ArrowButton with the specified style and button border.
 o ArrowButton(int, int, int)
Construct an ArrowButton with the specified style and button border.

Method Index

 o paint(Graphics)
Paint ArrowButton.
 o preferredSize()
Return preferred size of ArrowButton.
 o setDirection(int)
Change the arrow to the specified style.

Variables

 o UP
  public final static int UP
Up arrow button style.
 o LEFT
  public final static int LEFT
Left arrow button style.
 o DOWN
  public final static int DOWN
Down arrow button style.
 o RIGHT
  public final static int RIGHT
Right arrow button style.
 o DOUBLE_UP
  public final static int DOUBLE_UP
Double up arrow button style.
 o DOUBLE_LEFT
  public final static int DOUBLE_LEFT
Double left arrow button style.
 o DOUBLE_DOWN
  public final static int DOUBLE_DOWN
Double down arrow button style.
 o DOUBLE_RIGHT
  public final static int DOUBLE_RIGHT
Double right arrow button style.

Constructors

 o ArrowButton
  public ArrowButton(int direction)
Construct an ArrowButton with the specified style.
Parameters:
direction - arrow direction, one of the direction flag values.
 o ArrowButton
  public ArrowButton(int direction,
                     int w,
                     int h)
Construct an ArrowButton with the specified style and button border. The specified size will be the preferred size of this button.
Parameters:
direction - arrow direction, one of the direction flag values.
w - preferred width of this button.
h - preferred height of this button.
 o ArrowButton
  public ArrowButton(int direction,
                     int border)
Construct an ArrowButton with the specified style and button border. The use of this constructor is intended for toolkit extension, and should not be used in normal usage.
Parameters:
direction - arrow direction, one of the direction flag values.
border - button border width.

Methods

 o setDirection
  public void setDirection(int direction)
Change the arrow to the specified style. This causes a repaint of the button.
Parameters:
direction - arrow direction, one of the direction flag values.
 o preferredSize
  public Dimension preferredSize()
Return preferred size of ArrowButton.
Returns:
preferred size of the button.
Overrides:
preferredSize in class ImageButton
 o paint
  public void paint(Graphics g)
Paint ArrowButton.
Parameters:
g - Graphics content of this component.
Overrides:
paint in class ImageButton

All Packages  Class Hierarchy  This Package  Previous  Next  Index