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

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

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

Canvas.setLayout介绍

暂无

代码示例

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

private Composite createFontPreviewControl() {
  fontSampler = new Canvas(previewComposite, SWT.NONE);
  GridLayout gridLayout = new GridLayout();
  gridLayout.marginWidth = 0;
  gridLayout.marginHeight = 0;
  fontSampler.setLayout(gridLayout);
  fontSampler.setLayoutData(new GridData(GridData.FILL_BOTH));
  fontSampler.addPaintListener(e -> {
    if (currentFont != null) // do the font preview
      paintFontSample(e.gc);
  });
  return fontSampler;
}

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

public TitleRegion(Composite parent) {
  super(parent, SWT.NULL);
  titleLabel = new Label(this, SWT.WRAP);
  titleLabel.setVisible(false);
  titleCache = new SizeCache();
  super.setLayout(new TitleRegionLayout());
  hookHoverListeners();
  addListener(SWT.Dispose, new Listener() {
    @Override
    public void handleEvent(Event e) {
      if (dragImage != null) {
        dragImage.dispose();
        dragImage = null;
      }
    }
  });
}

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

private Composite createColorPreviewControl() {
  colorSampler = new Canvas(previewComposite, SWT.NONE);
  GridLayout gridLayout = new GridLayout();
  gridLayout.marginWidth = 0;
  gridLayout.marginHeight = 0;
  colorSampler.setLayout(gridLayout);
  colorSampler.setLayoutData(new GridData(GridData.FILL_BOTH));
  colorSampler.addPaintListener(e -> {
    if (currentColor != null) // do the color preview
      paintColorSample(e.gc);
  });
  return colorSampler;
}

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

public TitleRegion(Composite parent) {
  super(parent, SWT.NULL);
  titleLabel = new Label(this, SWT.WRAP);
  titleLabel.setVisible(false);
  titleCache = new SizeCache();
  super.setLayout(new TitleRegionLayout());
  hookHoverListeners();
  addListener(SWT.Dispose, e -> {
    if (dragImage != null) {
      dragImage.dispose();
      dragImage = null;
    }
  });
}

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

canvas.setLayout(new Layout() {

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

super.setLayout(new FormHeadingLayout());
titleRegion = new TitleRegion(this);

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

canvas.setLayout(new FillLayout());

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

super.setLayout(new FormHeadingLayout());
titleRegion = new TitleRegion(this);

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

if ((expansionStyle & TITLE_BAR) != 0)
  setBackgroundMode(SWT.INHERIT_DEFAULT);
super.setLayout(new ExpandableLayout());
if (hasTitleBar()) {
  this.addPaintListener(new PaintListener() {

代码示例来源:origin: com.google.code.maven-play-plugin.org.xhtmlrenderer/core-renderer

super.setLayout(null);
setBackground(getDisplay().getSystemColor(SWT.COLOR_WHITE));
setBackgroundMode(SWT.INHERIT_FORCE);

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

if ((expansionStyle & TITLE_BAR) != 0)
  setBackgroundMode(SWT.INHERIT_DEFAULT);
super.setLayout(new ExpandableLayout());
if (hasTitleBar()) {
  this.addPaintListener(e -> {

相关文章

Canvas类方法