com.mucommander.ui.action
Class EditAction

java.lang.Object
  extended by javax.swing.AbstractAction
      extended by com.mucommander.ui.action.MuAction
          extended by com.mucommander.ui.action.FileAction
              extended by com.mucommander.ui.action.SelectedFileAction
                  extended by com.mucommander.ui.action.InternalEditAction
                      extended by com.mucommander.ui.action.EditAction
All Implemented Interfaces:
ConfigurationListener, ActivePanelListener, TableSelectionListener, java.awt.event.ActionListener, java.io.Serializable, java.lang.Cloneable, java.util.EventListener, javax.swing.Action

public class EditAction
extends InternalEditAction
implements ConfigurationListener

User configurable variant of InternalEditAction.

Author:
Maxence Bernard, Nicolas Rinaudo
See Also:
Serialized Form

Field Summary
static java.lang.String CUSTOM_COMMAND_PROPERTY_KEY
          Key that controls the command that will be used to open files.
static java.lang.String USE_CUSTOM_COMMAND_PROPERTY_KEY
          Key that controls whether or not to use the custom command.
 
Fields inherited from class com.mucommander.ui.action.FileAction
filter
 
Fields inherited from class com.mucommander.ui.action.MuAction
ALTERNATE_ACCELERATOR_PROPERTY_KEY, mainFrame
 
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
EditAction(MainFrame mainFrame, java.util.Hashtable properties)
          Creates a new instance of EditAction.
 
Method Summary
 void configurationChanged(ConfigurationEvent event)
          Reacts to configuration changed events.
protected  Command getCustomCommand()
          Returns the command that should be used to open files.
 void performAction()
          Edits the currently selected file.
protected  void setCustomCommand(java.lang.String command)
          Sets the command to use to open files.
protected  void setUseCustomCommand(boolean use)
          Sets whether or not to use custom commands to open files.
protected  boolean useCustomCommand()
          Returns true if this action should use custom command.
 
Methods inherited from class com.mucommander.ui.action.InternalEditAction
performInternalAction
 
Methods inherited from class com.mucommander.ui.action.SelectedFileAction
getFileTableCondition, setSelectedFileFilter
 
Methods inherited from class com.mucommander.ui.action.FileAction
activePanelChanged, markedFilesChanged, selectedFileChanged, updateEnabledState
 
Methods inherited from class com.mucommander.ui.action.MuAction
actionPerformed, getAccelerator, getAcceleratorText, getAlternateAccelerator, getIcon, getKeyStrokeRepresentation, getLabel, getMainFrame, getModifiersRepresentation, getStandardAccelerator, getStandardAccelerator, getStandardAlternateAccelerator, getStandardAlternateAccelerator, getStandardIcon, getStandardIcon, getStandardIconPath, getStandardIconPath, getStandardLabel, getStandardLabel, getStandardLabelKey, getStandardLabelKey, getStandardTooltip, getStandardTooltip, getStandardTooltipKey, getStandardTooltipKey, getToolTipText, honourNoEventsMode, isAccelerator, performActionInSeparateThread, reportError, reportError, reportGenericError, setAccelerator, setAlternateAccelerator, setHonourNoEventsMode, setIcon, setLabel, setPerformActionInSeparateThread, setToolTipText
 
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

USE_CUSTOM_COMMAND_PROPERTY_KEY

public static final java.lang.String USE_CUSTOM_COMMAND_PROPERTY_KEY
Key that controls whether or not to use the custom command.

See Also:
Constant Field Values

CUSTOM_COMMAND_PROPERTY_KEY

public static final java.lang.String CUSTOM_COMMAND_PROPERTY_KEY
Key that controls the command that will be used to open files.

See Also:
Constant Field Values
Constructor Detail

EditAction

public EditAction(MainFrame mainFrame,
                  java.util.Hashtable properties)
Creates a new instance of EditAction.

Parameters:
mainFrame - frame to which the action is attached.
properties - action's properties.
Method Detail

configurationChanged

public void configurationChanged(ConfigurationEvent event)
Reacts to configuration changed events.

Specified by:
configurationChanged in interface ConfigurationListener
Parameters:
event - describes the configuration change.

useCustomCommand

protected boolean useCustomCommand()
Returns true if this action should use custom command.

Returns:
true if this action should use custom command, false otherwise.

getCustomCommand

protected Command getCustomCommand()
Returns the command that should be used to open files.

Returns:
the command that should be used to open files, or false if none.

setCustomCommand

protected void setCustomCommand(java.lang.String command)
Sets the command to use to open files.

Parameters:
command - command that will be used to open files.

setUseCustomCommand

protected void setUseCustomCommand(boolean use)
Sets whether or not to use custom commands to open files.

Parameters:
use - whether or not to use custom commands.

performAction

public void performAction()
Edits the currently selected file.

Specified by:
performAction in class MuAction


This file is part of muCommander - Copyright (C) 2002-2008 Maxence Bernard