cz.cuni.amis.nb.pogamut.base
Class NamedAction

Package class diagram package NamedAction
java.lang.Object
  extended by javax.swing.AbstractAction
      extended by cz.cuni.amis.nb.pogamut.base.NamedAction
All Implemented Interfaces:
ActionListener, Serializable, Cloneable, EventListener, Action
Direct Known Subclasses:
AgentAction, ServerNode.ServerUpAction

public abstract class NamedAction
extends AbstractAction

Action getting the text from resource bundle according to the supplied string key.

Author:
ik
See Also:
Serialized Form

Field Summary
 
Fields inherited from class javax.swing.AbstractAction
enabled, changeSupport
 
Fields inherited from interface javax.swing.Action
ACCELERATOR_KEY, ACTION_COMMAND_KEY, DEFAULT, DISPLAYED_MNEMONIC_INDEX_KEY, LARGE_ICON_KEY, LONG_DESCRIPTION, MNEMONIC_KEY, NAME, SELECTED_KEY, SHORT_DESCRIPTION, SMALL_ICON
 
Constructor Summary
NamedAction(String key)
           
NamedAction(String key, Class cls)
           
 
Method Summary
protected abstract  void action(ActionEvent e)
           
 void actionPerformed(ActionEvent e)
           
protected static String getStr(String key, Class cls)
           
protected  void init(String key, Class cls)
           
 
Methods inherited from class javax.swing.AbstractAction
addPropertyChangeListener, clone, firePropertyChange, getKeys, getPropertyChangeListeners, getValue, isEnabled, putValue, removePropertyChangeListener, setEnabled
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NamedAction

public NamedAction(String key)

NamedAction

public NamedAction(String key,
                   Class cls)
Parameters:
key -
cls - Class used to get the bundle with localized resources
Method Detail

getStr

protected static String getStr(String key,
                               Class cls)
                        throws MissingResourceException
Throws:
MissingResourceException

init

protected void init(String key,
                    Class cls)

actionPerformed

public void actionPerformed(ActionEvent e)

action

protected abstract void action(ActionEvent e)
                        throws cz.cuni.amis.utils.exception.PogamutException
Throws:
cz.cuni.amis.utils.exception.PogamutException


Copyright © 2014 AMIS research group, Faculty of Mathematics and Physics, Charles University in Prague, Czech Republic. All Rights Reserved.