本文整理了Java中org.eclipse.swt.widgets.Label.setForeground()
方法的一些代码示例,展示了Label.setForeground()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Label.setForeground()
方法的具体详情如下:
包路径:org.eclipse.swt.widgets.Label
类名称:Label
方法名:setForeground
暂无
代码示例来源:origin: pentaho/pentaho-kettle
wlStatusMessage.setForeground( display.getSystemColor( SWT.COLOR_RED ) );
props.setLook( wlStatusMessage );
fdlStatusMessage = new FormData();
代码示例来源:origin: pentaho/pentaho-kettle
fdlPOP3Message.top = new FormAttachment( 0, 3 * margin );
wlPOP3Message.setLayoutData( fdlPOP3Message );
wlPOP3Message.setForeground( GUIResource.getInstance().getColorOrange() );
代码示例来源:origin: pentaho/pentaho-kettle
fdlPOP3Message.top = new FormAttachment( wActionType, 3 * margin );
wlPOP3Message.setLayoutData( fdlPOP3Message );
wlPOP3Message.setForeground( GUIResource.getInstance().getColorOrange() );
代码示例来源:origin: org.eclipse.scout.sdk.deps/org.eclipse.jdt.ui
private Label createLabel(Composite parent, String text) {
Label label= new Label(parent, SWT.WRAP);
if (text != null)
label.setText(text);
label.setBackground(fBackgroundColor);
label.setForeground(fForegroundColor);
GridData gd= new GridData(SWT.FILL, SWT.FILL, true, false);
label.setLayoutData(gd);
return label;
}
代码示例来源:origin: infinitest/infinitest
@Override
public void run() {
statusLabel.setForeground(getColor(color));
}
});
代码示例来源:origin: org.eclipse.scout.sdk.deps/org.eclipse.ui.workbench.texteditor
private Label createLabel(Composite parent, String text) {
Label label = new Label(parent, SWT.NONE);
GridData data= new GridData(GridData.FILL_HORIZONTAL);
label.setLayoutData(data);
if (text != null)
label.setText(text);
label.setBackground(fBackgroundColor);
label.setForeground(fForegroundColor);
return label;
}
代码示例来源:origin: org.eclipse/org.eclipse.ajdt.ui
private Label createLabel(Composite parent, String text) {
Label label = new Label(parent, SWT.NONE);
if (text != null)
label.setText(text);
label.setBackground(fBackgroundColor);
label.setForeground(fForegroundColor);
return label;
}
代码示例来源:origin: org.eclipse/org.eclipse.ui.workbench.texteditor
private Label createLabel(Composite parent, String text) {
Label label = new Label(parent, SWT.NONE);
GridData data= new GridData(GridData.FILL_HORIZONTAL);
label.setLayoutData(data);
if (text != null)
label.setText(text);
label.setBackground(fBackgroundColor);
label.setForeground(fForegroundColor);
return label;
}
代码示例来源:origin: org.eclipse.jdt/org.eclipse.jdt.ui
private Label createLabel(Composite parent, String text) {
Label label= new Label(parent, SWT.WRAP);
if (text != null)
label.setText(text);
label.setBackground(fBackgroundColor);
label.setForeground(fForegroundColor);
GridData gd= new GridData(SWT.FILL, SWT.FILL, true, false);
label.setLayoutData(gd);
return label;
}
代码示例来源:origin: org.eclipse/org.eclipse.jdt.ui
private Label createLabel(Composite parent, String text) {
Label label= new Label(parent, SWT.WRAP);
if (text != null)
label.setText(text);
label.setBackground(fBackgroundColor);
label.setForeground(fForegroundColor);
GridData gd= new GridData(SWT.FILL, SWT.FILL, true, false);
label.setLayoutData(gd);
return label;
}
代码示例来源:origin: org.eclipse.platform/org.eclipse.ui.workbench.texteditor
private Label createLabel(Composite parent, String text) {
Label label = new Label(parent, SWT.NONE);
GridData data= new GridData(GridData.FILL_HORIZONTAL);
label.setLayoutData(data);
if (text != null)
label.setText(text);
label.setBackground(fBackgroundColor);
label.setForeground(fForegroundColor);
return label;
}
代码示例来源:origin: be.yildiz-games/module-window-swt
public Label createLabel(final String text, final SwtWindowUtils.ColorValue color, final Font font) {
Label label = new Label(this.shell, SWT.NONE);
label.setFont(font);
label.setForeground(this.shell.getDisplay().getSystemColor(color.value));
label.setText(text);
return label;
}
代码示例来源:origin: org.eclipse.platform/org.eclipse.ui.workbench.texteditor
private Label createHeader(Composite parent, String text) {
Label label = new Label(parent, SWT.NONE);
GridData data= new GridData(GridData.FILL_HORIZONTAL);
label.setLayoutData(data);
if (text != null)
label.setText(text);
label.setBackground(fBackgroundColor);
label.setForeground(fForegroundColor);
label.setFont(JFaceResources.getHeaderFont());
return label;
}
代码示例来源:origin: org.eclipse.scout.sdk.deps/org.eclipse.ui.workbench.texteditor
private Label createHeader(Composite parent, String text) {
Label label = new Label(parent, SWT.NONE);
GridData data= new GridData(GridData.FILL_HORIZONTAL);
label.setLayoutData(data);
if (text != null)
label.setText(text);
label.setBackground(fBackgroundColor);
label.setForeground(fForegroundColor);
label.setFont(JFaceResources.getHeaderFont());
return label;
}
代码示例来源:origin: org.eclipse/org.eclipse.jdt.ui
private Label createTitleLabel(Composite parent, String text) {
Label label = new Label(parent, SWT.NONE);
if (text != null)
label.setText(text);
label.setBackground(fBackgroundColor);
label.setForeground(fForegroundColor);
label.setFont(JFaceResources.getHeaderFont());
fHeaderLabels.add(label);
return label;
}
代码示例来源:origin: org.eclipse.scout.sdk.deps/org.eclipse.ui.workbench.texteditor
private Label createBanner(Composite parent, String text) {
Label label = new Label(parent, SWT.NONE);
if (text != null)
label.setText(text);
label.setBackground(fBackgroundColor);
label.setForeground(fForegroundColor);
label.setFont(JFaceResources.getBannerFont());
return label;
}
}
代码示例来源:origin: infinitest/infinitest
private void addStatusLabel(int newSide) {
statusLabel = new Label(composite, BORDER | LEFT);
statusLabel.setLayoutData(getRowData(newSide));
statusLabel.setForeground(getColor(COLOR_WHITE));
statusLabel.setText(statusString);
statusLabel.setBackground(getColor(backgroundColor));
}
代码示例来源:origin: org.eclipse.platform/org.eclipse.ui.intro
private void createSmallNavigator(Composite parent, IntroLink[] links) {
for (int i = 0; i < links.length; i++) {
Control c = createImageHyperlink(parent, links[i]);
c.setLayoutData(new GridData(GridData.HORIZONTAL_ALIGN_CENTER));
}
for (int i = 0; i < links.length; i++) {
Label text = toolkit.createLabel(parent, links[i].getLabel());
text.setLayoutData(new GridData(GridData.HORIZONTAL_ALIGN_CENTER));
text.setForeground(toolkit.getColors().getColor(IFormColors.TITLE));
}
}
代码示例来源:origin: BiglySoftware/BiglyBT
@Override
public void mouseUp(MouseEvent e) {
boolean vis = !config.getBooleanParameter(keys[f_i] + ".vis", true );
config.setParameter(keys[f_i] + ".vis", vis );
listener.visibilityChange( vis, f_i );
lblDesc.setForeground(vis?Colors.getSystemColor(lblDesc.getDisplay(), SWT.COLOR_BLACK ):Colors.grey );
}
});
代码示例来源:origin: org.eclipse.platform/org.eclipse.jface.text
private void setStatusLabelColors(Color foreground, Color background) {
if (foreground == null || background == null) return;
if (fStatusLabelForeground != null) {
fStatusLabelForeground.dispose();
}
fStatusLabelForeground = new Color(fStatusLabel.getDisplay(), Colors.blend(background.getRGB(), foreground.getRGB(), 0.56f));
fStatusLabel.setForeground(fStatusLabelForeground);
fStatusLabel.setBackground(background);
}
内容来源于网络,如有侵权,请联系作者删除!