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

x33g5p2x  于2022-01-30 转载在 其他  
字(2.4k)|赞(0)|评价(0)|浏览(117)

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

ScrollBar.getPageIncrement介绍

[英]Returns the amount that the receiver's value will be modified by when the page increment/decrement areas are selected.
[中]返回当选择页面递增/递减区域时接收器值将被修改的量。

代码示例

代码示例来源:origin: org.eclipse.swt.cocoa.macosx/x86_64

void setScrollbar () {
  if (itemCount == 0) return;
  ScrollBar verticalBar = getVerticalBar ();
  if (verticalBar == null) return;
  int height = getClientArea ().height;
  ExpandItem item = items [itemCount - 1];
  int maxHeight = item.y + getBandHeight () + spacing;
  if (item.expanded) maxHeight += item.height;

  //claim bottom free space
  if (yCurrentScroll > 0 && height > maxHeight) {
    yCurrentScroll = Math.max (0, yCurrentScroll + maxHeight - height);
    layoutItems (0, false);
  }
  maxHeight += yCurrentScroll;
  
  int selection = Math.min (yCurrentScroll, maxHeight);
  int increment = verticalBar.getIncrement ();
  int pageIncrement = verticalBar.getPageIncrement ();
  verticalBar.setValues(selection, 0, maxHeight, height, increment, pageIncrement);
  verticalBar.setVisible(maxHeight > height);
}

代码示例来源:origin: org.eclipse.scout.sdk.deps/org.eclipse.swt.win32.win32.x86

break;
case OS.SB_PAGEDOWN:
  info.nPos += bar.getPageIncrement ();
  break;
case OS.SB_PAGEUP:
  int pageIncrement = bar.getPageIncrement ();
  info.nPos = Math.max (info.nMin, info.nPos - pageIncrement);
  break;

代码示例来源:origin: com.google.code.maven-play-plugin.org.xhtmlrenderer/core-renderer

break;
case SWT.PAGE_UP:
  pt.y -= getVerticalBar().getPageIncrement();
  break;
case SWT.PAGE_DOWN:
  pt.y += getVerticalBar().getPageIncrement();
  break;
case SWT.HOME:

代码示例来源:origin: org.eclipse.platform/org.eclipse.e4.ui.css.swt

pos = (int) fScrollBarPositions.convertFromScrollBarPosToControlPixel(pos);
int selection = this.fScrollBar.getSelection();
int pageIncrement = this.fScrollBar.getPageIncrement();
if (pos > selection) {
  this.fScrollBar.setSelection(selection + pageIncrement);

代码示例来源:origin: org.eclipse.scout.sdk.deps/org.eclipse.swt.win32.win32.x86

OS.GetScrollInfo (handle, bar.scrollBarType (), info);
if (vertical && !pageScroll) delta *= linesToScroll [0];
int increment = pageScroll ? bar.getPageIncrement () : bar.getIncrement ();
info.nPos -=  increment * delta / OS.WHEEL_DELTA;
OS.SetScrollInfo (handle, bar.scrollBarType (), info, true);

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

vBar.setPageIncrement(vBar.getPageIncrement() - hBarW);

相关文章