X-Git-Url: http://source.jalview.org/gitweb/?p=jalviewjs.git;a=blobdiff_plain;f=site%2Fj2s%2Fjavax%2Fswing%2Fborder%2FCompoundBorder.js;fp=site%2Fj2s%2Fjavax%2Fswing%2Fborder%2FCompoundBorder.js;h=06b6c33def70ccdcc7bd50359f91f449e2691b74;hp=dc73b65ac8dd0c9858a8461d2384e4879f924af2;hb=b9b7a352eee79b7764c3b09c9d19663075061d8c;hpb=7301a2415adab88038b291fc54caeeb3a5a47a44 diff --git a/site/j2s/javax/swing/border/CompoundBorder.js b/site/j2s/javax/swing/border/CompoundBorder.js index dc73b65..06b6c33 100644 --- a/site/j2s/javax/swing/border/CompoundBorder.js +++ b/site/j2s/javax/swing/border/CompoundBorder.js @@ -1,74 +1,74 @@ -Clazz.declarePackage ("javax.swing.border"); -Clazz.load (["javax.swing.border.AbstractBorder"], "javax.swing.border.CompoundBorder", ["java.awt.Insets"], function () { -c$ = Clazz.decorateAsClass (function () { -this.outsideBorder = null; -this.insideBorder = null; -Clazz.instantialize (this, arguments); -}, javax.swing.border, "CompoundBorder", javax.swing.border.AbstractBorder); -Clazz.makeConstructor (c$, -function () { -Clazz.superConstructor (this, javax.swing.border.CompoundBorder, []); -this.outsideBorder = null; -this.insideBorder = null; -}); -Clazz.makeConstructor (c$, -function (outsideBorder, insideBorder) { -Clazz.superConstructor (this, javax.swing.border.CompoundBorder, []); -this.outsideBorder = outsideBorder; -this.insideBorder = insideBorder; -}, "javax.swing.border.Border,javax.swing.border.Border"); -Clazz.overrideMethod (c$, "isBorderOpaque", -function () { -return (this.outsideBorder == null || this.outsideBorder.isBorderOpaque ()) && (this.insideBorder == null || this.insideBorder.isBorderOpaque ()); -}); -Clazz.overrideMethod (c$, "paintBorder", -function (c, g, x, y, width, height) { -var nextInsets; -var px; -var py; -var pw; -var ph; -px = x; -py = y; -pw = width; -ph = height; -if (this.outsideBorder != null) { -this.outsideBorder.paintBorder (c, g, px, py, pw, ph); -nextInsets = this.outsideBorder.getBorderInsets (c); -px += nextInsets.left; -py += nextInsets.top; -pw = pw - nextInsets.right - nextInsets.left; -ph = ph - nextInsets.bottom - nextInsets.top; -}if (this.insideBorder != null) this.insideBorder.paintBorder (c, g, px, py, pw, ph); -}, "java.awt.Component,java.awt.Graphics,~N,~N,~N,~N"); -Clazz.defineMethod (c$, "getBorderInsets", -function (c, insets) { -var nextInsets; -insets.top = insets.left = insets.right = insets.bottom = 0; -if (this.outsideBorder != null) { -nextInsets = this.outsideBorder.getBorderInsets (c); -insets.top += nextInsets.top; -insets.left += nextInsets.left; -insets.right += nextInsets.right; -insets.bottom += nextInsets.bottom; -}if (this.insideBorder != null) { -nextInsets = this.insideBorder.getBorderInsets (c); -insets.top += nextInsets.top; -insets.left += nextInsets.left; -insets.right += nextInsets.right; -insets.bottom += nextInsets.bottom; -}return insets; -}, "java.awt.Component,java.awt.Insets"); -Clazz.defineMethod (c$, "getBorderInsets", -function (c) { -return this.getBorderInsets (c, new java.awt.Insets (0, 0, 0, 0)); -}, "java.awt.Component"); -Clazz.defineMethod (c$, "getOutsideBorder", -function () { -return this.outsideBorder; -}); -Clazz.defineMethod (c$, "getInsideBorder", -function () { -return this.insideBorder; -}); -}); +Clazz.declarePackage ("javax.swing.border"); +Clazz.load (["javax.swing.border.AbstractBorder"], "javax.swing.border.CompoundBorder", ["java.awt.Insets"], function () { +c$ = Clazz.decorateAsClass (function () { +this.outsideBorder = null; +this.insideBorder = null; +Clazz.instantialize (this, arguments); +}, javax.swing.border, "CompoundBorder", javax.swing.border.AbstractBorder); +Clazz.makeConstructor (c$, +function () { +Clazz.superConstructor (this, javax.swing.border.CompoundBorder, []); +this.outsideBorder = null; +this.insideBorder = null; +}); +Clazz.makeConstructor (c$, +function (outsideBorder, insideBorder) { +Clazz.superConstructor (this, javax.swing.border.CompoundBorder, []); +this.outsideBorder = outsideBorder; +this.insideBorder = insideBorder; +}, "javax.swing.border.Border,javax.swing.border.Border"); +Clazz.overrideMethod (c$, "isBorderOpaque", +function () { +return (this.outsideBorder == null || this.outsideBorder.isBorderOpaque ()) && (this.insideBorder == null || this.insideBorder.isBorderOpaque ()); +}); +Clazz.overrideMethod (c$, "paintBorder", +function (c, g, x, y, width, height) { +var nextInsets; +var px; +var py; +var pw; +var ph; +px = x; +py = y; +pw = width; +ph = height; +if (this.outsideBorder != null) { +this.outsideBorder.paintBorder (c, g, px, py, pw, ph); +nextInsets = this.outsideBorder.getBorderInsets (c); +px += nextInsets.left; +py += nextInsets.top; +pw = pw - nextInsets.right - nextInsets.left; +ph = ph - nextInsets.bottom - nextInsets.top; +}if (this.insideBorder != null) this.insideBorder.paintBorder (c, g, px, py, pw, ph); +}, "java.awt.Component,java.awt.Graphics,~N,~N,~N,~N"); +Clazz.defineMethod (c$, "getBorderInsets", +function (c, insets) { +var nextInsets; +insets.top = insets.left = insets.right = insets.bottom = 0; +if (this.outsideBorder != null) { +nextInsets = this.outsideBorder.getBorderInsets (c); +insets.top += nextInsets.top; +insets.left += nextInsets.left; +insets.right += nextInsets.right; +insets.bottom += nextInsets.bottom; +}if (this.insideBorder != null) { +nextInsets = this.insideBorder.getBorderInsets (c); +insets.top += nextInsets.top; +insets.left += nextInsets.left; +insets.right += nextInsets.right; +insets.bottom += nextInsets.bottom; +}return insets; +}, "java.awt.Component,java.awt.Insets"); +Clazz.defineMethod (c$, "getBorderInsets", +function (c) { +return this.getBorderInsets (c, new java.awt.Insets (0, 0, 0, 0)); +}, "java.awt.Component"); +Clazz.defineMethod (c$, "getOutsideBorder", +function () { +return this.outsideBorder; +}); +Clazz.defineMethod (c$, "getInsideBorder", +function () { +return this.insideBorder; +}); +});