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

x33g5p2x  于2022-01-16 转载在 其他  
字(3.9k)|赞(0)|评价(0)|浏览(121)

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

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);

相关文章

Button类方法