com.mucommander.ui.action
Class InternalEditAction

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
All Implemented Interfaces:
ActivePanelListener, TableSelectionListener, java.awt.event.ActionListener, java.io.Serializable, java.lang.Cloneable, java.util.EventListener, javax.swing.Action
Direct Known Subclasses:
EditAction

public class InternalEditAction
extends SelectedFileAction

Opens the current file in edit mode.

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
InternalEditAction(MainFrame mainFrame, java.util.Hashtable properties)
          Creates a new instance of EditAction.
 
Method Summary
protected  Command getCustomCommand()
          Returns the command that should be used to open files.
 void performAction()
          Edits the currently selected file.
 void performInternalAction(AbstractFile file)
          Opens the internal editor on the specified 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.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

InternalEditAction

public InternalEditAction(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

performInternalAction

public void performInternalAction(AbstractFile file)
Opens the internal editor on the specified file.

Parameters:
file - file to edit.

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