net.shredzone.ifish.actions
Class PlayerAction

java.lang.Object
  extended by javax.swing.AbstractAction
      extended by net.shredzone.ifish.actions.IFishAction
          extended by net.shredzone.ifish.actions.PlayerAction
All Implemented Interfaces:
ActionListener, Serializable, Cloneable, EventListener, PreferenceChangeListener, Action

public class PlayerAction
extends IFishAction
implements PreferenceChangeListener

Player action: starts, stops and pauses the external player.

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

Field Summary
static int PAUSE
           
static int PLAY
           
static int STOP
           
 
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
PlayerAction(IFishPane fish, int type)
          Create a new PlayerAction.
 
Method Summary
protected  void action()
          The action implementation itself.
protected  String getPlayerCmd()
          Get the player command used for this action.
 void preferenceChange(PreferenceChangeEvent evt)
          Internal PreferenceChangeListener implementation, do not use.
protected  void updateStatus()
          Updates the enabled state of the action.
 
Methods inherited from class net.shredzone.ifish.actions.IFishAction
actionPerformed, perform
 
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
 

Field Detail

PLAY

public static final int PLAY
See Also:
Constant Field Values

PAUSE

public static final int PAUSE
See Also:
Constant Field Values

STOP

public static final int STOP
See Also:
Constant Field Values
Constructor Detail

PlayerAction

public PlayerAction(IFishPane fish,
                    int type)
Create a new PlayerAction.

Parameters:
fish - Related IFishPane
type - Type, one of PLAY, PAUSE or STOP.
Method Detail

action

protected void action()
The action implementation itself. Do not call directly.

Specified by:
action in class IFishAction

updateStatus

protected void updateStatus()
Updates the enabled state of the action.


getPlayerCmd

protected String getPlayerCmd()
Get the player command used for this action.

Returns:
Player command, null if none was configured.

preferenceChange

public void preferenceChange(PreferenceChangeEvent evt)
Internal PreferenceChangeListener implementation, do not use.

Specified by:
preferenceChange in interface PreferenceChangeListener
Parameters:
evt - PreferenceChangeEvent


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