|
SalesPoint Framework v3.1 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object sale.ActionActionListener
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.
FormSheet
,
Serialized FormField 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. |
Constructor Summary | |
ActionActionListener(FormSheet fsOwner)
Create a new ActionActionListener. |
|
ActionActionListener(FormSheet fsOwner,
Action aAction)
Create a new ActionActionListener. |
Method Summary | |
void |
actionPerformed(ActionEvent e)
ActionListener interface method. |
void |
doAction(SaleProcess p,
SalesPoint sp)
Action interface method. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected FormSheet m_fsOwner
protected Action m_aAction
Constructor Detail |
public ActionActionListener(FormSheet fsOwner)
doAction(sale.SaleProcess, sale.SalesPoint)
when using this constructor.
fsOwner
- the FormSheet that contains this Action's button.public ActionActionListener(FormSheet fsOwner, Action aAction)
doAction(sale.SaleProcess, sale.SalesPoint)
when using this constructor.
fsOwner
- the FormSheet that contains this Action's button.aAction
- the Action to perform when the listener is triggered.Method Detail |
public final void actionPerformed(ActionEvent e)
doAction(sale.SaleProcess, sale.SalesPoint)
method.
actionPerformed
in interface ActionListener
public void doAction(SaleProcess p, SalesPoint sp) throws Throwable
doAction()
method of the Action that is associated with this
listener.
doAction
in interface Action
p
- the SaleProcess context of the action.sp
- the SalesPoint context of the action.
Throwable
- on any error that shall be reported and lead to cancellation of
the action.ActionActionListener(sale.FormSheet, sale.Action)
ActionActionListener(sale.FormSheet)
as a constructor and want the listener to be the
Action object
at the same time.
|
SalesPoint Framework v3.1 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |