com.levigo.util.swing.action
Interface ActionFactory

All Known Subinterfaces:
NamedActionFactory
All Known Implementing Classes:
BasicActionFactory, DefaultActionFactory

public interface ActionFactory

Basic interface for the action factory.
This interface has to be implemented in the action factory.
In the system can be more than one action factory but just one instance of each.

Version:
$Data$ $Revision$
Author:
l.boureanu@levigo.de

Method Summary
 CommandAction getAction(Context context, String key)
          Default constructor using the settings of the actions.properties file.
 CommandAction getAction(Context context, String key, String name, String commands, String shortDescription, String longDescription, Icon smallIcon, Icon largeIcon, String actionCommandKey, KeyStroke acceleratorKey, int mnemonicKey, HashMap<String,Object> otherParameters)
          Settings for the icons, texts etc.
 

Method Detail

getAction

CommandAction getAction(Context context,
                        String key)
Default constructor using the settings of the actions.properties file.
Short name is used as the action's name.

To create the commands is the default command factory used.

Parameters:
context - belongs to the context
key - key of the commandAction
Returns:
created CommandAction

getAction

CommandAction getAction(Context context,
                        String key,
                        String name,
                        String commands,
                        String shortDescription,
                        String longDescription,
                        Icon smallIcon,
                        Icon largeIcon,
                        String actionCommandKey,
                        KeyStroke acceleratorKey,
                        int mnemonicKey,
                        HashMap<String,Object> otherParameters)
Settings for the icons, texts etc. in the action.properties file can be overwritten. Key is used as the action's name.

To create the commands is the default command factory used.

Parameters:
context - belongs to the context
key - key of the commandAction
name - value for Action.NAME
commands - all commands of the commandAction
shortDescription - value for Action.SHORT_DESCRIPTION
longDescription - value for Action.LONG_DESCRIPTION
smallIcon - value for Action.SMALL_ICON
largeIcon - value for Action.LARGE_ICON_KEY
actionCommandKey - value for Action.ACTION_COMMAND_KEY
acceleratorKey - value for Action.ACCELERATOR_KEY
mnemonicKey - value for Action.MNEMONIC_KEY
otherParameters - other parameters which will be added to the action (can be null)
Returns:
created CommandAction


Copyright © 1995-2020 levigo holding gmbh. All Rights Reserved.