All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class jp.kyasu.awt.Button

java.lang.Object
   |
   +----java.awt.Component
           |
           +----jp.kyasu.awt.KComponent
                   |
                   +----jp.kyasu.awt.Label
                           |
                           +----jp.kyasu.awt.AbstractButton
                                   |
                                   +----jp.kyasu.awt.Button

public class Button
extends AbstractButton
The Button class implements a labeled button. The application can cause some action to happen when the button is pushed.

When a button is pressed and released, the button sends an instance of ActionEvent to the button.

Version:
15 Jun 1998
Author:
Kazuki YASUMATSU
See Also:
ButtonController

Constructor Index

 o Button()
Constructs a button with empty label.
 o Button(String)
Constructs a button with the specified label.
 o Button(Text)
Constructs a button with the specified text.
 o Button(VAbstractButton)
Constructs a button with the specified visual button.
 o Button(Visualizable)
Constructs a button with the specified visual object.

Method Index

 o actionPerformed()
Invoked when the button has been triggered by the controller.
 o addActionListener(ActionListener)
Adds the specified action listener to receive action events from this button.
 o isDirectNotification()
If true, notifies listeners directly without using the event queue.
 o itemStateChanged(boolean)
Invoked when the button has been toggled by the controller.
 o removeActionListener(ActionListener)
Removes the specified action listener so that it no longer receives action events from this button.

Constructors

 o Button
 public Button()
Constructs a button with empty label.

 o Button
 public Button(String label)
Constructs a button with the specified label.

Parameters:
label - A string label for the button.
 o Button
 public Button(Text text)
Constructs a button with the specified text.

Parameters:
text - A text label for the button.
 o Button
 public Button(Visualizable visualizable)
Constructs a button with the specified visual object.

Parameters:
visualizable - A visual label for the button.
 o Button
 public Button(VAbstractButton button)
Constructs a button with the specified visual button.

Parameters:
button - A visual button for the button.

Methods

 o addActionListener
 public synchronized void addActionListener(ActionListener l)
Adds the specified action listener to receive action events from this button. Action events occur when a user presses or releases the mouse over this button.

Parameters:
l - the action listener.
 o removeActionListener
 public synchronized void removeActionListener(ActionListener l)
Removes the specified action listener so that it no longer receives action events from this button. Action events occur when a user presses or releases the mouse over this button.

Parameters:
l - the action listener.
 o actionPerformed
 public void actionPerformed()
Invoked when the button has been triggered by the controller.

Overrides:
actionPerformed in class AbstractButton
 o itemStateChanged
 public void itemStateChanged(boolean selected)
Invoked when the button has been toggled by the controller.

Overrides:
itemStateChanged in class AbstractButton
 o isDirectNotification
 public boolean isDirectNotification()
If true, notifies listeners directly without using the event queue.

Overrides:
isDirectNotification in class KComponent

All Packages  Class Hierarchy  This Package  Previous  Next  Index