All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class jclass.bwt.JCArrowButton

java.lang.Object
   |
   +----java.awt.Component
           |
           +----java.awt.Canvas
                   |
                   +----jclass.bwt.JCComponent
                           |
                           +----jclass.bwt.JCLabel
                                   |
                                   +----jclass.bwt.JCButton
                                           |
                                           +----jclass.bwt.JCArrowButton

public class JCArrowButton
extends JCButton
implements Runnable
Properties

Name Method
ArrowSize setArrowSize
Background setBackground
DoubleBuffer setDoubleBuffer
HighlightThickness setHighlightThickness
InitialRepeatDelay setInitialRepeatDelay
Insets setInsets
Orientation setOrientation
PreferredSize setPreferredSize
ShadowThickness setShadowThickness
Traversable setTraversable
UserData setUserData

The ShadowThickess is set to 1 and the HighlightThickness is set to 0.

Events


Variable Index

 o DOWN
 o LEFT
 o RIGHT
 o UP

Constructor Index

 o JCArrowButton()
Creates a DOWN button.
 o JCArrowButton(int)
Creates a button with the specified orientation.
 o JCArrowButton(int, Applet, String)
Creates a button which reads parameters from the applet's HTML file.

Method Index

 o armAction(Event)
Displays the button as pressed in.
 o disable()
Disables the component.
 o disarmAction(Event)
Displays the button normally.
 o drawHighlight(Graphics, boolean)
Don't draw highlight rectangle.
 o drawShadow(Graphics)
Draws the shadow (called by paint).
 o getArrowSize()
Gets the arrow's size.
 o getInitialRepeatDelay()
Gets the InitialRepeatDelay value.
 o getOrientation()
Gets the direction of the arrow.
 o getParameters()
Reads the parameter values from the HTML page using the component's applet.
 o mouseDrag(Event, int, int)
 o mouseUp(Event, int, int)
If the cursor is within the button, calls clickAction, disarmAction.
 o paintComponent(Graphics)
An internal method used to handle repaint events.
 o preferredHeight()
Returns ArrowSize height.
 o preferredWidth()
Returns ArrowSize width.
 o run()
Sends mouseUp events if the user continues to press the button.
 o setArrowSize(Dimension)
Sets the arrow's size (default: 7x4 (UP/DOWN), 4x7 (LEFT/RIGHT)).
 o setInitialRepeatDelay(int)
Sets the time (in ms) to wait before sending continuous button press events while the button is pressed and held down.
 o setOrientation(int)
Sets the arrow's direction: UP, DOWN (default), LEFT, or RIGHT.

Variables

 o UP
  public final static int UP
 o DOWN
  public final static int DOWN
 o LEFT
  public final static int LEFT
 o RIGHT
  public final static int RIGHT

Constructors

 o JCArrowButton
  public JCArrowButton()
Creates a DOWN button. No parameters are read from an HTML file.

See Also:
setOrientation
 o JCArrowButton
  public JCArrowButton(int orientation)
Creates a button with the specified orientation. No parameters are read from an HTML file.

Parameters:
orientation - UP, DOWN, LEFT, or RIGHT.
Throws: IllegalArgumentException
If an invalid orientation is set
 o JCArrowButton
  public JCArrowButton(int orientation,
                       Applet applet,
                       String name)
Creates a button which reads parameters from the applet's HTML file.

Parameters:
orientation - UP, DOWN, LEFT, or RIGHT.
applet - the applet whose PARAM tags are to be read
name - if this is not null, only parameters preceded by this name are read
Throws: IllegalArgumentException
If an invalid value is set
See Also:
getParameter

Methods

 o getParameters
  protected void getParameters()
Reads the parameter values from the HTML page using the component's applet. The values will override those previously set.

Overrides:
getParameters in class JCButton
 o getOrientation
  public int getOrientation()
Gets the direction of the arrow.

See Also:
setOrientation
 o setOrientation
  public synchronized void setOrientation(int v)
Sets the arrow's direction: UP, DOWN (default), LEFT, or RIGHT.

Throws: IllegalArgumentException
If an invalid value is set
 o getArrowSize
  public Dimension getArrowSize()
Gets the arrow's size.

See Also:
setArrowSize
 o setArrowSize
  public synchronized void setArrowSize(Dimension v)
Sets the arrow's size (default: 7x4 (UP/DOWN), 4x7 (LEFT/RIGHT)).

 o getInitialRepeatDelay
  public int getInitialRepeatDelay()
Gets the InitialRepeatDelay value.

See Also:
setInitialRepeatDelay
 o setInitialRepeatDelay
  public void setInitialRepeatDelay(int v)
Sets the time (in ms) to wait before sending continuous button press events while the button is pressed and held down. If set to BWTEnum.MAXINT (default), events are not sent after the button is pressed.

 o preferredWidth
  protected int preferredWidth()
Returns ArrowSize width.

Overrides:
preferredWidth in class JCButton
 o preferredHeight
  protected int preferredHeight()
Returns ArrowSize height.

Overrides:
preferredHeight in class JCButton
 o drawHighlight
  protected void drawHighlight(Graphics gc,
                               boolean on)
Don't draw highlight rectangle.

Overrides:
drawHighlight in class JCButton
 o drawShadow
  protected void drawShadow(Graphics gc)
Draws the shadow (called by paint).

Overrides:
drawShadow in class JCComponent
 o paintComponent
  protected void paintComponent(Graphics gc)
An internal method used to handle repaint events.

Overrides:
paintComponent in class JCLabel
 o disable
  public synchronized void disable()
Disables the component.

Overrides:
disable in class JCComponent
 o armAction
  public void armAction(Event ev)
Displays the button as pressed in. If the InitialRepeatDelay has been set, a timer is started.

Overrides:
armAction in class JCButton
See Also:
setInitialRepeatDelay
 o disarmAction
  public void disarmAction(Event ev)
Displays the button normally. If the InitialRepeatDelay has been set, the timer is stopped.

Overrides:
disarmAction in class JCButton
See Also:
setInitialRepeatDelay
 o mouseDrag
  public boolean mouseDrag(Event ev,
                           int x,
                           int y)
Overrides:
mouseDrag in class Component
 o mouseUp
  public boolean mouseUp(Event ev,
                         int x,
                         int y)
If the cursor is within the button, calls clickAction, disarmAction.

Overrides:
mouseUp in class JCButton
 o run
  public void run()
Sends mouseUp events if the user continues to press the button.


All Packages  Class Hierarchy  This Package  Previous  Next  Index
Class Listener Description
JCActionEvent addActionListener Posted when the button is pressed and then released
JCButtonEvent addButtonListener Posted when the button is pressed and released