com.mucommander.ui.action
Class SortByAction

java.lang.Object
  extended by javax.swing.AbstractAction
      extended by com.mucommander.ui.action.MuAction
          extended by com.mucommander.ui.action.SortByAction
All Implemented Interfaces:
ActivePanelListener, java.awt.event.ActionListener, java.io.Serializable, java.lang.Cloneable, java.util.EventListener, javax.swing.Action, javax.swing.event.TableColumnModelListener
Direct Known Subclasses:
SortByDateAction, SortByExtensionAction, SortByGroupAction, SortByNameAction, SortByOwnerAction, SortByPermissionsAction, SortBySizeAction

public abstract class SortByAction
extends MuAction
implements ActivePanelListener, javax.swing.event.TableColumnModelListener

This action sorts the currently active FileTable by a specified criterion. If the table is already sorted by this particular criterion when the action is performed, the sort order will be reversed.

This action is enabled only if the corresponding column is currently visible. This prevents this action from being performed when the column is not visible, which is an unsupported operation

.

Author:
Maxence Bernard
See Also:
Serialized Form

Field Summary
protected  int columnIndex
          Index of the FileTable column this action operates on
 
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
SortByAction(MainFrame mainFrame, java.util.Hashtable properties, int columnIndex)
           
 
Method Summary
 void activePanelChanged(FolderPanel folderPanel)
          This method is invoked when the currently active (i.e.
 void columnAdded(javax.swing.event.TableColumnModelEvent event)
           
 void columnMarginChanged(javax.swing.event.ChangeEvent event)
           
 void columnMoved(javax.swing.event.TableColumnModelEvent event)
           
 void columnRemoved(javax.swing.event.TableColumnModelEvent event)
           
 void columnSelectionChanged(javax.swing.event.ListSelectionEvent event)
           
 void performAction()
          Called when this action has been triggered.
 
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

columnIndex

protected int columnIndex
Index of the FileTable column this action operates on

Constructor Detail

SortByAction

public SortByAction(MainFrame mainFrame,
                    java.util.Hashtable properties,
                    int columnIndex)
Method Detail

performAction

public void performAction()
Description copied from class: MuAction
Called when this action has been triggered. This method provides a response to the action trigger.

Specified by:
performAction in class MuAction

activePanelChanged

public void activePanelChanged(FolderPanel folderPanel)
Description copied from interface: ActivePanelListener
This method is invoked when the currently active (i.e. that has focus) folder panel has changed on the MainFrame.

Specified by:
activePanelChanged in interface ActivePanelListener
Parameters:
folderPanel - the new active FolderPanel.

columnAdded

public void columnAdded(javax.swing.event.TableColumnModelEvent event)
Specified by:
columnAdded in interface javax.swing.event.TableColumnModelListener

columnRemoved

public void columnRemoved(javax.swing.event.TableColumnModelEvent event)
Specified by:
columnRemoved in interface javax.swing.event.TableColumnModelListener

columnMoved

public void columnMoved(javax.swing.event.TableColumnModelEvent event)
Specified by:
columnMoved in interface javax.swing.event.TableColumnModelListener

columnMarginChanged

public void columnMarginChanged(javax.swing.event.ChangeEvent event)
Specified by:
columnMarginChanged in interface javax.swing.event.TableColumnModelListener

columnSelectionChanged

public void columnSelectionChanged(javax.swing.event.ListSelectionEvent event)
Specified by:
columnSelectionChanged in interface javax.swing.event.TableColumnModelListener


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