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

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

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

Canvas.setSize介绍

暂无

代码示例

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

canvas.setSize( bounds.width, bounds.height );

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

canvas.setSize( bounds.width, bounds.height );

代码示例来源:origin: be.yildiz-games/module-window-swt

public Canvas createCanvas(int width, int height) {
  Canvas canvas = new Canvas(this.shell, SWT.NONE);
  canvas.setSize(width, height);
  return canvas;
}

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

void setHeaderImageHeight (int value) {
  headerImageHeight = value;
  Point headerSize = header.getSize ();
  int newHeaderHeight = Math.max (fontHeight, headerImageHeight) + 2 * getHeaderPadding ();
  if (headerSize.y != newHeaderHeight) {
    header.setSize (headerSize.x, newHeaderHeight);
  }
}
/**

代码示例来源:origin: org.xworker/xworker_swt

public void setCanvasSize(int canvasWidth, int canvasHeight) {
  if(canvasWidth > width || this.canvasWidth <= 0) {
    this.canvasWidth = canvasWidth;
  }
  if(canvasHeight > height || this.canvasHeight <= 0) {
    this.canvasHeight = canvasHeight;
  }
  
  if(canvasHeight > 0 && canvasWidth > 0){
    imageCanvas.setSize(this.canvasWidth, this.canvasHeight);
    scrollComposite.setMinSize(this.canvasWidth, this.canvasHeight);
    scrollComposite.layout();
  }
  
}

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

end1.setSize(width, width);
end2 = new Canvas (parent.getShell(), SWT.BORDER);
end2.setSize(width, width);
  caretControl.setSize(trimRect.width-(2*hDelta), width);
  caretControl.setLocation(trimRect.x + hDelta, trimRect.y + trimRect.height + threshold);
  bb = caretControl.getBounds();
  break;
case SWT.BOTTOM:
  caretControl.setSize(trimRect.width-(2*hDelta), width);
  caretControl.setLocation(trimRect.x + hDelta, trimRect.y - threshold);
  bb = caretControl.getBounds();
  break;
case SWT.LEFT:
  caretControl.setSize(width, trimRect.height -(2*vDelta));
  caretControl.setLocation(trimRect.x + trimRect.width + threshold,
              trimRect.y + vDelta);
  break;
case SWT.RIGHT:
  caretControl.setSize(width, trimRect.height -(2*vDelta));
  caretControl.setLocation(trimRect.x - threshold,
              trimRect.y + vDelta);

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

if (drawMode != DRAW_CENTER && drawMode != DRAW_HCENTER
    && drawMode != DRAW_STRETCH && drawMode != DRAW_SCALEDOWN_OR_CENTER) {
  canvas.setSize(imgBounds.width + hpadding, imgBounds.height);
  canvas.setData("oldSize", canvas.getSize());

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

: maxSize.x, maxSize.y);
canvas.setLayoutData(layoutData);
canvas.setSize(SWT.DEFAULT, maxSize.y);
setControl(canvas);

代码示例来源:origin: com.github.rinde/rinsim-problem

barData.heightHint = 22;
barCanvas.setLayoutData(barData);
barCanvas.setSize(20, 20);
barCanvas.addPaintListener(new PaintListener() {
 @Override

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

header.setSize (clientArea.width, headerHeight);

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

int newHeaderHeight = Math.max (fontHeight, headerImageHeight) + 2 * getHeaderPadding ();
if (headerSize.y != newHeaderHeight) {
  header.setSize (headerSize.x, newHeaderHeight);

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

border.setSize(dragSize.x+2, dragSize.y+2);

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

pbWidth = width - OFFSET_LEFT - OFFSET_RIGHT;
canvas.setSize(width, height);
Font font = canvas.getFont();
FontData[] fdata = font.getFontData();

相关文章

Canvas类方法