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

The following are Jave code examples for showing how to use setFont() 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: cppcheclipse   File: CheckedTreeEditor.java   Source Code and License Vote up 5 votes
/**
 * Returns this field editor's list control.
 * 
 * @param parent
 *            the parent control
 * @return the list control
 */
public Tree createListControl(Composite parent) {
	Tree table = (Tree) getTreeControl();
	if (table == null) {
		listParent = parent;
		treeViewer = new ContainerCheckedTreeViewer(parent, SWT.BORDER | SWT.MULTI
				| SWT.V_SCROLL | SWT.H_SCROLL | SWT.FULL_SELECTION);
		table = treeViewer.getTree();
		table.setFont(parent.getFont());
		treeViewer.addCheckStateListener(this);
	} else {
		checkParent(table, parent);
	}
	return table;
}
 
Example 2
Project: filesync4eclipse   File: TreeListDialogField.java   Source Code and License Vote up 4 votes
protected TreeViewer createTreeViewer(Composite parent) {
    Tree tree = new Tree(parent, getTreeStyle());
    tree.setFont(parent.getFont());
    return new TreeViewer(tree);
}