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

## com.smardec.asc.xmlbars
Class BasicAction

    java.lang.Object
      |
      +--javax.swing.AbstractAction
            |
            +--com.smardec.asc.xmlbars.BasicAction

All Implemented Interfaces:
  javax.swing.Action, java.awt.event.ActionListener, java.lang.Cloneable, java.util.EventListener, java.io.Serializable

public class BasicAction
extends javax.swing.AbstractAction

This class provides implementations for `AbstractAction` used in `MenuToolBarManager`

Field Summary

Fields inherited from class javax.swing.AbstractAction
`changeSupport, enabled`

Fields inherited from interface javax.swing.Action
`ACCELERATOR_KEY, ACTION_COMMAND_KEY, DEFAULT, LONG_DESCRIPTION, MNEMONIC_KEY, NAME, SHORT_DESCRIPTION, SMALL_ICON`

Constructor Summary
`BasicAction()` Creates an `Action` object with no properties.
`BasicAction(java.lang.String name)` Creates an `Action` object with text and icon.
`BasicAction(java.lang.String name, javax.swing.Icon icon)` Creates an `Action` object with text and icon.

Method Summary
`void` | `actionPerformed(java.awt.event.ActionEvent e)` Invoked when an action occurs.
`javax.swing.Icon` | `getIcon()` Returns icon for action, used for a menu or toolbar button.
`java.lang.String` | `getId()` Returns action id which is used by `MenuToolBarManager`.
`java.lang.String` | `getKeyStroke()` Returns accelerator for action, used for a menu.
`javax.swing.Icon` | `getLargeIcon()` Returns large icon for action, used for toolbar button.
`java.lang.Integer` | `getMnemonic()` Returns mnemonic for action, used for a menu.
`java.lang.String` | `getText()` Returns name for action, used for a menu or button.
`boolean` | `isSelected()` Returns `true` if the action is enabled.
`void` | `setIcon(javax.swing.Icon icon)` Specifies icon for action, used for a menu or toolbar button.
`void` | `setId(java.lang.String id)` Specifies action id which is used by `MenuToolBarManager`.
`void` | `setKeyStroke(javax.swing.KeyStroke keyStroke)` Specifies accelerator for action, used for a menu.
`void` | `setLargeIcon(javax.swing.Icon icon)` Specifies large icon for action, used for toolbar button.
`void` | `setMnemonic(char mnemonic)` Specifies mnemonic for action, used for a menu.
`void` | `setSelected(boolean newValue)` Changes selected status of the action.
`void` | `setText(java.lang.String text)` Specifies name for action, used for a menu or button.
`java.lang.String` | `setToolTip()` Returns tooltip for action, used for a menu or toolbar button.
`void` | `setToolTip(java.lang.String text)` Specifies tooltip for action, used for a menu or toolbar button.

Methods inherited from class javax.swing.AbstractAction
`addPropertyChangeListener, clone, firePropertyChange, getKeys, getPropertyChangeListeners, getValue, isEnabled, putValue, removePropertyChangeListener, setEnabled`

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

Constructor Detail

### BasicAction

    public BasicAction()

  Creates an `Action` object with no properties.

### BasicAction

    public BasicAction(java.lang.String name)

  Creates an `Action` object with text and icon.

Parameters:
  `name` - the name of the `BasicAction`

### BasicAction

    public BasicAction(java.lang.String name,
                       javax.swing.Icon icon)

  Creates an `Action` object with text and icon.

Parameters:
  `name` - the name of the `BasicAction`
  `icon` - the icon of the `BasicAction`

Method Detail

### getId

    public java.lang.String getId()

  Returns action id which is used by `MenuToolBarManager`.

  Returns:
    action id.
  See Also:
    `setId(String)`

### setId

    public void setId(java.lang.String id)

  Specifies action id which is used by `MenuToolBarManager`.

  Parameters:
    `id` - action id
  See Also:
    `getId()`

### getText

    public java.lang.String getText()

  Returns name for action, used for a menu or button.

### setText

    public void setText(java.lang.String text)

  Specifies name for action, used for a menu or button.

  Parameters:
    `text` - name for action, used for a menu or button.

### getIcon

    public javax.swing.Icon getIcon()

  Returns icon for action, used for a menu or toolbar button.

### setIcon

    public void setIcon(javax.swing.Icon icon)

  Specifies icon for action, used for a menu or toolbar button.

  Parameters:
    `icon` - icon for action, used for a menu or toolbar button.

### getLargeIcon

    public javax.swing.Icon getLargeIcon()

  Returns large icon for action, used for toolbar button.

### setLargeIcon

    public void setLargeIcon(javax.swing.Icon icon)

  Specifies large icon for action, used for toolbar button.

  Parameters:
    `icon` - large icon for action, used for toolbar button.

### setToolTip

    public java.lang.String setToolTip()

  Returns tooltip for action, used for a menu or toolbar button.

### setToolTip

    public void setToolTip(java.lang.String text)

  Specifies tooltip for action, used for a menu or toolbar button.

  Parameters:
    `text` - tooltip for action, used for a menu or toolbar button.

### getKeyStroke

    public java.lang.String getKeyStroke()

  Returns accelerator for action, used for a menu.

### setKeyStroke

    public void setKeyStroke(javax.swing.KeyStroke keyStroke)

  Specifies accelerator for action, used for a menu.

  Parameters:
    `keyStroke` - accelerator for action, used for a menu.

### getMnemonic

    public java.lang.Integer getMnemonic()

  Returns mnemonic for action, used for a menu.

### setMnemonic

    public void setMnemonic(char mnemonic)

  Specifies mnemonic for action, used for a menu.

  Parameters:
    `mnemonic` - mnemonic for action, used for a menu.

### isSelected

    public boolean isSelected()

  Returns `true` if the action is enabled.

  Returns:
    `true` if the action is enabled, `false` otherwise
  See Also:
    `setSelected(boolean)`

### setSelected

    public void setSelected(boolean newValue)

  Changes selected status of the action.

  Parameters:
    `newValue` - `true` to set the action selected , `false` otherwise
  See Also:
    `isSelected()`

### actionPerformed

    public void actionPerformed(java.awt.event.ActionEvent e)

  Invoked when an action occurs.

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

Copyright © 2003-2006 Smardec. All Rights Reserved.