All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class jp.kyasu.awt.ButtonController

java.lang.Object
   |
   +----jp.kyasu.awt.ButtonController

public class ButtonController
extends Object
implements MouseListener, MouseMotionListener, KeyListener, FocusListener, Serializable
The ButtonController class controlls the Button component.

Version:
20 Jul 1998
Author:
Kazuki YASUMATSU
See Also:
AbstractButton, Button, ToggleButton, Checkbox

Variable Index

 o TOGGLE_ON_DOWN
The item state is changed when the mouse button is pressed.
 o TOGGLE_ON_UP
The item state is changed when the mouse button is released.
 o TRIGGER_ON_DOWN
The action is performed when the mouse button is pressed.
 o TRIGGER_ON_UP
The action is performed when the mouse button is released.

Constructor Index

 o ButtonController(AbstractButton)
Constructs a controller for the specified button component with the TRIGGER_ON_UP mode.
 o ButtonController(AbstractButton, int)
Constructs a controller for the specified button component with the controll mode.

Method Index

 o focusGained(FocusEvent)
Invoked when a component gains the keyboard focus.
 o focusLost(FocusEvent)
Invoked when a component loses the keyboard focus.
 o getMode()
Returns the control mode.
 o isFocusEmphasizeEnabled()
Returns true, if the button is emphasized when the keyboard focus has been gained; false otherwise.
 o keyPressed(KeyEvent)
Invoked when a key has been pressed.
 o keyReleased(KeyEvent)
Invoked when a key has been released.
 o keyTyped(KeyEvent)
Invoked when a key has been typed.
 o mouseClicked(MouseEvent)
Invoked when the mouse has been clicked on a component.
 o mouseDragged(MouseEvent)
Invoked when the mouse button is pressed on a component and then dragged.
 o mouseEntered(MouseEvent)
Invoked when the mouse enters a component.
 o mouseExited(MouseEvent)
Invoked when the mouse exits a component.
 o mouseMoved(MouseEvent)
Invoked when the mouse button has been moved on a component.
 o mousePressed(MouseEvent)
Invoked when the mouse has been pressed on a component.
 o mouseReleased(MouseEvent)
Invoked when the mouse has been released on a component.
 o needToRequestFocus()
Returns true if the controller needs to request the keyboard focus.
 o setFocusEmphasizeEnabled(boolean)
Enables the button to be emphasized when the keyboard focus has been gained.
 o setMode(int)
Sets the control mode.

Variables

 o TRIGGER_ON_UP
 public static final int TRIGGER_ON_UP
The action is performed when the mouse button is released.

 o TRIGGER_ON_DOWN
 public static final int TRIGGER_ON_DOWN
The action is performed when the mouse button is pressed.

 o TOGGLE_ON_UP
 public static final int TOGGLE_ON_UP
The item state is changed when the mouse button is released.

 o TOGGLE_ON_DOWN
 public static final int TOGGLE_ON_DOWN
The item state is changed when the mouse button is pressed.

Constructors

 o ButtonController
 public ButtonController(AbstractButton button)
Constructs a controller for the specified button component with the TRIGGER_ON_UP mode.

Parameters:
button - the button component.
 o ButtonController
 public ButtonController(AbstractButton button,
                         int mode)
Constructs a controller for the specified button component with the controll mode.

Parameters:
button - the button component.
mode - the controll mode.
See Also:
TRIGGER_ON_UP, TRIGGER_ON_DOWN, TOGGLE_ON_UP, TOGGLE_ON_DOWN

Methods

 o needToRequestFocus
 public boolean needToRequestFocus()
Returns true if the controller needs to request the keyboard focus.

 o getMode
 public int getMode()
Returns the control mode.

See Also:
setMode, TRIGGER_ON_UP, TRIGGER_ON_DOWN, TOGGLE_ON_UP, TOGGLE_ON_DOWN
 o setMode
 public synchronized void setMode(int mode)
Sets the control mode.

See Also:
getMode, TRIGGER_ON_UP, TRIGGER_ON_DOWN, TOGGLE_ON_UP, TOGGLE_ON_DOWN
 o isFocusEmphasizeEnabled
 public boolean isFocusEmphasizeEnabled()
Returns true, if the button is emphasized when the keyboard focus has been gained; false otherwise.

See Also:
setFocusEmphasizeEnabled
 o setFocusEmphasizeEnabled
 public synchronized void setFocusEmphasizeEnabled(boolean b)
Enables the button to be emphasized when the keyboard focus has been gained.

See Also:
isFocusEmphasizeEnabled
 o mouseClicked
 public void mouseClicked(MouseEvent e)
Invoked when the mouse has been clicked on a component.

See Also:
MouseListener
 o mousePressed
 public void mousePressed(MouseEvent e)
Invoked when the mouse has been pressed on a component.

See Also:
MouseListener
 o mouseReleased
 public void mouseReleased(MouseEvent e)
Invoked when the mouse has been released on a component.

See Also:
MouseListener
 o mouseEntered
 public void mouseEntered(MouseEvent e)
Invoked when the mouse enters a component.

See Also:
MouseListener
 o mouseExited
 public void mouseExited(MouseEvent e)
Invoked when the mouse exits a component.

See Also:
MouseListener
 o mouseDragged
 public void mouseDragged(MouseEvent e)
Invoked when the mouse button is pressed on a component and then dragged.

See Also:
MouseMotionListener
 o mouseMoved
 public void mouseMoved(MouseEvent e)
Invoked when the mouse button has been moved on a component.

See Also:
MouseMotionListener
 o keyTyped
 public void keyTyped(KeyEvent e)
Invoked when a key has been typed.

See Also:
KeyListener
 o keyPressed
 public void keyPressed(KeyEvent e)
Invoked when a key has been pressed.

See Also:
KeyListener
 o keyReleased
 public void keyReleased(KeyEvent e)
Invoked when a key has been released.

See Also:
KeyListener
 o focusGained
 public void focusGained(FocusEvent e)
Invoked when a component gains the keyboard focus.

See Also:
FocusListener
 o focusLost
 public void focusLost(FocusEvent e)
Invoked when a component loses the keyboard focus.

See Also:
FocusListener

All Packages  Class Hierarchy  This Package  Previous  Next  Index