01: /*
02: * MyGWT Widget Library
03: * Copyright(c) 2007, MyGWT.
04: * licensing@mygwt.net
05: *
06: * http://mygwt.net/license
07: */
08: package net.mygwt.ui.client.widget.tree;
09:
10: import net.mygwt.ui.client.MyDOM;
11:
12: import com.google.gwt.user.client.DOM;
13:
14: class RootTreeItem extends TreeItem {
15:
16: public RootTreeItem(Tree tree) {
17: setElement(DOM.createDiv());
18: this .tree = tree;
19: }
20:
21: protected TreeItemUI getTreeItemUI() {
22: TreeItemUI ui = new TreeItemUI(this );
23: ui.containerEl = getElement();
24: setData("loaded", "true");
25: MyDOM.setStyleAttribute(ui.containerEl, "padding", "4px");
26: return ui;
27: }
28:
29: // protected void onRender() {
30: // root = true;
31: // ui = new TreeItemUI(this);
32: // ui.containerEl = getElement();
33: // setData("loaded", "true");
34: // MyDOM.setStyleAttribute(ui.containerEl, "padding", "4px");
35: // }
36:
37: // public String getId() {
38: // return "";
39: // }
40:
41: }
|