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 JumboAction 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?
To add more context as suggested in answers, my application has some UI elements (like nodes and edges), and the user can select a bunch of nodes and perform A, B, C, or JumboAction on them.