/** * 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(); }
/** * 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(); }
public void run() { tree.update(); tree.getParent().layout(); }
private void update(final Tree tree) { tree.getDisplay().asyncExec(() -> { if (!tree.isDisposed()) { tree.update(); tree.getParent().layout(); } }); }
private void update(final Tree tree) { tree.getDisplay().asyncExec(() -> { if (!tree.isDisposed()) { tree.update(); tree.getParent().layout(); } }); }
@Override protected TreeViewer doCreateTreeViewer(Composite parent, int style) { TreeViewer viewer = super.doCreateTreeViewer(parent, toolkit.getBorderStyle() | style); toolkit.paintBordersFor(viewer.getTree().getParent()); return viewer; }
/** * 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); }
/** * {@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); } } }
/** * {@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); } } }
/** * {@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); } } }
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();
getViewer().addDoubleClickListener(new TracingDoubleClickListener()); Composite treeViewerComposite = getViewerTree().getParent(); TreeColumnLayout treeViewerCompositeLayout = new TreeColumnLayout(); treeViewerComposite.setLayout(treeViewerCompositeLayout);
getViewer().addDoubleClickListener(new TracingDoubleClickListener()); Composite treeViewerComposite = getViewerTree().getParent(); TreeColumnLayout treeViewerCompositeLayout = new TreeColumnLayout(); treeViewerComposite.setLayout(treeViewerCompositeLayout);
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" );
this.filePaths = pathList; Composite main = getTree().getParent();