01: package org.enhydra.jawe.components.graph.actions;
02:
03: import java.awt.event.ActionEvent;
04:
05: import org.enhydra.jawe.ActionBase;
06: import org.enhydra.jawe.JaWEComponent;
07: import org.enhydra.jawe.components.graph.GraphController;
08:
09: /**
10: * Selects "next" selected graph.
11: * @author Sasa Bojanic
12: */
13: public class NextGraph extends ActionBase {
14:
15: public NextGraph(JaWEComponent jawecomponent) {
16: super (jawecomponent);
17: }
18:
19: public void enableDisableAction() {
20: GraphController gc = (GraphController) jawecomponent;
21: setEnabled(gc.getHistoryManager() != null
22: && gc.getHistoryManager().canGoForward());
23: }
24:
25: public void actionPerformed(ActionEvent e) {
26: ((GraphController) jawecomponent).displayNextGraph();
27: }
28: }
|