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

x33g5p2x  于2022-01-23 转载在 其他  
字(6.3k)|赞(0)|评价(0)|浏览(193)

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

Label.setFont介绍

暂无

代码示例

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

fdlDesc.top = new FormAttachment( 0, margin );
wlDesc.setLayoutData( fdlDesc );
wlDesc.setFont( largeFont );

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

label.setText( BaseMessages.getString( PKG, "TransLog.Dialog.PerformanceMonitoringNotEnabled.Message" ) );
label.setBackground( perfComposite.getBackground() );
label.setFont( GUIResource.getInstance().getFontMedium() );

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

titleLabel.setText( title );
titleLabel.setBackground( display.getSystemColor( SWT.COLOR_INFO_BACKGROUND ) );
titleLabel.setFont( GUIResource.getInstance().getFontBold() );
FormData fdTitleLabel = new FormData();
fdTitleLabel.left = new FormAttachment( imageLabel, 20 );

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

wResultsLabel.setFont( GUIResource.getInstance().getFontMediumBold() );
wResultsLabel.setBackground( GUIResource.getInstance().getColorWhite() );
wResultsLabel.setText( BaseMessages.getString( PKG, "JobLog.ResultsPanel.NameLabel" ) );

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

wResultsLabel.setFont( GUIResource.getInstance().getFontMediumBold() );
wResultsLabel.setBackground( GUIResource.getInstance().getColorWhite() );
wResultsLabel.setText( BaseMessages.getString( PKG, "TransLog.ResultsPanel.NameLabel" ) );

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

private void populateHeader(Composite header) {
  title = new Label(header, SWT.WRAP);
  title.setFont(titleFont);
  FillLayout layout = new FillLayout();
  layout.marginHeight = 10;
  layout.marginWidth = 10;
  header.setLayout(layout);
}

代码示例来源:origin: org.eclipse.jdt/org.eclipse.jdt.ui

private void createDescription(String label) {
  if (label == null)
    return;
  fDescription= new Label(fParentComposite, SWT.LEFT | SWT.WRAP);
  fDescription.setFont(fParentComposite.getFont());
  fDescription.setText(label);
  fDescription.setLayoutData(new GridData(SWT.BEGINNING, SWT.CENTER, false, false));
}

代码示例来源:origin: org.eclipse/org.eclipse.jdt.ui

protected static Label createLabel(Composite composite, String text, int numColumns) {
  final GridData gd = new GridData(GridData.HORIZONTAL_ALIGN_FILL);
  gd.horizontalSpan = numColumns;
  gd.widthHint= 0;
  final Label label = new Label(composite, SWT.WRAP);
  label.setFont(composite.getFont());
  label.setText(text);
  label.setLayoutData(gd);
  return label;		
}

代码示例来源:origin: org.eclipse.jdt/org.eclipse.jdt.ui

protected static Label createLabel(int numColumns, Composite parent, String text, int indent) {
  final Label label= new Label(parent, SWT.WRAP);
  label.setFont(parent.getFont());
  label.setText(text);
  GridData gd= new GridData(GridData.BEGINNING, GridData.CENTER, true, false, numColumns, 1);
  gd.horizontalIndent= indent * LayoutUtil.getIndent();
  label.setLayoutData(gd);
  return label;
}

代码示例来源:origin: org.eclipse.jdt/org.eclipse.jdt.ui

private Label createSeparator(Composite parent) {
  Label separator= new Label(parent, SWT.SEPARATOR | SWT.HORIZONTAL);
  separator.setFont(parent.getFont());
  separator.setVisible(false);
  GridData gd= new GridData();
  gd.horizontalAlignment= GridData.FILL;
  gd.verticalAlignment= GridData.BEGINNING;
  gd.verticalIndent= 4;
  separator.setLayoutData(gd);
  return separator;
}

代码示例来源:origin: org.eclipse.platform/org.eclipse.ui.workbench

private Label createSeparator(Composite parent) {
  Label separator = new Label(parent, SWT.NONE);
  separator.setFont(parent.getFont());
  separator.setVisible(false);
  GridData gd = new GridData();
  gd.horizontalAlignment = GridData.FILL;
  gd.verticalAlignment = GridData.BEGINNING;
  gd.heightHint = 4;
  separator.setLayoutData(gd);
  return separator;
}

代码示例来源:origin: org.eclipse.jdt/org.eclipse.jdt.ui

private void createNoMatchFoundLabel() {
  fNoMatchFoundLabel= new Label(fScrolledPageContent.getBody(), SWT.NONE);
  GridData gd= new GridData(SWT.BEGINNING, SWT.CENTER, true, false);
  gd.horizontalSpan= 3;
  fNoMatchFoundLabel.setLayoutData(gd);
  fNoMatchFoundLabel.setFont(fScrolledPageContent.getFont());
  fNoMatchFoundLabel.setText(PreferencesMessages.OptionsConfigurationBlock_NoOptionMatchesTheFilter);
  setVisible(fNoMatchFoundLabel, false);
}

代码示例来源:origin: openaudible/openaudible

public static Label newTitle(Composite parent, String title) {
  Label label = new Label(parent, SWT.NONE);
  label.setText(Translate.getInstance().labelName(title) + ": ");
  label.setFont(fonts.dialogFontBold());
  label.setLayoutData(new GridData(GridData.VERTICAL_ALIGN_CENTER | GridData.HORIZONTAL_ALIGN_BEGINNING));
  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/org.eclipse.jdt.ui

protected Control createDialogArea(Composite parent) {
  Composite control= (Composite)super.createDialogArea(parent);
  
  fCountLabel= new Label(control, SWT.NONE);
  fCountLabel.setLayoutData(new GridData(SWT.FILL, SWT.TOP, true, false));
  fCountLabel.setFont(parent.getFont());
  updateCountLabel();
  
  return control;
}

代码示例来源:origin: org.eclipse.scout.sdk.deps/org.eclipse.jdt.ui

@Override
protected Control createDialogArea(Composite parent) {
  Composite control= (Composite)super.createDialogArea(parent);
  fCountLabel= new Label(control, SWT.NONE);
  fCountLabel.setLayoutData(new GridData(SWT.FILL, SWT.TOP, true, false));
  fCountLabel.setFont(parent.getFont());
  updateCountLabel();
  return control;
}

代码示例来源: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: org.eclipse/org.eclipse.wst.server.ui

protected Label createHeadingLabel(Composite parent, String text, int span) {
  Label label = createLabel(parent, text, span, true, false);
  label.setFont(JFaceResources.getBannerFont());
  return label;
}

代码示例来源:origin: org.eclipse.scout.sdk.deps/org.eclipse.ui.forms

@Override
public void setFont(Font font) {
  super.setFont(font);
  titleLabel.setFont(font);
  fontHeight = -1;
  fontBaselineHeight = -1;
  layout();
}

代码示例来源:origin: org.eclipse.scout.sdk.deps/org.eclipse.jface

@Override
public void setFont(Font font) {
  super.setFont(font);
  fLabel.setFont(font);
  fProgressIndicator.setFont(font);
}

相关文章