charvax.swing
public class JButton extends AbstractButton
_actionListeners, _itemListeners
_border
_alignmentX, _alignmentY, _background, _cursesColor, _enabled, _focusListeners, _foreground, _keyListeners, _origin, _parent, _visible, BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
Constructor and Description |
---|
JButton()
Default constructor - construct a button with an empty label.
|
JButton(java.lang.String text_) |
Modifier and Type | Method and Description |
---|---|
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(java.lang.String label_)
Deprecated.
Replaced by setText(String text)
|
void |
setText(java.lang.String label_)
Sets the button's label text.
|
java.lang.String |
toString() |
addActionListener, addItemListener, addKeyListenerToAncestor, doClick, fireActionPerformed, fireItemStateChanged, getActionCommand, getLabel, getLabelString, getMnemonic, getText, isSelected, keyPressed, keyReleased, keyTyped, processEvent, processMouseEvent, removeItemListener, setActionCommand, setMnemonic, setParent, setSelected
getBorder, getInsets, setBorder
addFocusListener, addKeyListener, contains, contains, getAlignmentX, getAlignmentY, getAncestorWindow, getBackground, getBounds, getCursesColor, getForeground, getLocation, getLocationOnScreen, getName, getParent, hasFocus, hide, invalidate, isDisplayed, isEnabled, isFocusTraversable, isRecursivelyVisible, isTotallyObscured, isValid, isVisible, processFocusEvent, repaint, requestSync, setBackground, setBounds, setBounds, setBounds, setEnabled, setForeground, setLocation, setLocation, setName, setVisible, show, validate, validateCursesColor
public JButton()
public JButton(java.lang.String text_)
public void setLabel(java.lang.String label_)
setLabel
in class AbstractButton
public void setText(java.lang.String label_)
AbstractButton
setText
in class AbstractButton
public Dimension getSize()
public Dimension minimumSize()
minimumSize
in class Component
public void draw()
draw
in class JComponent
public void processKeyEvent(KeyEvent ke_)
processKeyEvent
in class Component
public void requestFocus()
Component
requestFocus
in class Component
public java.lang.String toString()
toString
in class java.lang.Object