com.lightdev.app.filemanager.ui
Class FileActions

java.lang.Object
  extended by com.lightdev.app.filemanager.ui.FileActions

public class FileActions
extends Object

Helper class to centrally provide a number of file related actions inside application FileManager. Provided actions are create folder, delete files, extract archive, pack folder, rename file.

Version:
1, 12.01.2008
Author:
Ulrich Hilger, Light Development, http://www.lightdev.com, info@lightdev.com, published under the terms and conditions of the BSD License, for details see file license.txt in the distribution package of this software

Nested Class Summary
 class FileActions.FileAction
          Generic action class to use with different action commands.
 
Field Summary
static int CREATE_FOLDER
          index of action command inside 'names'
static int DELETE_FILES
          index of action command inside 'names'
static int EXTRACT_ARCHIVE
          index of action command inside 'names'
static String[] names
          string constants for file action commands
static int PACK_FOLDER
          index of action command inside 'names'
static int RENAME_FILE
          index of action command inside 'names'
 
Constructor Summary
FileActions()
          create a new instance of class FileActions
 
Method Summary
 Action getAction(String actionCommand)
          get an action from the actions provided by this class
 void mapActions(JComponent c)
          map actions provided by this class to a given component using the component's action map
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

names

public static final String[] names
string constants for file action commands


CREATE_FOLDER

public static final int CREATE_FOLDER
index of action command inside 'names'

See Also:
Constant Field Values

DELETE_FILES

public static final int DELETE_FILES
index of action command inside 'names'

See Also:
Constant Field Values

EXTRACT_ARCHIVE

public static final int EXTRACT_ARCHIVE
index of action command inside 'names'

See Also:
Constant Field Values

PACK_FOLDER

public static final int PACK_FOLDER
index of action command inside 'names'

See Also:
Constant Field Values

RENAME_FILE

public static final int RENAME_FILE
index of action command inside 'names'

See Also:
Constant Field Values
Constructor Detail

FileActions

public FileActions()
create a new instance of class FileActions

Method Detail

getAction

public Action getAction(String actionCommand)
get an action from the actions provided by this class

Parameters:
actionCommand - the action command to get the action for
Returns:
the action with the given action command or null in case no action with the given action command is found here

mapActions

public void mapActions(JComponent c)
map actions provided by this class to a given component using the component's action map

Parameters:
c -