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

## edu.stanford.smi.protege.util
Class AllowableAction

    java.lang.Object
      javax.swing.AbstractAction
          edu.stanford.smi.protege.util.StandardAction
              edu.stanford.smi.protege.util.AllowableAction

All Implemented Interfaces:
  ActionListener, Serializable, Cloneable, EventListener, Action

Direct Known Subclasses:
  AddAction, CreateAction, DeleteAction, MakeCopiesAction, ReferencersAction, RemoveAction, ViewAction

    public abstract class AllowableAction

extends StandardAction

Base class for actions that supports two features: (1) listening to a `Selectable`and only enabling if a selection is made, and (2) being disablable manually.

Author:
  Ray Fergerson
See Also:
  Serialized Form

Field Summary

Fields inherited from class edu.stanford.smi.protege.util.StandardAction
`DISABLED_ICON`

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
`protected` | `AllowableAction(ResourceKey key)`
`protected` | `AllowableAction(ResourceKey key, Selectable selectable)`
`protected` | `AllowableAction(String name, Icon icon, Selectable selectable)`
`protected` | `AllowableAction(String name, Selectable selectable)`
`protected` | `AllowableAction(String name, String description, Icon icon, Selectable selectable)`

Method Summary
`Selectable` | `getSelectable()`
`Collection` | `getSelection()`
`boolean` | `isAllowed()`
`void` | `onSelectionChange()`
`void` | `setAllowed(boolean b)`

Methods inherited from class edu.stanford.smi.protege.util.StandardAction
`equals, getIcon, getName, getName, initialize, setDescription, setDescription, setDisabledIcon, setDisabledIcon, setIcon, setIcon, setMnemonic, setMnemonic, setName, setName, setShortcut, setShortcut, substituteIntoName`

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`

Methods inherited from interface java.awt.event.ActionListener
`actionPerformed`

Constructor Detail

### AllowableAction

    protected AllowableAction(ResourceKey key)

### AllowableAction

    protected AllowableAction(ResourceKey key,
                              Selectable selectable)

### AllowableAction

    protected AllowableAction(String name,
                              Selectable selectable)

### AllowableAction

    protected AllowableAction(String name,
                              Icon icon,
                              Selectable selectable)

### AllowableAction

    protected AllowableAction(String name,
                              String description,
                              Icon icon,
                              Selectable selectable)

Method Detail

### getSelectable

    public Selectable getSelectable()

### getSelection

    public Collection getSelection()

### onSelectionChange

    public void onSelectionChange()

### setAllowed

    public void setAllowed(boolean b)

### isAllowed

    public boolean isAllowed()

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

Submit a bug report or feature request
Protégé is a trademark of Stanford University.
Copyright (c) 1998-2012 Stanford University.