Permalink
Browse files

Remove expand/collapse listener which we don't use.

  • Loading branch information...
1 parent 6b6c606 commit 2e656e32d4cd258c1353b7310c471019f249b4b2 @ystrot committed Feb 27, 2012
View
24 ...om.xored.glance.ui.controls/src/com/xored/glance/ui/controls/tree/TreeControlContent.java
@@ -18,31 +18,25 @@
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.swt.SWT;
-import org.eclipse.swt.events.TreeEvent;
-import org.eclipse.swt.events.TreeListener;
import org.eclipse.swt.widgets.Display;
import org.eclipse.swt.widgets.Event;
import org.eclipse.swt.widgets.Tree;
import org.eclipse.swt.widgets.TreeItem;
import com.xored.glance.ui.sources.ConfigurationManager;
-public class TreeControlContent extends TreeContent implements TreeListener {
+public class TreeControlContent extends TreeContent {
private Tree tree;
private final Map<TreeCell, TreeItemContent> cellToContent = new HashMap<TreeCell, TreeItemContent>();
public TreeControlContent(Tree tree) {
this.tree = tree;
- tree.addTreeListener(this);
collectCells(this, tree.getItems());
}
@Override
public void dispose() {
- if (tree != null && !tree.isDisposed()) {
- tree.removeTreeListener(this);
- }
tree = null;
}
@@ -182,22 +176,6 @@ private void collectCells(TreeNode node, TreeItem[] items) {
}
}
- public void treeExpanded(TreeEvent event) {
- // if (event.item instanceof TreeItem) {
- // TreeItem item = (TreeItem) event.item;
- // TreeItemContent content = getContent(item);
- // collectCells(content.getNode(), item.getItems());
- // }
- }
-
- public void treeCollapsed(TreeEvent event) {
- // if (event.item instanceof TreeItem) {
- // TreeItemContent content = getContent((TreeItem) event.item);
- // TreeNode node = content.getNode();
- // node.remove(node.getChildren());
- // }
- }
-
private TreeItemContent getContent(TreeItem item) {
return cellToContent.get(new TreeCell(item, 0));
}

0 comments on commit 2e656e3

Please sign in to comment.