本文整理了Java中org.eclipse.swt.widgets.Button.setBackground()
方法的一些代码示例,展示了Button.setBackground()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Button.setBackground()
方法的具体详情如下:
包路径:org.eclipse.swt.widgets.Button
类名称:Button
方法名:setBackground
暂无
代码示例来源:origin: pentaho/pentaho-kettle
button.setBackground( perfComposite.getBackground() );
button.setFont( GUIResource.getInstance().getFontMedium() );
代码示例来源:origin: pentaho/pentaho-kettle
disable.setBackground( display.getSystemColor( SWT.COLOR_INFO_BACKGROUND ) );
disable.setSelection( false );
FormData fdDisable = new FormData();
代码示例来源:origin: pentaho/pentaho-kettle
/**
* Setting the layout of an <i>Edit</i> option button. Either a button image is set - if existing - or a text.
*
* @param button
* The button
*/
private FormData layoutEditOptionButton( Button button ) {
FormData fd = new FormData();
Image editButton = GUIResource.getInstance().getEditOptionButton();
if ( editButton != null ) {
button.setImage( editButton );
button.setBackground( GUIResource.getInstance().getColorWhite() );
fd.width = editButton.getBounds().width + 20;
fd.height = editButton.getBounds().height;
} else {
button.setText( BaseMessages.getString( PKG, "EnterOptionsDialog.Button.Edit" ) );
}
button.setToolTipText( BaseMessages.getString( PKG, "EnterOptionsDialog.Button.Edit.Tooltip" ) );
return fd;
}
代码示例来源:origin: pentaho/pentaho-kettle
/**
* Setting the layout of a <i>Reset</i> option button. Either a button image is set - if existing - or a text.
*
* @param button
* The button
*/
private FormData layoutResetOptionButton( Button button ) {
FormData fd = new FormData();
Image editButton = GUIResource.getInstance().getResetOptionButton();
if ( editButton != null ) {
button.setImage( editButton );
button.setBackground( GUIResource.getInstance().getColorWhite() );
fd.width = editButton.getBounds().width + 20;
fd.height = editButton.getBounds().height;
} else {
button.setText( BaseMessages.getString( PKG, "EnterOptionsDialog.Button.Reset" ) );
}
button.setToolTipText( BaseMessages.getString( PKG, "EnterOptionsDialog.Button.Reset.Tooltip" ) );
return fd;
}
代码示例来源:origin: org.eclipse.jdt/org.eclipse.jdt.ui
private Button createButton(Composite parent, String text) {
Button button = new Button(parent, SWT.FLAT);
button.setBackground(fBackgroundColor);
button.setForeground(fForegroundColor);
if (text != null)
button.setText(text);
return button;
}
代码示例来源:origin: org.eclipse/org.eclipse.jdt.ui
private Button createButton(Composite parent, String text) {
Button button = new Button(parent, SWT.FLAT);
button.setBackground(fBackgroundColor);
button.setForeground(fForegroundColor);
if (text != null)
button.setText(text);
return button;
}
代码示例来源:origin: org.eclipse.scout.sdk.deps/org.eclipse.jdt.ui
private Button createButton(Composite parent, String text) {
Button button = new Button(parent, SWT.FLAT);
button.setBackground(fBackgroundColor);
button.setForeground(fForegroundColor);
if (text != null)
button.setText(text);
return button;
}
代码示例来源:origin: org.eclipse.egit/ui
private static void createButton(Composite parent, Color bgColor,
boolean checked, boolean enabled) {
Button button = new Button(parent, SWT.CHECK);
button.setSelection(checked);
button.setEnabled(enabled);
button.setBackground(bgColor);
Point bSize = button.computeSize(SWT.DEFAULT, SWT.DEFAULT);
button.setSize(bSize);
}
代码示例来源:origin: BiglySoftware/BiglyBT
@Override
public void handleEvent(Event event){
if(encryptToggle.getSelection()){
Messages.setLanguageText(encryptToggle,"SpeedTestWizard.test.panel.encrypted");
originalColor = encryptToggle.getForeground();
//Color highlightColor = ColorCache.getColor(display,178,78,127);
Color highlightColor = Colors.getSystemColor(display, SWT.COLOR_DARK_YELLOW);
encryptToggle.setBackground(highlightColor);
}else{
Messages.setLanguageText(encryptToggle,"SpeedTestWizard.test.panel.standard");
if(originalColor!=null){
encryptToggle.setBackground(originalColor);
}
}
}//handleEvent
}
代码示例来源:origin: org.eclipse.mylyn.commons/workbench
@Override
public void setBackground(Color backgroundColor) {
super.setBackground(backgroundColor);
dateText.setBackground(backgroundColor);
if ((getStyle() & SWT.FLAT) != 0) {
pickButton.setBackground(backgroundColor);
clearControl.setBackground(backgroundColor);
} else {
pickButton.setBackground(null);
clearControl.setBackground(null);
}
}
代码示例来源:origin: org.eclipse.swt.cocoa.macosx/x86_64
public void setBackground (Color color) {
super.setBackground(color);
background = color;
if (text != null) text.setBackground(color);
if (list != null) list.setBackground(color);
if (arrow != null) arrow.setBackground(color);
}
/**
代码示例来源:origin: org.eclipse.platform/org.eclipse.swt.gtk.linux.ppc
@Override
public void setBackground (Color color) {
super.setBackground(color);
background = color;
if (text != null) text.setBackground(color);
if (list != null) list.setBackground(color);
if (arrow != null) arrow.setBackground(color);
}
/**
代码示例来源:origin: org.eclipse.scout.sdk.deps/org.eclipse.swt.win32.win32.x86
@Override
public void setBackground (Color color) {
super.setBackground(color);
background = color;
if (text != null) text.setBackground(color);
if (list != null) list.setBackground(color);
if (arrow != null) arrow.setBackground(color);
}
/**
代码示例来源:origin: org.eclipse.platform/org.eclipse.swt.gtk.aix.ppc
@Override
public void setBackground (Color color) {
super.setBackground(color);
background = color;
if (text != null) text.setBackground(color);
if (list != null) list.setBackground(color);
if (arrow != null) arrow.setBackground(color);
}
/**
代码示例来源:origin: org.eclipse.platform/org.eclipse.swt.gtk.linux.s390x
@Override
public void setBackground (Color color) {
super.setBackground(color);
background = color;
if (text != null) text.setBackground(color);
if (list != null) list.setBackground(color);
if (arrow != null) arrow.setBackground(color);
}
/**
代码示例来源:origin: org.apache.uima/uimaj-ep-configurator
@Override
protected Control createDialogArea(Composite parent) {
Composite composite = (Composite) super.createDialogArea(parent);
new Label(composite, SWT.WRAP).setText(""); //$NON-NLS-1$
String sAddToFlowPrompt = Messages
.getString("MultiResourceSelectionDialogWithFlowOption.addSelectedAEsToEndOfFlow"); //$NON-NLS-1$
FormToolkit factory = new FormToolkit(TAEConfiguratorPlugin.getDefault().getFormColors(
parent.getDisplay()));
autoAddToFlowButton = factory.createButton(composite, sAddToFlowPrompt, SWT.CHECK);
m_bAutoAddToFlow = "false".equals(CDEpropertyPage.getAddToFlow(editor.getProject())) ? false : true;
autoAddToFlowButton.setSelection(m_bAutoAddToFlow);
autoAddToFlowButton.setBackground(null);
return composite;
}
代码示例来源:origin: org.eclipse.scout.sdk.deps/org.eclipse.ui.ide
button.setBackground(sectionClient.getBackground());
button.addSelectionListener(new SelectionAdapter() {
代码示例来源:origin: BiglySoftware/BiglyBT
seqDL.setBackground( Colors.white );
代码示例来源:origin: BiglySoftware/BiglyBT
grid_data.horizontalIndent = 16;
ftux_check.setLayoutData(grid_data);
ftux_check.setBackground( ftux_light_bg );
代码示例来源:origin: net.officefloor.eclipse/net.officefloor.ui
shell.setBackground(greenScreen);
Button button = new Button(shell, SWT.CHECK);
button.setBackground(greenScreen);
button.setSelection(type);
Point buttonSize = button.computeSize(SWT.DEFAULT, SWT.DEFAULT);
内容来源于网络,如有侵权,请联系作者删除!