svn changeset:3668/svn branch:trunk
private boolean open;
+ private Icon icon;
+
public TreeNode() {
constructDom();
sinkEvents(Event.ONCLICK);
if (uidl.getBooleanAttribute("selected")) {
setSelected(true);
}
+
+ if (uidl.hasAttribute("icon")) {
+ if (icon == null) {
+ icon = new Icon(client);
+ DOM.insertBefore(nodeCaptionDiv, icon.getElement(),
+ nodeCaptionSpan);
+ }
+ icon.setUri(uidl.getStringAttribute("icon"));
+ } else {
+ if (icon != null) {
+ DOM.removeChild(nodeCaptionDiv, icon.getElement());
+ icon = null;
+ }
+ }
}
private void setState(boolean state, boolean notifyServer) {