Protégé-OWL 3.4.1

edu.stanford.smi.protegex.owl.ui.actions
Class ResourceAction

java.lang.Object
  extended by javax.swing.AbstractAction
      extended by edu.stanford.smi.protegex.owl.ui.actions.ResourceAction
All Implemented Interfaces:
ActionListener, Serializable, Cloneable, Comparable, EventListener, Action
Direct Known Subclasses:
AddClosureAxiomAction, AddCoveringAxiomAction, AddRDFTypeAction, AddSubclassAction, ChangeMetaclassAction, ChangeMetaclassOfSubclassesAction, ChangePropertyTypeAction, CheckSingleConceptConsistencyAction, CollapseTreeAction, ComputeIndividualsBelongingToClassAction, ComputeSingleIndividualTypesAction, ConvertIndividualToClassAction, ConvertToDatatypePropertyAction, ConvertToDefinedClassAction, ConvertToObjectPropertyAction, ConvertToPrimitiveClassAction, CreateClassUsingMetaclassAction, CreateCloneAction, CreateRDFListResourceAction, CreateSiblingClassAction, CreateSubclassAction, CreateSubpropertyAction, DeleteClassAction, DeletePropertyAction, EditRuleAction, ExistentialMatrixAction, ExpandTreeAction, ExplorerAction, ExtractOntologyAction, ExtractTaxonomyAction, GetInferredSubClassesAction, GetInferredSuperClassesAction, GetSingleIndividualPropertyValuesAction, HideClassAction, JavaCodeGeneratorResourceAction, RefactorResourceAction, RemoveRDFTypeAction, SearchNamedClassAction, SortSubclassesAction, SortSubclassesTreeAction, SubclassesMatrixAction, SubpropertiesMatrixAction, UnhideClassAction

public abstract class ResourceAction
extends AbstractAction
implements Comparable

Author:
Holger Knublauch
See Also:
Serialized Form

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
ResourceAction(String name, Icon icon)
           
ResourceAction(String name, Icon icon, String group)
           
ResourceAction(String name, Icon icon, String group, boolean inToolBar)
          Constructs a new ResourceAction.
 
Method Summary
 int compareTo(Object o)
           
protected  Component getComponent()
           
 String getGroup()
           
 OWLModel getOWLModel()
           
 int getPriority()
          Gets an (optional) integer that can be used to control the order of actions in a menu.
protected  RDFResource getResource()
           
 void initialize(Component component, RDFResource resource)
           
 boolean isInToolBar()
           
abstract  boolean isSuitable(Component component, RDFResource resource)
           
 
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

ResourceAction

public ResourceAction(String name,
                      Icon icon)

ResourceAction

public ResourceAction(String name,
                      Icon icon,
                      String group)

ResourceAction

public ResourceAction(String name,
                      Icon icon,
                      String group,
                      boolean inToolBar)
Constructs a new ResourceAction.

Parameters:
name - the display name of the Action
icon - the Icon
group - the (optional) group this should belong to
inToolBar - true to put this into the tool bar at the bottom of forms (this is only possible if there is an icon as well)
Method Detail

compareTo

public int compareTo(Object o)
Specified by:
compareTo in interface Comparable

getComponent

protected Component getComponent()

getGroup

public String getGroup()

getPriority

public int getPriority()
Gets an (optional) integer that can be used to control the order of actions in a menu. The higher the number, the further up the item will appear.

Returns:
the priority (0 is default)

getOWLModel

public OWLModel getOWLModel()

getResource

protected RDFResource getResource()

initialize

public void initialize(Component component,
                       RDFResource resource)

isInToolBar

public boolean isInToolBar()

isSuitable

public abstract boolean isSuitable(Component component,
                                   RDFResource resource)

Protégé-OWL 3.4.1

Submit a bug report or feature request
Copyright (c) 1998-2009 Stanford University.