Mega Code Archive

 
Categories / Java Tutorial / SWT
 

Trees

SWT uses two classes, Tree and TreeItem, to implement tree controls. Creating Trees public Tree(Composite parent, int style) Trees can allow either a single selection or multiple selections. Tree Styles StyleDescription SWT.SINGLEAllows only one item in the tree to be selected at a time. This is the default. SWT.MULTIAllows multiple items in the tree to be selected at the same time. SWT.CHECKDisplays a checkbox to the left of each of the root items in the tree.