charvax.swing
Class JButton
- EventListener, ItemSelectable, KeyListener
An implementation of a "pushbutton" with a text label.
BOTTOM_ALIGNMENT , CENTER_ALIGNMENT , LEFT_ALIGNMENT , RIGHT_ALIGNMENT , TOP_ALIGNMENT , _alignmentX , _alignmentY , _background , _cursesColor , _enabled , _focusListeners , _foreground , _keyListeners , _origin , _parent , _visible |
JButton() - Default constructor - construct a button with an empty label.
|
JButton(String text_)
|
void | debug(int level_)
|
void | draw() - Draw the button.
|
int | getHeight()
|
Dimension | getSize() - Return the size of the button.
|
int | getWidth()
|
Dimension | minimumSize() - Called by the LayoutManager.
|
void | processKeyEvent(KeyEvent ke_) - Processes key events occurring on this object by dispatching them
to any registered KeyListener objects.
|
void | requestFocus() - This method should be invoked by all subclasses of Component
which override this method; because this method generates the
FOCUS_GAINED event when the component gains the keyboard focus.
|
void | setLabel(String label_) - Replaced by setText(String text)
|
void | setText(String label_) - Sets the button's label text.
|
String | toString()
|
addActionListener , addItemListener , doClick , fireActionPerformed , fireItemStateChanged , getActionCommand , getLabel , getLabelString , getMnemonic , getText , isSelected , keyPressed , keyReleased , keyTyped , processEvent , processMouseEvent , removeItemListener , setActionCommand , setLabel , setMnemonic , setSelected , setText |
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 , setBounds , setBounds , setBounds , setEnabled , setForeground , setLocation , setLocation , setName , setParent , setVisible , show , validate , validateCursesColor |
JButton
public JButton()
Default constructor - construct a button with an empty label.
JButton
public JButton(String text_)
draw
public void draw()
Draw the button. Called by this JButton's parent container.
- draw in interface JComponent
getSize
public Dimension getSize()
Return the size of the button. The button is always one line
high, and two columns wider than the label, plus the size
of the border (if any).
- getSize in interface Component
processKeyEvent
public void processKeyEvent(KeyEvent ke_)
Processes key events occurring on this object by dispatching them
to any registered KeyListener objects.
- processKeyEvent in interface Component
requestFocus
public void requestFocus()
This method should be invoked by all subclasses of Component
which override this method; because this method generates the
FOCUS_GAINED event when the component gains the keyboard focus.
- requestFocus in interface Component
setLabel
public void setLabel(String label_)
Replaced by setText(String text)
- setLabel in interface AbstractButton
setText
public void setText(String label_)
Sets the button's label text.
- setText in interface AbstractButton
toString
public String toString()