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

The following are Jave code examples for showing how to use addDisposeListener() 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: JFaceUtils   File:   Source Code and License Vote up 6 votes
protected void constrainShellSize() {
	if (Util.isCocoa()) {
		final Tree tree = getTreeViewer().getTree();
		final FontDescriptor treeFontDescriptor = FontDescriptor.createFrom(JFaceResources.getBannerFont()).setStyle(SWT.NORMAL);
		final Font treeFont = treeFontDescriptor.createFont(tree.getDisplay());
		tree.addDisposeListener(new DisposeListener() {
			public void widgetDisposed(DisposeEvent e) {