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
-
TOGGLE_ON_DOWN
- The item state is changed when the mouse button is pressed.
-
TOGGLE_ON_UP
- The item state is changed when the mouse button is released.
-
TRIGGER_ON_DOWN
- The action is performed when the mouse button is pressed.
-
TRIGGER_ON_UP
- The action is performed when the mouse button is released.
-
ButtonController(AbstractButton)
- Constructs a controller for the specified button component with the
TRIGGER_ON_UP
mode.
-
ButtonController(AbstractButton, int)
- Constructs a controller for the specified button component with the
controll mode.
-
focusGained(FocusEvent)
- Invoked when a component gains the keyboard focus.
-
focusLost(FocusEvent)
- Invoked when a component loses the keyboard focus.
-
getMode()
- Returns the control mode.
-
isFocusEmphasizeEnabled()
- Returns true, if the button is emphasized when the keyboard focus has
been gained; false otherwise.
-
keyPressed(KeyEvent)
- Invoked when a key has been pressed.
-
keyReleased(KeyEvent)
- Invoked when a key has been released.
-
keyTyped(KeyEvent)
- Invoked when a key has been typed.
-
mouseClicked(MouseEvent)
- Invoked when the mouse has been clicked on a component.
-
mouseDragged(MouseEvent)
- Invoked when the mouse button is pressed on a component and then dragged.
-
mouseEntered(MouseEvent)
- Invoked when the mouse enters a component.
-
mouseExited(MouseEvent)
- Invoked when the mouse exits a component.
-
mouseMoved(MouseEvent)
- Invoked when the mouse button has been moved on a component.
-
mousePressed(MouseEvent)
- Invoked when the mouse has been pressed on a component.
-
mouseReleased(MouseEvent)
- Invoked when the mouse has been released on a component.
-
needToRequestFocus()
- Returns true if the controller needs to request the keyboard focus.
-
setFocusEmphasizeEnabled(boolean)
- Enables the button to be emphasized when the keyboard focus has
been gained.
-
setMode(int)
- Sets the control mode.
TRIGGER_ON_UP
public static final int TRIGGER_ON_UP
- The action is performed when the mouse button is released.
TRIGGER_ON_DOWN
public static final int TRIGGER_ON_DOWN
- The action is performed when the mouse button is pressed.
TOGGLE_ON_UP
public static final int TOGGLE_ON_UP
- The item state is changed when the mouse button is released.
TOGGLE_ON_DOWN
public static final int TOGGLE_ON_DOWN
- The item state is changed when the mouse button is pressed.
ButtonController
public ButtonController(AbstractButton button)
- Constructs a controller for the specified button component with the
TRIGGER_ON_UP
mode.
- Parameters:
- button - the button component.
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
needToRequestFocus
public boolean needToRequestFocus()
- Returns true if the controller needs to request the keyboard focus.
getMode
public int getMode()
- Returns the control mode.
- See Also:
- setMode, TRIGGER_ON_UP, TRIGGER_ON_DOWN, TOGGLE_ON_UP, TOGGLE_ON_DOWN
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
isFocusEmphasizeEnabled
public boolean isFocusEmphasizeEnabled()
- Returns true, if the button is emphasized when the keyboard focus has
been gained; false otherwise.
- See Also:
- setFocusEmphasizeEnabled
setFocusEmphasizeEnabled
public synchronized void setFocusEmphasizeEnabled(boolean b)
- Enables the button to be emphasized when the keyboard focus has
been gained.
- See Also:
- isFocusEmphasizeEnabled
mouseClicked
public void mouseClicked(MouseEvent e)
- Invoked when the mouse has been clicked on a component.
- See Also:
- MouseListener
mousePressed
public void mousePressed(MouseEvent e)
- Invoked when the mouse has been pressed on a component.
- See Also:
- MouseListener
mouseReleased
public void mouseReleased(MouseEvent e)
- Invoked when the mouse has been released on a component.
- See Also:
- MouseListener
mouseEntered
public void mouseEntered(MouseEvent e)
- Invoked when the mouse enters a component.
- See Also:
- MouseListener
mouseExited
public void mouseExited(MouseEvent e)
- Invoked when the mouse exits a component.
- See Also:
- MouseListener
mouseDragged
public void mouseDragged(MouseEvent e)
- Invoked when the mouse button is pressed on a component and then dragged.
- See Also:
- MouseMotionListener
mouseMoved
public void mouseMoved(MouseEvent e)
- Invoked when the mouse button has been moved on a component.
- See Also:
- MouseMotionListener
keyTyped
public void keyTyped(KeyEvent e)
- Invoked when a key has been typed.
- See Also:
- KeyListener
keyPressed
public void keyPressed(KeyEvent e)
- Invoked when a key has been pressed.
- See Also:
- KeyListener
keyReleased
public void keyReleased(KeyEvent e)
- Invoked when a key has been released.
- See Also:
- KeyListener
focusGained
public void focusGained(FocusEvent e)
- Invoked when a component gains the keyboard focus.
- See Also:
- FocusListener
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