1 Clazz.declarePackage ("swingjs.plaf");
2 Clazz.load (["swingjs.plaf.JSComponentUI"], "swingjs.plaf.JSScrollPaneUI", ["swingjs.JSToolkit", "swingjs.api.DOMNode"], function () {
3 c$ = Clazz.decorateAsClass (function () {
4 this.scrolledComponent = null;
5 this.scrollpane = null;
7 this.scrolledUI = null;
8 Clazz.instantialize (this, arguments);
9 }, swingjs.plaf, "JSScrollPaneUI", swingjs.plaf.JSComponentUI);
10 Clazz.overrideMethod (c$, "getDOMObject",
12 this.isContainer = true;
13 this.scrollpane = this.c;
14 if (this.domNode == null) {
15 this.domNode = this.createDOMObject ("div", this.id, []);
16 }var v = this.scrollpane.getViewport ();
19 System.out.println ("JSScrollPaneUI v=" + v);
22 sc = v.getComponent (0);
24 if (Clazz.exceptionOf (e, Exception)) {
29 if (sc != null && sc !== this.scrolledComponent) {
30 this.scrolledComponent = sc;
31 this.scrolledUI = swingjs.JSToolkit.getUI (sc, false);
32 this.scrollNode = this.scrolledUI.outerNode;
33 if (this.scrollNode == null) this.scrollNode = this.scrolledUI.setHTMLElement ();
34 swingjs.api.DOMNode.setSize (this.scrollNode, this.c.getWidth (), this.c.getHeight ());
35 this.scrolledUI.scrollerNode = this;
36 this.components = Clazz.newArray (-1, [this.scrolledComponent]);
37 }}return this.domNode;
39 Clazz.overrideMethod (c$, "installJSUI",
42 Clazz.overrideMethod (c$, "uninstallJSUI",