Java Code Examples for org.eclipse.swt.widgets.Tree.removeAll()

The following are Jave code examples for showing how to use removeAll() of the org.eclipse.swt.widgets.Tree class. You can vote up the examples you like. Your votes will be used in our system to get more good examples.
Example 1
Project: areca-backup-release-mirror   File: ArchiveExplorer.java   Source Code and License Vote up 5 votes
private void refreshNode(TreeItem item, TraceEntry entry, Tree tree) 
throws ApplicationException {
	// Get data to display
	List entries;
	if (logicalView) {
		entries = this.medium.getLogicalView(context, entry.getKey(), aggregated);
	} else {
		entries = this.medium.getEntries(context, entry.getKey(), fromDate);
	}

	// Remove existing items
	if (item != null) {
		item.removeAll();
	}
	if (tree != null) {
		tree.removeAll();
	}

	// Add new items
	Iterator iter = entries.iterator();
	while (iter.hasNext()) {
		TreeItem chld;
		if (tree == null) {
			chld = new TreeItem(item, ITEM_STYLE);
		} else {
			chld = new TreeItem(tree, ITEM_STYLE);
		}
		chld.setData(iter.next());
		configure(chld);
	}
}