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 previously selected graph.
11: * @author Sasa Bojanic
12: */
13: public class PreviousGraph extends ActionBase {
14:
15: public PreviousGraph(JaWEComponent jawecomponent) {
16: super (jawecomponent);
17: }
18:
19: public void enableDisableAction() {
20: GraphController gc = (GraphController) jawecomponent;
21: setEnabled(gc.getHistoryManager() != null
22: && gc.getHistoryManager().canGoBack());
23: }
24:
25: public void actionPerformed(ActionEvent e) {
26: ((GraphController) jawecomponent).displayPreviousGraph();
27: }
28: }
|