|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectit.amattioli.applicate.commands.AbstractCommand
public abstract class AbstractCommand
This class is a base implementation of the Command interface.
It implements the two addCommandListener methods and fires a CommandEvent
when doCommand() and cancelCommand() are called with
CommandResult.SUCCESSFUL and CommandResult.CANCELLED respectively.
This class implements PropertyChangeEmitter too, so extenders can fire
PropertyChangeEvent when a command property changes.
| Constructor Summary | |
|---|---|
AbstractCommand()
|
|
| Method Summary | |
|---|---|
void |
addCommandListener(CommandListener listener)
Add a listener for this command events. |
void |
addCommandListener(CommandListener listener,
CommandResult... results)
Add a listener for this command events. |
void |
addPropertyChangeListener(PropertyChangeListener listener)
|
void |
cancelCommand()
|
void |
doCommand()
Execute this command. |
protected void |
firePropertyChange(String propertyName,
Object oldValue,
Object newValue)
|
Collection<?> |
getPropertyValues(String propertyName)
|
void |
removePropertyChangeListener(PropertyChangeListener listener)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public AbstractCommand()
| Method Detail |
|---|
public void doCommand()
throws ApplicationException
Command
doCommand in interface CommandApplicationExceptionpublic void cancelCommand()
cancelCommand in interface Commandpublic void addCommandListener(CommandListener listener)
CommandCommandEvent the CommandListener.commandDone(CommandEvent)
method will be called on all the added listeners.
addCommandListener in interface Commandlistener - the listener to be added
public void addCommandListener(CommandListener listener,
CommandResult... results)
CommandCommandEvent the CommandListener.commandDone(CommandEvent)
method will be called on all the added listeners with result equals to one
of the specified results.
addCommandListener in interface Commandlistener - the listener to be added
protected void firePropertyChange(String propertyName,
Object oldValue,
Object newValue)
public void addPropertyChangeListener(PropertyChangeListener listener)
addPropertyChangeListener in interface it.amattioli.dominate.util.PropertyChangeEmitterpublic void removePropertyChangeListener(PropertyChangeListener listener)
removePropertyChangeListener in interface it.amattioli.dominate.util.PropertyChangeEmitterpublic Collection<?> getPropertyValues(String propertyName)
getPropertyValues in interface ValuesLister
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||