org.eclipse.swt.widgets.Shell.getBackground()方法的使用及代码示例

x33g5p2x  于2022-01-29 转载在 其他  
字(7.0k)|赞(0)|评价(0)|浏览(88)

本文整理了Java中org.eclipse.swt.widgets.Shell.getBackground()方法的一些代码示例,展示了Shell.getBackground()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Shell.getBackground()方法的具体详情如下:
包路径:org.eclipse.swt.widgets.Shell
类名称:Shell
方法名:getBackground

Shell.getBackground介绍

暂无

代码示例

代码示例来源:origin: pentaho/pentaho-kettle

protected void runConfigurationSectionLayout( Class<?> PKG, String prefix ) {
 cRunConfiguration = new Composite( shell, SWT.NONE );
 cRunConfiguration.setLayout( new FormLayout() );
 props.setLook( cRunConfiguration );
 FormData fdLocal = new FormData();
 fdLocal.top = new FormAttachment( 0, 15 );
 fdLocal.right = new FormAttachment( 100, -15 );
 fdLocal.left = new FormAttachment( 0, 15 );
 cRunConfiguration.setBackground( shell.getBackground() ); // the default looks ugly
 cRunConfiguration.setLayoutData( fdLocal );
 Label wlRunConfiguration = new Label( cRunConfiguration, SWT.LEFT );
 props.setLook( wlRunConfiguration );
 wlRunConfiguration.setText( "Run configuration:" );
 FormData fdlRunConfiguration = new FormData();
 fdlRunConfiguration.top = new FormAttachment( 0 );
 fdlRunConfiguration.left = new FormAttachment( 0 );
 wlRunConfiguration.setLayoutData( fdlRunConfiguration );
 wRunConfiguration = new CCombo( cRunConfiguration, SWT.BORDER );
 props.setLook( wRunConfiguration );
 FormData fdRunConfiguration = new FormData();
 fdRunConfiguration.width = 200;
 fdRunConfiguration.top = new FormAttachment( wlRunConfiguration, 5 );
 fdRunConfiguration.left = new FormAttachment( 0 );
 wRunConfiguration.setLayoutData( fdRunConfiguration );
}

代码示例来源:origin: stackoverflow.com

final Color orig = shell.getBackground();

代码示例来源:origin: pentaho/pentaho-kettle

fdLocal.left = new FormAttachment( 0 );
cRunConfiguration.setBackground( shell.getBackground() ); // the default looks ugly
cRunConfiguration.setLayoutData( fdLocal );

代码示例来源:origin: pentaho/pentaho-kettle

fdLocal.left = new FormAttachment( 0 );
cRunConfiguration.setBackground( shell.getBackground() ); // the default looks ugly
cRunConfiguration.setLayoutData( fdLocal );

代码示例来源:origin: pentaho/pentaho-kettle

gButtonGroup.setBackground( shell.getBackground() ); // the default looks ugly
gButtonGroup.setLayoutData( fdButtonGroup );

代码示例来源:origin: pentaho/pentaho-kettle

protected void optionsSectionLayout( Class<?> PKG, String prefix ) {
 gDetails = new Group( shell, SWT.SHADOW_ETCHED_IN );
 gDetails.setText( BaseMessages.getString( PKG, prefix + ".DetailsGroup.Label" ) );
 props.setLook( gDetails );
 // The layout
 gDetails.setLayout( new FormLayout() );
 fdDetails = new FormData();
 fdDetails.top = new FormAttachment( cRunConfiguration, 15 );
 fdDetails.right = new FormAttachment( 100, -15 );
 fdDetails.left = new FormAttachment( 0, 15 );
 gDetails.setBackground( shell.getBackground() ); // the default looks ugly
 gDetails.setLayoutData( fdDetails );
 optionsSectionControls();
}

代码示例来源:origin: pentaho/pentaho-kettle

fdTechGroup.bottom = new FormAttachment( wReplace, -margin );
fdTechGroup.right = new FormAttachment( 100, 0 );
gTechGroup.setBackground( shell.getBackground() ); // the default looks ugly
gTechGroup.setLayoutData( fdTechGroup );

代码示例来源:origin: pentaho/pentaho-kettle

fdTechGroup.top = new FormAttachment( wTkRename, 2 * margin );
fdTechGroup.right = new FormAttachment( 100, 0 );
gTechGroup.setBackground( shell.getBackground() ); // the default looks ugly
gTechGroup.setLayoutData( fdTechGroup );

代码示例来源:origin: be.yildiz-games/module-window-swt

public static TreeRoot create(Shell shell, int width, int height, TreeElement... elements) {
  Tree tree = new Tree(shell, SWT.NONE);
  tree.setBackground(shell.getBackground());
  return new TreeRoot(tree, width, height, elements);
}

代码示例来源:origin: org.apache.uima/uimaj-ep-cas-editor

@Override
public void createControl(Composite parent) {
 book = new PageBook(parent, SWT.NONE);
 
 messageText = new Text(book, SWT.WRAP | SWT.READ_ONLY);
 messageText.setBackground(parent.getShell().getBackground());
 messageText.setText(notAvailableMessage);
 
 getSite().setSelectionProvider(this);
 
 // Page might be set before the page is initialized
 initializeAndShowPage(casViewPage);
}

代码示例来源:origin: org.eclipse.scout.sdk.deps/org.eclipse.swt.win32.win32.x86

text.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false));
text.setEditable(false);
text.setBackground(shell.getBackground());
text.setText(message);
int width = messageComposite.computeSize(SWT.DEFAULT, SWT.DEFAULT).x;
problemsText.setMargins(30, 0, 30, 0);
problemsText.setEditable(false);
problemsText.setBackground(shell.getBackground());
for (int i = 0; i < problems.length; i++) {
  problemsText.append(problems[i] + '\n');
text.setBackground(shell.getBackground());
text.setText(Compatibility.getMessage("SWT_InvalidCert_Connect")); //$NON-NLS-1$

代码示例来源:origin: org.eclipse.platform/org.eclipse.swt.gtk.linux.ppc

text.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false));
text.setEditable(false);
text.setBackground(shell.getBackground());
text.setText(message);
int width = messageComposite.computeSize(SWT.DEFAULT, SWT.DEFAULT).x;
problemsText.setMargins(30, 0, 30, 0);
problemsText.setEditable(false);
problemsText.setBackground(shell.getBackground());
for (int i = 0; i < problems.length; i++) {
  problemsText.append(problems[i] + '\n');
text.setBackground(shell.getBackground());
text.setText(Compatibility.getMessage("SWT_InvalidCert_Connect")); //$NON-NLS-1$

代码示例来源:origin: org.eclipse.platform/org.eclipse.swt.gtk.linux.s390x

text.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false));
text.setEditable(false);
text.setBackground(shell.getBackground());
text.setText(message);
int width = messageComposite.computeSize(SWT.DEFAULT, SWT.DEFAULT).x;
problemsText.setMargins(30, 0, 30, 0);
problemsText.setEditable(false);
problemsText.setBackground(shell.getBackground());
for (int i = 0; i < problems.length; i++) {
  problemsText.append(problems[i] + '\n');
text.setBackground(shell.getBackground());
text.setText(Compatibility.getMessage("SWT_InvalidCert_Connect")); //$NON-NLS-1$

代码示例来源:origin: org.eclipse.swt.cocoa.macosx/x86_64

text.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false));
text.setEditable(false);
text.setBackground(shell.getBackground());
text.setText(message);
int width = messageComposite.computeSize(SWT.DEFAULT, SWT.DEFAULT).x;
problemsText.setMargins(30, 0, 30, 0);
problemsText.setEditable(false);
problemsText.setBackground(shell.getBackground());
for (int i = 0; i < problems.length; i++) {
  problemsText.append(problems[i] + '\n');
text.setBackground(shell.getBackground());
text.setText(Compatibility.getMessage("SWT_InvalidCert_Connect")); //$NON-NLS-1$

代码示例来源:origin: org.eclipse.platform/org.eclipse.swt.gtk.aix.ppc

text.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false));
text.setEditable(false);
text.setBackground(shell.getBackground());
text.setText(message);
int width = messageComposite.computeSize(SWT.DEFAULT, SWT.DEFAULT).x;
problemsText.setMargins(30, 0, 30, 0);
problemsText.setEditable(false);
problemsText.setBackground(shell.getBackground());
for (int i = 0; i < problems.length; i++) {
  problemsText.append(problems[i] + '\n');
text.setBackground(shell.getBackground());
text.setText(Compatibility.getMessage("SWT_InvalidCert_Connect")); //$NON-NLS-1$

代码示例来源:origin: stackoverflow.com

shell.open();
shellGC = new GC(shell);
shellBackground = shell.getBackground();

代码示例来源:origin: BiglySoftware/BiglyBT

gc.setBackground(window.getBackground());
gc.fillRectangle(image2.getBounds());
gc.dispose();

相关文章

微信公众号

最新文章

更多

Shell类方法