jcreek.cke.command
Class CreekAction

java.lang.Object
  extended byjavax.swing.AbstractAction
      extended byjcreek.cke.command.CreekAction
All Implemented Interfaces:
javax.swing.Action, java.awt.event.ActionListener, java.lang.Cloneable, java.util.EventListener, java.io.Serializable
Direct Known Subclasses:
AboutAction, ActivateEntityAction, ClearAction, CloseAction, CopyAction, CurrentFrameAction, CutAction, DeActivateEntityAction, DeleteAction, DeleteViewAction, EntityListAction, EntityPropertiesAction, ExampleAction, ExportAction, LayoutAction, MergeKnowledgeModelAction, ModelPropertyAction, NewCaseAction, NewConceptViewAction, NewDomainRelationAction, NewEntityAction, NewKnowledgeModelAction, NewRelationAction, OpenCaseMatchAction, OpenCaseViewAction, OpenConceptViewAction, OpenEntityViewAction, OpenKnowledgeModelAction, OpenTestAction, OverviewAction, PageLayoutAction, PasteAction, PermanentFrameAction, PrintAction, PrintPreviewAction, RenameViewAction, RevertAction, SaveModelAction, SelectAction, SubModelAction, UserPrefsAction, ViewListAction, XmlExportAction, XmlImportAction, ZoomInAction, ZoomOutAction

public abstract class CreekAction
extends javax.swing.AbstractAction

Base action class which all other actions subclass. Provides some utility functions needed by nearly all of the actions in Creek.

Version:
Author:
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
CreekAction(java.lang.String name)
          Creates a new CreekAction command with the given action command string.
 
Method Summary
 CreekDocument getDocument()
          Returns the current creek document, if any.
 CreekModel getModel()
          Returns the current creek model, if any.
 java.lang.String getString(java.lang.String key)
          Retrieves a string resource from the app's resource bundle.
 ConceptView getView()
          Returns the current concept view, if any.
 Visualizer getWindow(java.awt.event.ActionEvent e)
          Finds the main window that contains the component that is the source of the given action event.
 void noCurrentDocument(java.awt.Frame win)
          Displays a dialog indicating that there's no current document to perform the desired operation.
 
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

CreekAction

public CreekAction(java.lang.String name)
Creates a new CreekAction command with the given action command string.

Parameters:
name - action command string
Method Detail

getString

public java.lang.String getString(java.lang.String key)
Retrieves a string resource from the app's resource bundle.

Parameters:
key - key of resource to retrieve
Returns:
string from resource bundle

getWindow

public Visualizer getWindow(java.awt.event.ActionEvent e)
Finds the main window that contains the component that is the source of the given action event.

Parameters:
e - action event to find window
Returns:
main window

noCurrentDocument

public void noCurrentDocument(java.awt.Frame win)
Displays a dialog indicating that there's no current document to perform the desired operation.

Parameters:
win - frame to attach dialog to

getDocument

public CreekDocument getDocument()
Returns the current creek document, if any. If there's no current document it returns null.

Returns:
current creek document

getModel

public CreekModel getModel()
Returns the current creek model, if any. If there's no current document it returns null.

Returns:
current creek model

getView

public ConceptView getView()
Returns the current concept view, if any. If there's no current document it returns null.

Returns:
current concept view


Created at IDI, NTNU by the Artificial Intelligence and Learning group