|
JavaGantt 2011.1 API | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjavax.swing.AbstractAction
eu.beesoft.gantt.action.AbstractGanttAction
public abstract class AbstractGanttAction
Abstract action to support all JavaGantt actions. It has two features:
Field Summary |
---|
Fields inherited from class javax.swing.AbstractAction |
---|
enabled, changeSupport |
Fields inherited from interface javax.swing.Action |
---|
ACCELERATOR_KEY, ACTION_COMMAND_KEY, DEFAULT, LONG_DESCRIPTION, MNEMONIC_KEY, NAME, SHORT_DESCRIPTION, SMALL_ICON |
Constructor Summary | |
---|---|
AbstractGanttAction(JavaGantt component)
Constructor. |
Method Summary | |
---|---|
void |
actionPerformed(java.awt.event.ActionEvent event)
Implements ActionListener . |
protected abstract boolean |
executeAction(java.awt.event.ActionEvent event,
UndoStep undo)
Executive method for each subclassed action. |
protected JavaGantt |
getGantt()
Returns the instance of JavaGantt to which this action belongs. |
protected java.lang.String |
getTextFromResourceBundle(java.lang.String key,
boolean keyIsComplete,
java.lang.String defaultValue)
Returns text from resource bundle for given key . |
void |
languageChanged(Language source)
Implements LanguageListener . |
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 |
---|
public AbstractGanttAction(JavaGantt component)
component
- JavaGantt instance to which this action belongsMethod Detail |
---|
protected final JavaGantt getGantt()
JavaGantt
to which this action belongs.
public void languageChanged(Language source)
LanguageListener
. Invoked when environment changes.
Reinitializes action properties from resource bundle.
languageChanged
in interface LanguageListener
source
- - source of this method invocationprotected java.lang.String getTextFromResourceBundle(java.lang.String key, boolean keyIsComplete, java.lang.String defaultValue)
key
. Resource
bundle is obtained from JavaGantt with method
JavaGantt.getResourceBundleName()
. If it returns null,
Language.getText(Object, String, String)
is called,
Language.getText(String, String, String)
otherwise.
key
- - name of property in resource bundlekeyIsComplete
- - if true, key is used "as is". If false, key is prefixed with
this class qualified name. If resource not found, key is
prefixed with this class simple name, and lookup is repeateddefaultValue
- - this value is used as return value if required key is not
found in resource bundlepublic void actionPerformed(java.awt.event.ActionEvent event)
ActionListener
. Prepares instance of
UndoStep
and calls executeAction(ActionEvent, UndoStep)
.
If it returns true, registers this UndoStep in JavaGantt UndoManager.
actionPerformed
in interface java.awt.event.ActionListener
event
- - eventprotected abstract boolean executeAction(java.awt.event.ActionEvent event, UndoStep undo)
event
- - event fot this actionundo
- - register for undo / redo operations
|
JavaGantt 2011.1 API | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |