sale
Class ActionActionListener
java.lang.Object
|
+--sale.ActionActionListener
- public class ActionActionListener
- extends Object
- implements Action, ActionListener
A special ActionListener that allows to associate Actions with buttons that are not
in a FormSheet's button bar or a MenuSheet.
You can use subclasses of this class as ActionListeners on any button in a FormSheet
that is not in the button bar. You can then think of it as of an Action
associated with that button. The doAction(sale.SaleProcess, sale.SalesPoint)
method will be called with the same
parameters as for an Action associated with a button in the FormSheet's button bar.
If you do not override doAction(sale.SaleProcess, sale.SalesPoint)
in subclasses, it will defer event handling
to the Action object handed in on creation. Thus, you can create chains of responsibility
which allow for, e.g., a capability to be associated with any
ActionEvent
in the FormSheet.
- Hooks:
- Define Action For Button In Component
- Since:
- v2.0
- Version:
- 2.0 07/06/1999
- Author:
- Steffen Zschaler
- See Also:
FormSheet
, Serialized Form
Field Summary |
protected Action |
m_aAction
The action to be performed, when the listener is triggered. |
protected FormSheet |
m_fsOwner
The FormSheet that contains this Action's button. |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
m_fsOwner
protected FormSheet m_fsOwner
- The FormSheet that contains this Action's button.
m_aAction
protected Action m_aAction
- The action to be performed, when the listener is triggered.
ActionActionListener
public ActionActionListener(FormSheet fsOwner)
- Create a new ActionActionListener. You must override
doAction(sale.SaleProcess, sale.SalesPoint)
when using this constructor.
- Parameters:
fsOwner
- the FormSheet that contains this Action's button.
ActionActionListener
public ActionActionListener(FormSheet fsOwner,
Action aAction)
- Create a new ActionActionListener. You should not override
doAction(sale.SaleProcess, sale.SalesPoint)
when using this constructor.
- Parameters:
fsOwner
- the FormSheet that contains this Action's button.aAction
- the Action to perform when the listener is triggered.
actionPerformed
public final void actionPerformed(ActionEvent e)
- ActionListener interface method. Will redirect the event to the
doAction(sale.SaleProcess, sale.SalesPoint)
method.
- Override:
- Never.
- Specified by:
- actionPerformed in interface ActionListener
doAction
public void doAction(SaleProcess p,
SalesPoint sp)
throws Throwable
- Action interface method. Unless you override it, it will redirect the event to the
doAction() method of the Action that is associated with this
listener.
- Override:
- Sometimes.
- Override this method when you used
ActionActionListener(sale.FormSheet)
as a constructor and want the listener to be the
Action object at the same time. - Specified by:
- doAction in interface Action
- Throws:
- Throwable - on any error that shall be reported and lead to cancellation of
the action.
- See Also:
ActionActionListener(sale.FormSheet, sale.Action)