X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=site%2Fj2s%2Fswingjs%2Fplaf%2FJSMenuUI.js;fp=site%2Fj2s%2Fswingjs%2Fplaf%2FJSMenuUI.js;h=fd37c78994749a2b56969d67037b1e604e477e73;hb=4231d40261fef32ce4570a6bbad0d35df44e8baf;hp=0000000000000000000000000000000000000000;hpb=c07eb2c5794833bd0241000d6844d783fe10cb82;p=jalview.git diff --git a/site/j2s/swingjs/plaf/JSMenuUI.js b/site/j2s/swingjs/plaf/JSMenuUI.js new file mode 100644 index 0000000..fd37c78 --- /dev/null +++ b/site/j2s/swingjs/plaf/JSMenuUI.js @@ -0,0 +1,30 @@ +Clazz.declarePackage ("swingjs.plaf"); +Clazz.load (["swingjs.plaf.JSComponentUI"], "swingjs.plaf.JSMenuUI", ["java.awt.Dimension", "javax.swing.LookAndFeel"], function () { +c$ = Clazz.declareType (swingjs.plaf, "JSMenuUI", swingjs.plaf.JSComponentUI); +Clazz.makeConstructor (c$, +function () { +Clazz.superConstructor (this, swingjs.plaf.JSMenuUI, []); +this.isContainer = true; +this.setDoc (); +}); +Clazz.overrideMethod (c$, "getDOMObject", +function () { +if (this.domNode == null) this.domNode = this.createDOMObject ("select", this.id, []); +return this.domNode; +}); +Clazz.overrideMethod (c$, "setHTMLSize", +function (obj, addCSS) { +return new java.awt.Dimension (this.c.getWidth (), this.c.getHeight ()); +}, "swingjs.api.DOMNode,~B"); +Clazz.defineMethod (c$, "getPreferredSize", +function (c) { +return null; +}, "javax.swing.JComponent"); +Clazz.overrideMethod (c$, "installJSUI", +function () { +javax.swing.LookAndFeel.installColorsAndFont (this.c, "Menu.background", "Menu.foreground", "Menu.font"); +}); +Clazz.overrideMethod (c$, "uninstallJSUI", +function () { +}); +});