javax.swing
Class JLabel.AccessibleJLabel.LabelKeyBinding

java.lang.Object
  extended byjavax.swing.JLabel.AccessibleJLabel.LabelKeyBinding
All Implemented Interfaces:
javax.accessibility.AccessibleKeyBinding
Enclosing class:
JLabel.AccessibleJLabel

class JLabel.AccessibleJLabel.LabelKeyBinding
extends Object
implements javax.accessibility.AccessibleKeyBinding


Field Summary
(package private)  int mnemonic
           
 
Constructor Summary
(package private) JLabel.AccessibleJLabel.LabelKeyBinding(int mnemonic)
           
 
Method Summary
 Object getAccessibleKeyBinding(int i)
          Returns a key binding for this object.
 int getAccessibleKeyBindingCount()
          Returns the number of key bindings for this object
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

mnemonic

int mnemonic
Constructor Detail

JLabel.AccessibleJLabel.LabelKeyBinding

JLabel.AccessibleJLabel.LabelKeyBinding(int mnemonic)
Method Detail

getAccessibleKeyBindingCount

public int getAccessibleKeyBindingCount()
Returns the number of key bindings for this object

Specified by:
getAccessibleKeyBindingCount in interface javax.accessibility.AccessibleKeyBinding
Returns:
the zero-based number of key bindings for this object

getAccessibleKeyBinding

public Object getAccessibleKeyBinding(int i)
Returns a key binding for this object. The value returned is an java.lang.Object which must be cast to appropriate type depending on the underlying implementation of the key. For example, if the Object returned is a javax.swing.KeyStroke, the user of this method should do the following: Component c = AccessibleContext ac = c.getAccessibleContext(); AccessibleKeyBinding akb = ac.getAccessibleKeyBinding(); for (int i = 0; i < akb.getAccessibleKeyBindingCount(); i++) { Object o = akb.getAccessibleKeyBinding(i); if (o instanceof javax.swing.KeyStroke) { javax.swing.KeyStroke keyStroke = (javax.swing.KeyStroke)o; } }

Specified by:
getAccessibleKeyBinding in interface javax.accessibility.AccessibleKeyBinding
Parameters:
i - zero-based index of the key bindings
Returns:
a javax.lang.Object which specifies the key binding
Throws:
IllegalArgumentException - if the index is out of bounds
See Also:
getAccessibleKeyBindingCount()