jcreek.cke.command
Class ExampleAction

java.lang.Object
  extended byjavax.swing.AbstractAction
      extended byjcreek.cke.command.CreekAction
          extended byjcreek.cke.command.ExampleAction
All Implemented Interfaces:
javax.swing.Action, java.awt.event.ActionListener, java.lang.Cloneable, java.util.EventListener, java.io.Serializable

public class ExampleAction
extends CreekAction

Example of a new action in the TrollCreek application. To add this action to the application, edit the jcreek/cke/resources/Creek.properties file. An example of adding this action to the "Model" menu:

   #
   # Model Menu definition
   #
   # Each of the strings that follow form a key to be
   # used as the basis of a menu item definition.
   #
   model =  modelProperty - example newRelation newDomainRelation newEntity newCase - delete - @BuildTool
   exampleLabel = Import From XML
   exampleImage = resources/blank.gif
   exampleAction = ExampleAction
 
In the above definition, the exampleLabel specify the name of the action, the exampleImage the image associated with it (drawn from jcreek/cke/resources/) and exampleAction is the class that will be invoked when the action is performed. This class must be present in the jcreek.cke.command package. When the "example" is added to the "model" property like in the example above, it is automatically included in the "model" menu. Toolbars and context menus can also be modified similarly elsewhere.

Version:
1.0
Author:
Frode Sørmo
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
ExampleAction()
           
 
Method Summary
 void actionPerformed(java.awt.event.ActionEvent event)
          This method is invoked whenever the action is performed.
 
Methods inherited from class jcreek.cke.command.CreekAction
getDocument, getModel, getString, getView, getWindow, noCurrentDocument
 
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

ExampleAction

public ExampleAction()
Method Detail

actionPerformed

public void actionPerformed(java.awt.event.ActionEvent event)
This method is invoked whenever the action is performed.



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