本文整理了Java中org.eclipse.swt.widgets.Shell.setBackgroundMode()
方法的一些代码示例,展示了Shell.setBackgroundMode()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Shell.setBackgroundMode()
方法的具体详情如下:
包路径:org.eclipse.swt.widgets.Shell
类名称:Shell
方法名:setBackgroundMode
暂无
代码示例来源:origin: pentaho/pentaho-kettle
/**
* Overridden to make the shell background white.
*
* @param shell
*/
@Override
protected void configureShell( Shell shell ) {
super.configureShell( shell );
shell.setBackground( shell.getDisplay().getSystemColor( SWT.COLOR_WHITE ) );
shell.setBackgroundMode( SWT.INHERIT_FORCE );
}
代码示例来源:origin: pentaho/pentaho-kettle
@Override
protected void configureShell( Shell shell ) {
super.configureShell( shell );
shell.setBackground( shell.getDisplay().getSystemColor( DIALOG_COLOR ) );
shell.setBackgroundMode( SWT.INHERIT_FORCE );
}
};
代码示例来源:origin: pentaho/pentaho-kettle
@Override
protected void configureShell( Shell shell ) {
super.configureShell( shell );
shell.setBackground( shell.getDisplay().getSystemColor( DIALOG_COLOR ) );
shell.setBackgroundMode( SWT.INHERIT_FORCE );
}
};
代码示例来源:origin: be.yildiz-games/module-window-swt
public void setBackground(final Color background) {
this.shell.setBackgroundMode(SWT.INHERIT_DEFAULT);
this.shell.setBackground(new org.eclipse.swt.graphics.Color(this.shell.getDisplay(), background.red, background.green, background.blue));
}
代码示例来源:origin: stackoverflow.com
Image image = new Image(display, "c:\\picture.jpeg");
Shell shell = new Shell(SWT.NO_TRIM);
shell.setBounds(10,10,200,200);
shell.setBackgroundImage(image);
shell.setBackgroundMode(SWT.INHERIT_DEFAULT);
Label label = new Label(shell, SWT.NONE);
label.setText("LAbel text here. ");
代码示例来源:origin: be.yildiz-games/module-window-swt
public void setBackground(final String background) {
this.shell.setBackgroundMode(SWT.INHERIT_DEFAULT);
this.shell.setBackgroundImage(this.getImage(background));
}
代码示例来源:origin: stackoverflow.com
public static void main(String[] args)
{
Display display = new Display();
Shell shell = new Shell(display);
shell.setLayout(new GridLayout(1, false));
shell.setText("StackOverflow");
shell.setBackground(display.getSystemColor(SWT.COLOR_BLUE));
shell.setBackgroundMode(SWT.INHERIT_FORCE);
new Button(shell, SWT.PUSH).setText("Button");
new Label(shell, SWT.NONE).setText("Label");
shell.pack();
shell.open();
while (!shell.isDisposed())
{
if (!display.readAndDispatch())
{
display.sleep();
}
}
display.dispose();
}
代码示例来源:origin: org.eclipse.platform/org.eclipse.e4.ui.workbench.renderers.swt
private void applyDialogStyles(Control control) {
IStylingEngine engine = context.get(IStylingEngine.class);
if (engine != null) {
Shell shell = control.getShell();
if (shell.getBackgroundMode() == SWT.INHERIT_NONE) {
shell.setBackgroundMode(SWT.INHERIT_DEFAULT);
}
engine.style(shell);
}
}
代码示例来源:origin: org.eclipse.e4.ui.workbench.renderers/swt
private void applyDialogStyles(Control control) {
IStylingEngine engine = (IStylingEngine) context
.get(IStylingEngine.SERVICE_NAME);
if (engine != null) {
Shell shell = control.getShell();
if (shell.getBackgroundMode() == SWT.INHERIT_NONE) {
shell.setBackgroundMode(SWT.INHERIT_DEFAULT);
}
engine.style(shell);
}
}
代码示例来源:origin: org.eclipse.platform/org.eclipse.swt.examples
currentShell.setBackgroundMode(SWT.INHERIT_DEFAULT);
final Button button = new Button(currentShell, SWT.CHECK);
button.setBounds(20, 20, 120, 30);
代码示例来源:origin: stackoverflow.com
shell.setLayout(new FillLayout());
shell.setBackground(display.getSystemColor(SWT.COLOR_BLACK));
shell.setBackgroundMode(SWT.INHERIT_FORCE);
代码示例来源:origin: stackoverflow.com
customShell.setBackgroundMode(SWT.INHERIT_FORCE);
customShell.setSize(300, 400);
customShell.setVisible(true);
代码示例来源:origin: org.xworker/xworker_swt
shell.setBackgroundMode(SWT.INHERIT_FORCE);
代码示例来源:origin: stackoverflow.com
shell.setBackgroundMode(SWT.INHERIT_DEFAULT);
代码示例来源:origin: pentaho/big-data-plugin
shell.setBackgroundMode( SWT.INHERIT_FORCE );
代码示例来源:origin: BiglySoftware/BiglyBT
shell.setBackgroundMode(SWT.INHERIT_FORCE);
代码示例来源:origin: be.yildiz-games/module-window-swt
/**
* Build the window in the SWT thread.
*
* @param window Window to use as container.
*/
public void initialize(final SwtWindow window, boolean fullScreenMode, Coordinates c) {
this.window = window;
this.window.getShell().setBackgroundMode(SWT.INHERIT_DEFAULT);
final Color white = this.window.getSystemColor(SWT.COLOR_WHITE);
final Color black = this.window.getSystemColor(SWT.COLOR_BLACK);
final PaletteData palette = new PaletteData(white.getRGB(), black.getRGB());
final ImageData sourceData = new ImageData(16, 16, 1, palette);
sourceData.transparentPixel = 0;
this.invisibleCursor = new Cursor(window.getShell().getDisplay(), sourceData, 0, 0);
if (fullScreenMode) {
this.window.setFullScreen();
}
Image tmpImage = this.window.getImage("engine.png");
this.loadingBackground = new Image(this.window.getShell().getDisplay(), tmpImage.getImageData().scaledTo(this.window.getShell().getBounds().width, this.window.getShell().getBounds().height));
this.currentCursor = this.window.getCursor();
this.window.setCursor(this.invisibleCursor);
this.window.setBackground(this.loadingBackground);
this.canvas = window.createCanvas(c.width, c.height);
this.canvas.setLocation(c.left, c.top);
if(fullScreenMode) {
this.window.getShell().setLayout(new FillLayout());
}
}
代码示例来源:origin: pentaho/big-data-plugin
shell.setBackgroundMode( SWT.INHERIT_FORCE );
代码示例来源:origin: org.eclipse.e4.ui.workbench.renderers/swt
wbwShell.setBackgroundMode(SWT.INHERIT_DEFAULT);
代码示例来源:origin: org.eclipse.platform/org.eclipse.e4.ui.workbench.renderers.swt
wbwShell.setBackgroundMode(SWT.INHERIT_DEFAULT);
内容来源于网络,如有侵权,请联系作者删除!