com.mucommander.ui.action
Class OpenInBothPanelsAction
java.lang.Object
javax.swing.AbstractAction
com.mucommander.ui.action.MuAction
com.mucommander.ui.action.FileAction
com.mucommander.ui.action.SelectedFileAction
com.mucommander.ui.action.OpenInBothPanelsAction
- All Implemented Interfaces:
- ActivePanelListener, TableSelectionListener, java.awt.event.ActionListener, java.io.Serializable, java.lang.Cloneable, java.util.EventListener, javax.swing.Action
public class OpenInBothPanelsAction
- extends SelectedFileAction
Opens the currently selected file and its equivalent in the inactive folder panel if it exists.
This action will analyse the current selection and, if applicable, any file from the inactive
panel that bears the same name and:
-
If both the selection and its inactive equivalent are browsable, both will be explored in their
respective panels.
-
If both are non-browsable, both will be opened as defined in
OpenAction.
-
If one is browsable an not the other one, only the current selection will be opened.
Note that this action's behaviour is strictly equivalent to that of OpenAction in the
active panel. Differences will only occur in the inactive panel, and then again only when possible.
This action opens both files synchronously: it will wait for the active panel file to have been
opened before opening the inactive panel one.
- Author:
- Nicolas Rinaudo
- See Also:
- Serialized Form
| 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 |
OpenInBothPanelsAction(MainFrame mainFrame,
java.util.Hashtable properties)
Creates a new OpenInBothPanelsAction with the specified parameters. |
|
Method Summary |
protected boolean |
getFileTableCondition(FileTable fileTable)
This method is overridden to enable this action when the parent folder is selected. |
void |
performAction()
Opens the current selection and its inactive equivalent. |
| 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 |
OpenInBothPanelsAction
public OpenInBothPanelsAction(MainFrame mainFrame,
java.util.Hashtable properties)
- Creates a new
OpenInBothPanelsAction with the specified parameters.
- Parameters:
mainFrame - frame to which the action is attached.properties - action's properties.
getFileTableCondition
protected boolean getFileTableCondition(FileTable fileTable)
- This method is overridden to enable this action when the parent folder is selected.
- Overrides:
getFileTableCondition in class SelectedFileAction
- Parameters:
fileTable - currently active FileTable
performAction
public void performAction()
- Opens the current selection and its inactive equivalent.
- Specified by:
performAction in class MuAction
This file is part of muCommander - Copyright (C) 2002-2008 Maxence Bernard