VLab Common 1.2

pl.psnc.vlab.util.gui.action
Class LocalizedObservableAbstractAction

java.lang.Object
  extended by javax.swing.AbstractAction
      extended by pl.psnc.vlab.util.gui.action.AbstractActionDefault
          extended by pl.psnc.vlab.util.gui.action.LocalizedAbstractAction
              extended by pl.psnc.vlab.util.gui.action.LocalizedObservableAbstractAction
All Implemented Interfaces:
java.awt.event.ActionListener, java.io.Serializable, java.lang.Cloneable, java.util.EventListener, javax.swing.Action, ActionDecorator

public abstract class LocalizedObservableAbstractAction
extends LocalizedAbstractAction

LocalizedObservableAbstractAction class - provides default implementation for the JFC Action interface with the localised text descriptions and possibility of adding observers.

Author:
Dominik Stoklosa (~osa~)
See Also:
Serialized Form
Email address
osa@man.poznan.pl

Field Summary
 
Fields inherited from class javax.swing.AbstractAction
changeSupport, enabled
 
Fields inherited from interface pl.psnc.vlab.util.gui.action.ActionDecorator
DISABLED_ICON, PARENT_OBJECT
 
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
LocalizedObservableAbstractAction(java.lang.String nameKey, java.lang.String iconPath, java.lang.String description)
          Define an Action Object with a specified action name, icon and short description.
 
Method Summary
 void addObserver(java.util.Observer observer)
          Adds an observer to the set of observers for this object, provided that it is not the same as some observer already in the set.
 void deleteObserver(java.util.Observer observer)
          Deletes an observer from the set of observers of this object.
 ModelObservable<LocalizedObservableAbstractAction> getObservable()
          Get value of field: observable
 void notifyObservers(java.lang.Object arg)
          If this object has changed, as indicated by the hasChanged method, then notify all of its observers and then call the clearChanged method to indicate that this object has no longer changed.
 
Methods inherited from class pl.psnc.vlab.util.gui.action.LocalizedAbstractAction
getBundle, setAcceleratorKey, setDisabledActionIcon, setMnemonic, setShortDescription
 
Methods inherited from class pl.psnc.vlab.util.gui.action.AbstractActionDefault
actionPerformed, addSource, getDisabledActionIcon, getName, getShortDescription, getSources, setDisabledActionIcon, setIcon, setMnemonic, setName
 
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

LocalizedObservableAbstractAction

public LocalizedObservableAbstractAction(java.lang.String nameKey,
                                         java.lang.String iconPath,
                                         java.lang.String description)
Define an Action Object with a specified action name, icon and short description.

Parameters:
nameKey - name of the action
iconPath - the icon for the current action
description - action short description
Method Detail

addObserver

public void addObserver(java.util.Observer observer)
Adds an observer to the set of observers for this object, provided that it is not the same as some observer already in the set. The order in which notifications will be delivered to multiple observers is not specified. See the class comment.

Parameters:
observer - an observer to be added.

deleteObserver

public void deleteObserver(java.util.Observer observer)
Deletes an observer from the set of observers of this object. Passing null to this method will have no effect.

Parameters:
observer - the observer to be deleted.

notifyObservers

public void notifyObservers(java.lang.Object arg)
If this object has changed, as indicated by the hasChanged method, then notify all of its observers and then call the clearChanged method to indicate that this object has no longer changed.

Each observer has its update method called with two arguments: this observable object and the arg argument.

Parameters:
arg - any object.
See Also:
Observable.clearChanged(), Observable.hasChanged(), Observer.update(java.util.Observable, java.lang.Object)

getObservable

public ModelObservable<LocalizedObservableAbstractAction> getObservable()
Get value of field: observable

Returns:
the observable

VLab Common 1.2

Copyright 2004 by VLAB Dominik Stoklosa.