1 Clazz.declarePackage ("jalview.appletgui");
2 Clazz.load (["awt2swing.Panel", "java.awt.Insets"], "jalview.appletgui.TitledPanel", null, function () {
3 c$ = Clazz.decorateAsClass (function () {
6 Clazz.instantialize (this, arguments);
7 }, jalview.appletgui, "TitledPanel", awt2swing.Panel);
8 Clazz.prepareFields (c$, function () {
9 this.$insets = new java.awt.Insets (10, 10, 10, 10);
11 Clazz.makeConstructor (c$,
15 Clazz.makeConstructor (c$,
17 Clazz.superConstructor (this, jalview.appletgui.TitledPanel, []);
18 this.setTitle (title);
20 Clazz.defineMethod (c$, "getInsets",
24 Clazz.defineMethod (c$, "paintComponent",
26 Clazz.superCall (this, jalview.appletgui.TitledPanel, "paintComponent", [g]);
27 g.setColor (this.getForeground ());
28 g.drawRect (5, 5, this.getWidth () - 10, this.getHeight () - 10);
29 var width = g.getFontMetrics ().stringWidth (this.getTitle ());
30 g.setColor (this.getBackground ());
31 g.fillRect (10, 0, width, 10);
32 g.setColor (this.getForeground ());
33 g.drawString (this.getTitle (), 10, 10);
34 }, "java.awt.Graphics");
35 Clazz.defineMethod (c$, "getTitle",
39 Clazz.defineMethod (c$, "setTitle",