Prev Class | Next Class | Frames | No Frames |
Summary: Nested | Field | Method | Constr | Detail: Nested | Field | Method | Constr |
java.lang.Object
charva.awt.Component
charvax.swing.JComponent
charvax.swing.AbstractButton
Field Summary | |
protected Vector |
|
protected Vector |
|
Fields inherited from class charvax.swing.JComponent | |
_border |
Fields inherited from class charva.awt.Component | |
BOTTOM_ALIGNMENT , CENTER_ALIGNMENT , LEFT_ALIGNMENT , RIGHT_ALIGNMENT , TOP_ALIGNMENT , _alignmentX , _alignmentY , _background , _cursesColor , _enabled , _focusListeners , _foreground , _keyListeners , _origin , _parent , _visible |
Method Summary | |
void |
|
void |
|
void |
|
protected void |
|
protected void |
|
String |
|
String |
|
protected String |
|
int |
|
String |
|
boolean |
|
void |
|
void |
|
void | |
protected void |
|
void |
|
void |
|
void |
|
void |
|
void |
|
void |
|
void |
|
Methods inherited from class charvax.swing.JComponent | |
draw , getBorder , getInsets , setBorder |
Methods inherited from class charva.awt.Component | |
addFocusListener , addKeyListener , contains , contains , debug , draw , getAlignmentX , getAlignmentY , getAncestorWindow , getBackground , getBounds , getCursesColor , getForeground , getHeight , getLocation , getLocationOnScreen , getName , getParent , getSize , getWidth , hasFocus , hide , invalidate , isDisplayed , isEnabled , isFocusTraversable , isTotallyObscured , isValid , isVisible , minimumSize , processEvent , processFocusEvent , processKeyEvent , processMouseEvent , repaint , requestFocus , requestSync , setBackground , setEnabled , setForeground , setLocation , setLocation , setName , setParent , setVisible , show , validate , validateCursesColor |
protected Vector _actionListeners
A list of ActionListeners registered for this component.
protected Vector _itemListeners
A list of ItemListeners registered for this component.
public void addActionListener(ActionListener al_)
Register an ActionListener object for this button.
public void addItemListener(ItemListener il_)
Register an ItemListener object for this component.
- Specified by:
- addItemListener in interface ItemSelectable
public void doClick()
Programmatically performs a "click" of this button.
protected void fireActionPerformed(ActionEvent ae_)
Invoke all the ActionListener callbacks that may have been registered for this button.
protected void fireItemStateChanged(ItemEvent ie_)
Invoke all the ItemListener callbacks that may have been registered for this component.
public String getActionCommand()
Returns the action command for this button.
public String getLabel()
Deprecated. Replaced by getText().
protected String getLabelString()
Returns the complete label string, including the mnemonic key surrounded by parentheses (if there is a mnemonic key and the mnemonic key does not appear within the label).
public int getMnemonic()
Returns the button's mnemonic character.
public String getText()
Returns the button's label text.
public boolean isSelected()
Returns the state of the button.
public void keyPressed(KeyEvent ke_)
Implements the KeyListener interface; this is called if a control character or a function key or cursor key was typed.
- Specified by:
- keyPressed in interface KeyListener
public void keyReleased(KeyEvent ke_)
Implements the KeyListener interface but is never invoked.
- Specified by:
- keyReleased in interface KeyListener
public void keyTyped(KeyEvent ke_)
Implements the KeyListener interface; this is called if a printable (ASCII or ISO8859-1) character was typed.
- Specified by:
- keyTyped in interface KeyListener
protected void processEvent(AWTEvent evt_)
Process events.
- Overrides:
- processEvent in interface Component
public void processMouseEvent(MouseEvent e)
Process a MouseEvent that was generated by clicking the mouse somewhere inside this component.
- Overrides:
- processMouseEvent in interface Component
public void removeItemListener(ItemListener listener_)
- Specified by:
- removeItemListener in interface ItemSelectable
public void setActionCommand(String text_)
Sets the action command for this button.
public void setLabel(String label_)
Deprecated. Replaced by setText().
public void setMnemonic(int mnemonic_)
Set the button's mnemonic character. The mnemonic is the key which will activate this button if focus is contained somewhere within this button's ancestor window. A mnemonic must correspond to a single key on the keyboard and should be specified using one of the VK_XXX keycodes defined in java.awt.event.KeyEvent. Mnemonics are case-insensitive, therefore a key event with the corresponding keycode would cause the button to be activated whether or not the Shift modifier was pressed. If the character defined by the mnemonic is found within the button's label string, the first occurrence of it will be underlined to indicate the mnemonic to the user. If the corresponding character is not contained within the button's label, then it will be displayed to the right, surrounded by parentheses. In the case of a JButton, JCheckBox or JRadioButton, this method should only be called after the button has been added to a Window, otherwise pressing the corresponding key will have no effect.
- Parameters:
mnemonic_
- the keycode of the mnemonic key.
public void setSelected(boolean state_)
Sets the state of the button. Note that this method does not post an ActionEvent.
public void setText(String label_)
Sets the button's label text.