@Override public final void setVisible(boolean visible) { if (!visible) disposeDeferredCreatedContent(); super.setVisible(visible); }
@Override public void setFocus() { super.setFocus(); if (fFocusControl != null) fFocusControl.setFocus(); }
@Override public void setBackgroundColor(Color background) { super.setBackgroundColor(background); fText.setBackground(background); }
setColor(fShell, foreground, background); fContentComposite.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true)); fContentComposite.setLayout(new FillLayout()); setColor(fContentComposite, foreground, background); createStatusComposite(statusFieldText, toolBarManager, foreground, background); addDisposeListener(e -> handleDispose());
Color foreground= display.getSystemColor(SWT.COLOR_INFO_FOREGROUND); Color background= display.getSystemColor(SWT.COLOR_INFO_BACKGROUND); setColor(fShell, foreground, background); fContentComposite.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true)); fContentComposite.setLayout(new FillLayout()); setColor(fContentComposite, foreground, background); createStatusComposite(statusFieldText, toolBarManager, foreground, background); addDisposeListener(new DisposeListener() { @Override public void widgetDisposed(DisposeEvent e) {
@Override public void setForegroundColor(Color foreground) { super.setForegroundColor(foreground); fBrowser.setForeground(foreground); }
private void createToolBar(ToolBarManager toolBarManager) { final Composite bars= new Composite(fStatusComposite, SWT.NONE); bars.setLayoutData(new GridData(SWT.FILL, SWT.FILL, false, false)); GridLayout layout= new GridLayout(3, false); layout.marginHeight= 0; layout.marginWidth= 0; layout.horizontalSpacing= 0; layout.verticalSpacing= 0; bars.setLayout(layout); fToolBar= toolBarManager.createControl(bars); GridData gd= new GridData(SWT.BEGINNING, SWT.BEGINNING, false, false); fToolBar.setLayoutData(gd); Composite spacer= new Composite(bars, SWT.NONE); gd= new GridData(SWT.FILL, SWT.FILL, true, true); gd.widthHint= 0; gd.heightHint= 0; spacer.setLayoutData(gd); addMoveSupport(spacer); addResizeSupportIfNecessary(bars); }
@Override public Rectangle computeTrim() { return Geometry.add(super.computeTrim(), fText.computeTrim(0, 0, 0, 0)); }
/** * Creates the content of this information control. Subclasses must call * this method at the end of their constructor(s). */ protected final void create() { createContent(fContentComposite); }
@Override public void setForegroundColor(Color foreground) { super.setForegroundColor(foreground); fText.setForeground(foreground); }
private void createToolBar(ToolBarManager toolBarManager) { final Composite bars= new Composite(fStatusComposite, SWT.NONE); bars.setLayoutData(new GridData(SWT.FILL, SWT.FILL, false, false)); GridLayout layout= new GridLayout(3, false); layout.marginHeight= 0; layout.marginWidth= 0; layout.horizontalSpacing= 0; layout.verticalSpacing= 0; bars.setLayout(layout); fToolBar= toolBarManager.createControl(bars); GridData gd= new GridData(SWT.BEGINNING, SWT.BEGINNING, false, false); fToolBar.setLayoutData(gd); Composite spacer= new Composite(bars, SWT.NONE); gd= new GridData(SWT.FILL, SWT.FILL, true, true); gd.widthHint= 0; gd.heightHint= 0; spacer.setLayoutData(gd); addMoveSupport(spacer); addResizeSupportIfNecessary(bars); }
@Override public Rectangle computeTrim() { return Geometry.add(super.computeTrim(), fText.computeTrim(0, 0, 0, 0)); }
/** * Creates the content of this information control. Subclasses must call * this method at the end of their constructor(s). */ protected final void create() { createContent(fContentComposite); }
@Override public final void setVisible(boolean visible) { if (!visible) disposeDeferredCreatedContent(); super.setVisible(visible); }
@Override public void setFocus() { super.setFocus(); fTree.setFocus(); }
@Override public void setBackgroundColor(Color background) { super.setBackgroundColor(background); fText.setBackground(background); }
@Override public void setForegroundColor(Color foreground) { super.setForegroundColor(foreground); fBrowser.setForeground(foreground); }
@Override public Rectangle computeTrim() { Rectangle trim= super.computeTrim(); if (isResizable()) { boolean RTL= (getShell().getStyle() & SWT.RIGHT_TO_LEFT) != 0; if (RTL) { trim.x-= fgScrollBarSize.x; } trim.width+= fgScrollBarSize.x; trim.height+= fgScrollBarSize.y; } return trim; }
@Override public final void setVisible(boolean visible) { if (!visible) disposeDeferredCreatedContent(); super.setVisible(visible); }
@Override public void setFocus() { super.setFocus(); if (fFocusControl != null) fFocusControl.setFocus(); }