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

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

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

Canvas.getVerticalBar介绍

暂无

代码示例

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

vert = canvas.getVerticalBar();

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

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

| 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

| 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

horizontal.setEnabled(false);
horizontal.addSelectionListener(widgetSelectedAdapter(event -> scrollHorizontally((ScrollBar)event.widget)));
ScrollBar vertical = imageCanvas.getVerticalBar();
vertical.setVisible(true);
vertical.setMinimum(0);
paletteCanvas.getVerticalBar().setVisible(true);
gridData = new GridData();
gridData.horizontalAlignment = GridData.FILL;
vertical = paletteCanvas.getVerticalBar();
vertical.setVisible(true);
vertical.setMinimum(0);

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

bar.addSelectionListener(widgetSelectedAdapter(event -> scrollHorizontal ((ScrollBar)event.widget)));
bar = canvas.getVerticalBar();
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

ScrollBar vertical = paintCanvas.getVerticalBar();
if (vertical != null) {
  displayFDC.yOffset = Math.min(vertical.getSelection(), imageHeight - visibleHeight);

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

void resizeScrollBars() {
  ScrollBar vertical = imageCanvas.getVerticalBar();
  Rectangle canvasBounds = imageCanvas.getClientArea();
  int width = Math.round(imageData.width * xscale);
  vertical = paletteCanvas.getVerticalBar();
  if (imageData.palette.isDirect) {
    vertical.setEnabled(false);

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

final ScrollBar copyVBar = copyImageCanvas.getVerticalBar();
copyVBar.setEnabled(false);
copyVBar.addListener(SWT.Selection, e -> {
final ScrollBar pasteVBar = pasteImageCanvas.getVerticalBar();
pasteVBar.setEnabled(false);
pasteVBar.addListener(SWT.Selection, e -> {

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

vBar = canvas.getVerticalBar();
vBar.setIncrement(2);
vBar.setPageIncrement(20);

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

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

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

fTopInset= trim.y;
fVScrollBar= fScrollCanvas.getVerticalBar();
fVScrollBar.setIncrement(1);
fVScrollBar.setVisible(true);

代码示例来源:origin: org.eclipse/org.eclipse.compare

fTopInset= trim.y;
fVScrollBar= fScrollCanvas.getVerticalBar();
fVScrollBar.setIncrement(1);
fVScrollBar.setVisible(true);

相关文章

Canvas类方法