org.workingfrog.i18n.swing
Class I18NActionWrapper

java.lang.Object
  extended byjavax.swing.AbstractAction
      extended byorg.workingfrog.i18n.swing.I18NAction
          extended byorg.workingfrog.i18n.swing.I18NActionWrapper
All Implemented Interfaces:
javax.swing.Action, java.awt.event.ActionListener, java.lang.Cloneable, java.util.EventListener, LocaleListener, java.io.Serializable

public class I18NActionWrapper
extends I18NAction
implements LocaleListener

Wraps a javax.swing.AbstractAction in an i18n version

Author:
Jean-Hugues de Raigniac
See Also:
Serialized Form

Nested Class Summary
 
Nested classes inherited from class javax.swing.AbstractAction
 
Field Summary
 
Fields inherited from class org.workingfrog.i18n.swing.I18NAction
ACTION
 
Fields inherited from class javax.swing.AbstractAction
changeSupport, enabled
 
Fields inherited from interface javax.swing.Action
ACCELERATOR_KEY, ACTION_COMMAND_KEY, DEFAULT, LONG_DESCRIPTION, MNEMONIC_KEY, NAME, SHORT_DESCRIPTION, SMALL_ICON
 
Constructor Summary
I18NActionWrapper()
           
I18NActionWrapper(javax.swing.AbstractAction action)
          Basic I18NActionWrapper.
 
Method Summary
 void actionPerformed(java.awt.event.ActionEvent event)
          Must be implemented by children.
 java.lang.String getKey()
          Used when Action.NAME needs an update.
 java.lang.Object[] getKeys()
           
 java.lang.Object getValue(java.lang.String key)
           
 void localeChanged(LocaleEvent event)
          Updates Action.NAME when a LocaleEvent is fired.
 
Methods inherited from class org.workingfrog.i18n.swing.I18NAction
setBundle
 
Methods inherited from class javax.swing.AbstractAction
addPropertyChangeListener, clone, firePropertyChange, getPropertyChangeListeners, isEnabled, putValue, removePropertyChangeListener, setEnabled
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

I18NActionWrapper

public I18NActionWrapper()

I18NActionWrapper

public I18NActionWrapper(javax.swing.AbstractAction action)
Basic I18NActionWrapper.

Parameters:
action - an AbstractAction
Method Detail

getKey

public java.lang.String getKey()
Description copied from class: I18NAction
Used when Action.NAME needs an update.

Overrides:
getKey in class I18NAction
Returns:
a String containing the i18nKey of this I18NAction

getKeys

public java.lang.Object[] getKeys()

getValue

public java.lang.Object getValue(java.lang.String key)
Specified by:
getValue in interface javax.swing.Action

actionPerformed

public void actionPerformed(java.awt.event.ActionEvent event)
Must be implemented by children.

Specified by:
actionPerformed in interface java.awt.event.ActionListener
Overrides:
actionPerformed in class I18NAction
Parameters:
event - The event fired

localeChanged

public void localeChanged(LocaleEvent event)
Updates Action.NAME when a LocaleEvent is fired.

Specified by:
localeChanged in interface LocaleListener
Overrides:
localeChanged in class I18NAction
Parameters:
event - contains the new Locale