本文整理了Java中org.eclipse.swt.widgets.Tree.getParent()
方法的一些代码示例,展示了Tree.getParent()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Tree.getParent()
方法的具体详情如下:
包路径:org.eclipse.swt.widgets.Tree
类名称:Tree
方法名:getParent
[英]Returns the receiver's parent item, which must be a TreeItem
or null when the receiver is a root.
[中]返回接收者的父项,当接收者是根时,父项必须是TreeItem
或null。
代码示例来源:origin: org.eclipse.platform/org.eclipse.compare
/**
* Creates a new viewer for the given SWT tree control with the specified configuration.
*
* @param tree the tree control
* @param configuration the configuration for this viewer
*/
public StructureDiffViewer(Tree tree, CompareConfiguration configuration) {
super(tree, configuration);
Composite c= tree.getParent();
if (c instanceof CompareViewerSwitchingPane)
fParent= (CompareViewerSwitchingPane) c;
initialize();
}
代码示例来源:origin: org.eclipse/org.eclipse.compare
/**
* Creates a new viewer for the given SWT tree control with the specified configuration.
*
* @param tree the tree control
* @param configuration the configuration for this viewer
*/
public StructureDiffViewer(Tree tree, CompareConfiguration configuration) {
super(tree, configuration);
Composite c= tree.getParent();
if (c instanceof CompareViewerSwitchingPane)
fParent= (CompareViewerSwitchingPane) c;
initialize();
}
代码示例来源:origin: org.eclipse.rap/org.eclipse.rap.jface
public void run() {
tree.update();
tree.getParent().layout();
}
代码示例来源:origin: org.eclipse.scout.sdk.deps/org.eclipse.jface
private void update(final Tree tree) {
tree.getDisplay().asyncExec(() -> {
if (!tree.isDisposed()) {
tree.update();
tree.getParent().layout();
}
});
}
代码示例来源:origin: org.eclipse.platform/org.eclipse.jface
private void update(final Tree tree) {
tree.getDisplay().asyncExec(() -> {
if (!tree.isDisposed()) {
tree.update();
tree.getParent().layout();
}
});
}
代码示例来源:origin: org.eclipse.pde/org.eclipse.pde.ui
@Override
protected TreeViewer doCreateTreeViewer(Composite parent, int style) {
TreeViewer viewer = super.doCreateTreeViewer(parent, toolkit.getBorderStyle() | style);
toolkit.paintBordersFor(viewer.getTree().getParent());
return viewer;
}
代码示例来源:origin: org.eclipse.mylyn.builds/ui
/**
* Initializes automatic resize of the tree control columns. The size of these will be adjusted when a node is
* expanded or collapsed and when the tree changes size.
*
* @param tree
* the tree to resize
*/
private void installAutomaticResize(final Tree tree) {
Listener listener = new Listener() {
public void handleEvent(Event e) {
packColumnsAsync(tree);
}
};
// Automatically resize columns when we expand tree nodes.
tree.addListener(SWT.Collapse, listener);
tree.addListener(SWT.Expand, listener);
tree.getParent().addListener(SWT.Resize, listener);
}
代码示例来源:origin: org.eclipse.rap/org.eclipse.rap.jface
/**
* {@inheritDoc}
*
* @since 1.3
*/
protected void updateColumnData(Widget column) {
TreeColumn tColumn = (TreeColumn) column;
Tree t = tColumn.getParent();
if( ! IS_GTK || t.getColumn(t.getColumnCount()-1) != tColumn ){
tColumn.setData(LAYOUT_DATA,new ColumnPixelData(tColumn.getWidth()));
layout(t.getParent(), true);
}
}
}
代码示例来源:origin: org.eclipse.scout.sdk.deps/org.eclipse.jface
/**
* {@inheritDoc}
*
* @since 3.5
*/
@Override
protected void updateColumnData(Widget column) {
TreeColumn tColumn = (TreeColumn) column;
Tree t = tColumn.getParent();
if( ! IS_GTK || t.getColumn(t.getColumnCount()-1) != tColumn ){
tColumn.setData(LAYOUT_DATA,new ColumnPixelData(tColumn.getWidth()));
layout(t.getParent(), true);
}
}
}
代码示例来源:origin: org.eclipse.platform/org.eclipse.jface
/**
* {@inheritDoc}
*
* @since 3.5
*/
@Override
protected void updateColumnData(Widget column) {
TreeColumn tColumn = (TreeColumn) column;
Tree t = tColumn.getParent();
if( ! IS_GTK || t.getColumn(t.getColumnCount()-1) != tColumn ){
tColumn.setData(LAYOUT_DATA,new ColumnPixelData(tColumn.getWidth()));
layout(t.getParent(), true);
}
}
}
代码示例来源:origin: org.eclipse.mylyn.commons/workbench
if (!customized) {
Color parentBackground = getViewer().getTree().getParent().getBackground();
double GRADIENT_TOP;// = 1.05;// 1.02;
double GRADIENT_BOTTOM;// = .995;// 1.035;
categoryGradientStart = new Color(Display.getDefault(), red, green, blue);
} catch (Exception e) {
categoryGradientStart = getViewer().getTree().getParent().getBackground();
categoryGradientEnd = new Color(Display.getDefault(), red, green, blue);
} catch (Exception e) {
categoryGradientStart = getViewer().getTree().getParent().getBackground();
代码示例来源:origin: org.eclipse.platform/org.eclipse.ui.trace
getViewer().addDoubleClickListener(new TracingDoubleClickListener());
Composite treeViewerComposite = getViewerTree().getParent();
TreeColumnLayout treeViewerCompositeLayout = new TreeColumnLayout();
treeViewerComposite.setLayout(treeViewerCompositeLayout);
代码示例来源:origin: org.eclipse.ui/trace
getViewer().addDoubleClickListener(new TracingDoubleClickListener());
Composite treeViewerComposite = getViewerTree().getParent();
TreeColumnLayout treeViewerCompositeLayout = new TreeColumnLayout();
treeViewerComposite.setLayout(treeViewerCompositeLayout);
代码示例来源:origin: org.eclipse.rap/org.eclipse.rap.rwt
RemoteObject remoteObject = createRemoteObject( tree, TYPE );
remoteObject.setHandler( new TreeOperationHandler( tree ) );
remoteObject.set( "parent", getId( tree.getParent() ) );
remoteObject.set( "style", createJsonArray( getStyles( tree, ALLOWED_STYLES ) ) );
remoteObject.set( "appearance", "tree" );
代码示例来源:origin: org.eclipse.egit/ui
this.filePaths = pathList;
Composite main = getTree().getParent();
内容来源于网络,如有侵权,请联系作者删除!