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
-
Button()
- Constructs a button with empty label.
-
Button(String)
- Constructs a button with the specified label.
-
Button(Text)
- Constructs a button with the specified text.
-
Button(VAbstractButton)
- Constructs a button with the specified visual button.
-
Button(Visualizable)
- Constructs a button with the specified visual object.
-
actionPerformed()
- Invoked when the button has been triggered by the controller.
-
addActionListener(ActionListener)
- Adds the specified action listener to receive action events from
this button.
-
isDirectNotification()
- If true, notifies listeners directly without using the event queue.
-
itemStateChanged(boolean)
- Invoked when the button has been toggled by the controller.
-
removeActionListener(ActionListener)
- Removes the specified action listener so that it no longer
receives action events from this button.
Button
public Button()
- Constructs a button with empty label.
Button
public Button(String label)
- Constructs a button with the specified label.
- Parameters:
- label - A string label for the button.
Button
public Button(Text text)
- Constructs a button with the specified text.
- Parameters:
- text - A text label for the button.
Button
public Button(Visualizable visualizable)
- Constructs a button with the specified visual object.
- Parameters:
- visualizable - A visual label for the button.
Button
public Button(VAbstractButton button)
- Constructs a button with the specified visual button.
- Parameters:
- button - A visual button for the button.
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.
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.
actionPerformed
public void actionPerformed()
- Invoked when the button has been triggered by the controller.
- Overrides:
- actionPerformed in class AbstractButton
itemStateChanged
public void itemStateChanged(boolean selected)
- Invoked when the button has been toggled by the controller.
- Overrides:
- itemStateChanged in class AbstractButton
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