super.uninstall();
}
public int getPreferredWidth(int height) {
TreeView treeView = (TreeView)getComponent();
TreeView.NodeRenderer nodeRenderer = treeView.getNodeRenderer();
int preferredWidth = 0;
for (int i = 0, n = visibleNodes.getLength(); i < n; i++) {
NodeInfo nodeInfo = visibleNodes.get(i);
int nodeWidth = (nodeInfo.depth - 1) * (indent + spacing);
nodeRenderer.render(nodeInfo.data, treeView, false, false,
TreeView.NodeCheckState.UNCHECKED, false, false);
nodeWidth += nodeRenderer.getPreferredWidth(-1);
preferredWidth = Math.max(preferredWidth, nodeWidth);
}
if (showBranchControls) {
preferredWidth += indent + spacing;
}
if (treeView.getCheckmarksEnabled()) {
preferredWidth += Math.max(CHECKBOX.getWidth(), indent) + spacing;
}
return preferredWidth;
}