Right way to compose an action as a sequence of multiple smaller actions?
I have three actions defined like so:
public class A extends AbstractAction;
public class B extends AbstractAction;
public class C extends AbstractAction;
Now I want to define a jumbo action that does these three actions in
order. I am sure there is a better way to do this than to do the
following:
public class JumboActin extends AbstractAction {
...
public void actionPerformed(ActionEvent e) {
new A().actionPerformed(null);
new B().actionPerformed(null);
new C().actionPerformed(null);
}
}
I just dont know what the better way is. Can someone please point me to that?
No comments:
Post a Comment