本文整理了Java中org.eclipse.swt.widgets.Tree.setLayout()
方法的一些代码示例,展示了Tree.setLayout()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Tree.setLayout()
方法的具体详情如下:
包路径:org.eclipse.swt.widgets.Tree
类名称:Tree
方法名:setLayout
暂无
代码示例来源:origin: pentaho/pentaho-kettle
private void createSelectionTree() {
// //////////////////////////////////////////////////////////////////////////////////////////////////
//
// Now set up the transformation/job tree
//
selectionTree = new Tree( viewTreeComposite, SWT.SINGLE );
selectionTreeManager = new TreeManager( selectionTree );
selectionTreeManager.addRoot( STRING_TRANSFORMATIONS, Arrays.asList( new DBConnectionFolderProvider(), new
StepsFolderProvider(), new HopsFolderProvider(), new PartitionsFolderProvider(), new SlavesFolderProvider(), new
ClustersFolderProvider() ) );
selectionTreeManager.addRoot( STRING_JOBS, Arrays.asList( new DBConnectionFolderProvider(), new
JobEntriesFolderProvider(), new SlavesFolderProvider() ) );
props.setLook( selectionTree );
selectionTree.setLayout( new FillLayout() );
addDefaultKeyListeners( selectionTree );
selectionTree.addMenuDetectListener( e -> setMenu( selectionTree ) );
selectionTree.addSelectionListener( new SelectionAdapter() {
@Override
public void widgetSelected( SelectionEvent e ) {
showSelection();
}
@Override
public void widgetDefaultSelected( SelectionEvent e ) {
doubleClickedInTree( selectionTree );
}
} );
// Set a listener on the tree
addDragSourceToTree( selectionTree );
}
代码示例来源:origin: org.eclipse.pde/org.eclipse.pde.ui
atree.setLayout(new GridLayout());
GridData gd = new GridData(GridData.FILL_BOTH);
gd.widthHint = 200;
代码示例来源:origin: org.eclipse.pde/org.eclipse.pde.ui
atree.setLayout(new GridLayout());
GridData gd = new GridData(GridData.FILL_BOTH);
atree.setLayoutData(gd);
代码示例来源:origin: stackoverflow.com
tree.setLayout(new FillLayout());
tree.setHeaderVisible(true);
代码示例来源:origin: org.eclipse/org.eclipse.team.ui
/**
* Create a TreeViewer that can be used to display a list of IFile instances.
* This method provides the labels and sorter but does not provide a content provider
*
* @param parent
* @return TableViewer
*/
public TreeViewer createTree(Composite parent) {
Tree tree = new Tree(parent, SWT.H_SCROLL | SWT.V_SCROLL | SWT.MULTI | SWT.FULL_SELECTION);
tree.setHeaderVisible(true);
tree.setLinesVisible(false);
GridData data = new GridData(GridData.FILL_BOTH);
tree.setLayoutData(data);
TableLayout layout = new TableLayout();
tree.setLayout(layout);
this.viewer = new TreeViewer(tree);
createColumns(tree, layout);
viewer.setLabelProvider(new LocalHistoryLabelProvider());
// By default, reverse sort by revision.
// If local filter is on sort by date
HistoryComparator sorter = new HistoryComparator(COL_DATE);
sorter.setReversed(false);
viewer.setComparator(sorter);
return viewer;
}
代码示例来源:origin: twineworks/ruby-for-pentaho-kettle
wSamplesTree.setLayout(new FillLayout());
wSamplesTree.setHeaderVisible(true);
props.setLook(wSamplesTree);
代码示例来源:origin: org.eclipse.platform/org.eclipse.team.ui
/**
* Create a TreeViewer that can be used to display a list of IFile instances.
* This method provides the labels and sorter but does not provide a content provider
*
* @param parent
* @return TableViewer
*/
public TreeViewer createTree(Composite parent) {
Tree tree = new Tree(parent, SWT.H_SCROLL | SWT.V_SCROLL | SWT.MULTI | SWT.FULL_SELECTION);
tree.setHeaderVisible(true);
tree.setLinesVisible(false);
GridData data = new GridData(GridData.FILL_BOTH);
tree.setLayoutData(data);
TableLayout layout = new TableLayout();
tree.setLayout(layout);
this.viewer = new TreeViewer(tree);
createColumns(tree, layout);
viewer.setLabelProvider(new LocalHistoryLabelProvider());
// By default, reverse sort by revision.
// If local filter is on sort by date
HistoryComparator sorter = new HistoryComparator(COL_DATE);
sorter.setReversed(false);
viewer.setComparator(sorter);
return viewer;
}
代码示例来源:origin: org.eclipse.scout.sdk.deps/org.eclipse.ui.ide
viewer.getTree().setLayout(layout);
tree.setLinesVisible(true);
tree.setHeaderVisible(true);
代码示例来源:origin: org.eclipse.equinox.p2/ui
protected Control createDialogArea(Composite parent) {
Composite composite = (Composite) super.createDialogArea(parent);
certificateChainViewer = new TreeViewer(composite, SWT.BORDER);
GridLayout layout = new GridLayout();
certificateChainViewer.getTree().setLayout(layout);
GridData data = new GridData(GridData.FILL_BOTH);
data.grabExcessHorizontalSpace = true;
certificateChainViewer.getTree().setLayoutData(data);
certificateChainViewer.setAutoExpandLevel(AbstractTreeViewer.ALL_LEVELS);
certificateChainViewer.setContentProvider(new TreeNodeContentProvider());
certificateChainViewer.setLabelProvider(new CertificateLabelProvider());
certificateChainViewer.addSelectionChangedListener(getChainSelectionListener());
Object input = getViewer().getInput();
if (input instanceof Object[]) {
ISelection selection = null;
Object[] nodes = (Object[]) input;
if (nodes.length > 0) {
selection = new StructuredSelection(nodes[0]);
certificateChainViewer.setInput(new TreeNode[] {(TreeNode) nodes[0]});
selectedCertificate = nodes[0];
}
getViewer().setSelection(selection);
}
getViewer().addDoubleClickListener(getDoubleClickListener());
getViewer().addSelectionChangedListener(getParentSelectionListener());
createButtons(composite);
return composite;
}
代码示例来源:origin: org.eclipse.neoscada.hmi/org.eclipse.scada.da.ui.client.dataitem.details
this.viewer.getTree ().setLayout ( tableLayout );
代码示例来源:origin: org.eclipse.pde/org.eclipse.pde.ui
tree.setLayout(new GridLayout());
GridData gd = new GridData(GridData.FILL_BOTH);
gd.widthHint = 200;
代码示例来源:origin: de.dentrassi.eclipse.neoscada.hmi/org.eclipse.scada.da.ui.client.dataitem.details
this.viewer.getTree ().setLayout ( tableLayout );
代码示例来源:origin: org.eclipse/org.eclipse.wst.xsd.ui
extensionTreeViewer.getTree().setLayout(gridLayout);
gridData = new GridData();
gridData.grabExcessHorizontalSpace = true;
代码示例来源:origin: org.eclipse.neoscada.hmi/org.eclipse.scada.da.ui.widgets
this.viewer.getTree ().setLayout ( tableLayout );
代码示例来源:origin: org.eclipse.egit/ui
viewer = new CheckboxTreeViewer(tree);
tree.setHeaderVisible(true);
tree.setLayout(new GridLayout());
tree.setLayoutData(GridDataFactory.fillDefaults().grab(true, true)
.span(3, 1).create());
内容来源于网络,如有侵权,请联系作者删除!