swtToolbar.setBackground( GUIResource.getInstance().getColorDemoGray() ); swtToolbar.pack();
toolbarLeft.setLayoutData( fdToolbarLeft ); toolbarLeft.setCursor( cursorEnabled ); toolbarLeft.setBackground( toolbarLeft.getParent().getBackground() ); toolbarRight.setLayoutData( fdToolbarRight ); toolbarRight.setCursor( cursorEnabled ); toolbarRight.setBackground( toolbarRight.getParent().getBackground() );
swtToolbar.setBackground( GUIResource.getInstance().getColorDemoGray() ); swtToolbar.pack();
/** * Set the background of all widgets to the supplied color. * * @param color */ private void setAllBackgrounds(Color color) { setBackground(color); progressLabel.setBackground(color); actionBar.setBackground(color); jobImageLabel.setBackground(color); Iterator<Link> taskEntryIterator = taskEntries.iterator(); while (taskEntryIterator.hasNext()) { taskEntryIterator.next().setBackground(color); } }
private void internalSetBackground(Color bg) { titleRegion.setBackground(bg); if (messageRegion != null) messageRegion.setBackground(bg); if (toolBarManager != null) toolBarManager.getControl().setBackground(bg); putColor(COLOR_BASE_BG, bg); }
private void internalSetBackground(Color bg) { titleRegion.setBackground(bg); if (messageRegion != null) messageRegion.setBackground(bg); if (toolBarManager != null) toolBarManager.getControl().setBackground(bg); putColor(COLOR_BASE_BG, bg); }
/** * Set the background for the widgets that support the filter text area. * * @param background * background <code>Color</code> to set */ @Override public void setBackground(Color background) { super.setBackground(background); if (filterComposite != null && (!useNewLook || useNativeSearchField(filterComposite))) { filterComposite.setBackground(background); } if (filterToolBar != null && filterToolBar.getControl() != null) { filterToolBar.getControl().setBackground(background); } }
@Override public Control createEmptyWindowContents(Composite parent) { final IWorkbenchWindow window = getWindowConfigurer().getWindow(); Composite composite = new Composite(parent, SWT.NONE); composite.setLayout(new GridLayout(2, false)); Display display = composite.getDisplay(); Color bgCol = display .getSystemColor(SWT.COLOR_TITLE_INACTIVE_BACKGROUND); composite.setBackground(bgCol); Label label = new Label(composite, SWT.WRAP); label.setForeground(display .getSystemColor(SWT.COLOR_TITLE_INACTIVE_FOREGROUND)); label.setBackground(bgCol); label.setFont(JFaceResources.getFontRegistry().getBold( JFaceResources.DEFAULT_FONT)); String msg = IDEWorkbenchMessages.IDEWorkbenchAdvisor_noPerspective; label.setText(msg); ToolBarManager toolBarManager = new ToolBarManager(); // TODO: should obtain the open perspective action from ActionFactory openPerspectiveAction = ActionFactory.OPEN_PERSPECTIVE_DIALOG .create(window); toolBarManager.add(openPerspectiveAction); ToolBar toolBar = toolBarManager.createControl(composite); toolBar.setBackground(bgCol); return composite; } @Override
if ( chevron == null ) { chevron = new ToolBar( parent, SWT.FLAT | SWT.NO_FOCUS ); chevron.setBackground( new Color( display, 255, 0, 0 ) ); ToolItem toolItem = new ToolItem( chevron, SWT.PUSH ); toolItem.addListener( SWT.Selection, new Listener() { chevron.setBackground( parent.getBackground() ); chevron.setBounds( parent.fixRectangle( itemBounds.x + width - CHEVRON_LEFT_MARGIN - CHEVRON_IMAGE_WIDTH
/** * Returns the tool bar manager that is used to manage tool items in the * form's title area. * * @return form tool bar manager */ public IToolBarManager getToolBarManager() { if (toolBarManager == null) { toolBarManager = new ToolBarManager(SWT.FLAT); ToolBar toolbar = toolBarManager.createControl(this); toolbar.setBackground(getBackground()); toolbar.setForeground(getForeground()); toolbar.setCursor(FormsResources.getHandCursor()); addDisposeListener(new DisposeListener() { @Override public void widgetDisposed(DisposeEvent e) { if (toolBarManager != null) { toolBarManager.dispose(); toolBarManager = null; } } }); } return toolBarManager; }
arrowImage = image; chevron.setBackground (parent.getBackground()); chevron.setBounds (parent.fixRectangle ( itemBounds.x + width - CHEVRON_LEFT_MARGIN - CHEVRON_IMAGE_WIDTH - CHEVRON_HORIZONTAL_TRIM,
/** * Returns the tool bar manager that is used to manage tool items in the * form's title area. * * @return form tool bar manager */ public IToolBarManager getToolBarManager() { if (toolBarManager == null) { toolBarManager = new ToolBarManager(SWT.FLAT); ToolBar toolbar = toolBarManager.createControl(this); toolbar.setBackground(getBackground()); toolbar.setForeground(getForeground()); toolbar.setCursor(FormsResources.getHandCursor()); addDisposeListener(e -> { if (toolBarManager != null) { toolBarManager.dispose(); toolBarManager.removeAll(); toolBarManager = null; } }); } return toolBarManager; }
arrowImage = image; chevron.setBackground (parent.getBackground()); chevron.setBounds (parent.fixRectangle ( itemBounds.x + width - CHEVRON_LEFT_MARGIN - CHEVRON_IMAGE_WIDTH - CHEVRON_HORIZONTAL_TRIM,
arrowImage = image; chevron.setBackground (parent.getBackground()); chevron.setBounds (parent.fixRectangle ( itemBounds.x + width - CHEVRON_LEFT_MARGIN - CHEVRON_IMAGE_WIDTH - CHEVRON_HORIZONTAL_TRIM,
arrowImage = image; chevron.setBackground (parent.getBackground()); chevron.setBounds (parent.fixRectangle ( itemBounds.x + width - CHEVRON_LEFT_MARGIN - CHEVRON_IMAGE_WIDTH - CHEVRON_HORIZONTAL_TRIM,
ToolBarManager toolBarManager= new ToolBarManager(SWT.FLAT); ToolBar toolBar = toolBarManager.createControl(viewForm); toolBar.setBackground(parent.getBackground()); viewForm.setTopLeft(toolBar); viewForm.setLayoutData(new GridData(GridData.FILL_BOTH));
toolbar.setBackground(null); section.setTextClient(toolbar); toolBarManager.update(true);
toolBar.setBackground(formColors.getBackground());