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

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

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

Canvas.getHorizontalBar介绍

暂无

代码示例

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

selectedNote = null;
hori = canvas.getHorizontalBar();
vert = canvas.getVerticalBar();

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

impactFinished = false;
hori = canvas.getHorizontalBar();
vert = canvas.getVerticalBar();

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

void resetScrollBars() {
  if (image == null) return;
  ix = 0; iy = 0; py = 0;
  resizeScrollBars();
  imageCanvas.getHorizontalBar().setSelection(0);
  imageCanvas.getVerticalBar().setSelection(0);
  paletteCanvas.getVerticalBar().setSelection(0);
}

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

canvas = Optional.of(new Canvas(parent, SWT.DOUBLE_BUFFERED | SWT.NONE
 | SWT.V_SCROLL | SWT.H_SCROLL));
final ScrollBar hBar = canvas.get().getHorizontalBar();
final ScrollBar vBar = canvas.get().getVerticalBar();

代码示例来源: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: com.github.rinde/rinsim-pdptw

canvas = Optional.of(new Canvas(parent, SWT.DOUBLE_BUFFERED | SWT.NONE
 | SWT.V_SCROLL | SWT.H_SCROLL));
final ScrollBar hBar = canvas.get().getHorizontalBar();
final ScrollBar vBar = canvas.get().getVerticalBar();

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

ScrollBar horizontal = imageCanvas.getHorizontalBar();
horizontal.setVisible(true);
horizontal.setMinimum(0);

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

resizeScrollBars();
}));
ScrollBar bar = canvas.getHorizontalBar();
if (bar != null) {
  hookListeners (bar);

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

/**
 * Resizes the maximum and thumb of both scrollbars.
 */
void resizeScrollBars () {
  Rectangle clientArea = canvas.getClientArea();
  ScrollBar bar = canvas.getHorizontalBar();
  if (bar != null) {
    bar.setMaximum(maxX);
    bar.setThumb(clientArea.width);
    bar.setPageIncrement(clientArea.width);
  }
  bar = canvas.getVerticalBar();
  if (bar != null) {
    bar.setMaximum(maxY);
    bar.setThumb(clientArea.height);
    bar.setPageIncrement(clientArea.height);
  }
}

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

visibleHeight = visibleRect.height;
ScrollBar horizontal = paintCanvas.getHorizontalBar();
if (horizontal != null) {
  displayFDC.xOffset = Math.min(horizontal.getSelection(), imageWidth - visibleWidth);

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

final ScrollBar copyHBar = copyImageCanvas.getHorizontalBar();
copyHBar.setEnabled(false);
copyHBar.addListener(SWT.Selection, e -> {
pasteImageCanvas.setLayoutData(data);
final Point pasteOrigin = new Point(0, 0);
final ScrollBar pasteHBar = pasteImageCanvas.getHorizontalBar();
pasteHBar.setEnabled(false);
pasteHBar.addListener(SWT.Selection, e -> {

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

hBar = canvas.getHorizontalBar();
hBar.setIncrement(2);
hBar.setPageIncrement(20);

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

void resizeScrollBars() {
  ScrollBar horizontal = imageCanvas.getHorizontalBar();
  ScrollBar vertical = imageCanvas.getVerticalBar();
  Rectangle canvasBounds = imageCanvas.getClientArea();

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

ScrollBar horizontal = paintCanvas.getHorizontalBar();
horizontal.setVisible(true);
horizontal.addSelectionListener(widgetSelectedAdapter(event -> scrollHorizontally((ScrollBar)event.widget)));

相关文章

Canvas类方法