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

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

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

Canvas.addControlListener介绍

暂无

代码示例

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

canvas.addControlListener( new ControlAdapter() {

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

@Override
public void addControlListener(ControlListener listener) {
  super.addControlListener(listener);
  addListener(ControlListener.class, listener);
}

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

@Override
public void addControlListener(ControlListener listener) {
  super.addControlListener(listener);
  addListener(ControlListener.class, listener);
}

代码示例来源:origin: rinde/RinSim

/**
 * Configure shell.
 */
void createContent(Composite parent) {
 canvas = new Canvas(parent, SWT.DOUBLE_BUFFERED | SWT.NONE
  | SWT.NO_REDRAW_RESIZE | SWT.V_SCROLL | SWT.H_SCROLL);
 canvas.setBackground(display.getSystemColor(SWT.COLOR_WIDGET_BACKGROUND));
 origin = new org.eclipse.swt.graphics.Point(0, 0);
 size = START_SCREEN_SIZE;
 canvas.addPaintListener(this);
 canvas.addControlListener(this);
 this.layout();
 timeLabel = new Label(canvas, SWT.NONE);
 timeLabel.setText("hello world");
 timeLabel.pack();
 timeLabel.setLocation(TIME_LABEL_LOC);
 timeLabel
  .setBackground(canvas.getDisplay().getSystemColor(SWT.COLOR_WHITE));
 hBar = canvas.getHorizontalBar();
 hBar.addSelectionListener(this);
 vBar = canvas.getVerticalBar();
 vBar.addSelectionListener(this);
}

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

gc.drawString(canvasString, cx + (size.x - extent.x) / 2, cy - extent.y + (size.y - 10) / 2, true);
});
canvas.addControlListener(ControlListener.controlResizedAdapter(e -> {
  Point size = canvas.getSize();
  maxX = size.x * 3 / 2;

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

paintCanvas.addControlListener(ControlListener.controlResizedAdapter(e -> handleResize()));

相关文章

Canvas类方法