Merge branch 'master' of https://source.jalview.org/git/jalviewjs.git
[jalviewjs.git] / site / j2s / javax / swing / text / View.js
index 7a25c40..9b1b0b5 100644 (file)
-Clazz.declarePackage ("javax.swing.text");\r
-Clazz.load (["javax.swing.SwingConstants"], "javax.swing.text.View", ["java.lang.IllegalArgumentException", "java.awt.Rectangle", "javax.swing.event.DocumentEvent", "javax.swing.text.Position", "$.Utilities"], function () {\r
-c$ = Clazz.decorateAsClass (function () {\r
-this.parent = null;\r
-this.elem = null;\r
-Clazz.instantialize (this, arguments);\r
-}, javax.swing.text, "View", null, javax.swing.SwingConstants);\r
-Clazz.makeConstructor (c$, \r
-function (elem) {\r
-this.elem = elem;\r
-}, "javax.swing.text.Element");\r
-Clazz.defineMethod (c$, "getParent", \r
-function () {\r
-return this.parent;\r
-});\r
-Clazz.defineMethod (c$, "isVisible", \r
-function () {\r
-return true;\r
-});\r
-Clazz.defineMethod (c$, "getMinimumSpan", \r
-function (axis) {\r
-var w = this.getResizeWeight (axis);\r
-if (w == 0) {\r
-return this.getPreferredSpan (axis);\r
-}return 0;\r
-}, "~N");\r
-Clazz.defineMethod (c$, "getMaximumSpan", \r
-function (axis) {\r
-var w = this.getResizeWeight (axis);\r
-if (w == 0) {\r
-return this.getPreferredSpan (axis);\r
-}return 2147483647;\r
-}, "~N");\r
-Clazz.defineMethod (c$, "preferenceChanged", \r
-function (child, width, height) {\r
-var parent = this.getParent ();\r
-if (parent != null) {\r
-parent.preferenceChanged (this, width, height);\r
-}}, "javax.swing.text.View,~B,~B");\r
-Clazz.defineMethod (c$, "getAlignment", \r
-function (axis) {\r
-return 0.5;\r
-}, "~N");\r
-Clazz.defineMethod (c$, "setParent", \r
-function (parent) {\r
-if (parent == null) {\r
-for (var i = 0; i < this.getViewCount (); i++) {\r
-if (this.getView (i).getParent () === this) {\r
-this.getView (i).setParent (null);\r
-}}\r
-}this.parent = parent;\r
-}, "javax.swing.text.View");\r
-Clazz.defineMethod (c$, "getViewCount", \r
-function () {\r
-return 0;\r
-});\r
-Clazz.defineMethod (c$, "getView", \r
-function (n) {\r
-return null;\r
-}, "~N");\r
-Clazz.defineMethod (c$, "removeAll", \r
-function () {\r
-this.replace (0, this.getViewCount (), null);\r
-});\r
-Clazz.defineMethod (c$, "remove", \r
-function (i) {\r
-this.replace (i, 1, null);\r
-}, "~N");\r
-Clazz.defineMethod (c$, "insert", \r
-function (offs, v) {\r
-var one =  new Array (1);\r
-one[0] = v;\r
-this.replace (offs, 0, one);\r
-}, "~N,javax.swing.text.View");\r
-Clazz.defineMethod (c$, "append", \r
-function (v) {\r
-var one =  new Array (1);\r
-one[0] = v;\r
-this.replace (this.getViewCount (), 0, one);\r
-}, "javax.swing.text.View");\r
-Clazz.defineMethod (c$, "replace", \r
-function (offset, length, views) {\r
-}, "~N,~N,~A");\r
-Clazz.defineMethod (c$, "getViewIndex", \r
-function (pos, b) {\r
-return -1;\r
-}, "~N,javax.swing.text.Position.Bias");\r
-Clazz.defineMethod (c$, "getChildAllocation", \r
-function (index, a) {\r
-return null;\r
-}, "~N,java.awt.Shape");\r
-Clazz.defineMethod (c$, "getNextVisualPositionFrom", \r
-function (pos, b, a, direction, biasRet) {\r
-biasRet[0] = javax.swing.text.Position.Bias.Forward;\r
-switch (direction) {\r
-case 1:\r
-case 5:\r
-{\r
-if (pos == -1) {\r
-pos = (direction == 1) ? Math.max (0, this.getEndOffset () - 1) : this.getStartOffset ();\r
-break;\r
-}var target = this.getContainer ();\r
-var c = (target != null) ? target.getCaret () : null;\r
-var mcp;\r
-if (c != null) {\r
-mcp = c.getMagicCaretPosition ();\r
-} else {\r
-mcp = null;\r
-}var x;\r
-if (mcp == null) {\r
-var loc = target.modelToView (pos);\r
-x = (loc == null) ? 0 : loc.x;\r
-} else {\r
-x = mcp.x;\r
-}if (direction == 1) {\r
-pos = javax.swing.text.Utilities.getPositionAbove (target, pos, x);\r
-} else {\r
-pos = javax.swing.text.Utilities.getPositionBelow (target, pos, x);\r
-}}break;\r
-case 7:\r
-if (pos == -1) {\r
-pos = Math.max (0, this.getEndOffset () - 1);\r
-} else {\r
-pos = Math.max (0, pos - 1);\r
-}break;\r
-case 3:\r
-if (pos == -1) {\r
-pos = this.getStartOffset ();\r
-} else {\r
-pos = Math.min (pos + 1, this.getDocument ().getLength ());\r
-}break;\r
-default:\r
-throw  new IllegalArgumentException ("Bad direction: " + direction);\r
-}\r
-return pos;\r
-}, "~N,javax.swing.text.Position.Bias,java.awt.Shape,~N,~A");\r
-Clazz.defineMethod (c$, "modelToView", \r
-function (p0, b0, p1, b1, a) {\r
-var s0 = this.modelToView (p0, a, b0);\r
-var s1;\r
-if (p1 == this.getEndOffset ()) {\r
-try {\r
-s1 = this.modelToView (p1, a, b1);\r
-} catch (ble) {\r
-if (Clazz.exceptionOf (ble, javax.swing.text.BadLocationException)) {\r
-s1 = null;\r
-} else {\r
-throw ble;\r
-}\r
-}\r
-if (s1 == null) {\r
-var alloc = (Clazz.instanceOf (a, java.awt.Rectangle)) ? a : a.getBounds ();\r
-s1 =  new java.awt.Rectangle (alloc.x + alloc.width - 1, alloc.y, 1, alloc.height);\r
-}} else {\r
-s1 = this.modelToView (p1, a, b1);\r
-}var r0 = s0.getBounds ();\r
-var r1 = (Clazz.instanceOf (s1, java.awt.Rectangle)) ? s1 : s1.getBounds ();\r
-if (r0.y != r1.y) {\r
-var alloc = (Clazz.instanceOf (a, java.awt.Rectangle)) ? a : a.getBounds ();\r
-r0.x = alloc.x;\r
-r0.width = alloc.width;\r
-}r0.add (r1);\r
-return r0;\r
-}, "~N,javax.swing.text.Position.Bias,~N,javax.swing.text.Position.Bias,java.awt.Shape");\r
-Clazz.defineMethod (c$, "insertUpdate", \r
-function (e, a, f) {\r
-if (this.getViewCount () > 0) {\r
-var elem = this.getElement ();\r
-var ec = e.getChange (elem);\r
-if (ec != null) {\r
-if (!this.updateChildren (ec, e, f)) {\r
-ec = null;\r
-}}this.forwardUpdate (ec, e, a, f);\r
-this.updateLayout (ec, e, a);\r
-}}, "javax.swing.event.DocumentEvent,java.awt.Shape,javax.swing.text.ViewFactory");\r
-Clazz.defineMethod (c$, "removeUpdate", \r
-function (e, a, f) {\r
-if (this.getViewCount () > 0) {\r
-var elem = this.getElement ();\r
-var ec = e.getChange (elem);\r
-if (ec != null) {\r
-if (!this.updateChildren (ec, e, f)) {\r
-ec = null;\r
-}}this.forwardUpdate (ec, e, a, f);\r
-this.updateLayout (ec, e, a);\r
-}}, "javax.swing.event.DocumentEvent,java.awt.Shape,javax.swing.text.ViewFactory");\r
-Clazz.defineMethod (c$, "changedUpdate", \r
-function (e, a, f) {\r
-if (this.getViewCount () > 0) {\r
-var elem = this.getElement ();\r
-var ec = e.getChange (elem);\r
-if (ec != null) {\r
-if (!this.updateChildren (ec, e, f)) {\r
-ec = null;\r
-}}this.forwardUpdate (ec, e, a, f);\r
-this.updateLayout (ec, e, a);\r
-}}, "javax.swing.event.DocumentEvent,java.awt.Shape,javax.swing.text.ViewFactory");\r
-Clazz.defineMethod (c$, "getDocument", \r
-function () {\r
-return this.elem.getDocument ();\r
-});\r
-Clazz.defineMethod (c$, "getStartOffset", \r
-function () {\r
-return this.elem.getStartOffset ();\r
-});\r
-Clazz.defineMethod (c$, "getEndOffset", \r
-function () {\r
-return this.elem.getEndOffset ();\r
-});\r
-Clazz.defineMethod (c$, "getElement", \r
-function () {\r
-return this.elem;\r
-});\r
-Clazz.defineMethod (c$, "getGraphics", \r
-function () {\r
-var c = this.getContainer ();\r
-return c.getGraphics ();\r
-});\r
-Clazz.defineMethod (c$, "getAttributes", \r
-function () {\r
-return this.elem.getAttributes ();\r
-});\r
-Clazz.defineMethod (c$, "breakView", \r
-function (axis, offset, pos, len) {\r
-return this;\r
-}, "~N,~N,~N,~N");\r
-Clazz.defineMethod (c$, "createFragment", \r
-function (p0, p1) {\r
-return this;\r
-}, "~N,~N");\r
-Clazz.defineMethod (c$, "getBreakWeight", \r
-function (axis, pos, len) {\r
-if (len > this.getPreferredSpan (axis)) {\r
-return 1000;\r
-}return 0;\r
-}, "~N,~N,~N");\r
-Clazz.defineMethod (c$, "getResizeWeight", \r
-function (axis) {\r
-return 0;\r
-}, "~N");\r
-Clazz.defineMethod (c$, "setSize", \r
-function (width, height) {\r
-}, "~N,~N");\r
-Clazz.defineMethod (c$, "getContainer", \r
-function () {\r
-var v = this.getParent ();\r
-return (v != null) ? v.getContainer () : null;\r
-});\r
-Clazz.defineMethod (c$, "getViewFactory", \r
-function () {\r
-var v = this.getParent ();\r
-return (v != null) ? v.getViewFactory () : null;\r
-});\r
-Clazz.defineMethod (c$, "getToolTipText", \r
-function (x, y, allocation) {\r
-var viewIndex = this.getViewIndex (x, y, allocation);\r
-if (viewIndex >= 0) {\r
-allocation = this.getChildAllocation (viewIndex, allocation);\r
-var rect = (Clazz.instanceOf (allocation, java.awt.Rectangle)) ? allocation : allocation.getBounds ();\r
-if (rect.contains (x, y)) {\r
-return this.getView (viewIndex).getToolTipText (x, y, allocation);\r
-}}return null;\r
-}, "~N,~N,java.awt.Shape");\r
-Clazz.defineMethod (c$, "getViewIndex", \r
-function (x, y, allocation) {\r
-for (var counter = this.getViewCount () - 1; counter >= 0; counter--) {\r
-var childAllocation = this.getChildAllocation (counter, allocation);\r
-if (childAllocation != null) {\r
-var rect = (Clazz.instanceOf (childAllocation, java.awt.Rectangle)) ? childAllocation : childAllocation.getBounds ();\r
-if (rect.contains (x, y)) {\r
-return counter;\r
-}}}\r
-return -1;\r
-}, "~N,~N,java.awt.Shape");\r
-Clazz.defineMethod (c$, "updateChildren", \r
-function (ec, e, f) {\r
-var removedElems = ec.getChildrenRemoved ();\r
-var addedElems = ec.getChildrenAdded ();\r
-var added = null;\r
-if (addedElems != null) {\r
-added =  new Array (addedElems.length);\r
-for (var i = 0; i < addedElems.length; i++) {\r
-added[i] = f.create (addedElems[i]);\r
-}\r
-}var nremoved = 0;\r
-var index = ec.getIndex ();\r
-if (removedElems != null) {\r
-nremoved = removedElems.length;\r
-}this.replace (index, nremoved, added);\r
-return true;\r
-}, "javax.swing.event.DocumentEvent.ElementChange,javax.swing.event.DocumentEvent,javax.swing.text.ViewFactory");\r
-Clazz.defineMethod (c$, "forwardUpdate", \r
-function (ec, e, a, f) {\r
-var elem = this.getElement ();\r
-var pos = e.getOffset ();\r
-var index0 = this.getViewIndex (pos, javax.swing.text.Position.Bias.Forward);\r
-if (index0 == -1 && e.getType () === javax.swing.event.DocumentEvent.EventType.REMOVE && pos >= this.getEndOffset ()) {\r
-index0 = this.getViewCount () - 1;\r
-}var index1 = index0;\r
-var v = (index0 >= 0) ? this.getView (index0) : null;\r
-if (v != null) {\r
-if ((v.getStartOffset () == pos) && (pos > 0)) {\r
-index0 = Math.max (index0 - 1, 0);\r
-}}if (e.getType () !== javax.swing.event.DocumentEvent.EventType.REMOVE) {\r
-index1 = this.getViewIndex (pos + e.getLength (), javax.swing.text.Position.Bias.Forward);\r
-if (index1 < 0) {\r
-index1 = this.getViewCount () - 1;\r
-}}var hole0 = index1 + 1;\r
-var hole1 = hole0;\r
-var addedElems = (ec != null) ? ec.getChildrenAdded () : null;\r
-if ((addedElems != null) && (addedElems.length > 0)) {\r
-hole0 = ec.getIndex ();\r
-hole1 = hole0 + addedElems.length - 1;\r
-}index0 = Math.max (index0, 0);\r
-for (var i = index0; i <= index1; i++) {\r
-if (!((i >= hole0) && (i <= hole1))) {\r
-v = this.getView (i);\r
-if (v != null) {\r
-var childAlloc = this.getChildAllocation (i, a);\r
-this.forwardUpdateToView (v, e, childAlloc, f);\r
-}}}\r
-}, "javax.swing.event.DocumentEvent.ElementChange,javax.swing.event.DocumentEvent,java.awt.Shape,javax.swing.text.ViewFactory");\r
-Clazz.defineMethod (c$, "forwardUpdateToView", \r
-function (v, e, a, f) {\r
-var type = e.getType ();\r
-if (type === javax.swing.event.DocumentEvent.EventType.INSERT) {\r
-v.insertUpdate (e, a, f);\r
-} else if (type === javax.swing.event.DocumentEvent.EventType.REMOVE) {\r
-v.removeUpdate (e, a, f);\r
-} else {\r
-v.changedUpdate (e, a, f);\r
-}}, "javax.swing.text.View,javax.swing.event.DocumentEvent,java.awt.Shape,javax.swing.text.ViewFactory");\r
-Clazz.defineMethod (c$, "updateLayout", \r
-function (ec, e, a) {\r
-if ((ec != null) && (a != null)) {\r
-this.preferenceChanged (null, true, true);\r
-var host = this.getContainer ();\r
-if (host != null) {\r
-host.repaint ();\r
-}}}, "javax.swing.event.DocumentEvent.ElementChange,javax.swing.event.DocumentEvent,java.awt.Shape");\r
-Clazz.defineMethod (c$, "modelToView", \r
-function (pos, a) {\r
-return this.modelToView (pos, a, javax.swing.text.Position.Bias.Forward);\r
-}, "~N,java.awt.Shape");\r
-Clazz.defineMethod (c$, "viewToModel", \r
-function (x, y, a) {\r
-javax.swing.text.View.sharedBiasReturn[0] = javax.swing.text.Position.Bias.Forward;\r
-return this.viewToModel (x, y, a, javax.swing.text.View.sharedBiasReturn);\r
-}, "~N,~N,java.awt.Shape");\r
-Clazz.defineStatics (c$,\r
-"BadBreakWeight", 0,\r
-"GoodBreakWeight", 1000,\r
-"ExcellentBreakWeight", 2000,\r
-"ForcedBreakWeight", 3000,\r
-"X_AXIS", 0,\r
-"Y_AXIS", 1);\r
-c$.sharedBiasReturn = c$.prototype.sharedBiasReturn =  new Array (1);\r
-});\r
+Clazz.declarePackage ("javax.swing.text");
+Clazz.load (["javax.swing.SwingConstants"], "javax.swing.text.View", ["java.lang.IllegalArgumentException", "java.awt.Rectangle", "javax.swing.event.DocumentEvent", "javax.swing.text.Position", "$.Utilities"], function () {
+c$ = Clazz.decorateAsClass (function () {
+this.parent = null;
+this.elem = null;
+Clazz.instantialize (this, arguments);
+}, javax.swing.text, "View", null, javax.swing.SwingConstants);
+Clazz.makeConstructor (c$, 
+function (elem) {
+this.elem = elem;
+}, "javax.swing.text.Element");
+Clazz.defineMethod (c$, "getParent", 
+function () {
+return this.parent;
+});
+Clazz.defineMethod (c$, "isVisible", 
+function () {
+return true;
+});
+Clazz.defineMethod (c$, "getMinimumSpan", 
+function (axis) {
+var w = this.getResizeWeight (axis);
+if (w == 0) {
+return this.getPreferredSpan (axis);
+}return 0;
+}, "~N");
+Clazz.defineMethod (c$, "getMaximumSpan", 
+function (axis) {
+var w = this.getResizeWeight (axis);
+if (w == 0) {
+return this.getPreferredSpan (axis);
+}return 2147483647;
+}, "~N");
+Clazz.defineMethod (c$, "preferenceChanged", 
+function (child, width, height) {
+var parent = this.getParent ();
+if (parent != null) {
+parent.preferenceChanged (this, width, height);
+}}, "javax.swing.text.View,~B,~B");
+Clazz.defineMethod (c$, "getAlignment", 
+function (axis) {
+return 0.5;
+}, "~N");
+Clazz.defineMethod (c$, "setParent", 
+function (parent) {
+if (parent == null) {
+for (var i = 0; i < this.getViewCount (); i++) {
+if (this.getView (i).getParent () === this) {
+this.getView (i).setParent (null);
+}}
+}this.parent = parent;
+}, "javax.swing.text.View");
+Clazz.defineMethod (c$, "getViewCount", 
+function () {
+return 0;
+});
+Clazz.defineMethod (c$, "getView", 
+function (n) {
+return null;
+}, "~N");
+Clazz.defineMethod (c$, "removeAll", 
+function () {
+this.replace (0, this.getViewCount (), null);
+});
+Clazz.defineMethod (c$, "remove", 
+function (i) {
+this.replace (i, 1, null);
+}, "~N");
+Clazz.defineMethod (c$, "insert", 
+function (offs, v) {
+var one =  new Array (1);
+one[0] = v;
+this.replace (offs, 0, one);
+}, "~N,javax.swing.text.View");
+Clazz.defineMethod (c$, "append", 
+function (v) {
+var one =  new Array (1);
+one[0] = v;
+this.replace (this.getViewCount (), 0, one);
+}, "javax.swing.text.View");
+Clazz.defineMethod (c$, "replace", 
+function (offset, length, views) {
+}, "~N,~N,~A");
+Clazz.defineMethod (c$, "getViewIndex", 
+function (pos, b) {
+return -1;
+}, "~N,javax.swing.text.Position.Bias");
+Clazz.defineMethod (c$, "getChildAllocation", 
+function (index, a) {
+return null;
+}, "~N,java.awt.Shape");
+Clazz.defineMethod (c$, "getNextVisualPositionFrom", 
+function (pos, b, a, direction, biasRet) {
+biasRet[0] = javax.swing.text.Position.Bias.Forward;
+switch (direction) {
+case 1:
+case 5:
+{
+if (pos == -1) {
+pos = (direction == 1) ? Math.max (0, this.getEndOffset () - 1) : this.getStartOffset ();
+break;
+}var target = this.getContainer ();
+var c = (target != null) ? target.getCaret () : null;
+var mcp;
+if (c != null) {
+mcp = c.getMagicCaretPosition ();
+} else {
+mcp = null;
+}var x;
+if (mcp == null) {
+var loc = target.modelToView (pos);
+x = (loc == null) ? 0 : loc.x;
+} else {
+x = mcp.x;
+}if (direction == 1) {
+pos = javax.swing.text.Utilities.getPositionAbove (target, pos, x);
+} else {
+pos = javax.swing.text.Utilities.getPositionBelow (target, pos, x);
+}}break;
+case 7:
+if (pos == -1) {
+pos = Math.max (0, this.getEndOffset () - 1);
+} else {
+pos = Math.max (0, pos - 1);
+}break;
+case 3:
+if (pos == -1) {
+pos = this.getStartOffset ();
+} else {
+pos = Math.min (pos + 1, this.getDocument ().getLength ());
+}break;
+default:
+throw  new IllegalArgumentException ("Bad direction: " + direction);
+}
+return pos;
+}, "~N,javax.swing.text.Position.Bias,java.awt.Shape,~N,~A");
+Clazz.defineMethod (c$, "modelToView", 
+function (p0, b0, p1, b1, a) {
+var s0 = this.modelToView (p0, a, b0);
+var s1;
+if (p1 == this.getEndOffset ()) {
+try {
+s1 = this.modelToView (p1, a, b1);
+} catch (ble) {
+if (Clazz.exceptionOf (ble, javax.swing.text.BadLocationException)) {
+s1 = null;
+} else {
+throw ble;
+}
+}
+if (s1 == null) {
+var alloc = (Clazz.instanceOf (a, java.awt.Rectangle)) ? a : a.getBounds ();
+s1 =  new java.awt.Rectangle (alloc.x + alloc.width - 1, alloc.y, 1, alloc.height);
+}} else {
+s1 = this.modelToView (p1, a, b1);
+}var r0 = s0.getBounds ();
+var r1 = (Clazz.instanceOf (s1, java.awt.Rectangle)) ? s1 : s1.getBounds ();
+if (r0.y != r1.y) {
+var alloc = (Clazz.instanceOf (a, java.awt.Rectangle)) ? a : a.getBounds ();
+r0.x = alloc.x;
+r0.width = alloc.width;
+}r0.add (r1);
+return r0;
+}, "~N,javax.swing.text.Position.Bias,~N,javax.swing.text.Position.Bias,java.awt.Shape");
+Clazz.defineMethod (c$, "insertUpdate", 
+function (e, a, f) {
+if (this.getViewCount () > 0) {
+var elem = this.getElement ();
+var ec = e.getChange (elem);
+if (ec != null) {
+if (!this.updateChildren (ec, e, f)) {
+ec = null;
+}}this.forwardUpdate (ec, e, a, f);
+this.updateLayout (ec, e, a);
+}}, "javax.swing.event.DocumentEvent,java.awt.Shape,javax.swing.text.ViewFactory");
+Clazz.defineMethod (c$, "removeUpdate", 
+function (e, a, f) {
+if (this.getViewCount () > 0) {
+var elem = this.getElement ();
+var ec = e.getChange (elem);
+if (ec != null) {
+if (!this.updateChildren (ec, e, f)) {
+ec = null;
+}}this.forwardUpdate (ec, e, a, f);
+this.updateLayout (ec, e, a);
+}}, "javax.swing.event.DocumentEvent,java.awt.Shape,javax.swing.text.ViewFactory");
+Clazz.defineMethod (c$, "changedUpdate", 
+function (e, a, f) {
+if (this.getViewCount () > 0) {
+var elem = this.getElement ();
+var ec = e.getChange (elem);
+if (ec != null) {
+if (!this.updateChildren (ec, e, f)) {
+ec = null;
+}}this.forwardUpdate (ec, e, a, f);
+this.updateLayout (ec, e, a);
+}}, "javax.swing.event.DocumentEvent,java.awt.Shape,javax.swing.text.ViewFactory");
+Clazz.defineMethod (c$, "getDocument", 
+function () {
+return this.elem.getDocument ();
+});
+Clazz.defineMethod (c$, "getStartOffset", 
+function () {
+return this.elem.getStartOffset ();
+});
+Clazz.defineMethod (c$, "getEndOffset", 
+function () {
+return this.elem.getEndOffset ();
+});
+Clazz.defineMethod (c$, "getElement", 
+function () {
+return this.elem;
+});
+Clazz.defineMethod (c$, "getGraphics", 
+function () {
+var c = this.getContainer ();
+return c.getGraphics ();
+});
+Clazz.defineMethod (c$, "getAttributes", 
+function () {
+return this.elem.getAttributes ();
+});
+Clazz.defineMethod (c$, "breakView", 
+function (axis, offset, pos, len) {
+return this;
+}, "~N,~N,~N,~N");
+Clazz.defineMethod (c$, "createFragment", 
+function (p0, p1) {
+return this;
+}, "~N,~N");
+Clazz.defineMethod (c$, "getBreakWeight", 
+function (axis, pos, len) {
+if (len > this.getPreferredSpan (axis)) {
+return 1000;
+}return 0;
+}, "~N,~N,~N");
+Clazz.defineMethod (c$, "getResizeWeight", 
+function (axis) {
+return 0;
+}, "~N");
+Clazz.defineMethod (c$, "setSize", 
+function (width, height) {
+}, "~N,~N");
+Clazz.defineMethod (c$, "getContainer", 
+function () {
+var v = this.getParent ();
+return (v != null) ? v.getContainer () : null;
+});
+Clazz.defineMethod (c$, "getViewFactory", 
+function () {
+var v = this.getParent ();
+return (v != null) ? v.getViewFactory () : null;
+});
+Clazz.defineMethod (c$, "getToolTipText", 
+function (x, y, allocation) {
+var viewIndex = this.getViewIndex (x, y, allocation);
+if (viewIndex >= 0) {
+allocation = this.getChildAllocation (viewIndex, allocation);
+var rect = (Clazz.instanceOf (allocation, java.awt.Rectangle)) ? allocation : allocation.getBounds ();
+if (rect.contains (x, y)) {
+return this.getView (viewIndex).getToolTipText (x, y, allocation);
+}}return null;
+}, "~N,~N,java.awt.Shape");
+Clazz.defineMethod (c$, "getViewIndex", 
+function (x, y, allocation) {
+for (var counter = this.getViewCount () - 1; counter >= 0; counter--) {
+var childAllocation = this.getChildAllocation (counter, allocation);
+if (childAllocation != null) {
+var rect = (Clazz.instanceOf (childAllocation, java.awt.Rectangle)) ? childAllocation : childAllocation.getBounds ();
+if (rect.contains (x, y)) {
+return counter;
+}}}
+return -1;
+}, "~N,~N,java.awt.Shape");
+Clazz.defineMethod (c$, "updateChildren", 
+function (ec, e, f) {
+var removedElems = ec.getChildrenRemoved ();
+var addedElems = ec.getChildrenAdded ();
+var added = null;
+if (addedElems != null) {
+added =  new Array (addedElems.length);
+for (var i = 0; i < addedElems.length; i++) {
+added[i] = f.create (addedElems[i]);
+}
+}var nremoved = 0;
+var index = ec.getIndex ();
+if (removedElems != null) {
+nremoved = removedElems.length;
+}this.replace (index, nremoved, added);
+return true;
+}, "javax.swing.event.DocumentEvent.ElementChange,javax.swing.event.DocumentEvent,javax.swing.text.ViewFactory");
+Clazz.defineMethod (c$, "forwardUpdate", 
+function (ec, e, a, f) {
+var elem = this.getElement ();
+var pos = e.getOffset ();
+var index0 = this.getViewIndex (pos, javax.swing.text.Position.Bias.Forward);
+if (index0 == -1 && e.getType () === javax.swing.event.DocumentEvent.EventType.REMOVE && pos >= this.getEndOffset ()) {
+index0 = this.getViewCount () - 1;
+}var index1 = index0;
+var v = (index0 >= 0) ? this.getView (index0) : null;
+if (v != null) {
+if ((v.getStartOffset () == pos) && (pos > 0)) {
+index0 = Math.max (index0 - 1, 0);
+}}if (e.getType () !== javax.swing.event.DocumentEvent.EventType.REMOVE) {
+index1 = this.getViewIndex (pos + e.getLength (), javax.swing.text.Position.Bias.Forward);
+if (index1 < 0) {
+index1 = this.getViewCount () - 1;
+}}var hole0 = index1 + 1;
+var hole1 = hole0;
+var addedElems = (ec != null) ? ec.getChildrenAdded () : null;
+if ((addedElems != null) && (addedElems.length > 0)) {
+hole0 = ec.getIndex ();
+hole1 = hole0 + addedElems.length - 1;
+}index0 = Math.max (index0, 0);
+for (var i = index0; i <= index1; i++) {
+if (!((i >= hole0) && (i <= hole1))) {
+v = this.getView (i);
+if (v != null) {
+var childAlloc = this.getChildAllocation (i, a);
+this.forwardUpdateToView (v, e, childAlloc, f);
+}}}
+}, "javax.swing.event.DocumentEvent.ElementChange,javax.swing.event.DocumentEvent,java.awt.Shape,javax.swing.text.ViewFactory");
+Clazz.defineMethod (c$, "forwardUpdateToView", 
+function (v, e, a, f) {
+var type = e.getType ();
+if (type === javax.swing.event.DocumentEvent.EventType.INSERT) {
+v.insertUpdate (e, a, f);
+} else if (type === javax.swing.event.DocumentEvent.EventType.REMOVE) {
+v.removeUpdate (e, a, f);
+} else {
+v.changedUpdate (e, a, f);
+}}, "javax.swing.text.View,javax.swing.event.DocumentEvent,java.awt.Shape,javax.swing.text.ViewFactory");
+Clazz.defineMethod (c$, "updateLayout", 
+function (ec, e, a) {
+if ((ec != null) && (a != null)) {
+this.preferenceChanged (null, true, true);
+var host = this.getContainer ();
+if (host != null) {
+host.repaint ();
+}}}, "javax.swing.event.DocumentEvent.ElementChange,javax.swing.event.DocumentEvent,java.awt.Shape");
+Clazz.defineMethod (c$, "modelToView", 
+function (pos, a) {
+return this.modelToView (pos, a, javax.swing.text.Position.Bias.Forward);
+}, "~N,java.awt.Shape");
+Clazz.defineMethod (c$, "viewToModel", 
+function (x, y, a) {
+javax.swing.text.View.sharedBiasReturn[0] = javax.swing.text.Position.Bias.Forward;
+return this.viewToModel (x, y, a, javax.swing.text.View.sharedBiasReturn);
+}, "~N,~N,java.awt.Shape");
+Clazz.defineStatics (c$,
+"BadBreakWeight", 0,
+"GoodBreakWeight", 1000,
+"ExcellentBreakWeight", 2000,
+"ForcedBreakWeight", 3000,
+"X_AXIS", 0,
+"Y_AXIS", 1);
+c$.sharedBiasReturn = c$.prototype.sharedBiasReturn =  new Array (1);
+});