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

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

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

Canvas.getLayoutData介绍

暂无

代码示例

代码示例来源:origin: com.eclipsesource.tabris/tabris

private void updateSize() {
 int width = ( getCount() * diameter ) + ( Math.max( 0, getCount() - 1 ) * spacing );
 indicatorCanvas.setSize( width, diameter );
 GridData gd = ( GridData )indicatorCanvas.getLayoutData();
 gd.heightHint = diameter;
 gd.widthHint = width;
}

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

@Override
  public void handleEvent(Event event) {
    GridData gridData = (GridData) cPaint.getLayoutData();
    gridData.heightHint = spinnerHeight.getSelection();
    cPaint.setLayoutData(gridData);
    shell.layout();
  }
});

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

@Override
  public void runSupport() {
    FormData fd = (FormData) canvas.getLayoutData();
    if (fd == null) {
      fd = new FormData(0, 0);
    } else {
      fd.width = 0;
      fd.height = 0;
    }
    canvas.setLayoutData(fd);
    if (initialized) {
      Utils.relayout(canvas);
    }
  }
});

代码示例来源:origin: org.eclipse.platform/org.eclipse.swt.examples

void recreateCanvas() {
  if (dbItem.getSelection() == ((canvas.getStyle() & SWT.DOUBLE_BUFFERED) != 0)) return;
  Object data = canvas.getLayoutData();
  if (canvas != null) canvas.dispose();
  createCanvas(parent);
  canvas.setLayoutData(data);
  parent.layout(true, true);
}

代码示例来源:origin: org.eclipse.platform/org.eclipse.swt.examples

sash.addSelectionListener (widgetSelectedAdapter(event -> {
  if (event.detail != SWT.DRAG) {
    ((GridData)paletteCanvas.getLayoutData()).heightHint = SWT.DEFAULT;
    Rectangle paletteCanvasBounds = paletteCanvas.getBounds();
    int minY = paletteCanvasBounds.y + 20;

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

@Override
  public void imageDownloaded(Image image, String key, boolean returnedImmediately) {
    if (!returnedImmediately) {
      if (lblImage.isDisposed()) {
        return;
      }
      lblImage.setData("Image", image);
      Rectangle bounds = image.getBounds();
      GridData gridData = (GridData) lblImage.getLayoutData();
      gridData.heightHint = bounds.height + 10;
      gridData.widthHint = bounds.width + 16;
      lblImage.setLayoutData(gridData);
      lblImage.getShell().layout(new Control[] {
        lblImage
      });
      Point computeSize = shell.computeSize(600, SWT.DEFAULT, true);
      shell.setSize(computeSize);
    }
  }
});

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

|| drawMode == DRAW_ANIMATE) {
FormData fd = (FormData) canvas.getLayoutData();
if (fd == null) {
  fd = new FormData(imgBounds.width  + hpadding, imgBounds.height);

相关文章

Canvas类方法