01: package org.enhydra.jawe.base.controller.actions.defaultactions;
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.UndoHistoryManager;
08: import org.enhydra.jawe.base.controller.JaWEController;
09:
10: /**
11: * Selects "next" selected graph.
12: * @author Sasa Bojanic
13: */
14: public class Redo extends ActionBase {
15:
16: public Redo(JaWEComponent jawecomponent) {
17: super (jawecomponent);
18: }
19:
20: public void enableDisableAction() {
21: UndoHistoryManager uhm = ((JaWEController) jawecomponent)
22: .getUndoHistoryManager();
23: setEnabled(uhm != null && uhm.canRedo());
24: }
25:
26: public void actionPerformed(ActionEvent e) {
27: ((JaWEController) jawecomponent).redo();
28: }
29: }
|