Merge branch 'master' of https://source.jalview.org/git/jalviewjs.git
[jalviewjs.git] / site / swingjs / j2s / javax / swing / tree / AbstractLayoutCache.js
index e20bb27..fbd556d 100644 (file)
-Clazz.declarePackage ("javax.swing.tree");\r
-Clazz.load (["javax.swing.tree.RowMapper"], "javax.swing.tree.AbstractLayoutCache", null, function () {\r
-c$ = Clazz.decorateAsClass (function () {\r
-this.nodeDimensions = null;\r
-this.treeModel = null;\r
-this.treeSelectionModel = null;\r
-this.rootVisible = false;\r
-this.rowHeight = 0;\r
-Clazz.instantialize (this, arguments);\r
-}, javax.swing.tree, "AbstractLayoutCache", null, javax.swing.tree.RowMapper);\r
-Clazz.defineMethod (c$, "setNodeDimensions", \r
-function (nd) {\r
-this.nodeDimensions = nd;\r
-}, "javax.swing.tree.AbstractLayoutCache.NodeDimensions");\r
-Clazz.defineMethod (c$, "getNodeDimensions", \r
-function () {\r
-return this.nodeDimensions;\r
-});\r
-Clazz.defineMethod (c$, "setModel", \r
-function (newModel) {\r
-this.treeModel = newModel;\r
-}, "javax.swing.tree.TreeModel");\r
-Clazz.defineMethod (c$, "getModel", \r
-function () {\r
-return this.treeModel;\r
-});\r
-Clazz.defineMethod (c$, "setRootVisible", \r
-function (rootVisible) {\r
-this.rootVisible = rootVisible;\r
-}, "~B");\r
-Clazz.defineMethod (c$, "isRootVisible", \r
-function () {\r
-return this.rootVisible;\r
-});\r
-Clazz.defineMethod (c$, "setRowHeight", \r
-function (rowHeight) {\r
-this.rowHeight = rowHeight;\r
-}, "~N");\r
-Clazz.defineMethod (c$, "getRowHeight", \r
-function () {\r
-return this.rowHeight;\r
-});\r
-Clazz.defineMethod (c$, "setSelectionModel", \r
-function (newLSM) {\r
-if (this.treeSelectionModel != null) this.treeSelectionModel.setRowMapper (null);\r
-this.treeSelectionModel = newLSM;\r
-if (this.treeSelectionModel != null) this.treeSelectionModel.setRowMapper (this);\r
-}, "javax.swing.tree.TreeSelectionModel");\r
-Clazz.defineMethod (c$, "getSelectionModel", \r
-function () {\r
-return this.treeSelectionModel;\r
-});\r
-Clazz.defineMethod (c$, "getPreferredHeight", \r
-function () {\r
-var rowCount = this.getRowCount ();\r
-if (rowCount > 0) {\r
-var bounds = this.getBounds (this.getPathForRow (rowCount - 1), null);\r
-if (bounds != null) return bounds.y + bounds.height;\r
-}return 0;\r
-});\r
-Clazz.defineMethod (c$, "getPreferredWidth", \r
-function (bounds) {\r
-var rowCount = this.getRowCount ();\r
-if (rowCount > 0) {\r
-var firstPath;\r
-var endY;\r
-if (bounds == null) {\r
-firstPath = this.getPathForRow (0);\r
-endY = 2147483647;\r
-} else {\r
-firstPath = this.getPathClosestTo (bounds.x, bounds.y);\r
-endY = bounds.height + bounds.y;\r
-}var paths = this.getVisiblePathsFrom (firstPath);\r
-if (paths != null && paths.hasMoreElements ()) {\r
-var pBounds = this.getBounds (paths.nextElement (), null);\r
-var width;\r
-if (pBounds != null) {\r
-width = pBounds.x + pBounds.width;\r
-if (pBounds.y >= endY) {\r
-return width;\r
-}} else width = 0;\r
-while (pBounds != null && paths.hasMoreElements ()) {\r
-pBounds = this.getBounds (paths.nextElement (), pBounds);\r
-if (pBounds != null && pBounds.y < endY) {\r
-width = Math.max (width, pBounds.x + pBounds.width);\r
-} else {\r
-pBounds = null;\r
-}}\r
-return width;\r
-}}return 0;\r
-}, "java.awt.Rectangle");\r
-Clazz.overrideMethod (c$, "getRowsForPaths", \r
-function (paths) {\r
-if (paths == null) return null;\r
-var numPaths = paths.length;\r
-var rows =  Clazz.newIntArray (numPaths, 0);\r
-for (var counter = 0; counter < numPaths; counter++) rows[counter] = this.getRowForPath (paths[counter]);\r
-\r
-return rows;\r
-}, "~A");\r
-Clazz.defineMethod (c$, "getNodeDimensions", \r
-function (value, row, depth, expanded, placeIn) {\r
-var nd = this.getNodeDimensions ();\r
-if (nd != null) {\r
-return nd.getNodeDimensions (value, row, depth, expanded, placeIn);\r
-}return null;\r
-}, "~O,~N,~N,~B,java.awt.Rectangle");\r
-Clazz.defineMethod (c$, "isFixedRowHeight", \r
-function () {\r
-return (this.rowHeight > 0);\r
-});\r
-Clazz.pu$h(self.c$);\r
-c$ = Clazz.declareType (javax.swing.tree.AbstractLayoutCache, "NodeDimensions");\r
-c$ = Clazz.p0p ();\r
-});\r
+Clazz.declarePackage ("javax.swing.tree");
+Clazz.load (["javax.swing.tree.RowMapper"], "javax.swing.tree.AbstractLayoutCache", null, function () {
+c$ = Clazz.decorateAsClass (function () {
+this.nodeDimensions = null;
+this.treeModel = null;
+this.treeSelectionModel = null;
+this.rootVisible = false;
+this.rowHeight = 0;
+Clazz.instantialize (this, arguments);
+}, javax.swing.tree, "AbstractLayoutCache", null, javax.swing.tree.RowMapper);
+Clazz.defineMethod (c$, "setNodeDimensions", 
+function (nd) {
+this.nodeDimensions = nd;
+}, "javax.swing.tree.AbstractLayoutCache.NodeDimensions");
+Clazz.defineMethod (c$, "getNodeDimensions", 
+function () {
+return this.nodeDimensions;
+});
+Clazz.defineMethod (c$, "setModel", 
+function (newModel) {
+this.treeModel = newModel;
+}, "javax.swing.tree.TreeModel");
+Clazz.defineMethod (c$, "getModel", 
+function () {
+return this.treeModel;
+});
+Clazz.defineMethod (c$, "setRootVisible", 
+function (rootVisible) {
+this.rootVisible = rootVisible;
+}, "~B");
+Clazz.defineMethod (c$, "isRootVisible", 
+function () {
+return this.rootVisible;
+});
+Clazz.defineMethod (c$, "setRowHeight", 
+function (rowHeight) {
+this.rowHeight = rowHeight;
+}, "~N");
+Clazz.defineMethod (c$, "getRowHeight", 
+function () {
+return this.rowHeight;
+});
+Clazz.defineMethod (c$, "setSelectionModel", 
+function (newLSM) {
+if (this.treeSelectionModel != null) this.treeSelectionModel.setRowMapper (null);
+this.treeSelectionModel = newLSM;
+if (this.treeSelectionModel != null) this.treeSelectionModel.setRowMapper (this);
+}, "javax.swing.tree.TreeSelectionModel");
+Clazz.defineMethod (c$, "getSelectionModel", 
+function () {
+return this.treeSelectionModel;
+});
+Clazz.defineMethod (c$, "getPreferredHeight", 
+function () {
+var rowCount = this.getRowCount ();
+if (rowCount > 0) {
+var bounds = this.getBounds (this.getPathForRow (rowCount - 1), null);
+if (bounds != null) return bounds.y + bounds.height;
+}return 0;
+});
+Clazz.defineMethod (c$, "getPreferredWidth", 
+function (bounds) {
+var rowCount = this.getRowCount ();
+if (rowCount > 0) {
+var firstPath;
+var endY;
+if (bounds == null) {
+firstPath = this.getPathForRow (0);
+endY = 2147483647;
+} else {
+firstPath = this.getPathClosestTo (bounds.x, bounds.y);
+endY = bounds.height + bounds.y;
+}var paths = this.getVisiblePathsFrom (firstPath);
+if (paths != null && paths.hasMoreElements ()) {
+var pBounds = this.getBounds (paths.nextElement (), null);
+var width;
+if (pBounds != null) {
+width = pBounds.x + pBounds.width;
+if (pBounds.y >= endY) {
+return width;
+}} else width = 0;
+while (pBounds != null && paths.hasMoreElements ()) {
+pBounds = this.getBounds (paths.nextElement (), pBounds);
+if (pBounds != null && pBounds.y < endY) {
+width = Math.max (width, pBounds.x + pBounds.width);
+} else {
+pBounds = null;
+}}
+return width;
+}}return 0;
+}, "java.awt.Rectangle");
+Clazz.overrideMethod (c$, "getRowsForPaths", 
+function (paths) {
+if (paths == null) return null;
+var numPaths = paths.length;
+var rows =  Clazz.newIntArray (numPaths, 0);
+for (var counter = 0; counter < numPaths; counter++) rows[counter] = this.getRowForPath (paths[counter]);
+
+return rows;
+}, "~A");
+Clazz.defineMethod (c$, "getNodeDimensions", 
+function (value, row, depth, expanded, placeIn) {
+var nd = this.getNodeDimensions ();
+if (nd != null) {
+return nd.getNodeDimensions (value, row, depth, expanded, placeIn);
+}return null;
+}, "~O,~N,~N,~B,java.awt.Rectangle");
+Clazz.defineMethod (c$, "isFixedRowHeight", 
+function () {
+return (this.rowHeight > 0);
+});
+Clazz.pu$h(self.c$);
+c$ = Clazz.declareType (javax.swing.tree.AbstractLayoutCache, "NodeDimensions");
+c$ = Clazz.p0p ();
+});