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