Skip navigation links

Oracle Fusion Middleware Java API Reference for Oracle Extension SDK Reference
11g Release 1 (11.1.1.5.0)

E13403-06


oracle.ide.controls
Class ButtonKeyController

java.lang.Object
  extended by javax.swing.AbstractAction
      extended by oracle.ide.controls.ButtonKeyController

All Implemented Interfaces:
java.awt.event.ActionListener, java.io.Serializable, java.lang.Cloneable, java.util.EventListener, javax.swing.Action
Direct Known Subclasses:
RadioKeyController

public class ButtonKeyController
extends javax.swing.AbstractAction

ButtonKeyController is a utility class that adds keyboard navigation to buttons.

For example: with the following code, the user will be able to navigate between the 3 checkboxes using the up/down keys

 JCheckBox checkBox1 = new JCheckBox("Match Case");
 JCheckBox checkBox2 = new JCheckBox("Whole Word");
 JCheckBox checkBox3 = new JCheckBox("Wrap Around");
 ButtonKeyController.attach(checkBox1, checkBox2, checkBox3);
 ...
 
See Also:
Serialized Form

Field Summary

 

Fields inherited from class javax.swing.AbstractAction
changeSupport, enabled

 

Fields inherited from interface javax.swing.Action
ACCELERATOR_KEY, ACTION_COMMAND_KEY, DEFAULT, DISPLAYED_MNEMONIC_INDEX_KEY, LARGE_ICON_KEY, LONG_DESCRIPTION, MNEMONIC_KEY, NAME, SELECTED_KEY, SHORT_DESCRIPTION, SMALL_ICON

 

Constructor Summary
protected ButtonKeyController(javax.swing.AbstractButton[] buttons, int direction)
           

 

Method Summary
 void actionPerformed(java.awt.event.ActionEvent e)
          This is a private implementation method.
static void attach(javax.swing.AbstractButton... buttons)
          Adds the keyboard navigation to those buttons.
protected static void attach(ButtonKeyController upAction, ButtonKeyController downAction, javax.swing.AbstractButton[] buttons)
          Adds the KeyControllers to the button maps.
protected  int getActivedButton(javax.swing.AbstractButton[] buttons)
           
protected  void setActiveButton(javax.swing.AbstractButton button)
          Activates the button

 

Methods inherited from class javax.swing.AbstractAction
addPropertyChangeListener, clone, firePropertyChange, getKeys, getPropertyChangeListeners, getValue, isEnabled, putValue, removePropertyChangeListener, setEnabled

 

Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

 

Constructor Detail

ButtonKeyController

protected ButtonKeyController(javax.swing.AbstractButton[] buttons,
                              int direction)

Method Detail

attach

public static void attach(javax.swing.AbstractButton... buttons)
Adds the keyboard navigation to those buttons.

actionPerformed

public void actionPerformed(java.awt.event.ActionEvent e)
This is a private implementation method.

attach

protected static void attach(ButtonKeyController upAction,
                             ButtonKeyController downAction,
                             javax.swing.AbstractButton[] buttons)
Adds the KeyControllers to the button maps.
Parameters:
upAction -
downAction -
buttons -

getActivedButton

protected int getActivedButton(javax.swing.AbstractButton[] buttons)
Returns:
the position of the active button.

setActiveButton

protected void setActiveButton(javax.swing.AbstractButton button)
Activates the button

Skip navigation links

Oracle Fusion Middleware Java API Reference for Oracle Extension SDK Reference
11g Release 1 (11.1.1.5.0)

E13403-06


Copyright © 1997, 2011, Oracle. All rights reserved.