X-Git-Url: http://source.jalview.org/gitweb/?p=jalviewjs.git;a=blobdiff_plain;f=site%2Fj2s%2Fjava%2Fawt%2FGraphics2D.js;h=4d1d3158c8bb0e354e376799b6e978ed9a2b7582;hp=0042dc3a34e99f4e76b662cbbbabc7181df56162;hb=b9b7a352eee79b7764c3b09c9d19663075061d8c;hpb=7301a2415adab88038b291fc54caeeb3a5a47a44 diff --git a/site/j2s/java/awt/Graphics2D.js b/site/j2s/java/awt/Graphics2D.js index 0042dc3..4d1d315 100644 --- a/site/j2s/java/awt/Graphics2D.js +++ b/site/j2s/java/awt/Graphics2D.js @@ -1,41 +1,41 @@ -Clazz.declarePackage ("java.awt"); -Clazz.load (["java.awt.Graphics"], "java.awt.Graphics2D", null, function () { -c$ = Clazz.declareType (java.awt, "Graphics2D", java.awt.Graphics); -Clazz.makeConstructor (c$, -function () { -Clazz.superConstructor (this, java.awt.Graphics2D, []); -}); -Clazz.overrideMethod (c$, "draw3DRect", -function (x, y, width, height, raised) { -var p = this.getPaint (); -var c = this.getColor (); -var brighter = c.brighter (); -var darker = c.darker (); -this.setColor (raised ? brighter : darker); -this.fillRect (x, y, 1, height + 1); -this.fillRect (x + 1, y, width - 1, 1); -this.setColor (raised ? darker : brighter); -this.fillRect (x + 1, y + height, width, 1); -this.fillRect (x + width, y, 1, height); -this.setPaint (p); -}, "~N,~N,~N,~N,~B"); -Clazz.overrideMethod (c$, "fill3DRect", -function (x, y, width, height, raised) { -var p = this.getPaint (); -var c = this.getColor (); -var brighter = c.brighter (); -var darker = c.darker (); -if (!raised) { -this.setColor (darker); -} else if (p !== c) { -this.setColor (c); -}this.fillRect (x + 1, y + 1, width - 2, height - 2); -this.setColor (raised ? brighter : darker); -this.fillRect (x, y, 1, height); -this.fillRect (x + 1, y, width - 2, 1); -this.setColor (raised ? darker : brighter); -this.fillRect (x + 1, y + height - 1, width - 1, 1); -this.fillRect (x + width - 1, y, 1, height - 1); -this.setPaint (p); -}, "~N,~N,~N,~N,~B"); -}); +Clazz.declarePackage ("java.awt"); +Clazz.load (["java.awt.Graphics"], "java.awt.Graphics2D", null, function () { +c$ = Clazz.declareType (java.awt, "Graphics2D", java.awt.Graphics); +Clazz.makeConstructor (c$, +function () { +Clazz.superConstructor (this, java.awt.Graphics2D, []); +}); +Clazz.overrideMethod (c$, "draw3DRect", +function (x, y, width, height, raised) { +var p = this.getPaint (); +var c = this.getColor (); +var brighter = c.brighter (); +var darker = c.darker (); +this.setColor (raised ? brighter : darker); +this.fillRect (x, y, 1, height + 1); +this.fillRect (x + 1, y, width - 1, 1); +this.setColor (raised ? darker : brighter); +this.fillRect (x + 1, y + height, width, 1); +this.fillRect (x + width, y, 1, height); +this.setPaint (p); +}, "~N,~N,~N,~N,~B"); +Clazz.overrideMethod (c$, "fill3DRect", +function (x, y, width, height, raised) { +var p = this.getPaint (); +var c = this.getColor (); +var brighter = c.brighter (); +var darker = c.darker (); +if (!raised) { +this.setColor (darker); +} else if (p !== c) { +this.setColor (c); +}this.fillRect (x + 1, y + 1, width - 2, height - 2); +this.setColor (raised ? brighter : darker); +this.fillRect (x, y, 1, height); +this.fillRect (x + 1, y, width - 2, 1); +this.setColor (raised ? darker : brighter); +this.fillRect (x + 1, y + height - 1, width - 1, 1); +this.fillRect (x + width - 1, y, 1, height - 1); +this.setPaint (p); +}, "~N,~N,~N,~N,~B"); +});