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