Merge branch 'master' of https://source.jalview.org/git/jalviewjs.git
[jalviewjs.git] / site / swingjs / j2s / javax / swing / text / AbstractDocument.js
index d9a9d55..8e5ee91 100644 (file)
-Clazz.declarePackage ("javax.swing.text");\r
-Clazz.load (["javax.swing.event.DocumentEvent", "javax.swing.text.DocumentFilter", "$.Element", "$.JSMinimalAbstractDocument", "$.MutableAttributeSet", "javax.swing.tree.TreeNode", "javax.swing.undo.AbstractUndoableEdit", "$.CompoundEdit", "javax.swing.event.EventListenerList"], "javax.swing.text.AbstractDocument", ["java.lang.Boolean", "java.util.Hashtable", "$.Vector", "javax.swing.UIManager", "javax.swing.event.DocumentEvent.ElementChange", "javax.swing.event.DocumentListener", "$.UndoableEditEvent", "$.UndoableEditListener", "javax.swing.text.BadLocationException", "$.SegmentCache", "$.StateInvariantError", "$.StyleConstants", "$.StyleContext", "$.Utilities"], function () {\r
-c$ = Clazz.decorateAsClass (function () {\r
-this.documentProperties = null;\r
-this.listenerList = null;\r
-this.data = null;\r
-this.context = null;\r
-this.bidiRoot = null;\r
-this.documentFilter = null;\r
-this.filterBypass = null;\r
-if (!Clazz.isClassDefined ("javax.swing.text.AbstractDocument.AbstractElement")) {\r
-javax.swing.text.AbstractDocument.$AbstractDocument$AbstractElement$ ();\r
-}\r
-if (!Clazz.isClassDefined ("javax.swing.text.AbstractDocument.BranchElement")) {\r
-javax.swing.text.AbstractDocument.$AbstractDocument$BranchElement$ ();\r
-}\r
-if (!Clazz.isClassDefined ("javax.swing.text.AbstractDocument.LeafElement")) {\r
-javax.swing.text.AbstractDocument.$AbstractDocument$LeafElement$ ();\r
-}\r
-if (!Clazz.isClassDefined ("javax.swing.text.AbstractDocument.DefaultDocumentEvent")) {\r
-javax.swing.text.AbstractDocument.$AbstractDocument$DefaultDocumentEvent$ ();\r
-}\r
-if (!Clazz.isClassDefined ("javax.swing.text.AbstractDocument.UndoRedoDocumentEvent")) {\r
-javax.swing.text.AbstractDocument.$AbstractDocument$UndoRedoDocumentEvent$ ();\r
-}\r
-if (!Clazz.isClassDefined ("javax.swing.text.AbstractDocument.DefaultFilterBypass")) {\r
-javax.swing.text.AbstractDocument.$AbstractDocument$DefaultFilterBypass$ ();\r
-}\r
-Clazz.instantialize (this, arguments);\r
-}, javax.swing.text, "AbstractDocument", null, javax.swing.text.JSMinimalAbstractDocument);\r
-Clazz.prepareFields (c$, function () {\r
-this.listenerList =  new javax.swing.event.EventListenerList ();\r
-});\r
-Clazz.makeConstructor (c$, \r
-function (data) {\r
-this.construct (data, javax.swing.text.StyleContext.getDefaultStyleContext ());\r
-}, "javax.swing.text.AbstractDocument.Content");\r
-Clazz.makeConstructor (c$, \r
-function (data, context) {\r
-this.data = data;\r
-this.context = context;\r
-}, "javax.swing.text.AbstractDocument.Content,javax.swing.text.AbstractDocument.AttributeContext");\r
-Clazz.defineMethod (c$, "getDocumentProperties", \r
-function () {\r
-if (this.documentProperties == null) {\r
-this.documentProperties =  new java.util.Hashtable (2);\r
-}return this.documentProperties;\r
-});\r
-Clazz.defineMethod (c$, "setDocumentProperties", \r
-function (x) {\r
-this.documentProperties = x;\r
-}, "java.util.Dictionary");\r
-Clazz.defineMethod (c$, "fireInsertUpdate", \r
-function (e) {\r
-try {\r
-var listeners = this.listenerList.getListenerList ();\r
-for (var i = listeners.length - 2; i >= 0; i -= 2) {\r
-if (listeners[i] === javax.swing.event.DocumentListener) {\r
-(listeners[i + 1]).insertUpdate (e);\r
-}}\r
-} finally {\r
-}\r
-}, "javax.swing.event.DocumentEvent");\r
-Clazz.defineMethod (c$, "fireChangedUpdate", \r
-function (e) {\r
-try {\r
-var listeners = this.listenerList.getListenerList ();\r
-for (var i = listeners.length - 2; i >= 0; i -= 2) {\r
-if (listeners[i] === javax.swing.event.DocumentListener) {\r
-(listeners[i + 1]).changedUpdate (e);\r
-}}\r
-} finally {\r
-}\r
-}, "javax.swing.event.DocumentEvent");\r
-Clazz.defineMethod (c$, "fireRemoveUpdate", \r
-function (e) {\r
-try {\r
-var listeners = this.listenerList.getListenerList ();\r
-for (var i = listeners.length - 2; i >= 0; i -= 2) {\r
-if (listeners[i] === javax.swing.event.DocumentListener) {\r
-(listeners[i + 1]).removeUpdate (e);\r
-}}\r
-} finally {\r
-}\r
-}, "javax.swing.event.DocumentEvent");\r
-Clazz.defineMethod (c$, "fireUndoableEditUpdate", \r
-function (e) {\r
-var listeners = this.listenerList.getListenerList ();\r
-for (var i = listeners.length - 2; i >= 0; i -= 2) {\r
-if (listeners[i] === javax.swing.event.UndoableEditListener) {\r
-(listeners[i + 1]).undoableEditHappened (e);\r
-}}\r
-}, "javax.swing.event.UndoableEditEvent");\r
-Clazz.defineMethod (c$, "getListeners", \r
-function (listenerType) {\r
-return this.listenerList.getListeners (listenerType);\r
-}, "Class");\r
-Clazz.overrideMethod (c$, "getAsynchronousLoadPriority", \r
-function () {\r
-var loadPriority = this.getProperty ("load priority");\r
-if (loadPriority != null) {\r
-return loadPriority.intValue ();\r
-}return -1;\r
-});\r
-Clazz.defineMethod (c$, "setAsynchronousLoadPriority", \r
-function (p) {\r
-var loadPriority = (p >= 0) ?  new Integer (p) : null;\r
-this.putProperty ("load priority", loadPriority);\r
-}, "~N");\r
-Clazz.overrideMethod (c$, "setDocumentFilter", \r
-function (filter) {\r
-this.documentFilter = filter;\r
-}, "javax.swing.text.DocumentFilter");\r
-Clazz.defineMethod (c$, "getDocumentFilter", \r
-function () {\r
-return this.documentFilter;\r
-});\r
-Clazz.overrideMethod (c$, "getLength", \r
-function () {\r
-return this.data.length () - 1;\r
-});\r
-Clazz.overrideMethod (c$, "addDocumentListener", \r
-function (listener) {\r
-this.listenerList.add (javax.swing.event.DocumentListener, listener);\r
-}, "javax.swing.event.DocumentListener");\r
-Clazz.overrideMethod (c$, "removeDocumentListener", \r
-function (listener) {\r
-this.listenerList.remove (javax.swing.event.DocumentListener, listener);\r
-}, "javax.swing.event.DocumentListener");\r
-Clazz.defineMethod (c$, "getDocumentListeners", \r
-function () {\r
-return this.listenerList.getListeners (javax.swing.event.DocumentListener);\r
-});\r
-Clazz.overrideMethod (c$, "addUndoableEditListener", \r
-function (listener) {\r
-this.listenerList.add (javax.swing.event.UndoableEditListener, listener);\r
-}, "javax.swing.event.UndoableEditListener");\r
-Clazz.overrideMethod (c$, "removeUndoableEditListener", \r
-function (listener) {\r
-this.listenerList.remove (javax.swing.event.UndoableEditListener, listener);\r
-}, "javax.swing.event.UndoableEditListener");\r
-Clazz.defineMethod (c$, "getUndoableEditListeners", \r
-function () {\r
-return this.listenerList.getListeners (javax.swing.event.UndoableEditListener);\r
-});\r
-Clazz.overrideMethod (c$, "getProperty", \r
-function (key) {\r
-return this.getDocumentProperties ().get (key);\r
-}, "~O");\r
-Clazz.overrideMethod (c$, "putProperty", \r
-function (key, value) {\r
-if (value != null) {\r
-this.getDocumentProperties ().put (key, value);\r
-} else {\r
-this.getDocumentProperties ().remove (key);\r
-}}, "~O,~O");\r
-Clazz.overrideMethod (c$, "remove", \r
-function (offs, len) {\r
-var filter = this.getDocumentFilter ();\r
-this.writeLock ();\r
-try {\r
-if (filter != null) {\r
-filter.remove (this.getFilterBypass (), offs, len);\r
-} else {\r
-this.handleRemove (offs, len);\r
-}} finally {\r
-this.writeUnlock ();\r
-}\r
-}, "~N,~N");\r
-Clazz.defineMethod (c$, "handleRemove", \r
-function (offs, len) {\r
-if (len > 0) {\r
-if (offs < 0 || (offs + len) > this.getLength ()) {\r
-throw  new javax.swing.text.BadLocationException ("Invalid remove", this.getLength () + 1);\r
-}var chng = Clazz.innerTypeInstance (javax.swing.text.AbstractDocument.DefaultDocumentEvent, this, null, offs, len, javax.swing.event.DocumentEvent.EventType.REMOVE);\r
-var isComposedTextElement = false;\r
-isComposedTextElement = javax.swing.text.Utilities.isComposedTextElement (this, offs);\r
-this.removeUpdate (chng);\r
-var u = this.data.remove (offs, len);\r
-if (u != null) {\r
-chng.addEdit (u);\r
-}this.postRemoveUpdate (chng);\r
-chng.end ();\r
-this.fireRemoveUpdate (chng);\r
-if ((u != null) && !isComposedTextElement) {\r
-this.fireUndoableEditUpdate ( new javax.swing.event.UndoableEditEvent (this, chng));\r
-}}}, "~N,~N");\r
-Clazz.overrideMethod (c$, "replace", \r
-function (offset, length, text, attrs) {\r
-if (length == 0 && (text == null || text.length == 0)) {\r
-return;\r
-}var filter = this.getDocumentFilter ();\r
-this.writeLock ();\r
-try {\r
-if (filter != null) {\r
-filter.replace (this.getFilterBypass (), offset, length, text, attrs);\r
-} else {\r
-if (length > 0) {\r
-this.remove (offset, length);\r
-}if (text != null && text.length > 0) {\r
-this.insertString (offset, text, attrs);\r
-}}} finally {\r
-this.writeUnlock ();\r
-}\r
-}, "~N,~N,~S,javax.swing.text.AttributeSet");\r
-Clazz.overrideMethod (c$, "insertString", \r
-function (offs, str, a) {\r
-if ((str == null) || (str.length == 0)) {\r
-return;\r
-}var filter = this.getDocumentFilter ();\r
-this.writeLock ();\r
-try {\r
-if (filter != null) {\r
-filter.insertString (this.getFilterBypass (), offs, str, a);\r
-} else {\r
-this.handleInsertString (offs, str, a);\r
-}} finally {\r
-this.writeUnlock ();\r
-}\r
-}, "~N,~S,javax.swing.text.AttributeSet");\r
-Clazz.defineMethod (c$, "handleInsertString", \r
-function (offs, str, a) {\r
-if ((str == null) || (str.length == 0)) {\r
-return;\r
-}var u = this.data.insertString (offs, str);\r
-var e = Clazz.innerTypeInstance (javax.swing.text.AbstractDocument.DefaultDocumentEvent, this, null, offs, str.length, javax.swing.event.DocumentEvent.EventType.INSERT);\r
-if (u != null) {\r
-e.addEdit (u);\r
-}if (this.getProperty ("i18n").equals (Boolean.FALSE)) {\r
-}this.insertUpdate (e, a);\r
-e.end ();\r
-this.fireInsertUpdate (e);\r
-if (u != null && (a == null || !a.isDefined (javax.swing.text.StyleConstants.ComposedTextAttribute))) {\r
-this.fireUndoableEditUpdate ( new javax.swing.event.UndoableEditEvent (this, e));\r
-}}, "~N,~S,javax.swing.text.AttributeSet");\r
-Clazz.defineMethod (c$, "getText", \r
-function (offset, length) {\r
-if (length < 0) {\r
-throw  new javax.swing.text.BadLocationException ("Length must be positive", length);\r
-}var str = this.data.getString (offset, length);\r
-return str;\r
-}, "~N,~N");\r
-Clazz.defineMethod (c$, "getText", \r
-function (offset, length, txt) {\r
-if (length < 0) {\r
-throw  new javax.swing.text.BadLocationException ("Length must be positive", length);\r
-}this.data.getChars (offset, length, txt);\r
-}, "~N,~N,javax.swing.text.Segment");\r
-Clazz.overrideMethod (c$, "createPosition", \r
-function (offs) {\r
-return this.data.createPosition (offs);\r
-}, "~N");\r
-Clazz.overrideMethod (c$, "getStartPosition", \r
-function () {\r
-var p;\r
-try {\r
-p = this.createPosition (0);\r
-} catch (bl) {\r
-if (Clazz.exceptionOf (bl, javax.swing.text.BadLocationException)) {\r
-p = null;\r
-} else {\r
-throw bl;\r
-}\r
-}\r
-return p;\r
-});\r
-Clazz.overrideMethod (c$, "getEndPosition", \r
-function () {\r
-var p;\r
-try {\r
-p = this.createPosition (this.data.length ());\r
-} catch (bl) {\r
-if (Clazz.exceptionOf (bl, javax.swing.text.BadLocationException)) {\r
-p = null;\r
-} else {\r
-throw bl;\r
-}\r
-}\r
-return p;\r
-});\r
-Clazz.overrideMethod (c$, "getRootElements", \r
-function () {\r
-var elems =  new Array (2);\r
-elems[0] = this.getDefaultRootElement ();\r
-elems[1] = this.getBidiRootElement ();\r
-return elems;\r
-});\r
-Clazz.defineMethod (c$, "getFilterBypass", \r
- function () {\r
-if (this.filterBypass == null) {\r
-this.filterBypass = Clazz.innerTypeInstance (javax.swing.text.AbstractDocument.DefaultFilterBypass, this, null);\r
-}return this.filterBypass;\r
-});\r
-Clazz.defineMethod (c$, "getBidiRootElement", \r
-function () {\r
-return this.bidiRoot;\r
-});\r
-Clazz.defineMethod (c$, "isLeftToRight", \r
-function (p0, p1) {\r
-if (!this.getProperty ("i18n").equals (Boolean.TRUE)) {\r
-return true;\r
-}var bidiRoot = this.getBidiRootElement ();\r
-var index = bidiRoot.getElementIndex (p0);\r
-var bidiElem = bidiRoot.getElement (index);\r
-if (bidiElem.getEndOffset () >= p1) {\r
-var bidiAttrs = bidiElem.getAttributes ();\r
-return ((javax.swing.text.StyleConstants.getBidiLevel (bidiAttrs) % 2) == 0);\r
-}return true;\r
-}, "~N,~N");\r
-Clazz.defineMethod (c$, "getAttributeContext", \r
-function () {\r
-return this.context;\r
-});\r
-Clazz.defineMethod (c$, "insertUpdate", \r
-function (chng, attr) {\r
-if (chng.type === javax.swing.event.DocumentEvent.EventType.INSERT && chng.getLength () > 0 && !Boolean.TRUE.equals (this.getProperty (javax.swing.text.AbstractDocument.MultiByteProperty))) {\r
-var segment = javax.swing.text.SegmentCache.getSharedSegment ();\r
-try {\r
-this.getText (chng.getOffset (), chng.getLength (), segment);\r
-segment.first ();\r
-do {\r
-if ((segment.current ()).charCodeAt (0) > 255) {\r
-this.putProperty (javax.swing.text.AbstractDocument.MultiByteProperty, Boolean.TRUE);\r
-break;\r
-}} while (segment.next () != '\uffff');\r
-} catch (ble) {\r
-if (Clazz.exceptionOf (ble, javax.swing.text.BadLocationException)) {\r
-} else {\r
-throw ble;\r
-}\r
-}\r
-javax.swing.text.SegmentCache.releaseSharedSegment (segment);\r
-}}, "javax.swing.text.AbstractDocument.DefaultDocumentEvent,javax.swing.text.AttributeSet");\r
-Clazz.defineMethod (c$, "removeUpdate", \r
-function (chng) {\r
-}, "javax.swing.text.AbstractDocument.DefaultDocumentEvent");\r
-Clazz.defineMethod (c$, "postRemoveUpdate", \r
-function (chng) {\r
-}, "javax.swing.text.AbstractDocument.DefaultDocumentEvent");\r
-Clazz.defineMethod (c$, "getContent", \r
-function () {\r
-return this.data;\r
-});\r
-Clazz.defineMethod (c$, "createLeafElement", \r
-function (parent, a, p0, p1) {\r
-return Clazz.innerTypeInstance (javax.swing.text.AbstractDocument.LeafElement, this, null, parent, a, p0, p1);\r
-}, "javax.swing.text.Element,javax.swing.text.AttributeSet,~N,~N");\r
-Clazz.defineMethod (c$, "createBranchElement", \r
-function (parent, a) {\r
-return Clazz.innerTypeInstance (javax.swing.text.AbstractDocument.BranchElement, this, null, parent, a);\r
-}, "javax.swing.text.Element,javax.swing.text.AttributeSet");\r
-Clazz.defineMethod (c$, "writeLock", \r
-function () {\r
-});\r
-Clazz.defineMethod (c$, "writeUnlock", \r
-function () {\r
-});\r
-Clazz.defineMethod (c$, "readLock", \r
-function () {\r
-});\r
-Clazz.defineMethod (c$, "readUnlock", \r
-function () {\r
-});\r
-c$.$AbstractDocument$AbstractElement$ = function () {\r
-Clazz.pu$h(self.c$);\r
-c$ = Clazz.decorateAsClass (function () {\r
-Clazz.prepareCallback (this, arguments);\r
-this.parent = null;\r
-this.attributes = null;\r
-Clazz.instantialize (this, arguments);\r
-}, javax.swing.text.AbstractDocument, "AbstractElement", null, [javax.swing.text.Element, javax.swing.text.MutableAttributeSet, javax.swing.tree.TreeNode]);\r
-Clazz.makeConstructor (c$, \r
-function (a, b) {\r
-this.parent = a;\r
-this.attributes = this.b$["javax.swing.text.AbstractDocument"].getAttributeContext ().getEmptySet ();\r
-if (b != null) {\r
-this.addAttributes (b);\r
-}}, "javax.swing.text.Element,javax.swing.text.AttributeSet");\r
-Clazz.defineMethod (c$, "getAttributeCount", \r
-function () {\r
-return this.attributes.getAttributeCount ();\r
-});\r
-Clazz.defineMethod (c$, "isDefined", \r
-function (a) {\r
-return this.attributes.isDefined (a);\r
-}, "~O");\r
-Clazz.defineMethod (c$, "isEqual", \r
-function (a) {\r
-return this.attributes.isEqual (a);\r
-}, "javax.swing.text.AttributeSet");\r
-Clazz.defineMethod (c$, "copyAttributes", \r
-function () {\r
-return this.attributes.copyAttributes ();\r
-});\r
-Clazz.defineMethod (c$, "getAttribute", \r
-function (a) {\r
-var b = this.attributes.getAttribute (a);\r
-if (b == null) {\r
-var c = (this.parent != null) ? this.parent.getAttributes () : null;\r
-if (c != null) {\r
-b = c.getAttribute (a);\r
-}}return b;\r
-}, "~O");\r
-Clazz.defineMethod (c$, "getAttributeNames", \r
-function () {\r
-return this.attributes.getAttributeNames ();\r
-});\r
-Clazz.defineMethod (c$, "containsAttribute", \r
-function (a, b) {\r
-return this.attributes.containsAttribute (a, b);\r
-}, "~O,~O");\r
-Clazz.defineMethod (c$, "containsAttributes", \r
-function (a) {\r
-return this.attributes.containsAttributes (a);\r
-}, "javax.swing.text.AttributeSet");\r
-Clazz.defineMethod (c$, "getResolveParent", \r
-function () {\r
-var a = this.attributes.getResolveParent ();\r
-if ((a == null) && (this.parent != null)) {\r
-a = this.parent.getAttributes ();\r
-}return a;\r
-});\r
-Clazz.overrideMethod (c$, "addAttribute", \r
-function (a, b) {\r
-this.checkForIllegalCast ();\r
-var c = this.b$["javax.swing.text.AbstractDocument"].getAttributeContext ();\r
-this.attributes = c.addAttribute (this.attributes, a, b);\r
-}, "~O,~O");\r
-Clazz.overrideMethod (c$, "addAttributes", \r
-function (a) {\r
-this.checkForIllegalCast ();\r
-var b = this.b$["javax.swing.text.AbstractDocument"].getAttributeContext ();\r
-this.attributes = b.addAttributes (this.attributes, a);\r
-}, "javax.swing.text.AttributeSet");\r
-Clazz.overrideMethod (c$, "removeAttribute", \r
-function (a) {\r
-this.checkForIllegalCast ();\r
-var b = this.b$["javax.swing.text.AbstractDocument"].getAttributeContext ();\r
-this.attributes = b.removeAttribute (this.attributes, a);\r
-}, "~O");\r
-Clazz.defineMethod (c$, "removeAttributes", \r
-function (a) {\r
-this.checkForIllegalCast ();\r
-var b = this.b$["javax.swing.text.AbstractDocument"].getAttributeContext ();\r
-this.attributes = b.removeAttributes (this.attributes, a);\r
-}, "java.util.Enumeration");\r
-Clazz.defineMethod (c$, "removeAttributes", \r
-function (a) {\r
-this.checkForIllegalCast ();\r
-var b = this.b$["javax.swing.text.AbstractDocument"].getAttributeContext ();\r
-if (a === this) {\r
-this.attributes = b.getEmptySet ();\r
-} else {\r
-this.attributes = b.removeAttributes (this.attributes, a);\r
-}}, "javax.swing.text.AttributeSet");\r
-Clazz.overrideMethod (c$, "setResolveParent", \r
-function (a) {\r
-this.checkForIllegalCast ();\r
-var b = this.b$["javax.swing.text.AbstractDocument"].getAttributeContext ();\r
-if (a != null) {\r
-this.attributes = b.addAttribute (this.attributes, javax.swing.text.StyleConstants.ResolveAttribute, a);\r
-} else {\r
-this.attributes = b.removeAttribute (this.attributes, javax.swing.text.StyleConstants.ResolveAttribute);\r
-}}, "javax.swing.text.AttributeSet");\r
-Clazz.defineMethod (c$, "checkForIllegalCast", \r
- function () {\r
-});\r
-Clazz.overrideMethod (c$, "getDocument", \r
-function () {\r
-return this.b$["javax.swing.text.AbstractDocument"];\r
-});\r
-Clazz.overrideMethod (c$, "getParentElement", \r
-function () {\r
-return this.parent;\r
-});\r
-Clazz.defineMethod (c$, "getAttributes", \r
-function () {\r
-return this;\r
-});\r
-Clazz.overrideMethod (c$, "getName", \r
-function () {\r
-if (this.attributes.isDefined ("$ename")) {\r
-return this.attributes.getAttribute ("$ename");\r
-}return null;\r
-});\r
-Clazz.overrideMethod (c$, "getChildAt", \r
-function (a) {\r
-return this.getElement (a);\r
-}, "~N");\r
-Clazz.overrideMethod (c$, "getChildCount", \r
-function () {\r
-return this.getElementCount ();\r
-});\r
-Clazz.overrideMethod (c$, "getParent", \r
-function () {\r
-return this.getParentElement ();\r
-});\r
-Clazz.overrideMethod (c$, "getIndex", \r
-function (a) {\r
-for (var b = this.getChildCount () - 1; b >= 0; b--) if (this.getChildAt (b) === a) return b;\r
-\r
-return -1;\r
-}, "javax.swing.tree.TreeNode");\r
-c$ = Clazz.p0p ();\r
-};\r
-c$.$AbstractDocument$BranchElement$ = function () {\r
-Clazz.pu$h(self.c$);\r
-c$ = Clazz.decorateAsClass (function () {\r
-Clazz.prepareCallback (this, arguments);\r
-this.$children = null;\r
-this.nchildren = 0;\r
-this.lastIndex = 0;\r
-Clazz.instantialize (this, arguments);\r
-}, javax.swing.text.AbstractDocument, "BranchElement", javax.swing.text.AbstractDocument.AbstractElement, null, Clazz.innerTypeInstance (javax.swing.text.AbstractDocument.AbstractElement, this, null, Clazz.inheritArgs));\r
-Clazz.makeConstructor (c$, \r
-function (a, b) {\r
-Clazz.superConstructor (this, javax.swing.text.AbstractDocument.BranchElement, [a, b]);\r
-this.$children =  new Array (1);\r
-this.nchildren = 0;\r
-this.lastIndex = -1;\r
-}, "javax.swing.text.Element,javax.swing.text.AttributeSet");\r
-Clazz.defineMethod (c$, "positionToElement", \r
-function (a) {\r
-var b = this.getElementIndex (a);\r
-var c = this.$children[b];\r
-var d = c.getStartOffset ();\r
-var e = c.getEndOffset ();\r
-if ((a >= d) && (a < e)) {\r
-return c;\r
-}return null;\r
-}, "~N");\r
-Clazz.defineMethod (c$, "replace", \r
-function (a, b, c) {\r
-var d = c.length - b;\r
-var e = a + b;\r
-var f = this.nchildren - e;\r
-var g = e + d;\r
-if ((this.nchildren + d) >= this.$children.length) {\r
-var h = Math.max (2 * this.$children.length, this.nchildren + d);\r
-var i =  new Array (h);\r
-System.arraycopy (this.$children, 0, i, 0, a);\r
-System.arraycopy (c, 0, i, a, c.length);\r
-System.arraycopy (this.$children, e, i, g, f);\r
-this.$children = i;\r
-} else {\r
-System.arraycopy (this.$children, e, this.$children, g, f);\r
-System.arraycopy (c, 0, this.$children, a, c.length);\r
-}this.nchildren = this.nchildren + d;\r
-}, "~N,~N,~A");\r
-Clazz.overrideMethod (c$, "toString", \r
-function () {\r
-return "BranchElement(" + this.getName () + ") " + this.getStartOffset () + "," + this.getEndOffset () + "\n";\r
-});\r
-Clazz.defineMethod (c$, "getName", \r
-function () {\r
-var a = Clazz.superCall (this, javax.swing.text.AbstractDocument.BranchElement, "getName", []);\r
-if (a == null) {\r
-a = "paragraph";\r
-}return a;\r
-});\r
-Clazz.defineMethod (c$, "getStartOffset", \r
-function () {\r
-return this.$children[0].getStartOffset ();\r
-});\r
-Clazz.overrideMethod (c$, "getEndOffset", \r
-function () {\r
-var a = (this.nchildren > 0) ? this.$children[this.nchildren - 1] : this.$children[0];\r
-return a.getEndOffset ();\r
-});\r
-Clazz.overrideMethod (c$, "getElement", \r
-function (a) {\r
-if (a < this.nchildren) {\r
-return this.$children[a];\r
-}return null;\r
-}, "~N");\r
-Clazz.overrideMethod (c$, "getElementCount", \r
-function () {\r
-return this.nchildren;\r
-});\r
-Clazz.overrideMethod (c$, "getElementIndex", \r
-function (a) {\r
-var b;\r
-var c = 0;\r
-var d = this.nchildren - 1;\r
-var e = 0;\r
-var f = this.getStartOffset ();\r
-var g;\r
-if (this.nchildren == 0) {\r
-return 0;\r
-}if (a >= this.getEndOffset ()) {\r
-return this.nchildren - 1;\r
-}if ((this.lastIndex >= c) && (this.lastIndex <= d)) {\r
-var h = this.$children[this.lastIndex];\r
-f = h.getStartOffset ();\r
-g = h.getEndOffset ();\r
-if ((a >= f) && (a < g)) {\r
-return this.lastIndex;\r
-}if (a < f) {\r
-d = this.lastIndex;\r
-} else {\r
-c = this.lastIndex;\r
-}}while (c <= d) {\r
-e = c + (Clazz.doubleToInt ((d - c) / 2));\r
-var h = this.$children[e];\r
-f = h.getStartOffset ();\r
-g = h.getEndOffset ();\r
-if ((a >= f) && (a < g)) {\r
-b = e;\r
-this.lastIndex = b;\r
-return b;\r
-} else if (a < f) {\r
-d = e - 1;\r
-} else {\r
-c = e + 1;\r
-}}\r
-if (a < f) {\r
-b = e;\r
-} else {\r
-b = e + 1;\r
-}this.lastIndex = b;\r
-return b;\r
-}, "~N");\r
-Clazz.overrideMethod (c$, "isLeaf", \r
-function () {\r
-return false;\r
-});\r
-Clazz.overrideMethod (c$, "getAllowsChildren", \r
-function () {\r
-return true;\r
-});\r
-Clazz.overrideMethod (c$, "children", \r
-function () {\r
-if (this.nchildren == 0) return null;\r
-var a =  new java.util.Vector (this.nchildren);\r
-for (var b = 0; b < this.nchildren; b++) a.addElement (this.$children[b]);\r
-\r
-return a.elements ();\r
-});\r
-c$ = Clazz.p0p ();\r
-};\r
-c$.$AbstractDocument$LeafElement$ = function () {\r
-Clazz.pu$h(self.c$);\r
-c$ = Clazz.decorateAsClass (function () {\r
-Clazz.prepareCallback (this, arguments);\r
-this.p0 = null;\r
-this.p1 = null;\r
-Clazz.instantialize (this, arguments);\r
-}, javax.swing.text.AbstractDocument, "LeafElement", javax.swing.text.AbstractDocument.AbstractElement, null, Clazz.innerTypeInstance (javax.swing.text.AbstractDocument.AbstractElement, this, null, Clazz.inheritArgs));\r
-Clazz.makeConstructor (c$, \r
-function (a, b, c, d) {\r
-Clazz.superConstructor (this, javax.swing.text.AbstractDocument.LeafElement, [a, b]);\r
-try {\r
-this.p0 = this.b$["javax.swing.text.AbstractDocument"].createPosition (c);\r
-this.p1 = this.b$["javax.swing.text.AbstractDocument"].createPosition (d);\r
-} catch (e) {\r
-if (Clazz.exceptionOf (e, javax.swing.text.BadLocationException)) {\r
-this.p0 = null;\r
-this.p1 = null;\r
-throw  new javax.swing.text.StateInvariantError ("Can't create Position references");\r
-} else {\r
-throw e;\r
-}\r
-}\r
-}, "javax.swing.text.Element,javax.swing.text.AttributeSet,~N,~N");\r
-Clazz.overrideMethod (c$, "toString", \r
-function () {\r
-return "LeafElement(" + this.getName () + ") " + this.p0 + "," + this.p1 + "\n";\r
-});\r
-Clazz.overrideMethod (c$, "getStartOffset", \r
-function () {\r
-return this.p0.getOffset ();\r
-});\r
-Clazz.overrideMethod (c$, "getEndOffset", \r
-function () {\r
-return this.p1.getOffset ();\r
-});\r
-Clazz.defineMethod (c$, "getName", \r
-function () {\r
-var a = Clazz.superCall (this, javax.swing.text.AbstractDocument.LeafElement, "getName", []);\r
-if (a == null) {\r
-a = "content";\r
-}return a;\r
-});\r
-Clazz.overrideMethod (c$, "getElementIndex", \r
-function (a) {\r
-return -1;\r
-}, "~N");\r
-Clazz.overrideMethod (c$, "getElement", \r
-function (a) {\r
-return null;\r
-}, "~N");\r
-Clazz.overrideMethod (c$, "getElementCount", \r
-function () {\r
-return 0;\r
-});\r
-Clazz.overrideMethod (c$, "isLeaf", \r
-function () {\r
-return true;\r
-});\r
-Clazz.overrideMethod (c$, "getAllowsChildren", \r
-function () {\r
-return false;\r
-});\r
-Clazz.overrideMethod (c$, "children", \r
-function () {\r
-return null;\r
-});\r
-c$ = Clazz.p0p ();\r
-};\r
-c$.$AbstractDocument$DefaultDocumentEvent$ = function () {\r
-Clazz.pu$h(self.c$);\r
-c$ = Clazz.decorateAsClass (function () {\r
-Clazz.prepareCallback (this, arguments);\r
-this.offset = 0;\r
-this.length = 0;\r
-this.changeLookup = null;\r
-this.type = null;\r
-Clazz.instantialize (this, arguments);\r
-}, javax.swing.text.AbstractDocument, "DefaultDocumentEvent", javax.swing.undo.CompoundEdit, javax.swing.event.DocumentEvent);\r
-Clazz.makeConstructor (c$, \r
-function (a, b, c) {\r
-Clazz.superConstructor (this, javax.swing.text.AbstractDocument.DefaultDocumentEvent);\r
-this.offset = a;\r
-this.length = b;\r
-this.type = c;\r
-}, "~N,~N,javax.swing.event.DocumentEvent.EventType");\r
-Clazz.overrideMethod (c$, "toString", \r
-function () {\r
-return this.edits.toString ();\r
-});\r
-Clazz.defineMethod (c$, "addEdit", \r
-function (a) {\r
-if ((this.changeLookup == null) && (this.edits.size () > 10)) {\r
-this.changeLookup =  new java.util.Hashtable ();\r
-var b = this.edits.size ();\r
-for (var c = 0; c < b; c++) {\r
-var d = this.edits.elementAt (c);\r
-if (Clazz.instanceOf (d, javax.swing.event.DocumentEvent.ElementChange)) {\r
-var e = d;\r
-this.changeLookup.put (e.getElement (), e);\r
-}}\r
-}if ((this.changeLookup != null) && (Clazz.instanceOf (a, javax.swing.event.DocumentEvent.ElementChange))) {\r
-var b = a;\r
-this.changeLookup.put (b.getElement (), b);\r
-}return Clazz.superCall (this, javax.swing.text.AbstractDocument.DefaultDocumentEvent, "addEdit", [a]);\r
-}, "javax.swing.undo.UndoableEdit");\r
-Clazz.defineMethod (c$, "redo", \r
-function () {\r
-this.b$["javax.swing.text.AbstractDocument"].writeLock ();\r
-try {\r
-Clazz.superCall (this, javax.swing.text.AbstractDocument.DefaultDocumentEvent, "redo", []);\r
-var a = Clazz.innerTypeInstance (javax.swing.text.AbstractDocument.UndoRedoDocumentEvent, this, null, this, false);\r
-if (this.type === javax.swing.event.DocumentEvent.EventType.INSERT) {\r
-this.b$["javax.swing.text.AbstractDocument"].fireInsertUpdate (a);\r
-} else if (this.type === javax.swing.event.DocumentEvent.EventType.REMOVE) {\r
-this.b$["javax.swing.text.AbstractDocument"].fireRemoveUpdate (a);\r
-} else {\r
-this.b$["javax.swing.text.AbstractDocument"].fireChangedUpdate (a);\r
-}} finally {\r
-this.b$["javax.swing.text.AbstractDocument"].writeUnlock ();\r
-}\r
-});\r
-Clazz.defineMethod (c$, "undo", \r
-function () {\r
-this.b$["javax.swing.text.AbstractDocument"].writeLock ();\r
-try {\r
-Clazz.superCall (this, javax.swing.text.AbstractDocument.DefaultDocumentEvent, "undo", []);\r
-var a = Clazz.innerTypeInstance (javax.swing.text.AbstractDocument.UndoRedoDocumentEvent, this, null, this, true);\r
-if (this.type === javax.swing.event.DocumentEvent.EventType.REMOVE) {\r
-this.b$["javax.swing.text.AbstractDocument"].fireInsertUpdate (a);\r
-} else if (this.type === javax.swing.event.DocumentEvent.EventType.INSERT) {\r
-this.b$["javax.swing.text.AbstractDocument"].fireRemoveUpdate (a);\r
-} else {\r
-this.b$["javax.swing.text.AbstractDocument"].fireChangedUpdate (a);\r
-}} finally {\r
-this.b$["javax.swing.text.AbstractDocument"].writeUnlock ();\r
-}\r
-});\r
-Clazz.overrideMethod (c$, "isSignificant", \r
-function () {\r
-return true;\r
-});\r
-Clazz.overrideMethod (c$, "getPresentationName", \r
-function () {\r
-var a = this.getType ();\r
-if (a === javax.swing.event.DocumentEvent.EventType.INSERT) return javax.swing.UIManager.getString ("AbstractDocument.additionText");\r
-if (a === javax.swing.event.DocumentEvent.EventType.REMOVE) return javax.swing.UIManager.getString ("AbstractDocument.deletionText");\r
-return javax.swing.UIManager.getString ("AbstractDocument.styleChangeText");\r
-});\r
-Clazz.overrideMethod (c$, "getUndoPresentationName", \r
-function () {\r
-return javax.swing.UIManager.getString ("AbstractDocument.undoText") + " " + this.getPresentationName ();\r
-});\r
-Clazz.overrideMethod (c$, "getRedoPresentationName", \r
-function () {\r
-return javax.swing.UIManager.getString ("AbstractDocument.redoText") + " " + this.getPresentationName ();\r
-});\r
-Clazz.overrideMethod (c$, "getType", \r
-function () {\r
-return this.type;\r
-});\r
-Clazz.overrideMethod (c$, "getOffset", \r
-function () {\r
-return this.offset;\r
-});\r
-Clazz.overrideMethod (c$, "getLength", \r
-function () {\r
-return this.length;\r
-});\r
-Clazz.overrideMethod (c$, "getDocument", \r
-function () {\r
-return this.b$["javax.swing.text.AbstractDocument"];\r
-});\r
-Clazz.overrideMethod (c$, "getChange", \r
-function (a) {\r
-if (this.changeLookup != null) {\r
-return this.changeLookup.get (a);\r
-}var b = this.edits.size ();\r
-for (var c = 0; c < b; c++) {\r
-var d = this.edits.elementAt (c);\r
-if (Clazz.instanceOf (d, javax.swing.event.DocumentEvent.ElementChange)) {\r
-var e = d;\r
-if (a.equals (e.getElement ())) {\r
-return e;\r
-}}}\r
-return null;\r
-}, "javax.swing.text.Element");\r
-c$ = Clazz.p0p ();\r
-};\r
-c$.$AbstractDocument$UndoRedoDocumentEvent$ = function () {\r
-Clazz.pu$h(self.c$);\r
-c$ = Clazz.decorateAsClass (function () {\r
-Clazz.prepareCallback (this, arguments);\r
-this.src = null;\r
-this.type = null;\r
-Clazz.instantialize (this, arguments);\r
-}, javax.swing.text.AbstractDocument, "UndoRedoDocumentEvent", null, javax.swing.event.DocumentEvent);\r
-Clazz.makeConstructor (c$, \r
-function (a, b) {\r
-this.src = a;\r
-if (b) {\r
-if (a.getType ().equals (javax.swing.event.DocumentEvent.EventType.INSERT)) {\r
-this.type = javax.swing.event.DocumentEvent.EventType.REMOVE;\r
-} else if (a.getType ().equals (javax.swing.event.DocumentEvent.EventType.REMOVE)) {\r
-this.type = javax.swing.event.DocumentEvent.EventType.INSERT;\r
-} else {\r
-this.type = a.getType ();\r
-}} else {\r
-this.type = a.getType ();\r
-}}, "javax.swing.text.AbstractDocument.DefaultDocumentEvent,~B");\r
-Clazz.defineMethod (c$, "getSource", \r
-function () {\r
-return this.src;\r
-});\r
-Clazz.overrideMethod (c$, "getOffset", \r
-function () {\r
-return this.src.getOffset ();\r
-});\r
-Clazz.overrideMethod (c$, "getLength", \r
-function () {\r
-return this.src.getLength ();\r
-});\r
-Clazz.overrideMethod (c$, "getDocument", \r
-function () {\r
-return this.src.getDocument ();\r
-});\r
-Clazz.overrideMethod (c$, "getType", \r
-function () {\r
-return this.type;\r
-});\r
-Clazz.overrideMethod (c$, "getChange", \r
-function (a) {\r
-return this.src.getChange (a);\r
-}, "javax.swing.text.Element");\r
-c$ = Clazz.p0p ();\r
-};\r
-c$.$AbstractDocument$DefaultFilterBypass$ = function () {\r
-Clazz.pu$h(self.c$);\r
-c$ = Clazz.decorateAsClass (function () {\r
-Clazz.prepareCallback (this, arguments);\r
-Clazz.instantialize (this, arguments);\r
-}, javax.swing.text.AbstractDocument, "DefaultFilterBypass", javax.swing.text.DocumentFilter.FilterBypass);\r
-Clazz.overrideMethod (c$, "getDocument", \r
-function () {\r
-return this.b$["javax.swing.text.AbstractDocument"];\r
-});\r
-Clazz.overrideMethod (c$, "remove", \r
-function (a, b) {\r
-this.b$["javax.swing.text.AbstractDocument"].handleRemove (a, b);\r
-}, "~N,~N");\r
-Clazz.overrideMethod (c$, "insertString", \r
-function (a, b, c) {\r
-this.b$["javax.swing.text.AbstractDocument"].handleInsertString (a, b, c);\r
-}, "~N,~S,javax.swing.text.AttributeSet");\r
-Clazz.overrideMethod (c$, "replace", \r
-function (a, b, c, d) {\r
-this.b$["javax.swing.text.AbstractDocument"].handleRemove (a, b);\r
-this.b$["javax.swing.text.AbstractDocument"].handleInsertString (a, c, d);\r
-}, "~N,~N,~S,javax.swing.text.AttributeSet");\r
-c$ = Clazz.p0p ();\r
-};\r
-Clazz.declareInterface (javax.swing.text.AbstractDocument, "Content");\r
-Clazz.declareInterface (javax.swing.text.AbstractDocument, "AttributeContext");\r
-Clazz.pu$h(self.c$);\r
-c$ = Clazz.decorateAsClass (function () {\r
-this.e = null;\r
-this.index = 0;\r
-this.removed = null;\r
-this.added = null;\r
-Clazz.instantialize (this, arguments);\r
-}, javax.swing.text.AbstractDocument, "ElementEdit", javax.swing.undo.AbstractUndoableEdit, javax.swing.event.DocumentEvent.ElementChange);\r
-Clazz.makeConstructor (c$, \r
-function (a, b, c, d) {\r
-Clazz.superConstructor (this, javax.swing.text.AbstractDocument.ElementEdit);\r
-this.e = a;\r
-this.index = b;\r
-this.removed = c;\r
-this.added = d;\r
-}, "javax.swing.text.Element,~N,~A,~A");\r
-Clazz.overrideMethod (c$, "getElement", \r
-function () {\r
-return this.e;\r
-});\r
-Clazz.overrideMethod (c$, "getIndex", \r
-function () {\r
-return this.index;\r
-});\r
-Clazz.overrideMethod (c$, "getChildrenRemoved", \r
-function () {\r
-return this.removed;\r
-});\r
-Clazz.overrideMethod (c$, "getChildrenAdded", \r
-function () {\r
-return this.added;\r
-});\r
-Clazz.defineMethod (c$, "redo", \r
-function () {\r
-Clazz.superCall (this, javax.swing.text.AbstractDocument.ElementEdit, "redo", []);\r
-var a = this.removed;\r
-this.removed = this.added;\r
-this.added = a;\r
-(this.e).replace (this.index, this.removed.length, this.added);\r
-});\r
-Clazz.defineMethod (c$, "undo", \r
-function () {\r
-Clazz.superCall (this, javax.swing.text.AbstractDocument.ElementEdit, "undo", []);\r
-(this.e).replace (this.index, this.added.length, this.removed);\r
-var a = this.removed;\r
-this.removed = this.added;\r
-this.added = a;\r
-});\r
-c$ = Clazz.p0p ();\r
-Clazz.defineStatics (c$,\r
-"BAD_LOCATION", "document location failure",\r
-"ParagraphElementName", "paragraph",\r
-"ContentElementName", "content",\r
-"SectionElementName", "section",\r
-"BidiElementName", "bidi level",\r
-"ElementNameAttribute", "$ename",\r
-"I18NProperty", "i18n",\r
-"MultiByteProperty", "multiByte",\r
-"AsyncLoadPriority", "load priority");\r
-});\r
+Clazz.declarePackage ("javax.swing.text");
+Clazz.load (["javax.swing.event.DocumentEvent", "javax.swing.text.DocumentFilter", "$.Element", "$.JSMinimalAbstractDocument", "$.MutableAttributeSet", "javax.swing.tree.TreeNode", "javax.swing.undo.AbstractUndoableEdit", "$.CompoundEdit", "javax.swing.event.EventListenerList"], "javax.swing.text.AbstractDocument", ["java.lang.Boolean", "java.util.Hashtable", "$.Vector", "javax.swing.UIManager", "javax.swing.event.DocumentEvent.ElementChange", "javax.swing.event.DocumentListener", "$.UndoableEditEvent", "$.UndoableEditListener", "javax.swing.text.BadLocationException", "$.SegmentCache", "$.StateInvariantError", "$.StyleConstants", "$.StyleContext", "$.Utilities"], function () {
+c$ = Clazz.decorateAsClass (function () {
+this.documentProperties = null;
+this.listenerList = null;
+this.data = null;
+this.context = null;
+this.bidiRoot = null;
+this.documentFilter = null;
+this.filterBypass = null;
+if (!Clazz.isClassDefined ("javax.swing.text.AbstractDocument.AbstractElement")) {
+javax.swing.text.AbstractDocument.$AbstractDocument$AbstractElement$ ();
+}
+if (!Clazz.isClassDefined ("javax.swing.text.AbstractDocument.BranchElement")) {
+javax.swing.text.AbstractDocument.$AbstractDocument$BranchElement$ ();
+}
+if (!Clazz.isClassDefined ("javax.swing.text.AbstractDocument.LeafElement")) {
+javax.swing.text.AbstractDocument.$AbstractDocument$LeafElement$ ();
+}
+if (!Clazz.isClassDefined ("javax.swing.text.AbstractDocument.DefaultDocumentEvent")) {
+javax.swing.text.AbstractDocument.$AbstractDocument$DefaultDocumentEvent$ ();
+}
+if (!Clazz.isClassDefined ("javax.swing.text.AbstractDocument.UndoRedoDocumentEvent")) {
+javax.swing.text.AbstractDocument.$AbstractDocument$UndoRedoDocumentEvent$ ();
+}
+if (!Clazz.isClassDefined ("javax.swing.text.AbstractDocument.DefaultFilterBypass")) {
+javax.swing.text.AbstractDocument.$AbstractDocument$DefaultFilterBypass$ ();
+}
+Clazz.instantialize (this, arguments);
+}, javax.swing.text, "AbstractDocument", null, javax.swing.text.JSMinimalAbstractDocument);
+Clazz.prepareFields (c$, function () {
+this.listenerList =  new javax.swing.event.EventListenerList ();
+});
+Clazz.makeConstructor (c$, 
+function (data) {
+this.construct (data, javax.swing.text.StyleContext.getDefaultStyleContext ());
+}, "javax.swing.text.AbstractDocument.Content");
+Clazz.makeConstructor (c$, 
+function (data, context) {
+this.data = data;
+this.context = context;
+}, "javax.swing.text.AbstractDocument.Content,javax.swing.text.AbstractDocument.AttributeContext");
+Clazz.defineMethod (c$, "getDocumentProperties", 
+function () {
+if (this.documentProperties == null) {
+this.documentProperties =  new java.util.Hashtable (2);
+}return this.documentProperties;
+});
+Clazz.defineMethod (c$, "setDocumentProperties", 
+function (x) {
+this.documentProperties = x;
+}, "java.util.Dictionary");
+Clazz.defineMethod (c$, "fireInsertUpdate", 
+function (e) {
+try {
+var listeners = this.listenerList.getListenerList ();
+for (var i = listeners.length - 2; i >= 0; i -= 2) {
+if (listeners[i] === javax.swing.event.DocumentListener) {
+(listeners[i + 1]).insertUpdate (e);
+}}
+} finally {
+}
+}, "javax.swing.event.DocumentEvent");
+Clazz.defineMethod (c$, "fireChangedUpdate", 
+function (e) {
+try {
+var listeners = this.listenerList.getListenerList ();
+for (var i = listeners.length - 2; i >= 0; i -= 2) {
+if (listeners[i] === javax.swing.event.DocumentListener) {
+(listeners[i + 1]).changedUpdate (e);
+}}
+} finally {
+}
+}, "javax.swing.event.DocumentEvent");
+Clazz.defineMethod (c$, "fireRemoveUpdate", 
+function (e) {
+try {
+var listeners = this.listenerList.getListenerList ();
+for (var i = listeners.length - 2; i >= 0; i -= 2) {
+if (listeners[i] === javax.swing.event.DocumentListener) {
+(listeners[i + 1]).removeUpdate (e);
+}}
+} finally {
+}
+}, "javax.swing.event.DocumentEvent");
+Clazz.defineMethod (c$, "fireUndoableEditUpdate", 
+function (e) {
+var listeners = this.listenerList.getListenerList ();
+for (var i = listeners.length - 2; i >= 0; i -= 2) {
+if (listeners[i] === javax.swing.event.UndoableEditListener) {
+(listeners[i + 1]).undoableEditHappened (e);
+}}
+}, "javax.swing.event.UndoableEditEvent");
+Clazz.defineMethod (c$, "getListeners", 
+function (listenerType) {
+return this.listenerList.getListeners (listenerType);
+}, "Class");
+Clazz.overrideMethod (c$, "getAsynchronousLoadPriority", 
+function () {
+var loadPriority = this.getProperty ("load priority");
+if (loadPriority != null) {
+return loadPriority.intValue ();
+}return -1;
+});
+Clazz.defineMethod (c$, "setAsynchronousLoadPriority", 
+function (p) {
+var loadPriority = (p >= 0) ?  new Integer (p) : null;
+this.putProperty ("load priority", loadPriority);
+}, "~N");
+Clazz.overrideMethod (c$, "setDocumentFilter", 
+function (filter) {
+this.documentFilter = filter;
+}, "javax.swing.text.DocumentFilter");
+Clazz.defineMethod (c$, "getDocumentFilter", 
+function () {
+return this.documentFilter;
+});
+Clazz.overrideMethod (c$, "getLength", 
+function () {
+return this.data.length () - 1;
+});
+Clazz.overrideMethod (c$, "addDocumentListener", 
+function (listener) {
+this.listenerList.add (javax.swing.event.DocumentListener, listener);
+}, "javax.swing.event.DocumentListener");
+Clazz.overrideMethod (c$, "removeDocumentListener", 
+function (listener) {
+this.listenerList.remove (javax.swing.event.DocumentListener, listener);
+}, "javax.swing.event.DocumentListener");
+Clazz.defineMethod (c$, "getDocumentListeners", 
+function () {
+return this.listenerList.getListeners (javax.swing.event.DocumentListener);
+});
+Clazz.overrideMethod (c$, "addUndoableEditListener", 
+function (listener) {
+this.listenerList.add (javax.swing.event.UndoableEditListener, listener);
+}, "javax.swing.event.UndoableEditListener");
+Clazz.overrideMethod (c$, "removeUndoableEditListener", 
+function (listener) {
+this.listenerList.remove (javax.swing.event.UndoableEditListener, listener);
+}, "javax.swing.event.UndoableEditListener");
+Clazz.defineMethod (c$, "getUndoableEditListeners", 
+function () {
+return this.listenerList.getListeners (javax.swing.event.UndoableEditListener);
+});
+Clazz.overrideMethod (c$, "getProperty", 
+function (key) {
+return this.getDocumentProperties ().get (key);
+}, "~O");
+Clazz.overrideMethod (c$, "putProperty", 
+function (key, value) {
+if (value != null) {
+this.getDocumentProperties ().put (key, value);
+} else {
+this.getDocumentProperties ().remove (key);
+}}, "~O,~O");
+Clazz.overrideMethod (c$, "remove", 
+function (offs, len) {
+var filter = this.getDocumentFilter ();
+this.writeLock ();
+try {
+if (filter != null) {
+filter.remove (this.getFilterBypass (), offs, len);
+} else {
+this.handleRemove (offs, len);
+}} finally {
+this.writeUnlock ();
+}
+}, "~N,~N");
+Clazz.defineMethod (c$, "handleRemove", 
+function (offs, len) {
+if (len > 0) {
+if (offs < 0 || (offs + len) > this.getLength ()) {
+throw  new javax.swing.text.BadLocationException ("Invalid remove", this.getLength () + 1);
+}var chng = Clazz.innerTypeInstance (javax.swing.text.AbstractDocument.DefaultDocumentEvent, this, null, offs, len, javax.swing.event.DocumentEvent.EventType.REMOVE);
+var isComposedTextElement = false;
+isComposedTextElement = javax.swing.text.Utilities.isComposedTextElement (this, offs);
+this.removeUpdate (chng);
+var u = this.data.remove (offs, len);
+if (u != null) {
+chng.addEdit (u);
+}this.postRemoveUpdate (chng);
+chng.end ();
+this.fireRemoveUpdate (chng);
+if ((u != null) && !isComposedTextElement) {
+this.fireUndoableEditUpdate ( new javax.swing.event.UndoableEditEvent (this, chng));
+}}}, "~N,~N");
+Clazz.overrideMethod (c$, "replace", 
+function (offset, length, text, attrs) {
+if (length == 0 && (text == null || text.length == 0)) {
+return;
+}var filter = this.getDocumentFilter ();
+this.writeLock ();
+try {
+if (filter != null) {
+filter.replace (this.getFilterBypass (), offset, length, text, attrs);
+} else {
+if (length > 0) {
+this.remove (offset, length);
+}if (text != null && text.length > 0) {
+this.insertString (offset, text, attrs);
+}}} finally {
+this.writeUnlock ();
+}
+}, "~N,~N,~S,javax.swing.text.AttributeSet");
+Clazz.overrideMethod (c$, "insertString", 
+function (offs, str, a) {
+if ((str == null) || (str.length == 0)) {
+return;
+}var filter = this.getDocumentFilter ();
+this.writeLock ();
+try {
+if (filter != null) {
+filter.insertString (this.getFilterBypass (), offs, str, a);
+} else {
+this.handleInsertString (offs, str, a);
+}} finally {
+this.writeUnlock ();
+}
+}, "~N,~S,javax.swing.text.AttributeSet");
+Clazz.defineMethod (c$, "handleInsertString", 
+function (offs, str, a) {
+if ((str == null) || (str.length == 0)) {
+return;
+}var u = this.data.insertString (offs, str);
+var e = Clazz.innerTypeInstance (javax.swing.text.AbstractDocument.DefaultDocumentEvent, this, null, offs, str.length, javax.swing.event.DocumentEvent.EventType.INSERT);
+if (u != null) {
+e.addEdit (u);
+}if (this.getProperty ("i18n").equals (Boolean.FALSE)) {
+}this.insertUpdate (e, a);
+e.end ();
+this.fireInsertUpdate (e);
+if (u != null && (a == null || !a.isDefined (javax.swing.text.StyleConstants.ComposedTextAttribute))) {
+this.fireUndoableEditUpdate ( new javax.swing.event.UndoableEditEvent (this, e));
+}}, "~N,~S,javax.swing.text.AttributeSet");
+Clazz.defineMethod (c$, "getText", 
+function (offset, length) {
+if (length < 0) {
+throw  new javax.swing.text.BadLocationException ("Length must be positive", length);
+}var str = this.data.getString (offset, length);
+return str;
+}, "~N,~N");
+Clazz.defineMethod (c$, "getText", 
+function (offset, length, txt) {
+if (length < 0) {
+throw  new javax.swing.text.BadLocationException ("Length must be positive", length);
+}this.data.getChars (offset, length, txt);
+}, "~N,~N,javax.swing.text.Segment");
+Clazz.overrideMethod (c$, "createPosition", 
+function (offs) {
+return this.data.createPosition (offs);
+}, "~N");
+Clazz.overrideMethod (c$, "getStartPosition", 
+function () {
+var p;
+try {
+p = this.createPosition (0);
+} catch (bl) {
+if (Clazz.exceptionOf (bl, javax.swing.text.BadLocationException)) {
+p = null;
+} else {
+throw bl;
+}
+}
+return p;
+});
+Clazz.overrideMethod (c$, "getEndPosition", 
+function () {
+var p;
+try {
+p = this.createPosition (this.data.length ());
+} catch (bl) {
+if (Clazz.exceptionOf (bl, javax.swing.text.BadLocationException)) {
+p = null;
+} else {
+throw bl;
+}
+}
+return p;
+});
+Clazz.overrideMethod (c$, "getRootElements", 
+function () {
+var elems =  new Array (2);
+elems[0] = this.getDefaultRootElement ();
+elems[1] = this.getBidiRootElement ();
+return elems;
+});
+Clazz.defineMethod (c$, "getFilterBypass", 
+ function () {
+if (this.filterBypass == null) {
+this.filterBypass = Clazz.innerTypeInstance (javax.swing.text.AbstractDocument.DefaultFilterBypass, this, null);
+}return this.filterBypass;
+});
+Clazz.defineMethod (c$, "getBidiRootElement", 
+function () {
+return this.bidiRoot;
+});
+Clazz.defineMethod (c$, "isLeftToRight", 
+function (p0, p1) {
+if (!this.getProperty ("i18n").equals (Boolean.TRUE)) {
+return true;
+}var bidiRoot = this.getBidiRootElement ();
+var index = bidiRoot.getElementIndex (p0);
+var bidiElem = bidiRoot.getElement (index);
+if (bidiElem.getEndOffset () >= p1) {
+var bidiAttrs = bidiElem.getAttributes ();
+return ((javax.swing.text.StyleConstants.getBidiLevel (bidiAttrs) % 2) == 0);
+}return true;
+}, "~N,~N");
+Clazz.defineMethod (c$, "getAttributeContext", 
+function () {
+return this.context;
+});
+Clazz.defineMethod (c$, "insertUpdate", 
+function (chng, attr) {
+if (chng.type === javax.swing.event.DocumentEvent.EventType.INSERT && chng.getLength () > 0 && !Boolean.TRUE.equals (this.getProperty (javax.swing.text.AbstractDocument.MultiByteProperty))) {
+var segment = javax.swing.text.SegmentCache.getSharedSegment ();
+try {
+this.getText (chng.getOffset (), chng.getLength (), segment);
+segment.first ();
+do {
+if ((segment.current ()).charCodeAt (0) > 255) {
+this.putProperty (javax.swing.text.AbstractDocument.MultiByteProperty, Boolean.TRUE);
+break;
+}} while (segment.next () != '\uffff');
+} catch (ble) {
+if (Clazz.exceptionOf (ble, javax.swing.text.BadLocationException)) {
+} else {
+throw ble;
+}
+}
+javax.swing.text.SegmentCache.releaseSharedSegment (segment);
+}}, "javax.swing.text.AbstractDocument.DefaultDocumentEvent,javax.swing.text.AttributeSet");
+Clazz.defineMethod (c$, "removeUpdate", 
+function (chng) {
+}, "javax.swing.text.AbstractDocument.DefaultDocumentEvent");
+Clazz.defineMethod (c$, "postRemoveUpdate", 
+function (chng) {
+}, "javax.swing.text.AbstractDocument.DefaultDocumentEvent");
+Clazz.defineMethod (c$, "getContent", 
+function () {
+return this.data;
+});
+Clazz.defineMethod (c$, "createLeafElement", 
+function (parent, a, p0, p1) {
+return Clazz.innerTypeInstance (javax.swing.text.AbstractDocument.LeafElement, this, null, parent, a, p0, p1);
+}, "javax.swing.text.Element,javax.swing.text.AttributeSet,~N,~N");
+Clazz.defineMethod (c$, "createBranchElement", 
+function (parent, a) {
+return Clazz.innerTypeInstance (javax.swing.text.AbstractDocument.BranchElement, this, null, parent, a);
+}, "javax.swing.text.Element,javax.swing.text.AttributeSet");
+Clazz.defineMethod (c$, "writeLock", 
+function () {
+});
+Clazz.defineMethod (c$, "writeUnlock", 
+function () {
+});
+Clazz.defineMethod (c$, "readLock", 
+function () {
+});
+Clazz.defineMethod (c$, "readUnlock", 
+function () {
+});
+c$.$AbstractDocument$AbstractElement$ = function () {
+Clazz.pu$h(self.c$);
+c$ = Clazz.decorateAsClass (function () {
+Clazz.prepareCallback (this, arguments);
+this.parent = null;
+this.attributes = null;
+Clazz.instantialize (this, arguments);
+}, javax.swing.text.AbstractDocument, "AbstractElement", null, [javax.swing.text.Element, javax.swing.text.MutableAttributeSet, javax.swing.tree.TreeNode]);
+Clazz.makeConstructor (c$, 
+function (a, b) {
+this.parent = a;
+this.attributes = this.b$["javax.swing.text.AbstractDocument"].getAttributeContext ().getEmptySet ();
+if (b != null) {
+this.addAttributes (b);
+}}, "javax.swing.text.Element,javax.swing.text.AttributeSet");
+Clazz.defineMethod (c$, "getAttributeCount", 
+function () {
+return this.attributes.getAttributeCount ();
+});
+Clazz.defineMethod (c$, "isDefined", 
+function (a) {
+return this.attributes.isDefined (a);
+}, "~O");
+Clazz.defineMethod (c$, "isEqual", 
+function (a) {
+return this.attributes.isEqual (a);
+}, "javax.swing.text.AttributeSet");
+Clazz.defineMethod (c$, "copyAttributes", 
+function () {
+return this.attributes.copyAttributes ();
+});
+Clazz.defineMethod (c$, "getAttribute", 
+function (a) {
+var b = this.attributes.getAttribute (a);
+if (b == null) {
+var c = (this.parent != null) ? this.parent.getAttributes () : null;
+if (c != null) {
+b = c.getAttribute (a);
+}}return b;
+}, "~O");
+Clazz.defineMethod (c$, "getAttributeNames", 
+function () {
+return this.attributes.getAttributeNames ();
+});
+Clazz.defineMethod (c$, "containsAttribute", 
+function (a, b) {
+return this.attributes.containsAttribute (a, b);
+}, "~O,~O");
+Clazz.defineMethod (c$, "containsAttributes", 
+function (a) {
+return this.attributes.containsAttributes (a);
+}, "javax.swing.text.AttributeSet");
+Clazz.defineMethod (c$, "getResolveParent", 
+function () {
+var a = this.attributes.getResolveParent ();
+if ((a == null) && (this.parent != null)) {
+a = this.parent.getAttributes ();
+}return a;
+});
+Clazz.overrideMethod (c$, "addAttribute", 
+function (a, b) {
+this.checkForIllegalCast ();
+var c = this.b$["javax.swing.text.AbstractDocument"].getAttributeContext ();
+this.attributes = c.addAttribute (this.attributes, a, b);
+}, "~O,~O");
+Clazz.overrideMethod (c$, "addAttributes", 
+function (a) {
+this.checkForIllegalCast ();
+var b = this.b$["javax.swing.text.AbstractDocument"].getAttributeContext ();
+this.attributes = b.addAttributes (this.attributes, a);
+}, "javax.swing.text.AttributeSet");
+Clazz.overrideMethod (c$, "removeAttribute", 
+function (a) {
+this.checkForIllegalCast ();
+var b = this.b$["javax.swing.text.AbstractDocument"].getAttributeContext ();
+this.attributes = b.removeAttribute (this.attributes, a);
+}, "~O");
+Clazz.defineMethod (c$, "removeAttributes", 
+function (a) {
+this.checkForIllegalCast ();
+var b = this.b$["javax.swing.text.AbstractDocument"].getAttributeContext ();
+this.attributes = b.removeAttributes (this.attributes, a);
+}, "java.util.Enumeration");
+Clazz.defineMethod (c$, "removeAttributes", 
+function (a) {
+this.checkForIllegalCast ();
+var b = this.b$["javax.swing.text.AbstractDocument"].getAttributeContext ();
+if (a === this) {
+this.attributes = b.getEmptySet ();
+} else {
+this.attributes = b.removeAttributes (this.attributes, a);
+}}, "javax.swing.text.AttributeSet");
+Clazz.overrideMethod (c$, "setResolveParent", 
+function (a) {
+this.checkForIllegalCast ();
+var b = this.b$["javax.swing.text.AbstractDocument"].getAttributeContext ();
+if (a != null) {
+this.attributes = b.addAttribute (this.attributes, javax.swing.text.StyleConstants.ResolveAttribute, a);
+} else {
+this.attributes = b.removeAttribute (this.attributes, javax.swing.text.StyleConstants.ResolveAttribute);
+}}, "javax.swing.text.AttributeSet");
+Clazz.defineMethod (c$, "checkForIllegalCast", 
+ function () {
+});
+Clazz.overrideMethod (c$, "getDocument", 
+function () {
+return this.b$["javax.swing.text.AbstractDocument"];
+});
+Clazz.overrideMethod (c$, "getParentElement", 
+function () {
+return this.parent;
+});
+Clazz.defineMethod (c$, "getAttributes", 
+function () {
+return this;
+});
+Clazz.overrideMethod (c$, "getName", 
+function () {
+if (this.attributes.isDefined ("$ename")) {
+return this.attributes.getAttribute ("$ename");
+}return null;
+});
+Clazz.overrideMethod (c$, "getChildAt", 
+function (a) {
+return this.getElement (a);
+}, "~N");
+Clazz.overrideMethod (c$, "getChildCount", 
+function () {
+return this.getElementCount ();
+});
+Clazz.overrideMethod (c$, "getParent", 
+function () {
+return this.getParentElement ();
+});
+Clazz.overrideMethod (c$, "getIndex", 
+function (a) {
+for (var b = this.getChildCount () - 1; b >= 0; b--) if (this.getChildAt (b) === a) return b;
+
+return -1;
+}, "javax.swing.tree.TreeNode");
+c$ = Clazz.p0p ();
+};
+c$.$AbstractDocument$BranchElement$ = function () {
+Clazz.pu$h(self.c$);
+c$ = Clazz.decorateAsClass (function () {
+Clazz.prepareCallback (this, arguments);
+this.$children = null;
+this.nchildren = 0;
+this.lastIndex = 0;
+Clazz.instantialize (this, arguments);
+}, javax.swing.text.AbstractDocument, "BranchElement", javax.swing.text.AbstractDocument.AbstractElement, null, Clazz.innerTypeInstance (javax.swing.text.AbstractDocument.AbstractElement, this, null, Clazz.inheritArgs));
+Clazz.makeConstructor (c$, 
+function (a, b) {
+Clazz.superConstructor (this, javax.swing.text.AbstractDocument.BranchElement, [a, b]);
+this.$children =  new Array (1);
+this.nchildren = 0;
+this.lastIndex = -1;
+}, "javax.swing.text.Element,javax.swing.text.AttributeSet");
+Clazz.defineMethod (c$, "positionToElement", 
+function (a) {
+var b = this.getElementIndex (a);
+var c = this.$children[b];
+var d = c.getStartOffset ();
+var e = c.getEndOffset ();
+if ((a >= d) && (a < e)) {
+return c;
+}return null;
+}, "~N");
+Clazz.defineMethod (c$, "replace", 
+function (a, b, c) {
+var d = c.length - b;
+var e = a + b;
+var f = this.nchildren - e;
+var g = e + d;
+if ((this.nchildren + d) >= this.$children.length) {
+var h = Math.max (2 * this.$children.length, this.nchildren + d);
+var i =  new Array (h);
+System.arraycopy (this.$children, 0, i, 0, a);
+System.arraycopy (c, 0, i, a, c.length);
+System.arraycopy (this.$children, e, i, g, f);
+this.$children = i;
+} else {
+System.arraycopy (this.$children, e, this.$children, g, f);
+System.arraycopy (c, 0, this.$children, a, c.length);
+}this.nchildren = this.nchildren + d;
+}, "~N,~N,~A");
+Clazz.overrideMethod (c$, "toString", 
+function () {
+return "BranchElement(" + this.getName () + ") " + this.getStartOffset () + "," + this.getEndOffset () + "\n";
+});
+Clazz.defineMethod (c$, "getName", 
+function () {
+var a = Clazz.superCall (this, javax.swing.text.AbstractDocument.BranchElement, "getName", []);
+if (a == null) {
+a = "paragraph";
+}return a;
+});
+Clazz.defineMethod (c$, "getStartOffset", 
+function () {
+return this.$children[0].getStartOffset ();
+});
+Clazz.overrideMethod (c$, "getEndOffset", 
+function () {
+var a = (this.nchildren > 0) ? this.$children[this.nchildren - 1] : this.$children[0];
+return a.getEndOffset ();
+});
+Clazz.overrideMethod (c$, "getElement", 
+function (a) {
+if (a < this.nchildren) {
+return this.$children[a];
+}return null;
+}, "~N");
+Clazz.overrideMethod (c$, "getElementCount", 
+function () {
+return this.nchildren;
+});
+Clazz.overrideMethod (c$, "getElementIndex", 
+function (a) {
+var b;
+var c = 0;
+var d = this.nchildren - 1;
+var e = 0;
+var f = this.getStartOffset ();
+var g;
+if (this.nchildren == 0) {
+return 0;
+}if (a >= this.getEndOffset ()) {
+return this.nchildren - 1;
+}if ((this.lastIndex >= c) && (this.lastIndex <= d)) {
+var h = this.$children[this.lastIndex];
+f = h.getStartOffset ();
+g = h.getEndOffset ();
+if ((a >= f) && (a < g)) {
+return this.lastIndex;
+}if (a < f) {
+d = this.lastIndex;
+} else {
+c = this.lastIndex;
+}}while (c <= d) {
+e = c + (Clazz.doubleToInt ((d - c) / 2));
+var h = this.$children[e];
+f = h.getStartOffset ();
+g = h.getEndOffset ();
+if ((a >= f) && (a < g)) {
+b = e;
+this.lastIndex = b;
+return b;
+} else if (a < f) {
+d = e - 1;
+} else {
+c = e + 1;
+}}
+if (a < f) {
+b = e;
+} else {
+b = e + 1;
+}this.lastIndex = b;
+return b;
+}, "~N");
+Clazz.overrideMethod (c$, "isLeaf", 
+function () {
+return false;
+});
+Clazz.overrideMethod (c$, "getAllowsChildren", 
+function () {
+return true;
+});
+Clazz.overrideMethod (c$, "children", 
+function () {
+if (this.nchildren == 0) return null;
+var a =  new java.util.Vector (this.nchildren);
+for (var b = 0; b < this.nchildren; b++) a.addElement (this.$children[b]);
+
+return a.elements ();
+});
+c$ = Clazz.p0p ();
+};
+c$.$AbstractDocument$LeafElement$ = function () {
+Clazz.pu$h(self.c$);
+c$ = Clazz.decorateAsClass (function () {
+Clazz.prepareCallback (this, arguments);
+this.p0 = null;
+this.p1 = null;
+Clazz.instantialize (this, arguments);
+}, javax.swing.text.AbstractDocument, "LeafElement", javax.swing.text.AbstractDocument.AbstractElement, null, Clazz.innerTypeInstance (javax.swing.text.AbstractDocument.AbstractElement, this, null, Clazz.inheritArgs));
+Clazz.makeConstructor (c$, 
+function (a, b, c, d) {
+Clazz.superConstructor (this, javax.swing.text.AbstractDocument.LeafElement, [a, b]);
+try {
+this.p0 = this.b$["javax.swing.text.AbstractDocument"].createPosition (c);
+this.p1 = this.b$["javax.swing.text.AbstractDocument"].createPosition (d);
+} catch (e) {
+if (Clazz.exceptionOf (e, javax.swing.text.BadLocationException)) {
+this.p0 = null;
+this.p1 = null;
+throw  new javax.swing.text.StateInvariantError ("Can't create Position references");
+} else {
+throw e;
+}
+}
+}, "javax.swing.text.Element,javax.swing.text.AttributeSet,~N,~N");
+Clazz.overrideMethod (c$, "toString", 
+function () {
+return "LeafElement(" + this.getName () + ") " + this.p0 + "," + this.p1 + "\n";
+});
+Clazz.overrideMethod (c$, "getStartOffset", 
+function () {
+return this.p0.getOffset ();
+});
+Clazz.overrideMethod (c$, "getEndOffset", 
+function () {
+return this.p1.getOffset ();
+});
+Clazz.defineMethod (c$, "getName", 
+function () {
+var a = Clazz.superCall (this, javax.swing.text.AbstractDocument.LeafElement, "getName", []);
+if (a == null) {
+a = "content";
+}return a;
+});
+Clazz.overrideMethod (c$, "getElementIndex", 
+function (a) {
+return -1;
+}, "~N");
+Clazz.overrideMethod (c$, "getElement", 
+function (a) {
+return null;
+}, "~N");
+Clazz.overrideMethod (c$, "getElementCount", 
+function () {
+return 0;
+});
+Clazz.overrideMethod (c$, "isLeaf", 
+function () {
+return true;
+});
+Clazz.overrideMethod (c$, "getAllowsChildren", 
+function () {
+return false;
+});
+Clazz.overrideMethod (c$, "children", 
+function () {
+return null;
+});
+c$ = Clazz.p0p ();
+};
+c$.$AbstractDocument$DefaultDocumentEvent$ = function () {
+Clazz.pu$h(self.c$);
+c$ = Clazz.decorateAsClass (function () {
+Clazz.prepareCallback (this, arguments);
+this.offset = 0;
+this.length = 0;
+this.changeLookup = null;
+this.type = null;
+Clazz.instantialize (this, arguments);
+}, javax.swing.text.AbstractDocument, "DefaultDocumentEvent", javax.swing.undo.CompoundEdit, javax.swing.event.DocumentEvent);
+Clazz.makeConstructor (c$, 
+function (a, b, c) {
+Clazz.superConstructor (this, javax.swing.text.AbstractDocument.DefaultDocumentEvent);
+this.offset = a;
+this.length = b;
+this.type = c;
+}, "~N,~N,javax.swing.event.DocumentEvent.EventType");
+Clazz.overrideMethod (c$, "toString", 
+function () {
+return this.edits.toString ();
+});
+Clazz.defineMethod (c$, "addEdit", 
+function (a) {
+if ((this.changeLookup == null) && (this.edits.size () > 10)) {
+this.changeLookup =  new java.util.Hashtable ();
+var b = this.edits.size ();
+for (var c = 0; c < b; c++) {
+var d = this.edits.elementAt (c);
+if (Clazz.instanceOf (d, javax.swing.event.DocumentEvent.ElementChange)) {
+var e = d;
+this.changeLookup.put (e.getElement (), e);
+}}
+}if ((this.changeLookup != null) && (Clazz.instanceOf (a, javax.swing.event.DocumentEvent.ElementChange))) {
+var b = a;
+this.changeLookup.put (b.getElement (), b);
+}return Clazz.superCall (this, javax.swing.text.AbstractDocument.DefaultDocumentEvent, "addEdit", [a]);
+}, "javax.swing.undo.UndoableEdit");
+Clazz.defineMethod (c$, "redo", 
+function () {
+this.b$["javax.swing.text.AbstractDocument"].writeLock ();
+try {
+Clazz.superCall (this, javax.swing.text.AbstractDocument.DefaultDocumentEvent, "redo", []);
+var a = Clazz.innerTypeInstance (javax.swing.text.AbstractDocument.UndoRedoDocumentEvent, this, null, this, false);
+if (this.type === javax.swing.event.DocumentEvent.EventType.INSERT) {
+this.b$["javax.swing.text.AbstractDocument"].fireInsertUpdate (a);
+} else if (this.type === javax.swing.event.DocumentEvent.EventType.REMOVE) {
+this.b$["javax.swing.text.AbstractDocument"].fireRemoveUpdate (a);
+} else {
+this.b$["javax.swing.text.AbstractDocument"].fireChangedUpdate (a);
+}} finally {
+this.b$["javax.swing.text.AbstractDocument"].writeUnlock ();
+}
+});
+Clazz.defineMethod (c$, "undo", 
+function () {
+this.b$["javax.swing.text.AbstractDocument"].writeLock ();
+try {
+Clazz.superCall (this, javax.swing.text.AbstractDocument.DefaultDocumentEvent, "undo", []);
+var a = Clazz.innerTypeInstance (javax.swing.text.AbstractDocument.UndoRedoDocumentEvent, this, null, this, true);
+if (this.type === javax.swing.event.DocumentEvent.EventType.REMOVE) {
+this.b$["javax.swing.text.AbstractDocument"].fireInsertUpdate (a);
+} else if (this.type === javax.swing.event.DocumentEvent.EventType.INSERT) {
+this.b$["javax.swing.text.AbstractDocument"].fireRemoveUpdate (a);
+} else {
+this.b$["javax.swing.text.AbstractDocument"].fireChangedUpdate (a);
+}} finally {
+this.b$["javax.swing.text.AbstractDocument"].writeUnlock ();
+}
+});
+Clazz.overrideMethod (c$, "isSignificant", 
+function () {
+return true;
+});
+Clazz.overrideMethod (c$, "getPresentationName", 
+function () {
+var a = this.getType ();
+if (a === javax.swing.event.DocumentEvent.EventType.INSERT) return javax.swing.UIManager.getString ("AbstractDocument.additionText");
+if (a === javax.swing.event.DocumentEvent.EventType.REMOVE) return javax.swing.UIManager.getString ("AbstractDocument.deletionText");
+return javax.swing.UIManager.getString ("AbstractDocument.styleChangeText");
+});
+Clazz.overrideMethod (c$, "getUndoPresentationName", 
+function () {
+return javax.swing.UIManager.getString ("AbstractDocument.undoText") + " " + this.getPresentationName ();
+});
+Clazz.overrideMethod (c$, "getRedoPresentationName", 
+function () {
+return javax.swing.UIManager.getString ("AbstractDocument.redoText") + " " + this.getPresentationName ();
+});
+Clazz.overrideMethod (c$, "getType", 
+function () {
+return this.type;
+});
+Clazz.overrideMethod (c$, "getOffset", 
+function () {
+return this.offset;
+});
+Clazz.overrideMethod (c$, "getLength", 
+function () {
+return this.length;
+});
+Clazz.overrideMethod (c$, "getDocument", 
+function () {
+return this.b$["javax.swing.text.AbstractDocument"];
+});
+Clazz.overrideMethod (c$, "getChange", 
+function (a) {
+if (this.changeLookup != null) {
+return this.changeLookup.get (a);
+}var b = this.edits.size ();
+for (var c = 0; c < b; c++) {
+var d = this.edits.elementAt (c);
+if (Clazz.instanceOf (d, javax.swing.event.DocumentEvent.ElementChange)) {
+var e = d;
+if (a.equals (e.getElement ())) {
+return e;
+}}}
+return null;
+}, "javax.swing.text.Element");
+c$ = Clazz.p0p ();
+};
+c$.$AbstractDocument$UndoRedoDocumentEvent$ = function () {
+Clazz.pu$h(self.c$);
+c$ = Clazz.decorateAsClass (function () {
+Clazz.prepareCallback (this, arguments);
+this.src = null;
+this.type = null;
+Clazz.instantialize (this, arguments);
+}, javax.swing.text.AbstractDocument, "UndoRedoDocumentEvent", null, javax.swing.event.DocumentEvent);
+Clazz.makeConstructor (c$, 
+function (a, b) {
+this.src = a;
+if (b) {
+if (a.getType ().equals (javax.swing.event.DocumentEvent.EventType.INSERT)) {
+this.type = javax.swing.event.DocumentEvent.EventType.REMOVE;
+} else if (a.getType ().equals (javax.swing.event.DocumentEvent.EventType.REMOVE)) {
+this.type = javax.swing.event.DocumentEvent.EventType.INSERT;
+} else {
+this.type = a.getType ();
+}} else {
+this.type = a.getType ();
+}}, "javax.swing.text.AbstractDocument.DefaultDocumentEvent,~B");
+Clazz.defineMethod (c$, "getSource", 
+function () {
+return this.src;
+});
+Clazz.overrideMethod (c$, "getOffset", 
+function () {
+return this.src.getOffset ();
+});
+Clazz.overrideMethod (c$, "getLength", 
+function () {
+return this.src.getLength ();
+});
+Clazz.overrideMethod (c$, "getDocument", 
+function () {
+return this.src.getDocument ();
+});
+Clazz.overrideMethod (c$, "getType", 
+function () {
+return this.type;
+});
+Clazz.overrideMethod (c$, "getChange", 
+function (a) {
+return this.src.getChange (a);
+}, "javax.swing.text.Element");
+c$ = Clazz.p0p ();
+};
+c$.$AbstractDocument$DefaultFilterBypass$ = function () {
+Clazz.pu$h(self.c$);
+c$ = Clazz.decorateAsClass (function () {
+Clazz.prepareCallback (this, arguments);
+Clazz.instantialize (this, arguments);
+}, javax.swing.text.AbstractDocument, "DefaultFilterBypass", javax.swing.text.DocumentFilter.FilterBypass);
+Clazz.overrideMethod (c$, "getDocument", 
+function () {
+return this.b$["javax.swing.text.AbstractDocument"];
+});
+Clazz.overrideMethod (c$, "remove", 
+function (a, b) {
+this.b$["javax.swing.text.AbstractDocument"].handleRemove (a, b);
+}, "~N,~N");
+Clazz.overrideMethod (c$, "insertString", 
+function (a, b, c) {
+this.b$["javax.swing.text.AbstractDocument"].handleInsertString (a, b, c);
+}, "~N,~S,javax.swing.text.AttributeSet");
+Clazz.overrideMethod (c$, "replace", 
+function (a, b, c, d) {
+this.b$["javax.swing.text.AbstractDocument"].handleRemove (a, b);
+this.b$["javax.swing.text.AbstractDocument"].handleInsertString (a, c, d);
+}, "~N,~N,~S,javax.swing.text.AttributeSet");
+c$ = Clazz.p0p ();
+};
+Clazz.declareInterface (javax.swing.text.AbstractDocument, "Content");
+Clazz.declareInterface (javax.swing.text.AbstractDocument, "AttributeContext");
+Clazz.pu$h(self.c$);
+c$ = Clazz.decorateAsClass (function () {
+this.e = null;
+this.index = 0;
+this.removed = null;
+this.added = null;
+Clazz.instantialize (this, arguments);
+}, javax.swing.text.AbstractDocument, "ElementEdit", javax.swing.undo.AbstractUndoableEdit, javax.swing.event.DocumentEvent.ElementChange);
+Clazz.makeConstructor (c$, 
+function (a, b, c, d) {
+Clazz.superConstructor (this, javax.swing.text.AbstractDocument.ElementEdit);
+this.e = a;
+this.index = b;
+this.removed = c;
+this.added = d;
+}, "javax.swing.text.Element,~N,~A,~A");
+Clazz.overrideMethod (c$, "getElement", 
+function () {
+return this.e;
+});
+Clazz.overrideMethod (c$, "getIndex", 
+function () {
+return this.index;
+});
+Clazz.overrideMethod (c$, "getChildrenRemoved", 
+function () {
+return this.removed;
+});
+Clazz.overrideMethod (c$, "getChildrenAdded", 
+function () {
+return this.added;
+});
+Clazz.defineMethod (c$, "redo", 
+function () {
+Clazz.superCall (this, javax.swing.text.AbstractDocument.ElementEdit, "redo", []);
+var a = this.removed;
+this.removed = this.added;
+this.added = a;
+(this.e).replace (this.index, this.removed.length, this.added);
+});
+Clazz.defineMethod (c$, "undo", 
+function () {
+Clazz.superCall (this, javax.swing.text.AbstractDocument.ElementEdit, "undo", []);
+(this.e).replace (this.index, this.added.length, this.removed);
+var a = this.removed;
+this.removed = this.added;
+this.added = a;
+});
+c$ = Clazz.p0p ();
+Clazz.defineStatics (c$,
+"BAD_LOCATION", "document location failure",
+"ParagraphElementName", "paragraph",
+"ContentElementName", "content",
+"SectionElementName", "section",
+"BidiElementName", "bidi level",
+"ElementNameAttribute", "$ename",
+"I18NProperty", "i18n",
+"MultiByteProperty", "multiByte",
+"AsyncLoadPriority", "load priority");
+});