org.fopps.ui.actions
Class ViewAction
java.lang.Object
|
+--javax.swing.AbstractAction
|
+--org.fopps.ui.actions.BaseAction
|
+--org.fopps.ui.actions.ViewAction
- 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:
- InvertSelectionAction, NarrowAction, PrintAction, SelectAllAction, UnselectAllAction, WidenAction, ZoomInAction, ZoomOutAction
- public abstract class ViewAction
- extends BaseAction
ViewAction is the base class for all view actions
- See Also:
- Serialized Form
| 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 |
| Methods inherited from class org.fopps.ui.actions.BaseAction |
actionPerformed, addToMenu, addToToolBar, clearSelection, compareTo, getAccelerator, getActionHandler, getApplication, getContainer, getGroup, getIcon, getLocaleName, getLongDescription, getMnemonic, getName, getSelectedItems, getSelectionSize, getShortDescription, isStringPropertySet, isTogglable, itemInSelection, 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 |
ViewAction
public ViewAction(ActionHandler pListener)
ViewAction
public ViewAction(java.lang.String name,
ActionHandler pListener)
ViewAction
public ViewAction(java.lang.String name,
javax.swing.Icon icon,
ActionHandler pListener)
getViewActionReceiver
public ViewActionReceiver getViewActionReceiver()
- Convenience method
acceptSelection
public boolean acceptSelection()
- 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. All instances of
ViewAction are enabled, if the selected view is able to handle view actions.
- Overrides:
acceptSelection in class BaseAction
- Returns:
- true, if action is able to operate on current selection
itemStateChanged
public void itemStateChanged(java.awt.event.ItemEvent e)
- Handler of itemListener
- Specified by:
itemStateChanged in interface java.awt.event.ItemListener- Overrides:
itemStateChanged in class BaseAction
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.