net.sf.tm.plugin.actions
Class AbstractAction

java.lang.Object
  extended byorg.eclipse.jface.action.Action
      extended bynet.sf.tm.plugin.actions.AbstractAction
All Implemented Interfaces:
IAction
Direct Known Subclasses:
AbstractBackgroundAction, AbstractBusyAction, CopyToClipboardAction, DiscardServerAction, EditServerAction, NewServerAction

public abstract class AbstractAction
extends Action

Base class for all plugin actions. It provides some common methods needed in all actions.

Version:
$Id: AbstractAction.java,v 1.2 2004/02/23 19:19:22 apataki Exp $
Author:
Andreas Pataki

Field Summary
 
Fields inherited from interface org.eclipse.jface.action.IAction
AS_CHECK_BOX, AS_DROP_DOWN_MENU, AS_PUSH_BUTTON, AS_RADIO_BUTTON, CHECKED, DESCRIPTION, ENABLED, IMAGE, TEXT, TOOL_TIP_TEXT
 
Constructor Summary
AbstractAction()
           
 
Method Summary
protected  String getLocalizedString(String key)
          Gets the localized text for the given key from the plugin resource bundle.
protected  String getLocalizedString(String key, Object arg)
           
protected  String getLocalizedString(String key, Object[] args)
           
 
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, run, 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
 

Constructor Detail

AbstractAction

public AbstractAction()
Method Detail

getLocalizedString

protected String getLocalizedString(String key)
Gets the localized text for the given key from the plugin resource bundle.

Parameters:
key - message key
Returns:
localized message

getLocalizedString

protected String getLocalizedString(String key,
                                    Object arg)
Parameters:
key - Message key
arg - The arg which should be inserted into the {0} position.
Returns:
localized message

getLocalizedString

protected String getLocalizedString(String key,
                                    Object[] args)
Parameters:
key - Message key
args - The arguments which should be inserted into the text
Returns:
localized message


Copyright © 2003-2004 Andreas Pataki. All Rights Reserved.