net.shredzone.ifish.actions
Class IFishAction
java.lang.Object
javax.swing.AbstractAction
net.shredzone.ifish.actions.IFishAction
- All Implemented Interfaces:
- ActionListener, Serializable, Cloneable, EventListener, Action
- Direct Known Subclasses:
- AboutAction, AsyncIFishAction, DeleteDatabaseAction, ExportDatabaseAction, PlayerAction, PlaylistPane.AllAction, PlaylistPane.CreateAction, PlaylistPane.DeleteAction, PlaylistPane.MoveAction, PlaylistPane.PasteAction, PlaylistPane.RemoveAction, PlaylistPane.RenameAction, PlaylistPane.SortAction, PrefsAction, QuitAction
public abstract class IFishAction
- extends AbstractAction
The basic class for all IFish actions. The action is executed
synchronously with in the GUI thread, so it is rather meant to be
used for actions that either take very little time to execute, or
for actions which open a modal dialog.
- Version:
- $Id: IFishAction.java 291 2009-04-28 21:29:27Z shred $
- See Also:
- Serialized Form
| Fields inherited from interface javax.swing.Action |
ACCELERATOR_KEY, ACTION_COMMAND_KEY, DEFAULT, DISPLAYED_MNEMONIC_INDEX_KEY, LARGE_ICON_KEY, LONG_DESCRIPTION, MNEMONIC_KEY, NAME, SELECTED_KEY, SHORT_DESCRIPTION, SMALL_ICON |
|
Method Summary |
protected abstract void |
action()
The action implementation itself. |
void |
actionPerformed(ActionEvent e)
The action has been invoked from a button, menu item etc. |
void |
perform()
You can use this method if you want to invoke the action directly
from your current application code. |
fish
protected final IFishPane fish
prefs
protected final IFishPrefs prefs
IFishAction
public IFishAction(IFishPane fish,
String name,
Icon icon,
String tip,
KeyStroke accel)
- Create a new, synchronous Action. Event processing will be stopped
during execution, which also means that there is no GUI update. If
you do not fancy this, you should have a look at AsyncIFishAction.
- Parameters:
fish - IFishPane this action belongs toname - Action Nameicon - Action Icon or nulltip - Action Tooltip or nullaccel - Accelerator Key or null
actionPerformed
public void actionPerformed(ActionEvent e)
- The action has been invoked from a button, menu item etc.
- Parameters:
e - ActionEvent
perform
public void perform()
- You can use this method if you want to invoke the action directly
from your current application code.
action
protected abstract void action()
- The action implementation itself. Overwrite this method with your
desired action. You do not need to care for threading, locking
etc. Anyhow keep in mind that for AsyncIFishActions, this method
is actually running in a separate thread.
Copyright © 2007-2011
shredzone.org. All Rights Reserved.