public class Button extends AbstractButton
Button class implements a labeled button. The application
can cause some action to happen when the button is pushed.
When a button is pressed and released, the button sends an instance of
ActionEvent to the button.
ButtonController,
直列化された形式| 修飾子とタイプ | フィールドと説明 |
|---|---|
protected java.awt.event.ActionListener |
actionListener |
protected static java.lang.String |
actionListenerK
Internal constant for serialization
|
actionCommand, controlleralignment, CENTER, EAST, label, LEFT, NORTH, NORTHEAST, NORTHWEST, RIGHT, SOUTH, SOUTHEAST, SOUTHWEST, WESTDefaultToolkit, doubleBuffered, focusTraversable, offscreenBuffer, toolTip| コンストラクタと説明 |
|---|
Button()
Constructs a button with empty label.
|
Button(java.lang.String label)
Constructs a button with the specified label.
|
Button(Text text)
Constructs a button with the specified text.
|
Button(VAbstractButton button)
Constructs a button with the specified visual button.
|
Button(Visualizable visualizable)
Constructs a button with the specified visual object.
|
| 修飾子とタイプ | メソッドと説明 |
|---|---|
void |
actionPerformed()
Invoked when the button has been triggered by the controller.
|
void |
addActionListener(java.awt.event.ActionListener l)
Adds the specified action listener to receive action events from
this button.
|
boolean |
isDirectNotification()
If true, notifies listeners directly without using the event queue.
|
void |
itemStateChanged(boolean selected)
Invoked when the button has been toggled by the controller.
|
protected void |
notifyActionListeners(java.awt.event.ActionEvent e)
Notifies the action event to the action listeners.
|
protected void |
processEvent(java.awt.AWTEvent e) |
void |
removeActionListener(java.awt.event.ActionListener l)
Removes the specified action listener so that it no longer
receives action events from this button.
|
getActionCommand, getController, getLabel, getVButton, isFocusTraversable, setActionCommand, setLabel, setVButton, setVButtonInnergetAlignment, getButtonBackground, getMinimumSize, getPreferredSize, getText, getTEXT, getVisualizable, getVLabel, paintOn, setAlignment, setBackground, setBounds, setEnabled, setFont, setForeground, setLabelSize, setText, setText, setTEXT, setVisualizable, setVLabeladdNotify, bounds, disable, doLayout, enable, enable, getBounds, getFrame, getLocation, getPreferredGraphics, getPreferredGraphics, getSize, getToolTipText, getToolTipVisual, hide, isDoubleBuffered, layout, location, minimumSize, paint, postOldEvent, preferredSize, processMouseEvent, processMouseMotionEvent, repaintNow, requestFocus, reshape, setDoubleBuffered, setFocusTraversable, setToolTipText, setToolTipText, setToolTipVisual, setVisible, show, show, size, syncGraphics, syncGraphics, syncGraphics, updateaction, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, checkImage, checkImage, coalesceEvents, contains, contains, createImage, createImage, createVolatileImage, createVolatileImage, deliverEvent, disableEvents, dispatchEvent, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getAccessibleContext, getAlignmentX, getAlignmentY, getBackground, getBaseline, getBaselineResizeBehavior, getBounds, getColorModel, getComponentAt, getComponentAt, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeys, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphics, getGraphicsConfiguration, getHeight, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getListeners, getLocale, getLocation, getLocationOnScreen, getMaximumSize, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getToolkit, getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus, imageUpdate, inside, invalidate, isBackgroundSet, isCursorSet, isDisplayable, isEnabled, isFocusable, isFocusCycleRoot, isFocusOwner, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isOpaque, isPreferredSizeSet, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, list, list, locate, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, paramString, postEvent, prepareImage, prepareImage, print, printAll, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processKeyEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removeNotify, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, repaint, requestFocus, requestFocusInWindow, requestFocusInWindow, resize, resize, revalidate, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeys, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setMaximumSize, setMinimumSize, setName, setPreferredSize, setSize, setSize, toString, transferFocus, transferFocusBackward, transferFocusUpCycle, validateprotected transient java.awt.event.ActionListener actionListener
protected static final java.lang.String actionListenerK
public Button()
public Button(java.lang.String label)
label - A string label for the button.public Button(Text text)
text - A text label for the button.public Button(Visualizable visualizable)
visualizable - A visual label for the button.public Button(VAbstractButton button)
button - A visual button for the button.public void addActionListener(java.awt.event.ActionListener l)
l - the action listener.public void removeActionListener(java.awt.event.ActionListener l)
l - the action listener.public void actionPerformed()
actionPerformed クラス内 AbstractButtonpublic void itemStateChanged(boolean selected)
itemStateChanged クラス内 AbstractButtonpublic boolean isDirectNotification()
isDirectNotification クラス内 KComponentprotected void notifyActionListeners(java.awt.event.ActionEvent e)
protected void processEvent(java.awt.AWTEvent e)
processEvent クラス内 java.awt.Component