1 Clazz.declarePackage ("javax.swing.undo");
2 Clazz.load (["javax.swing.undo.UndoableEdit"], "javax.swing.undo.AbstractUndoableEdit", ["javax.swing.UIManager", "javax.swing.undo.CannotRedoException", "$.CannotUndoException"], function () {
3 c$ = Clazz.decorateAsClass (function () {
4 this.hasBeenDone = false;
6 Clazz.instantialize (this, arguments);
7 }, javax.swing.undo, "AbstractUndoableEdit", null, javax.swing.undo.UndoableEdit);
8 Clazz.makeConstructor (c$,
10 this.hasBeenDone = true;
13 Clazz.overrideMethod (c$, "die",
17 Clazz.overrideMethod (c$, "undo",
19 if (!this.canUndo ()) {
20 throw new javax.swing.undo.CannotUndoException ();
21 }this.hasBeenDone = false;
23 Clazz.overrideMethod (c$, "canUndo",
25 return this.alive && this.hasBeenDone;
27 Clazz.overrideMethod (c$, "redo",
29 if (!this.canRedo ()) {
30 throw new javax.swing.undo.CannotRedoException ();
31 }this.hasBeenDone = true;
33 Clazz.overrideMethod (c$, "canRedo",
35 return this.alive && !this.hasBeenDone;
37 Clazz.overrideMethod (c$, "addEdit",
40 }, "javax.swing.undo.UndoableEdit");
41 Clazz.overrideMethod (c$, "replaceEdit",
44 }, "javax.swing.undo.UndoableEdit");
45 Clazz.overrideMethod (c$, "isSignificant",
49 Clazz.overrideMethod (c$, "getPresentationName",
53 Clazz.overrideMethod (c$, "getUndoPresentationName",
55 var name = this.getPresentationName ();
56 if (!"".equals (name)) {
57 name = javax.swing.UIManager.getString ("AbstractUndoableEdit.undoText") + " " + name;
59 name = javax.swing.UIManager.getString ("AbstractUndoableEdit.undoText");
62 Clazz.overrideMethod (c$, "getRedoPresentationName",
64 var name = this.getPresentationName ();
65 if (!"".equals (name)) {
66 name = javax.swing.UIManager.getString ("AbstractUndoableEdit.redoText") + " " + name;
68 name = javax.swing.UIManager.getString ("AbstractUndoableEdit.redoText");
71 Clazz.defineMethod (c$, "toString",
73 return Clazz.superCall (this, javax.swing.undo.AbstractUndoableEdit, "toString", []) + " hasBeenDone: " + this.hasBeenDone + " alive: " + this.alive;
75 Clazz.defineStatics (c$,