本文整理了Java中org.eclipse.swt.widgets.ScrollBar.setIncrement()
方法的一些代码示例,展示了ScrollBar.setIncrement()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。ScrollBar.setIncrement()
方法的具体详情如下:
包路径:org.eclipse.swt.widgets.ScrollBar
类名称:ScrollBar
方法名:setIncrement
[英]Sets the amount that the receiver's value will be modified by when the up/down (or right/left) arrows are pressed to the argument, which must be at least one.
[中]设置在参数上按向上/向下(或向右/向左)箭头时,接收器值将被修改的量,该值必须至少为一。
代码示例来源:origin: pentaho/pentaho-kettle
sbHorizontal.setMinimum( 0 );
sbHorizontal.setPageIncrement( size_widget.width );
sbHorizontal.setIncrement( 10 );
sbVertical.setMinimum( 0 );
sbVertical.setPageIncrement( size_widget.height );
sbVertical.setIncrement( 10 );
代码示例来源:origin: BiglySoftware/BiglyBT
@Override
public void runSupport() {
if (vBar != null && !vBar.isDisposed()) {
vBar.setIncrement(defaultRowHeight);
}
}
});
代码示例来源:origin: org.eclipse.scout.sdk.deps/org.eclipse.ui.forms
private void initializeScrollBars() {
ScrollBar hbar = getHorizontalBar();
if (hbar != null) {
hbar.setIncrement(H_SCROLL_INCREMENT);
}
ScrollBar vbar = getVerticalBar();
if (vbar != null) {
vbar.setIncrement(V_SCROLL_INCREMENT);
}
FormUtil.updatePageIncrement(this);
}
代码示例来源:origin: org.eclipse.platform/org.eclipse.ui.forms
private void initializeScrollBars() {
ScrollBar hbar = getHorizontalBar();
if (hbar != null) {
hbar.setIncrement(H_SCROLL_INCREMENT);
}
ScrollBar vbar = getVerticalBar();
if (vbar != null) {
vbar.setIncrement(V_SCROLL_INCREMENT);
}
FormUtil.updatePageIncrement(this);
}
代码示例来源:origin: org.eclipse.scout.sdk.deps/org.eclipse.swt.win32.win32.x86
/**
* Calculates the scroll bars
*/
void calculateScrollBars() {
ScrollBar horizontalBar = getHorizontalBar();
ScrollBar verticalBar = getVerticalBar();
setScrollBars(true);
if (verticalBar != null) {
verticalBar.setIncrement(getVerticalIncrement());
}
if (horizontalBar != null) {
horizontalBar.setIncrement(getHorizontalIncrement());
}
}
/**
代码示例来源:origin: org.eclipse.platform/org.eclipse.swt.gtk.aix.ppc
/**
* Calculates the scroll bars
*/
void calculateScrollBars() {
ScrollBar horizontalBar = getHorizontalBar();
ScrollBar verticalBar = getVerticalBar();
setScrollBars(true);
if (verticalBar != null) {
verticalBar.setIncrement(getVerticalIncrement());
}
if (horizontalBar != null) {
horizontalBar.setIncrement(getHorizontalIncrement());
}
}
/**
代码示例来源:origin: org.eclipse.platform/org.eclipse.swt.gtk.linux.ppc
/**
* Calculates the scroll bars
*/
void calculateScrollBars() {
ScrollBar horizontalBar = getHorizontalBar();
ScrollBar verticalBar = getVerticalBar();
setScrollBars(true);
if (verticalBar != null) {
verticalBar.setIncrement(getVerticalIncrement());
}
if (horizontalBar != null) {
horizontalBar.setIncrement(getHorizontalIncrement());
}
}
/**
代码示例来源:origin: org.eclipse.platform/org.eclipse.swt.gtk.linux.s390x
/**
* Calculates the scroll bars
*/
void calculateScrollBars() {
ScrollBar horizontalBar = getHorizontalBar();
ScrollBar verticalBar = getVerticalBar();
setScrollBars(true);
if (verticalBar != null) {
verticalBar.setIncrement(getVerticalIncrement());
}
if (horizontalBar != null) {
horizontalBar.setIncrement(getHorizontalIncrement());
}
}
/**
代码示例来源:origin: org.eclipse.swt.cocoa.macosx/x86_64
/**
* Calculates the scroll bars
*/
void calculateScrollBars() {
ScrollBar horizontalBar = getHorizontalBar();
ScrollBar verticalBar = getVerticalBar();
setScrollBars(true);
if (verticalBar != null) {
verticalBar.setIncrement(getVerticalIncrement());
}
if (horizontalBar != null) {
horizontalBar.setIncrement(getHorizontalIncrement());
}
}
/**
代码示例来源:origin: org.eclipse/org.eclipse.ajdt.ui
public void controlResized(ControlEvent e) {
Rectangle clientArea = fScrolledComposite.getClientArea();
ScrollBar verticalBar= fScrolledComposite.getVerticalBar();
verticalBar.setIncrement(VERTICAL_SCROLL_INCREMENT);
verticalBar.setPageIncrement(clientArea.height - verticalBar.getIncrement());
ScrollBar horizontalBar= fScrolledComposite.getHorizontalBar();
horizontalBar.setIncrement(HORIZONTAL_SCROLL_INCREMENT);
horizontalBar.setPageIncrement(clientArea.width - horizontalBar.getIncrement());
}
});
代码示例来源:origin: org.eclipse.recommenders.extdoc/rcp
private void createContentArea() {
scrollable = new ScrolledComposite(sash, SWT.H_SCROLL | SWT.V_SCROLL);
scrollable.getVerticalBar().setIncrement(20);
scrollable.setExpandHorizontal(true);
scrollable.setExpandVertical(true);
content = new Composite(scrollable, SWT.NONE);
content.setLayout(new GridLayout());
content.setFont(JFaceResources.getDialogFont());
ExtdocUtils.setInfoBackgroundColor(content);
scrollable.setContent(content);
}
代码示例来源:origin: org.eclipse/org.eclipse.compare
public ImageCanvas(Composite parent, int style) {
super(parent, style | SWT.H_SCROLL | SWT.V_SCROLL);
ScrollBar sb= getHorizontalBar();
sb.setIncrement(20);
sb.addListener(SWT.Selection, new Listener() {
public void handleEvent(Event e) {
repaint();
}
});
sb= getVerticalBar();
sb.setIncrement(20);
sb.addListener(SWT.Selection, new Listener() {
public void handleEvent(Event e) {
repaint();
}
});
addListener(SWT.Resize, new Listener() {
public void handleEvent(Event e) {
updateScrollbars();
}
});
addListener(SWT.Paint, new Listener() {
public void handleEvent(Event event) {
paint(event.gc);
}
});
}
代码示例来源:origin: org.eclipse.platform/org.eclipse.compare
public ImageCanvas(Composite parent, int style) {
super(parent, style | SWT.H_SCROLL | SWT.V_SCROLL);
ScrollBar sb= getHorizontalBar();
sb.setIncrement(20);
sb.addListener(SWT.Selection, e -> repaint());
sb= getVerticalBar();
sb.setIncrement(20);
sb.addListener(SWT.Selection, e -> repaint());
addListener(SWT.Resize, e -> updateScrollbars());
addListener(SWT.Paint, event -> paint(event.gc));
}
代码示例来源:origin: com.google.code.maven-play-plugin.org.xhtmlrenderer/core-renderer
/**
* Update the scrollbars
*
* @return true if we need to relayout the whole thing
*/
protected boolean updateScrollBars() {
Point size = getScreenSize();
ScrollBar hBar = getHorizontalBar(), vBar = getVerticalBar();
boolean needRelayout = false;
hBar.setMaximum(_drawnSize.x);
hBar.setThumb(Math.min(_drawnSize.x, size.x));
hBar.setIncrement(15); // TODO something meaningful ?
hBar.setPageIncrement(size.x);
boolean visible = !(_origin.x == 0 && _drawnSize.x <= size.x);
hBar.setVisible(visible);
size = getScreenSize();
vBar.setMaximum(_drawnSize.y);
vBar.setThumb(Math.min(_drawnSize.y, size.y));
vBar.setIncrement(15); // TODO line height here
vBar.setPageIncrement(size.y);
visible = !(_origin.y == 0 && _drawnSize.y <= size.y);
if (!isPrint() && vBar.isVisible() != visible) {
needRelayout = true;
}
vBar.setVisible(visible);
return needRelayout;
}
代码示例来源:origin: org.eclipse.platform/org.eclipse.ui.forms
if (vbar != null) {
if (getClientArea().height - 5 < V_SCROLL_INCREMENT)
getVerticalBar().setIncrement(getClientArea().height - 5);
else
getVerticalBar().setIncrement(V_SCROLL_INCREMENT);
代码示例来源:origin: org.eclipse/org.eclipse.jdt.ui
spc.getVerticalBar().setIncrement(5);
代码示例来源:origin: org.eclipse.scout.sdk.deps/org.eclipse.jdt.ui
spc.getVerticalBar().setIncrement(5);
代码示例来源:origin: org.eclipse.jdt/org.eclipse.jdt.ui
spc.getVerticalBar().setIncrement(5);
代码示例来源:origin: org.eclipse.scout.sdk.deps/org.eclipse.ui.forms
if (vbar != null) {
if (getClientArea().height - 5 < V_SCROLL_INCREMENT)
getVerticalBar().setIncrement(getClientArea().height - 5);
else
getVerticalBar().setIncrement(V_SCROLL_INCREMENT);
代码示例来源:origin: org.eclipse.scout.sdk.deps/org.eclipse.swt.win32.win32.x86
horizontalBar.setIncrement (INCREMENT);
horizontalBar.setPageIncrement (info.nPage);
内容来源于网络,如有侵权,请联系作者删除!