net.shredzone.ifish.actions
Class AsyncIFishAction

java.lang.Object
  extended by javax.swing.AbstractAction
      extended by net.shredzone.ifish.actions.IFishAction
          extended by net.shredzone.ifish.actions.AsyncIFishAction
All Implemented Interfaces:
ActionListener, Serializable, Cloneable, EventListener, Action
Direct Known Subclasses:
ReadDatabaseAction, SaveDatabaseAction, SyncDatabaseAction

public abstract class AsyncIFishAction
extends IFishAction

The basic class for asynchronous IFish actions. The action itself will be executed in a separate thread, keeping the GUI thread running. The GUI will be blocked meanwhile, though. This kind is meant for actions which take a rather long time to execute, but do not open a modal dialog.

Version:
$Id: AsyncIFishAction.java 291 2009-04-28 21:29:27Z shred $
See Also:
Serialized Form

Field Summary
 
Fields inherited from class net.shredzone.ifish.actions.IFishAction
fish, prefs
 
Fields inherited from class javax.swing.AbstractAction
changeSupport, enabled
 
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
 
Constructor Summary
AsyncIFishAction(IFishPane fish, String name, Icon icon, String tip, KeyStroke accel)
          Create a new, asynchronous Action.
 
Method Summary
 void perform()
          Invoke the action directly from within the application.
 void performSync()
          Invoke the action synchronously, e.g. from batch scripts.
 
Methods inherited from class net.shredzone.ifish.actions.IFishAction
action, actionPerformed
 
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

AsyncIFishAction

public AsyncIFishAction(IFishPane fish,
                        String name,
                        Icon icon,
                        String tip,
                        KeyStroke accel)
Create a new, asynchronous Action.

Parameters:
fish - IFishPane this action belongs to
name - Action Name
icon - Action Icon or null
tip - Action Tooltip or null
accel - Accelerator Key or null
Method Detail

perform

public void perform()
Invoke the action directly from within the application.

Overrides:
perform in class IFishAction

performSync

public void performSync()
Invoke the action synchronously, e.g. from batch scripts.



Copyright © 2007-2011 shredzone.org. All Rights Reserved.