本文整理了Java中org.eclipse.swt.widgets.Canvas.addControlListener()
方法的一些代码示例,展示了Canvas.addControlListener()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Canvas.addControlListener()
方法的具体详情如下:
包路径:org.eclipse.swt.widgets.Canvas
类名称: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()));
内容来源于网络,如有侵权,请联系作者删除!