org.fopps.ui.actions
Class ProjectAction

java.lang.Object
  |
  +--javax.swing.AbstractAction
        |
        +--org.fopps.ui.actions.BaseAction
              |
              +--org.fopps.ui.actions.ProjectAction
All Implemented Interfaces:
javax.swing.Action, java.awt.event.ActionListener, java.lang.Cloneable, java.lang.Comparable, java.util.EventListener, java.awt.event.ItemListener, java.io.Serializable
Direct Known Subclasses:
CloneAction, CreateMany2OneRelationAction, CreateRelationAction, DecDurationAction, DecDurationQAction, DeleteRelationAction, FixTimingAction, IncDurationAction, IncDurationQAction, MoveDownAction, MoveLeftAction, MoveLeftQAction, MoveLeftYAction, MoveRightAction, MoveRightQAction, MoveRightYAction, MoveUpAction

public abstract class ProjectAction
extends BaseAction

ProjectAction is the base class for all actions working on a single project item, normally to change project properties.

See Also:
Serialized Form

Field Summary
 
Fields inherited from class org.fopps.ui.actions.BaseAction
GROUP, selectedItems
 
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
ProjectAction(ActionHandler pListener)
          Constructor for ProjectAction.
ProjectAction(java.lang.String name, ActionHandler pListener)
          Constructor for ProjectAction.
ProjectAction(java.lang.String name, javax.swing.Icon icon, ActionHandler pListener)
          Constructor for ProjectAction.
 
Method Summary
 boolean acceptSelection()
          Indicates, if an action is able to work with the selected items.
 void actionPerformed(java.awt.event.ActionEvent e)
           
 boolean addToPopup()
          Determines, if action should appear in popup menu
 int itemsNeeded()
          Returns the minimum of selected items.
 void postProcess()
          Called after processElement.
 void preProcess()
          Called before processElement.
abstract  void processElement(java.lang.Object pSelectedItem)
          processElement is falled for every selected item
 
Methods inherited from class org.fopps.ui.actions.BaseAction
addToMenu, addToToolBar, clearSelection, compareTo, getAccelerator, getActionHandler, getApplication, getContainer, getGroup, getIcon, getLocaleName, getLongDescription, getMnemonic, getName, getSelectedItems, getSelectionSize, getShortDescription, isStringPropertySet, isTogglable, itemInSelection, itemStateChanged, setAccelerator, setAccelerator, setAcceleratorWithAlt, setAcceleratorWithCtrl, setAcceleratorWithShift, setGroup, setLocaleName, setLongDescription, setMnemonic, setMnemonic, setShortDescription, toString, updateState
 
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, wait, wait, wait
 

Constructor Detail

ProjectAction

public ProjectAction(ActionHandler pListener)
Constructor for ProjectAction.

Parameters:
pListener -

ProjectAction

public ProjectAction(java.lang.String name,
                     ActionHandler pListener)
Constructor for ProjectAction.

Parameters:
name -
pListener -

ProjectAction

public ProjectAction(java.lang.String name,
                     javax.swing.Icon icon,
                     ActionHandler pListener)
Constructor for ProjectAction.

Parameters:
name -
icon -
pListener -
Method Detail

acceptSelection

public boolean acceptSelection()
Description copied from class: BaseAction
Indicates, if an action is able to work with the selected items. If acceptSelection returns false, the action will be disabled. This method is called after every selection change

Overrides:
acceptSelection in class BaseAction
Returns:
true, if action is able to operate on current selection
See Also:
BaseAction.acceptSelection()

actionPerformed

public void actionPerformed(java.awt.event.ActionEvent e)
Specified by:
actionPerformed in interface java.awt.event.ActionListener
Specified by:
actionPerformed in class BaseAction
See Also:
ActionListener.actionPerformed(ActionEvent)

itemsNeeded

public int itemsNeeded()
Returns the minimum of selected items. If less objects selected, the action is disabled


preProcess

public void preProcess()
Called before processElement. Use the hook to prepare iteration. The default implementation does nothing


postProcess

public void postProcess()
Called after processElement. Use the hook for clean up purposes


processElement

public abstract void processElement(java.lang.Object pSelectedItem)
processElement is falled for every selected item


addToPopup

public boolean addToPopup()
Determines, if action should appear in popup menu

Specified by:
addToPopup in class BaseAction
Returns:
true, if action should added to context menu, otherwise false


Fopps 0.19 - Copyright © 2002 Oliver Wieland. All Rights Reserved.