com.groovemanager.actions
Class ConfigAction

java.lang.Object
  extended by org.eclipse.jface.action.Action
      extended by com.groovemanager.actions.ConfigAction
All Implemented Interfaces:
org.eclipse.jface.action.IAction

public class ConfigAction
extends org.eclipse.jface.action.Action

This subclass of Action is used for showing a PreferenceDialog with the selected predefined PreferencePages. The key names given for the PreferencePages to show must be known by the used ConfigManager.

Author:
Manu Robledo

Field Summary
protected  ConfigManager confManager
          The ConfigManager to be used
protected  java.lang.String[] pages
          The key names of the selected pages that should be displayed
protected  org.eclipse.swt.widgets.Shell parent
          The parent Shell
 
Fields inherited from interface org.eclipse.jface.action.IAction
AS_CHECK_BOX, AS_DROP_DOWN_MENU, AS_PUSH_BUTTON, AS_RADIO_BUTTON, AS_UNSPECIFIED, CHECKED, DESCRIPTION, ENABLED, IMAGE, TEXT, TOOL_TIP_TEXT
 
Constructor Summary
ConfigAction(java.lang.String name)
          Constructs a new ConfigAction with the given name using the default ConfigManager and without any PreferencePages.
ConfigAction(java.lang.String name, ConfigManager manager)
          Constructs a new ConfigAction with the given name using the given ConfigManager and without any PreferencePages.
ConfigAction(java.lang.String name, java.lang.String[] pages)
          Constructs a new ConfigAction with the given name using the default ConfigManager with the given PreferencePages
ConfigAction(java.lang.String name, java.lang.String[] pages, ConfigManager manager)
          Constructs a new ConfigAction with the given name using the given ConfigManager with the given PreferencePages
 
Method Summary
 void run()
          Open the dialog
 void setConfigManager(ConfigManager manager)
          Set the ConfigManager to be used by the dialog
 void setPages(java.lang.String[] pages)
          Set the PreferencePages to display
 void setShell(org.eclipse.swt.widgets.Shell shell)
          Set the parent Shell under which the dialog should be opened
 
Methods inherited from class org.eclipse.jface.action.Action
addPropertyChangeListener, convertAccelerator, convertAccelerator, findKeyCode, findKeyString, findModifier, findModifierString, firePropertyChange, firePropertyChange, getAccelerator, getActionDefinitionId, getDescription, getDisabledImageDescriptor, getHelpListener, getHoverImageDescriptor, getId, getImageDescriptor, getMenuCreator, getStyle, getText, getToolTipText, isChecked, isEnabled, removeAcceleratorText, removePropertyChangeListener, runWithEvent, setAccelerator, setActionDefinitionId, setChecked, setDescription, setDisabledImageDescriptor, setEnabled, setHelpListener, setHoverImageDescriptor, setId, setImageDescriptor, setMenuCreator, setText, setToolTipText
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

confManager

protected ConfigManager confManager
The ConfigManager to be used


pages

protected java.lang.String[] pages
The key names of the selected pages that should be displayed


parent

protected org.eclipse.swt.widgets.Shell parent
The parent Shell

Constructor Detail

ConfigAction

public ConfigAction(java.lang.String name)
Constructs a new ConfigAction with the given name using the default ConfigManager and without any PreferencePages. Pages can be added later with addPages(String[])

Parameters:
name - The Action´s name

ConfigAction

public ConfigAction(java.lang.String name,
                    ConfigManager manager)
Constructs a new ConfigAction with the given name using the given ConfigManager and without any PreferencePages. Pages can be added later with addPages(String[])

Parameters:
name - The Action´s name
manager - The ConfigManager to be used

ConfigAction

public ConfigAction(java.lang.String name,
                    java.lang.String[] pages)
Constructs a new ConfigAction with the given name using the default ConfigManager with the given PreferencePages

Parameters:
name - The Action´s name
pages - The key names of the pages to be shown in the PreferenceDialog

ConfigAction

public ConfigAction(java.lang.String name,
                    java.lang.String[] pages,
                    ConfigManager manager)
Constructs a new ConfigAction with the given name using the given ConfigManager with the given PreferencePages

Parameters:
name - The Action´s name
pages - The key names of the pages to be shown in the PreferenceDialog
manager - The ConfigManager to be used
Method Detail

run

public void run()
Open the dialog

Specified by:
run in interface org.eclipse.jface.action.IAction
Overrides:
run in class org.eclipse.jface.action.Action
See Also:
IAction.run()

setConfigManager

public void setConfigManager(ConfigManager manager)
Set the ConfigManager to be used by the dialog

Parameters:
manager - The new ConfigManager to be used

setPages

public void setPages(java.lang.String[] pages)
Set the PreferencePages to display

Parameters:
pages - The key names of the predefined PreferencePages

setShell

public void setShell(org.eclipse.swt.widgets.Shell shell)
Set the parent Shell under which the dialog should be opened

Parameters:
shell - The parent Shell