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

x33g5p2x  于2022-01-18 转载在 其他  
字(5.7k)|赞(0)|评价(0)|浏览(179)

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

Canvas.setFont介绍

暂无

代码示例

代码示例来源:origin: org.eclipse.rap/org.eclipse.rap.rwt

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

代码示例来源:origin: de.dentrassi.eclipse.neoscada.hmi/org.eclipse.scada.swt

public void setFont(Font font) {
  super.setFont(font);
  redraw();
}
/**

代码示例来源:origin: org.eclipse.swt.cocoa.macosx/x86_64

public void setFont(Font font) {
  super.setFont(font);
  redraw();
}
/**

代码示例来源:origin: org.eclipse.platform/org.eclipse.swt.gtk.linux.ppc

@Override
public void setFont(Font font) {
  super.setFont(font);
  redraw();
}
/**

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

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

代码示例来源:origin: org.eclipse.scout.sdk.deps/org.eclipse.swt.win32.win32.x86

@Override
public void setFont(Font font) {
  super.setFont(font);
  redraw();
}
/**

代码示例来源:origin: org.eclipse.platform/org.eclipse.swt.gtk.linux.s390x

@Override
public void setFont(Font font) {
  super.setFont(font);
  redraw();
}
/**

代码示例来源:origin: org.eclipse.platform/org.eclipse.swt.gtk.aix.ppc

@Override
public void setFont(Font font) {
  super.setFont(font);
  redraw();
}
/**

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

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

代码示例来源:origin: org.eclipse.neoscada.hmi/org.eclipse.scada.swt

public void setFont(Font font) {
  super.setFont(font);
  redraw();
}
/**

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

/**
 * Sets the fonts of all the custom controls in the expandable.
 */
@Override
public void setFont(Font font) {
  super.setFont(font);
  if (textLabel != null)
    textLabel.setFont(font);
  if (toggle != null)
    toggle.setFont(font);
}

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

/**
 * Sets the fonts of all the custom controls in the expandable.
 */
@Override
public void setFont(Font font) {
  super.setFont(font);
  if (textLabel != null)
    textLabel.setFont(font);
  if (toggle != null)
    toggle.setFont(font);
}

代码示例来源:origin: org.eclipse.platform/org.eclipse.jface.text

@Override
public void setFont(Font font) {
  fFont= font;
  if (fCanvas != null && !fCanvas.isDisposed()) {
    fCanvas.setFont(fFont);
    updateNumberOfDigits();
    computeIndentations();
  }
}

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

@Override
public void setFont(Font font) {
  fFont= font;
  if (fCanvas != null && !fCanvas.isDisposed()) {
    fCanvas.setFont(fFont);
    updateNumberOfDigits();
    computeIndentations();
  }
}

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

/**
 * Sets the font to use to render the default text (text that does not have
 * special font property assigned). Bold font will be constructed from this
 * font.
 *
 * @param font
 *            the default font to use
 */
@Override
public void setFont(Font font) {
  super.setFont(font);
  model.clearCache(null);
  Font boldFont = (Font) resourceTable.get(FormTextModel.BOLD_FONT_ID);
  if (boldFont != null) {
    FormFonts.getInstance().markFinished(boldFont, getDisplay());
    resourceTable.remove(FormTextModel.BOLD_FONT_ID);
  }
  ensureBoldFontPresent(getFont());
}

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

/**
 * Sets the font to use to render the default text (text that does not have
 * special font property assigned). Bold font will be constructed from this
 * font.
 *
 * @param font
 *            the default font to use
 */
@Override
public void setFont(Font font) {
  super.setFont(font);
  model.clearCache(null);
  Font boldFont = (Font) resourceTable.get(FormTextModel.BOLD_FONT_ID);
  if (boldFont != null) {
    FormFonts.getInstance().markFinished(boldFont, getDisplay());
    resourceTable.remove(FormTextModel.BOLD_FONT_ID);
  }
  ensureBoldFontPresent(getFont());
}

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

@Override
public Control createControl(CompositeRuler parentRuler, Composite parentControl) {
  Assert.isLegal(parentControl != null);
  Assert.isLegal(parentRuler != null);
  Assert.isLegal(fParentRuler == null); // only call when not yet initialized!
  fParentRuler= parentRuler;
  fTextViewer= getParentRuler().getTextViewer();
  fTextViewer.addViewportListener(fInternalListener);
  fTextViewer.addTextListener(fInternalListener);
  fStyledText= fTextViewer.getTextWidget();
  fCanvas= new Canvas(parentControl, getCanvasStyle());
  fCanvas.setBackground(getDefaultBackground());
  fCanvas.setFont(getFont());
  fCanvas.addPaintListener(new PaintListener() {
    @Override
    public void paintControl(PaintEvent event) {
      AbstractRulerColumn.this.paintControl(event);
    }
  });
  fCanvas.addMouseListener(fMouseHandler);
  fCanvas.addMouseMoveListener(fMouseHandler);
  return fCanvas;
}

代码示例来源:origin: org.eclipse.platform/org.eclipse.jface.text

@Override
public Control createControl(CompositeRuler parentRuler, Composite parentControl) {
  Assert.isLegal(parentControl != null);
  Assert.isLegal(parentRuler != null);
  Assert.isLegal(fParentRuler == null); // only call when not yet initialized!
  fParentRuler= parentRuler;
  fTextViewer= getParentRuler().getTextViewer();
  fTextViewer.addViewportListener(fInternalListener);
  fTextViewer.addTextListener(fInternalListener);
  fStyledText= fTextViewer.getTextWidget();
  fCanvas= new Canvas(parentControl, getCanvasStyle());
  fCanvas.setBackground(getDefaultBackground());
  fCanvas.setFont(getFont());
  fCanvas.addPaintListener(new PaintListener() {
    @Override
    public void paintControl(PaintEvent event) {
      AbstractRulerColumn.this.paintControl(event);
    }
  });
  fCanvas.addMouseListener(fMouseHandler);
  fCanvas.addMouseMoveListener(fMouseHandler);
  return fCanvas;
}

相关文章

Canvas类方法