void | addActionListener(ActionListener l)- Adds an ActionListener to the button's listener list.
|
void | addChangeListener(ChangeListener l)- Adds a ChangeListener to the button's listener list.
|
protected void | addImpl(Component comp, Object constraints, int index)- Adds the specified component to this AbstractButton.
|
void | addItemListener(ItemListener l)- Adds an ItemListener to the button's listener list.
|
protected int | checkHorizontalKey(int key, String exception)- Verifies that a particular key is one of the valid constants used for
describing horizontal alignment and positioning.
|
protected int | checkVerticalKey(int key, String exception)- Verifies that a particular key is one of the valid constants used for
describing vertical alignment and positioning.
|
protected void | configurePropertiesFromAction(Action a)- Configure various properties of the button by reading properties
of an
Action.
|
protected ActionListener | createActionListener()- A factory method which should return an
ActionListener that
propagates events from the button's ButtonModel to any of the
button's ActionListeners.
|
protected PropertyChangeListener | createActionPropertyChangeListener(Action a)- A factory method which should return a
PropertyChangeListener
that accepts changes to the specified Action and reconfigure
the AbstractButton, by default using the configurePropertiesFromAction(Action) method.
The button calls this method whenever a new Action is assigned to
the button's "action" property, via setAction(Action), and stores the
resulting PropertyChangeListener in its
actionPropertyChangeListener member field.
|
protected ChangeListener | createChangeListener()- Factory method which creates a
ChangeListener, used to
subscribe to ChangeEvents from the button's model.
|
protected ItemListener | createItemListener()- Factory method which creates a
ItemListener, used to
subscribe to ItemEvents from the button's model.
|
void | doClick()- Programmatically perform a "click" on the button: arming, pressing,
waiting, un-pressing, and disarming the model.
|
void | doClick(int pressTime)- Programmatically perform a "click" on the button: arming, pressing,
waiting, un-pressing, and disarming the model.
|
protected void | fireActionPerformed(ActionEvent e)- Calls
ActionListener.actionPerformed(ActionEvent) on each ActionListener in the button's listener list.
|
protected void | fireItemStateChanged(ItemEvent e)- Calls
ItemListener.itemStateChanged(ItemEvent) on each ItemListener in
the button's listener list.
|
protected void | fireStateChanged()- Calls
ChangeListener.stateChanged(ChangeEvent) on each ChangeListener
in the button's listener list.
|
Action | getAction()- Get the value of the "action" property.
|
String | getActionCommand()- Returns the action command string for this button's model.
If the action command was set to
null, the button's
text (label) is returned instead.
|
ActionListener[] | getActionListeners()- Returns all added
ActionListener objects.
|
ChangeListener[] | getChangeListeners()- Returns all added
ChangeListener objects.
|
Icon | getDisabledIcon()- Return the button's "disabledIcon" property.
|
Icon | getDisabledSelectedIcon()- Return the button's disabled selected icon.
|
int | getDisplayedMnemonicIndex()- Get the button's mnemonic index, which is an offset into the button's
"text" property.
|
int | getHorizontalAlignment()- Set the horizontal alignment of the button's text and icon.
|
int | getHorizontalTextPosition()- Get the horizontal position of the button's text relative to its
icon.
|
Icon | getIcon()- Return the button's default "icon" property.
|
int | getIconTextGap()- Get the value of the
iconTextGap property.
|
ItemListener[] | getItemListeners()- Returns all added
ItemListener objects.
|
String | getLabel()- use
getText()
|
Insets | getMargin()- Return the button's "margin" property, which is an
Insets object
describing the distance between the button's border and its text and
icon.
|
int | getMnemonic()- Get the current keyboard mnemonic value.
|
ButtonModel | getModel()- Get the model the button is currently using.
|
long | getMultiClickThreshhold()- Returns the current time in milliseconds in which clicks gets coalesced
into a single
ActionEvent.
|
Icon | getPressedIcon()- Return the button's "pressedIcon" property.
|
Icon | getRolloverIcon()- Return the button's rollover icon.
|
Icon | getRolloverSelectedIcon()- Return the button's rollover selected icon.
|
Icon | getSelectedIcon()- Return the button's selected icon.
|
Object[] | getSelectedObjects()- Returns an single-element array containing the "text" property of the
button if the "selected" property of the button's model is
true, otherwise returns null.
|
String | getText()- Return the button's "text" property.
|
ButtonUI | getUI()- Set the "UI" property of the button, which is a look and feel class
responsible for handling the button's input events and painting it.
|
int | getVerticalAlignment()- Get the vertical alignment of the button's text and icon.
|
int | getVerticalTextPosition()- Get the vertical position of the button's text relative to its
icon.
|
boolean | imageUpdate(Image img, int infoflags, int x, int y, int w, int h)- Called when image data becomes available for one of the button's icons.
|
protected void | init(String text, Icon icon)
|
boolean | isBorderPainted()- Set the value of the "borderPainted" property.
|
boolean | isContentAreaFilled()- Returns the value of the button's "contentAreaFilled" property.
|
boolean | isFocusPainted()- Return the button's "paintFocus" property.
|
boolean | isRolloverEnabled()- Returns whether or not rollover icon changes are enabled on the
button.
|
boolean | isSelected()- Get the value of the button's "selected" property.
|
protected void | paintBorder(Graphics g)- Paints the button's border, if the button's "borderPainted" property is
true, by out calling to the button's look and feel class.
|
protected String | paramString()- Returns a string, used only for debugging, which identifies or somehow
represents this button.
|
void | removeActionListener(ActionListener l)- Removes an ActionListener from the button's listener list.
|
void | removeChangeListener(ChangeListener l)- Removes a ChangeListener from the button's listener list.
|
void | removeItemListener(ItemListener l)- Removes an ItemListener from the button's listener list.
|
void | setAction(Action a)- Set the button's "action" property, subscribing the new action to the
button, as an ActionListener, if it is not already subscribed.
|
void | setActionCommand(String actionCommand)- Sets the action command string for this button's model.
|
void | setBorderPainted(boolean b)- Set the value of the "borderPainted" property.
|
void | setContentAreaFilled(boolean b)- Sets the value of the button's "contentAreaFilled" property.
|
void | setDisabledIcon(Icon d)- Set the button's "disabledIcon" property.
|
void | setDisabledSelectedIcon(Icon icon)- Set the button's disabled selected icon.
|
void | setDisplayedMnemonicIndex(int index)- Sets the button's mnemonic index.
|
void | setEnabled(boolean b)- Enables or disables the button.
|
void | setFocusPainted(boolean p)- Set the button's "paintFocus" property.
|
void | setHorizontalAlignment(int a)- Set the horizontal alignment of the button's text and icon.
|
void | setHorizontalTextPosition(int t)- Set the horizontal position of the button's text relative to its
icon.
|
void | setIcon(Icon i)- Set the button's default "icon" property.
|
void | setIconTextGap(int i)- Set the value of the
iconTextGap property.
|
void | setLabel(String label)- use
setText(text)
|
void | setLayout(LayoutManager layout)- Sets a layout manager on this AbstractButton.
|
void | setMargin(Insets m)- Set the button's "margin" property, which is an
Insets object
describing the distance between the button's border and its text and
icon.
|
void | setMnemonic(char mne)- Set the current keyboard mnemonic value.
|
void | setMnemonic(int mne)- Set the current keyboard mnemonic value.
|
void | setModel(ButtonModel newModel)- Set the model the button is currently using.
|
void | setMultiClickThreshhold(long threshhold)- Sets the time in milliseconds in which clicks gets coalesced into a single
ActionEvent.
|
void | setPressedIcon(Icon pressedIcon)- Set the button's "pressedIcon" property.
|
void | setRolloverEnabled(boolean r)- Set the "rolloverEnabled" property.
|
void | setRolloverIcon(Icon r)- Set the button's rollover icon and sets the
rolloverEnabled
property to true.
|
void | setRolloverSelectedIcon(Icon r)- Set the button's rollover selected icon and sets the
rolloverEnabled property to true.
|
void | setSelected(boolean s)- Set the value of the button's "selected" property.
|
void | setSelectedIcon(Icon s)- Set the button's selected icon.
|
void | setText(String t)- Set the button's "text" property.
|
void | setUI(ButtonUI ui)- Set the "UI" property of the button, which is a look and feel class
responsible for handling the button's input events and painting it.
|
void | setVerticalAlignment(int a)- Set the vertical alignment of the button's text and icon.
|
void | setVerticalTextPosition(int t)- Set the vertical position of the button's text relative to its
icon.
|
void | updateUI()- Set the "UI" property to a class constructed, via the
UIManager, from the current look and feel.
|