home *** CD-ROM | disk | FTP | other *** search
- import com.sun.java.swing.AbstractAction;
- import com.sun.java.swing.undo.CannotRedoException;
- import java.awt.event.ActionEvent;
-
- class Notepad$RedoAction extends AbstractAction {
- // $FF: synthetic field
- private final Notepad this$0;
-
- public Notepad$RedoAction(Notepad var1) {
- super("Redo");
- this.this$0 = var1;
- this.this$0 = var1;
- ((AbstractAction)this).setEnabled(false);
- }
-
- public void actionPerformed(ActionEvent var1) {
- try {
- this.this$0.undo.redo();
- } catch (CannotRedoException var3) {
- System.out.println("Unable to redo: " + var3);
- ((Throwable)var3).printStackTrace();
- }
-
- this.update();
- Notepad.access$1(this.this$0).update();
- }
-
- protected void update() {
- if (this.this$0.undo.canRedo()) {
- ((AbstractAction)this).setEnabled(true);
- ((AbstractAction)this).putValue("Name", this.this$0.undo.getRedoPresentationName());
- } else {
- ((AbstractAction)this).setEnabled(false);
- ((AbstractAction)this).putValue("Name", "Redo");
- }
- }
- }
-