本文整理了Java中org.eclipse.swt.widgets.ToolBar.setBackground()
方法的一些代码示例,展示了ToolBar.setBackground()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。ToolBar.setBackground()
方法的具体详情如下:
包路径:org.eclipse.swt.widgets.ToolBar
类名称:ToolBar
方法名:setBackground
暂无
代码示例来源:origin: pentaho/pentaho-kettle
swtToolbar.setBackground( GUIResource.getInstance().getColorDemoGray() );
swtToolbar.pack();
代码示例来源:origin: pentaho/pentaho-kettle
toolbarLeft.setLayoutData( fdToolbarLeft );
toolbarLeft.setCursor( cursorEnabled );
toolbarLeft.setBackground( toolbarLeft.getParent().getBackground() );
toolbarRight.setLayoutData( fdToolbarRight );
toolbarRight.setCursor( cursorEnabled );
toolbarRight.setBackground( toolbarRight.getParent().getBackground() );
代码示例来源:origin: pentaho/pentaho-kettle
swtToolbar.setBackground( GUIResource.getInstance().getColorDemoGray() );
swtToolbar.pack();
代码示例来源:origin: org.eclipse.platform/org.eclipse.ui.workbench
/**
* 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);
}
}
代码示例来源:origin: org.eclipse.platform/org.eclipse.ui.forms
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);
}
代码示例来源:origin: org.eclipse.scout.sdk.deps/org.eclipse.ui.forms
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);
}
代码示例来源:origin: org.eclipse.platform/org.eclipse.ui.workbench
/**
* 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);
}
}
代码示例来源:origin: org.eclipse.platform/org.eclipse.ui.ide.application
@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
代码示例来源:origin: org.eclipse.rap/org.eclipse.rap.rwt
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
代码示例来源:origin: org.eclipse.scout.sdk.deps/org.eclipse.ui.forms
/**
* 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;
}
代码示例来源:origin: org.eclipse.platform/org.eclipse.swt.gtk.linux.ppc
arrowImage = image;
chevron.setBackground (parent.getBackground());
chevron.setBounds (parent.fixRectangle (
itemBounds.x + width - CHEVRON_LEFT_MARGIN - CHEVRON_IMAGE_WIDTH - CHEVRON_HORIZONTAL_TRIM,
代码示例来源:origin: org.eclipse.platform/org.eclipse.ui.forms
/**
* 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;
}
代码示例来源:origin: org.eclipse.platform/org.eclipse.swt.gtk.aix.ppc
arrowImage = image;
chevron.setBackground (parent.getBackground());
chevron.setBounds (parent.fixRectangle (
itemBounds.x + width - CHEVRON_LEFT_MARGIN - CHEVRON_IMAGE_WIDTH - CHEVRON_HORIZONTAL_TRIM,
代码示例来源:origin: org.eclipse.swt.cocoa.macosx/x86_64
arrowImage = image;
chevron.setBackground (parent.getBackground());
chevron.setBounds (parent.fixRectangle (
itemBounds.x + width - CHEVRON_LEFT_MARGIN - CHEVRON_IMAGE_WIDTH - CHEVRON_HORIZONTAL_TRIM,
代码示例来源:origin: org.eclipse.platform/org.eclipse.swt.gtk.linux.s390x
arrowImage = image;
chevron.setBackground (parent.getBackground());
chevron.setBounds (parent.fixRectangle (
itemBounds.x + width - CHEVRON_LEFT_MARGIN - CHEVRON_IMAGE_WIDTH - CHEVRON_HORIZONTAL_TRIM,
代码示例来源:origin: org.eclipse.platform/org.eclipse.debug.ui
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));
代码示例来源:origin: org.eclipse.platform/org.eclipse.ui.intro
toolBar.setBackground(bg);
代码示例来源:origin: org.eclipse.pde/org.eclipse.pde.ui
toolbar.setBackground(null);
section.setTextClient(toolbar);
toolBarManager.update(true);
代码示例来源:origin: inspectIT/inspectIT
toolBar.setBackground(formColors.getBackground());
内容来源于网络,如有侵权,请联系作者删除!