Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## nextapp.echo2.app.button
Class AbstractButton

    java.lang.Object
      nextapp.echo2.app.Component
          nextapp.echo2.app.button.AbstractButton

All Implemented Interfaces:
  java.io.Serializable, RenderIdSupport

Direct Known Subclasses:
  Button, ToggleButton

    public abstract class AbstractButton

extends Component

An abstract base class for button components. Provides basic properties, a model, and event handling facilities.

See Also:
  Serialized Form

Field Summary
`static java.lang.String` | `ACTION_LISTENERS_CHANGED_PROPERTY`
`static java.lang.String` | `INPUT_CLICK`
`static java.lang.String` | `PROPERTY_ALIGNMENT`
`static java.lang.String` | `PROPERTY_BACKGROUND_IMAGE`
`static java.lang.String` | `PROPERTY_BORDER`
`static java.lang.String` | `PROPERTY_DISABLED_BACKGROUND`
`static java.lang.String` | `PROPERTY_DISABLED_BACKGROUND_IMAGE`
`static java.lang.String` | `PROPERTY_DISABLED_BORDER`
`static java.lang.String` | `PROPERTY_DISABLED_FONT`
`static java.lang.String` | `PROPERTY_DISABLED_FOREGROUND`
`static java.lang.String` | `PROPERTY_DISABLED_ICON`
`static java.lang.String` | `PROPERTY_HEIGHT`
`static java.lang.String` | `PROPERTY_ICON`
`static java.lang.String` | `PROPERTY_ICON_TEXT_MARGIN`
`static java.lang.String` | `PROPERTY_INSETS`
`static java.lang.String` | `PROPERTY_LINE_WRAP`
`static java.lang.String` | `PROPERTY_MODEL`
`static java.lang.String` | `PROPERTY_PRESSED_BACKGROUND`
`static java.lang.String` | `PROPERTY_PRESSED_BACKGROUND_IMAGE`
`static java.lang.String` | `PROPERTY_PRESSED_BORDER`
`static java.lang.String` | `PROPERTY_PRESSED_ENABLED`
`static java.lang.String` | `PROPERTY_PRESSED_FONT`
`static java.lang.String` | `PROPERTY_PRESSED_FOREGROUND`
`static java.lang.String` | `PROPERTY_PRESSED_ICON`
`static java.lang.String` | `PROPERTY_ROLLOVER_BACKGROUND`
`static java.lang.String` | `PROPERTY_ROLLOVER_BACKGROUND_IMAGE`
`static java.lang.String` | `PROPERTY_ROLLOVER_BORDER`
`static java.lang.String` | `PROPERTY_ROLLOVER_ENABLED`
`static java.lang.String` | `PROPERTY_ROLLOVER_FONT`
`static java.lang.String` | `PROPERTY_ROLLOVER_FOREGROUND`
`static java.lang.String` | `PROPERTY_ROLLOVER_ICON`
`static java.lang.String` | `PROPERTY_TEXT`
`static java.lang.String` | `PROPERTY_TEXT_ALIGNMENT`
`static java.lang.String` | `PROPERTY_TEXT_POSITION`
`static java.lang.String` | `PROPERTY_TOOL_TIP_TEXT`
`static java.lang.String` | `PROPERTY_WIDTH`

Fields inherited from class nextapp.echo2.app.Component
`CHILDREN_CHANGED_PROPERTY, ENABLED_CHANGED_PROPERTY, FOCUS_TRAVERSAL_INDEX_CHANGED_PROPERTY, FOCUS_TRAVERSAL_PARTICIPANT_CHANGED_PROPERTY, LAYOUT_DIRECTION_CHANGED_PROPERTY, LOCALE_CHANGED_PROPERTY, PROPERTY_BACKGROUND, PROPERTY_FONT, PROPERTY_FOREGROUND, PROPERTY_LAYOUT_DATA, STYLE_CHANGED_PROPERTY, STYLE_NAME_CHANGED_PROPERTY, VISIBLE_CHANGED_PROPERTY`

Constructor Summary
`AbstractButton()`

Method Summary
`void` | `addActionListener(ActionListener l)` Adds an `ActionListener` to receive notification of user actions, i.e., button presses.
`void` | `doAction()` Programmatically performs a click/activation of the button.
`void` | `fireActionPerformed(ActionEvent e)` Notifies all listeners that have registered for this event type.
`java.lang.String` | `getActionCommand()` Retrieves the action command from the `ButtonModel`.
`Alignment` | `getAlignment()` Returns the alignment of the button's content.
`FillImage` | `getBackgroundImage()` Returns the background image of the button.
`Border` | `getBorder()` Returns the border displayed around the button.
`Color` | `getDisabledBackground()` Returns the background color of the button when the button is disabled.
`FillImage` | `getDisabledBackgroundImage()` Returns the background image displayed when the button is disabled.
`Border` | `getDisabledBorder()` Returns the border displayed around the button when the button is disabled.
`Font` | `getDisabledFont()` Returns the font of the button when the button is disabled.
`Color` | `getDisabledForeground()` Returns the foreground color of the button when the button is disabled.
`ImageReference` | `getDisabledIcon()` Returns the icon of the button that is displayed when the button is disabled.
`Extent` | `getHeight()` Returns the height of the button.
`ImageReference` | `getIcon()` Returns the icon displayed in the button.
`Extent` | `getIconTextMargin()` Returns the margin size between the icon and the text.
`Insets` | `getInsets()` Returns the margin between the buttons edge and its content.
`ButtonModel` | `getModel()` Returns the model that this button represents.
`Color` | `getPressedBackground()` Returns the background color of the button when the button is pressed.
`FillImage` | `getPressedBackgroundImage()` Returns the background image displayed when the button is pressed.
`Border` | `getPressedBorder()` Returns the border displayed around the button when the button is pressed.
`Font` | `getPressedFont()` Returns the font of the button when the button is pressed.
`Color` | `getPressedForeground()` Returns the foreground color of the button when the button is pressed.
`ImageReference` | `getPressedIcon()` Returns the icon of the button that is displayed when the button is pressed.
`Color` | `getRolloverBackground()` Returns the background color of the button when the mouse cursor is inside its bounds.
`FillImage` | `getRolloverBackgroundImage()` Returns the background image displayed when the mouse cursor is inside the button's bounds.
`Border` | `getRolloverBorder()` Returns the border displayed around the button when the mouse cursor is inside its bounds.
`Font` | `getRolloverFont()` Returns the font of the button when the mouse cursor is inside its bounds.
`Color` | `getRolloverForeground()` Returns the foreground color of the button when the mouse cursor is inside its bounds.
`ImageReference` | `getRolloverIcon()` Returns the icon of the button that is displayed when the mouse cursor is inside its bounds.
`java.lang.String` | `getText()` Returns the text label of the button.
`Alignment` | `getTextAlignment()` Returns the alignment of the text relative to the icon.
`Alignment` | `getTextPosition()` Returns the position of the text relative to the icon.
`java.lang.String` | `getToolTipText()` Returns the tool tip text (displayed when the mouse cursor is hovered over the component).
`Extent` | `getWidth()` Returns the width of the button.
`boolean` | `hasActionListeners()` Determines if the button has any `ActionListener`s registered.
`boolean` | `isLineWrap()` Determines if the text of the button should wrap in the event that horizontal space is limited.
`boolean` | `isPressedEnabled()` Determines if pressed effects are enabled.
`boolean` | `isRolloverEnabled()` Determines if rollover effects are enabled.
`boolean` | `isValidChild(Component component)` This component does not support children.
`void` | `processInput(java.lang.String name, java.lang.Object value)` Processes client input specific to the `Component` received from the `UpdateManager`.
`void` | `removeActionListener(ActionListener l)` Removes an `ActionListener` from being notified of user actions, i.e., button presses.
`void` | `setActionCommand(java.lang.String newValue)` Sets the action command of the `ButtonModel`.
`void` | `setAlignment(Alignment newValue)` Sets the alignment of the button's content.
`void` | `setBackgroundImage(FillImage newValue)` Sets the background image of the button.
`void` | `setBorder(Border newValue)` Sets the border displayed around the button.
`void` | `setDisabledBackground(Color newValue)` Sets the background color of the button when the button is disabled.
`void` | `setDisabledBackgroundImage(FillImage newValue)` Sets the background image displayed when the button is disabled.
`void` | `setDisabledBorder(Border newValue)` Sets the border displayed around the button when the button is disabled.
`void` | `setDisabledFont(Font newValue)` Sets the font of the button when the button is disabled.
`void` | `setDisabledForeground(Color newValue)` Sets the foreground color of the button when the button is disabled.
`void` | `setDisabledIcon(ImageReference newValue)` Sets the icon of the button that is displayed when the button is disabled.
`void` | `setHeight(Extent newValue)` Sets the height of the button.
`void` | `setIcon(ImageReference newValue)` Sets the icon displayed in the button.
`void` | `setIconTextMargin(Extent newValue)` Sets the margin size between the icon and the text.
`void` | `setInsets(Insets newValue)` Sets the margin between the buttons edge and its content.
`void` | `setLineWrap(boolean newValue)` Sets whether the text of the button should wrap in the event that horizontal space is limited.
`void` | `setModel(ButtonModel newValue)` Sets the model that this button represents.
`void` | `setPressedBackground(Color newValue)` Sets the background color of the button when the button is pressed.
`void` | `setPressedBackgroundImage(FillImage newValue)` Sets the background image displayed when the button is pressed.
`void` | `setPressedBorder(Border newValue)` Sets the border displayed around the button when the button is pressed.
`void` | `setPressedEnabled(boolean newValue)` Sets whether pressed effects are enabled when the button is pressed.
`void` | `setPressedFont(Font newValue)` Sets the font of the button when the button is pressed.
`void` | `setPressedForeground(Color newValue)` Sets the foreground color of the button when the button is pressed.
`void` | `setPressedIcon(ImageReference newValue)` Sets the icon of the button that is displayed when the button is pressed.
`void` | `setRolloverBackground(Color newValue)` Sets the background color of the button when the mouse cursor is inside its bounds.
`void` | `setRolloverBackgroundImage(FillImage newValue)` Sets the background image displayed when the mouse cursor is inside the button's bounds
`void` | `setRolloverBorder(Border newValue)` Sets the border displayed around the button when the mouse cursor is inside its bounds.
`void` | `setRolloverEnabled(boolean newValue)` Sets whether rollover effects are enabled when the mouse cursor is inside the button's bounds.
`void` | `setRolloverFont(Font newValue)` Sets the font of the button when the mouse cursor is inside its bounds.
`void` | `setRolloverForeground(Color newValue)` Sets the foreground color of the button when the mouse cursor is inside its bounds.
`void` | `setRolloverIcon(ImageReference newValue)` Sets the icon of the button that is displayed when the mouse cursor is inside its bounds.
`void` | `setText(java.lang.String newValue)` Sets the text label of the button.
`void` | `setTextAlignment(Alignment newValue)` Sets the alignment of the text relative to the icon.
`void` | `setTextPosition(Alignment newValue)` Sets the position of the text relative to the icon.
`void` | `setToolTipText(java.lang.String newValue)` Sets the tool tip text (displayed when the mouse cursor is hovered over the component).
`void` | `setWidth(Extent newValue)` Sets the width of the button.

Methods inherited from class nextapp.echo2.app.Component
`add, add, addPropertyChangeListener, dispose, firePropertyChange, getApplicationInstance, getBackground, getComponent, getComponent, getComponentCount, getComponents, getEventListenerList, getFocusTraversalIndex, getFont, getForeground, getId, getIndexedProperty, getLayoutData, getLayoutDirection, getLocale, getParent, getProperty, getRenderId, getRenderIndexedProperty, getRenderIndexedProperty, getRenderLayoutDirection, getRenderLocale, getRenderProperty, getRenderProperty, getStyle, getStyleName, getVisibleComponent, getVisibleComponentCount, getVisibleComponents, hasEventListenerList, indexOf, init, isAncestorOf, isEnabled, isFocusTraversalParticipant, isRegistered, isRenderEnabled, isRenderVisible, isValidParent, isVisible, remove, remove, removeAll, removePropertyChangeListener, setBackground, setEnabled, setFocusTraversalIndex, setFocusTraversalParticipant, setFont, setForeground, setId, setIndexedProperty, setLayoutData, setLayoutDirection, setLocale, setProperty, setStyle, setStyleName, setVisible, validate, verifyInput, visibleIndexOf`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### ACTION_LISTENERS_CHANGED_PROPERTY

    public static final java.lang.String ACTION_LISTENERS_CHANGED_PROPERTY

See Also:
  Constant Field Values

### INPUT_CLICK

    public static final java.lang.String INPUT_CLICK

See Also:
  Constant Field Values

### PROPERTY_BACKGROUND_IMAGE

    public static final java.lang.String PROPERTY_BACKGROUND_IMAGE

See Also:
  Constant Field Values

### PROPERTY_BORDER

    public static final java.lang.String PROPERTY_BORDER

See Also:
  Constant Field Values

### PROPERTY_DISABLED_BACKGROUND

    public static final java.lang.String PROPERTY_DISABLED_BACKGROUND

See Also:
  Constant Field Values

### PROPERTY_DISABLED_BACKGROUND_IMAGE

    public static final java.lang.String PROPERTY_DISABLED_BACKGROUND_IMAGE

See Also:
  Constant Field Values

### PROPERTY_DISABLED_BORDER

    public static final java.lang.String PROPERTY_DISABLED_BORDER

See Also:
  Constant Field Values

### PROPERTY_DISABLED_FONT

    public static final java.lang.String PROPERTY_DISABLED_FONT

See Also:
  Constant Field Values

### PROPERTY_DISABLED_FOREGROUND

    public static final java.lang.String PROPERTY_DISABLED_FOREGROUND

See Also:
  Constant Field Values

### PROPERTY_DISABLED_ICON

    public static final java.lang.String PROPERTY_DISABLED_ICON

See Also:
  Constant Field Values

### PROPERTY_HEIGHT

    public static final java.lang.String PROPERTY_HEIGHT

See Also:
  Constant Field Values

### PROPERTY_ICON

    public static final java.lang.String PROPERTY_ICON

See Also:
  Constant Field Values

### PROPERTY_ALIGNMENT

    public static final java.lang.String PROPERTY_ALIGNMENT

See Also:
  Constant Field Values

### PROPERTY_ICON_TEXT_MARGIN

    public static final java.lang.String PROPERTY_ICON_TEXT_MARGIN

See Also:
  Constant Field Values

### PROPERTY_INSETS

    public static final java.lang.String PROPERTY_INSETS

See Also:
  Constant Field Values

### PROPERTY_LINE_WRAP

    public static final java.lang.String PROPERTY_LINE_WRAP

See Also:
  Constant Field Values

### PROPERTY_MODEL

    public static final java.lang.String PROPERTY_MODEL

See Also:
  Constant Field Values

### PROPERTY_PRESSED_BACKGROUND

    public static final java.lang.String PROPERTY_PRESSED_BACKGROUND

See Also:
  Constant Field Values

### PROPERTY_PRESSED_BACKGROUND_IMAGE

    public static final java.lang.String PROPERTY_PRESSED_BACKGROUND_IMAGE

See Also:
  Constant Field Values

### PROPERTY_PRESSED_BORDER

    public static final java.lang.String PROPERTY_PRESSED_BORDER

See Also:
  Constant Field Values

### PROPERTY_PRESSED_ENABLED

    public static final java.lang.String PROPERTY_PRESSED_ENABLED

See Also:
  Constant Field Values

### PROPERTY_PRESSED_FONT

    public static final java.lang.String PROPERTY_PRESSED_FONT

See Also:
  Constant Field Values

### PROPERTY_PRESSED_FOREGROUND

    public static final java.lang.String PROPERTY_PRESSED_FOREGROUND

See Also:
  Constant Field Values

### PROPERTY_PRESSED_ICON

    public static final java.lang.String PROPERTY_PRESSED_ICON

See Also:
  Constant Field Values

### PROPERTY_ROLLOVER_BACKGROUND

    public static final java.lang.String PROPERTY_ROLLOVER_BACKGROUND

See Also:
  Constant Field Values

### PROPERTY_ROLLOVER_BACKGROUND_IMAGE

    public static final java.lang.String PROPERTY_ROLLOVER_BACKGROUND_IMAGE

See Also:
  Constant Field Values

### PROPERTY_ROLLOVER_BORDER

    public static final java.lang.String PROPERTY_ROLLOVER_BORDER

See Also:
  Constant Field Values

### PROPERTY_ROLLOVER_ENABLED

    public static final java.lang.String PROPERTY_ROLLOVER_ENABLED

See Also:
  Constant Field Values

### PROPERTY_ROLLOVER_FONT

    public static final java.lang.String PROPERTY_ROLLOVER_FONT

See Also:
  Constant Field Values

### PROPERTY_ROLLOVER_FOREGROUND

    public static final java.lang.String PROPERTY_ROLLOVER_FOREGROUND

See Also:
  Constant Field Values

### PROPERTY_ROLLOVER_ICON

    public static final java.lang.String PROPERTY_ROLLOVER_ICON

See Also:
  Constant Field Values

### PROPERTY_TEXT

    public static final java.lang.String PROPERTY_TEXT

See Also:
  Constant Field Values

### PROPERTY_TEXT_ALIGNMENT

    public static final java.lang.String PROPERTY_TEXT_ALIGNMENT

See Also:
  Constant Field Values

### PROPERTY_TEXT_POSITION

    public static final java.lang.String PROPERTY_TEXT_POSITION

See Also:
  Constant Field Values

### PROPERTY_TOOL_TIP_TEXT

    public static final java.lang.String PROPERTY_TOOL_TIP_TEXT

See Also:
  Constant Field Values

### PROPERTY_WIDTH

    public static final java.lang.String PROPERTY_WIDTH

See Also:
  Constant Field Values

Constructor Detail

### AbstractButton

    public AbstractButton()

Method Detail

### addActionListener

    public void addActionListener(ActionListener l)

  Adds an `ActionListener` to receive notification of user actions, i.e., button presses.

  Parameters:
    `l` - the listener to add

### doAction

    public void doAction()

  Programmatically performs a click/activation of the button.

### fireActionPerformed

    public void fireActionPerformed(ActionEvent e)

  Notifies all listeners that have registered for this event type.

  Parameters:
    `e` - the `ActionEvent` to send

### getActionCommand

    public java.lang.String getActionCommand()

  Retrieves the action command from the `ButtonModel`.

  Returns:
    the action command
  See Also:
    `ButtonModel.getActionCommand()`

### getAlignment

    public Alignment getAlignment()

  Returns the alignment of the button's content. Only horizontal alignments are supported.

  Returns:
    the alignment

### getBackgroundImage

    public FillImage getBackgroundImage()

  Returns the background image of the button.

  Returns:
    the background image

### getBorder

    public Border getBorder()

  Returns the border displayed around the button.

  Returns:
    the border

### getDisabledBackground

    public Color getDisabledBackground()

  Returns the background color of the button when the button is disabled.

  Returns:
    the color

### getDisabledBackgroundImage

    public FillImage getDisabledBackgroundImage()

  Returns the background image displayed when the button is disabled.

  Returns:
    the background image

### getDisabledBorder

    public Border getDisabledBorder()

  Returns the border displayed around the button when the button is disabled.

  Returns:
    the border

### getDisabledFont

    public Font getDisabledFont()

  Returns the font of the button when the button is disabled.

  Returns:
    the font

### getDisabledForeground

    public Color getDisabledForeground()

  Returns the foreground color of the button when the button is disabled.

  Returns:
    the color

### getDisabledIcon

    public ImageReference getDisabledIcon()

  Returns the icon of the button that is displayed when the button is disabled.

  Returns:
    the icon

### getHeight

    public Extent getHeight()

  Returns the height of the button. This property only supports `Extent`s with fixed (i.e., not percent) units.

  Returns:
    the height

### getIcon

    public ImageReference getIcon()

  Returns the icon displayed in the button.

  Returns:
    the icon

### getIconTextMargin

    public Extent getIconTextMargin()

  Returns the margin size between the icon and the text. The margin will only be displayed if the button has both icon and text properties set. This property only supports `Extent`s with fixed (i.e., not percent) units.

  Returns:
    the margin size

### getInsets

    public Insets getInsets()

  Returns the margin between the buttons edge and its content.

  Returns:
    the margin

### getModel

    public ButtonModel getModel()

  Returns the model that this button represents.

  Returns:
    the model

### getPressedBackground

    public Color getPressedBackground()

  Returns the background color of the button when the button is pressed.

  Returns:
    the color

### getPressedBackgroundImage

    public FillImage getPressedBackgroundImage()

  Returns the background image displayed when the button is pressed.

  Returns:
    the background image

### getPressedBorder

    public Border getPressedBorder()

  Returns the border displayed around the button when the button is pressed.

  Returns:
    the border

### getPressedFont

    public Font getPressedFont()

  Returns the font of the button when the button is pressed.

  Returns:
    the font

### getPressedForeground

    public Color getPressedForeground()

  Returns the foreground color of the button when the button is pressed.

  Returns:
    the color

### getPressedIcon

    public ImageReference getPressedIcon()

  Returns the icon of the button that is displayed when the button is pressed.

  Returns:
    the icon

### getRolloverBackground

    public Color getRolloverBackground()

  Returns the background color of the button when the mouse cursor is inside its bounds.

  Returns:
    the color

### getRolloverBackgroundImage

    public FillImage getRolloverBackgroundImage()

  Returns the background image displayed when the mouse cursor is inside the button's bounds.

  Returns:
    the background image

### getRolloverBorder

    public Border getRolloverBorder()

  Returns the border displayed around the button when the mouse cursor is inside its bounds.

  Returns:
    the border

### getRolloverFont

    public Font getRolloverFont()

  Returns the font of the button when the mouse cursor is inside its bounds.

  Returns:
    the font

### getRolloverForeground

    public Color getRolloverForeground()

  Returns the foreground color of the button when the mouse cursor is inside its bounds.

  Returns:
    the color

### getRolloverIcon

    public ImageReference getRolloverIcon()

  Returns the icon of the button that is displayed when the mouse cursor is inside its bounds.

  Returns:
    the icon

### getText

    public java.lang.String getText()

  Returns the text label of the button.

  Returns:
    the text label

### getTextAlignment

    public Alignment getTextAlignment()

  Returns the alignment of the text relative to the icon.

  Returns:
    the text alignment

### getTextPosition

    public Alignment getTextPosition()

  Returns the position of the text relative to the icon.

  Returns:
    the text position

### getToolTipText

    public java.lang.String getToolTipText()

  Returns the tool tip text (displayed when the mouse cursor is hovered over the component).

  Returns:
    the tool tip text

### getWidth

    public Extent getWidth()

  Returns the width of the button. This property supports `Extent`s with fixed or percentile units.

  Returns:
    the width

### hasActionListeners

    public boolean hasActionListeners()

  Determines if the button has any `ActionListener`s registered.

  Returns:
    true if any action listeners are registered

### isLineWrap

    public boolean isLineWrap()

  Determines if the text of the button should wrap in the event that horizontal space is limited. Default value is true.

  Returns:
    the line wrap state

### isPressedEnabled

    public boolean isPressedEnabled()

  Determines if pressed effects are enabled.

  Returns:
    true if pressed effects are enabled
  See Also:
    `setPressedEnabled(boolean)`

### isRolloverEnabled

    public boolean isRolloverEnabled()

  Determines if rollover effects are enabled.

  Returns:
    true if rollover effects are enabled
  See Also:
    `setRolloverEnabled(boolean)`

### isValidChild

    public boolean isValidChild(Component component)

  This component does not support children.

  Overrides:
    `isValidChild` in class `Component`
  Parameters:
    `component` - the `Component` to evaluate as a child
  Returns:
    true if the `Component` is a valid child
  See Also:
    `Component.isValidChild(nextapp.echo2.app.Component)`

### processInput

    public void processInput(java.lang.String name,
                             java.lang.Object value)

  Description copied from class: `Component`
  Processes client input specific to the `Component` received from the `UpdateManager`. Derivative implementations should take care to invoke `super.processInput()`.

  Overrides:
    `processInput` in class `Component`
  Parameters:
    `name` - the name of the input
    `value` - the value of the input
  See Also:
    `Component.processInput(java.lang.String, java.lang.Object)`

### removeActionListener

    public void removeActionListener(ActionListener l)

  Removes an `ActionListener` from being notified of user actions, i.e., button presses.

  Parameters:
    `l` - the listener to remove

### setActionCommand

    public void setActionCommand(java.lang.String newValue)

  Sets the action command of the `ButtonModel`.

  Parameters:
    `newValue` - the action command
  See Also:
    `ButtonModel.setActionCommand(java.lang.String)`

### setAlignment

    public void setAlignment(Alignment newValue)

  Sets the alignment of the button's content. Only horizontal alignments are supported.

  Parameters:
    `newValue` - the new alignment

### setBackgroundImage

    public void setBackgroundImage(FillImage newValue)

  Sets the background image of the button.

  Parameters:
    `newValue` - the new background image

### setBorder

    public void setBorder(Border newValue)

  Sets the border displayed around the button.

  Parameters:
    `newValue` - the new border

### setDisabledBackground

    public void setDisabledBackground(Color newValue)

  Sets the background color of the button when the button is disabled.

  Parameters:
    `newValue` - the new `Color`

### setDisabledBackgroundImage

    public void setDisabledBackgroundImage(FillImage newValue)

  Sets the background image displayed when the button is disabled.

  Parameters:
    `newValue` - the new background image

### setDisabledBorder

    public void setDisabledBorder(Border newValue)

  Sets the border displayed around the button when the button is disabled.

  Parameters:
    `newValue` - the new border

### setDisabledFont

    public void setDisabledFont(Font newValue)

  Sets the font of the button when the button is disabled.

  Parameters:
    `newValue` - the new `Font`

### setDisabledForeground

    public void setDisabledForeground(Color newValue)

  Sets the foreground color of the button when the button is disabled.

  Parameters:
    `newValue` - the new `Color`

### setDisabledIcon

    public void setDisabledIcon(ImageReference newValue)

  Sets the icon of the button that is displayed when the button is disabled.

  Parameters:
    `newValue` - the new icon

### setHeight

    public void setHeight(Extent newValue)

  Sets the height of the button. This property only supports `Extent`s with fixed (i.e., not percent) units.

  Parameters:
    `newValue` - the new height

### setIcon

    public void setIcon(ImageReference newValue)

  Sets the icon displayed in the button.

  Parameters:
    `newValue` - the new icon

### setIconTextMargin

    public void setIconTextMargin(Extent newValue)

  Sets the margin size between the icon and the text. The margin will only be displayed if the button has both icon and text properties set. This property only supports `Extent`s with fixed (i.e., not percent) units.

  Parameters:
    `newValue` - the margin size

### setInsets

    public void setInsets(Insets newValue)

  Sets the margin between the buttons edge and its content.

  Parameters:
    `newValue` - the new margin

### setLineWrap

    public void setLineWrap(boolean newValue)

  Sets whether the text of the button should wrap in the event that horizontal space is limited. Default value is true.

  Parameters:
    `newValue` - the new line wrap state

### setModel

    public void setModel(ButtonModel newValue)

  Sets the model that this button represents. The model may not be null.

  Parameters:
    `newValue` - the new `ButtonModel`

### setPressedBackground

    public void setPressedBackground(Color newValue)

  Sets the background color of the button when the button is pressed.

  Parameters:
    `newValue` - the new `Color`

### setPressedBackgroundImage

    public void setPressedBackgroundImage(FillImage newValue)

  Sets the background image displayed when the button is pressed.

  Parameters:
    `newValue` - the new background image

### setPressedBorder

    public void setPressedBorder(Border newValue)

  Sets the border displayed around the button when the button is pressed.

  Parameters:
    `newValue` - the new border

### setPressedEnabled

    public void setPressedEnabled(boolean newValue)

  Sets whether pressed effects are enabled when the button is pressed. Pressed properties have no effect unless this property is set to true. The default value is false.

  Parameters:
    `newValue` - true if pressed effects should be enabled

### setPressedFont

    public void setPressedFont(Font newValue)

  Sets the font of the button when the button is pressed.

  Parameters:
    `newValue` - the new `Font`

### setPressedForeground

    public void setPressedForeground(Color newValue)

  Sets the foreground color of the button when the button is pressed.

  Parameters:
    `newValue` - the new `Color`

### setPressedIcon

    public void setPressedIcon(ImageReference newValue)

  Sets the icon of the button that is displayed when the button is pressed.

  Parameters:
    `newValue` - the new icon

### setRolloverBackground

    public void setRolloverBackground(Color newValue)

  Sets the background color of the button when the mouse cursor is inside its bounds.

  Parameters:
    `newValue` - the new `Color`

### setRolloverBackgroundImage

    public void setRolloverBackgroundImage(FillImage newValue)

  Sets the background image displayed when the mouse cursor is inside the button's bounds

  Parameters:
    `newValue` - the new background image

### setRolloverBorder

    public void setRolloverBorder(Border newValue)

  Sets the border displayed around the button when the mouse cursor is inside its bounds.

  Parameters:
    `newValue` - the new border

### setRolloverEnabled

    public void setRolloverEnabled(boolean newValue)

  Sets whether rollover effects are enabled when the mouse cursor is inside the button's bounds. Rollover properties have no effect unless this property is set to true. The default value is false.

  Parameters:
    `newValue` - true if rollover effects should be enabled

### setRolloverFont

    public void setRolloverFont(Font newValue)

  Sets the font of the button when the mouse cursor is inside its bounds.

  Parameters:
    `newValue` - the new `Font`

### setRolloverForeground

    public void setRolloverForeground(Color newValue)

  Sets the foreground color of the button when the mouse cursor is inside its bounds.

  Parameters:
    `newValue` - the new `Color`

### setRolloverIcon

    public void setRolloverIcon(ImageReference newValue)

  Sets the icon of the button that is displayed when the mouse cursor is inside its bounds.

  Parameters:
    `newValue` - the new icon

### setText

    public void setText(java.lang.String newValue)

  Sets the text label of the button.

  Parameters:
    `newValue` - the new text label

### setTextAlignment

    public void setTextAlignment(Alignment newValue)

  Sets the alignment of the text relative to the icon. Note that only one of the provided `Alignment`'s settings should be non-default.

  Parameters:
    `newValue` - the new text alignment

### setTextPosition

    public void setTextPosition(Alignment newValue)

  Sets the position of the text relative to the icon. Note that only one of the provided `Alignment`'s settings should be non-default.

  Parameters:
    `newValue` - the new text position

### setToolTipText

    public void setToolTipText(java.lang.String newValue)

  Sets the tool tip text (displayed when the mouse cursor is hovered over the component).

  Parameters:
    `newValue` - the new tool tip text

### setWidth

    public void setWidth(Extent newValue)

  Sets the width of the button. This property supports `Extent`s with fixed or percentile units.

  Parameters:
    `newValue` - the new width

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD