本文整理了Java中org.eclipse.swt.widgets.Button.setForeground()
方法的一些代码示例,展示了Button.setForeground()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Button.setForeground()
方法的具体详情如下:
包路径:org.eclipse.swt.widgets.Button
类名称:Button
方法名:setForeground
暂无
代码示例来源: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.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/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.rap/org.eclipse.rap.jface
/**
* Update the image being displayed on the button using the current color
* setting.
*/
protected void updateColorImage() {
// RAP [if] GC not supported
// Display display = fButton.getDisplay();
// GC gc = new GC(fImage);
// gc.setForeground(display.getSystemColor(SWT.COLOR_BLACK));
// gc.drawRectangle(0, 2, fExtent.x - 1, fExtent.y - 4);
// if (fColor != null) {
// fColor.dispose();
// }
// fColor = new Color(display, fColorValue);
fColor = Graphics.getColor( fColorValue );
// gc.setBackground(fColor);
// gc.fillRectangle(1, 3, fExtent.x - 2, fExtent.y - 5);
// gc.dispose();
// fButton.setImage(fImage);
fButton.setForeground( fColor );
}
代码示例来源:origin: org.eclipse.swt.cocoa.macosx/x86_64
public void setForeground (Color color) {
super.setForeground(color);
foreground = color;
if (text != null) text.setForeground(color);
if (list != null) list.setForeground(color);
if (arrow != null) arrow.setForeground(color);
}
/**
代码示例来源:origin: org.eclipse.platform/org.eclipse.swt.gtk.linux.s390x
@Override
public void setForeground (Color color) {
super.setForeground(color);
foreground = color;
if (text != null) text.setForeground(color);
if (list != null) list.setForeground(color);
if (arrow != null) arrow.setForeground(color);
}
/**
代码示例来源:origin: org.eclipse.platform/org.eclipse.swt.gtk.linux.ppc
@Override
public void setForeground (Color color) {
super.setForeground(color);
foreground = color;
if (text != null) text.setForeground(color);
if (list != null) list.setForeground(color);
if (arrow != null) arrow.setForeground(color);
}
/**
代码示例来源:origin: org.eclipse.platform/org.eclipse.swt.gtk.aix.ppc
@Override
public void setForeground (Color color) {
super.setForeground(color);
foreground = color;
if (text != null) text.setForeground(color);
if (list != null) list.setForeground(color);
if (arrow != null) arrow.setForeground(color);
}
/**
代码示例来源:origin: org.eclipse.scout.sdk.deps/org.eclipse.swt.win32.win32.x86
@Override
public void setForeground (Color color) {
super.setForeground(color);
foreground = color;
if (text != null) text.setForeground(color);
if (list != null) list.setForeground(color);
if (arrow != null) arrow.setForeground(color);
}
/**
代码示例来源:origin: org.eclipse.rap/org.eclipse.rap.jface
fButton.setForeground( fButton.getBackground() );
fButton.setText( "\u2588\u2588\u2588" ); //$NON-NLS-1$
代码示例来源:origin: BiglySoftware/BiglyBT
btnDetails.setForeground(colorFG);
Messages.setLanguageText(btnDetails, "label.details");
gridData = new GridData();
Messages.setLanguageText(btnHideAll, "popup.error.hideall");
btnHideAll.setVisible(false);
btnHideAll.setForeground(Colors.getSystemColor(display, SWT.COLOR_BLACK));
btnPrev.setForeground(Colors.getSystemColor(display, SWT.COLOR_BLACK));
btnPrev.setText(MessageText.getString("popup.previous", new String[] {
"" + idxHistory
btnNext.setForeground(Colors.getSystemColor(display, SWT.COLOR_BLACK));
int numAfter = historyList.size() - idxHistory - 1;
setButtonNextText(numAfter);
内容来源于网络,如有侵权,请联系作者删除!