本文整理了Java中org.eclipse.swt.widgets.ScrollBar.getSize()
方法的一些代码示例,展示了ScrollBar.getSize()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。ScrollBar.getSize()
方法的具体详情如下:
包路径:org.eclipse.swt.widgets.ScrollBar
类名称:ScrollBar
方法名:getSize
[英]Returns a point describing the receiver's size. The x coordinate of the result is the width of the receiver. The y coordinate of the result is the height of the receiver.
[中]返回一个描述接收器大小的点。结果的x坐标是接收器的宽度。结果的y坐标是接收器的高度。
代码示例来源:origin: pentaho/pentaho-kettle
protected int getTableWidth( Table table ) {
int width = table.getSize().x - 2;
if ( table.getVerticalBar() != null && table.getVerticalBar().isVisible() ) {
width -= table.getVerticalBar().getSize().x;
}
return width;
}
代码示例来源:origin: org.eclipse.rap/org.eclipse.rap.rwt
int getVScrollBarWidth() {
int result = 0;
if( verticalBar != null && verticalBar.getVisible() ) {
result = verticalBar.getSize().x;
}
return result;
}
代码示例来源:origin: org.eclipse.rap/org.eclipse.rap.rwt
int getHScrollBarHeight() {
int result = 0;
if( horizontalBar != null && horizontalBar.getVisible() ) {
result = horizontalBar.getSize().y;
}
return result;
}
}
代码示例来源:origin: org.eclipse.rap/org.eclipse.rap.rwt
@Override
int getVScrollBarWidth() {
int result = 0;
if( ( style & SWT.V_SCROLL ) != 0 ) {
result = getVerticalBar().getSize().x;
}
return result;
}
代码示例来源:origin: org.eclipse.rap/org.eclipse.rap.rwt
@Override
int getHScrollBarHeight() {
int result = 0;
if( hasHScrollBar() ) {
result = getHorizontalBar().getSize().y;
}
return result;
}
代码示例来源:origin: org.eclipse.rap/org.eclipse.rap.rwt
@Override
int getVScrollBarWidth() {
int result = 0;
if( hasVScrollBar() ) {
result = getVerticalBar().getSize().x;
}
return result;
}
代码示例来源:origin: org.eclipse.rap/org.eclipse.rap.rwt
@Override
int getVScrollBarWidth() {
int result = 0;
if( hasVScrollBar() ) {
result = getVerticalBar().getSize().x;
}
return result;
}
代码示例来源:origin: org.eclipse.rap/org.eclipse.rap.rwt
@Override
int getHScrollBarHeight() {
int result = 0;
if( hasHScrollBar() ) {
result = getHorizontalBar().getSize().y;
}
return result;
}
代码示例来源:origin: org.eclipse.rap/org.eclipse.rap.rwt
@Override
int getHScrollBarHeight() {
int result = 0;
if( hasHScrollBar() ) {
result = getHorizontalBar().getSize().y;
}
return result;
}
代码示例来源:origin: org.eclipse.rap/org.eclipse.rap.rwt
@Override
int getVScrollBarWidth() {
int result = 0;
if( hasVScrollBar() ) {
result = getVerticalBar().getSize().x;
}
return result;
}
代码示例来源:origin: org.eclipse.rap/org.eclipse.rap.rwt
final int getVisibleItemCount() {
int clientHeight = getBounds().height;
if( ( style & SWT.H_SCROLL ) != 0 ) {
clientHeight -= getHorizontalBar().getSize().y;
}
int result = 0;
if( clientHeight >= 0 ) {
int itemHeight = getItemHeight();
result = clientHeight / itemHeight;
}
return result;
}
代码示例来源:origin: org.eclipse.platform/org.eclipse.swt.gtk.aix.ppc
boolean needVScroll(Rectangle contentRect, boolean hVisible) {
ScrollBar vBar = getVerticalBar();
if (vBar == null) return false;
Rectangle hostRect = getBounds();
int border = getBorderWidth();
hostRect.height -= 2*border;
ScrollBar hBar = getHorizontalBar();
if (hVisible && hBar != null) hostRect.height -= hBar.getSize().y;
if (!expandVertical && contentRect.height > hostRect.height) return true;
if (expandVertical && minHeight > hostRect.height) return true;
return false;
}
代码示例来源:origin: org.eclipse.scout.sdk.deps/org.eclipse.swt.win32.win32.x86
boolean needHScroll(Rectangle contentRect, boolean vVisible) {
ScrollBar hBar = getHorizontalBar();
if (hBar == null) return false;
Rectangle hostRect = getBounds();
int border = getBorderWidth();
hostRect.width -= 2*border;
ScrollBar vBar = getVerticalBar();
if (vVisible && vBar != null) hostRect.width -= vBar.getSize().x;
if (!expandHorizontal && contentRect.width > hostRect.width) return true;
if (expandHorizontal && minWidth > hostRect.width) return true;
return false;
}
代码示例来源:origin: org.eclipse.scout.sdk.deps/org.eclipse.swt.win32.win32.x86
boolean needVScroll(Rectangle contentRect, boolean hVisible) {
ScrollBar vBar = getVerticalBar();
if (vBar == null) return false;
Rectangle hostRect = getBounds();
int border = getBorderWidth();
hostRect.height -= 2*border;
ScrollBar hBar = getHorizontalBar();
if (hVisible && hBar != null) hostRect.height -= hBar.getSize().y;
if (!expandVertical && contentRect.height > hostRect.height) return true;
if (expandVertical && minHeight > hostRect.height) return true;
return false;
}
代码示例来源:origin: org.eclipse.swt.cocoa.macosx/x86_64
boolean needVScroll(Rectangle contentRect, boolean hVisible) {
ScrollBar vBar = getVerticalBar();
if (vBar == null) return false;
Rectangle hostRect = getBounds();
int border = getBorderWidth();
hostRect.height -= 2*border;
ScrollBar hBar = getHorizontalBar();
if (hVisible && hBar != null) hostRect.height -= hBar.getSize().y;
if (!expandVertical && contentRect.height > hostRect.height) return true;
if (expandVertical && minHeight > hostRect.height) return true;
return false;
}
代码示例来源:origin: org.eclipse.platform/org.eclipse.swt.gtk.linux.s390x
boolean needHScroll(Rectangle contentRect, boolean vVisible) {
ScrollBar hBar = getHorizontalBar();
if (hBar == null) return false;
Rectangle hostRect = getBounds();
int border = getBorderWidth();
hostRect.width -= 2*border;
ScrollBar vBar = getVerticalBar();
if (vVisible && vBar != null) hostRect.width -= vBar.getSize().x;
if (!expandHorizontal && contentRect.width > hostRect.width) return true;
if (expandHorizontal && minWidth > hostRect.width) return true;
return false;
}
代码示例来源:origin: org.eclipse.swt.cocoa.macosx/x86_64
boolean needHScroll(Rectangle contentRect, boolean vVisible) {
ScrollBar hBar = getHorizontalBar();
if (hBar == null) return false;
Rectangle hostRect = getBounds();
int border = getBorderWidth();
hostRect.width -= 2*border;
ScrollBar vBar = getVerticalBar();
if (vVisible && vBar != null) hostRect.width -= vBar.getSize().x;
if (!expandHorizontal && contentRect.width > hostRect.width) return true;
if (expandHorizontal && minWidth > hostRect.width) return true;
return false;
}
代码示例来源:origin: org.eclipse.platform/org.eclipse.swt.gtk.aix.ppc
boolean needHScroll(Rectangle contentRect, boolean vVisible) {
ScrollBar hBar = getHorizontalBar();
if (hBar == null) return false;
Rectangle hostRect = getBounds();
int border = getBorderWidth();
hostRect.width -= 2*border;
ScrollBar vBar = getVerticalBar();
if (vVisible && vBar != null) hostRect.width -= vBar.getSize().x;
if (!expandHorizontal && contentRect.width > hostRect.width) return true;
if (expandHorizontal && minWidth > hostRect.width) return true;
return false;
}
代码示例来源:origin: org.eclipse.platform/org.eclipse.swt.gtk.linux.ppc
boolean needHScroll(Rectangle contentRect, boolean vVisible) {
ScrollBar hBar = getHorizontalBar();
if (hBar == null) return false;
Rectangle hostRect = getBounds();
int border = getBorderWidth();
hostRect.width -= 2*border;
ScrollBar vBar = getVerticalBar();
if (vVisible && vBar != null) hostRect.width -= vBar.getSize().x;
if (!expandHorizontal && contentRect.width > hostRect.width) return true;
if (expandHorizontal && minWidth > hostRect.width) return true;
return false;
}
代码示例来源:origin: org.eclipse.platform/org.eclipse.swt.gtk.linux.ppc
boolean needVScroll(Rectangle contentRect, boolean hVisible) {
ScrollBar vBar = getVerticalBar();
if (vBar == null) return false;
Rectangle hostRect = getBounds();
int border = getBorderWidth();
hostRect.height -= 2*border;
ScrollBar hBar = getHorizontalBar();
if (hVisible && hBar != null) hostRect.height -= hBar.getSize().y;
if (!expandVertical && contentRect.height > hostRect.height) return true;
if (expandVertical && minHeight > hostRect.height) return true;
return false;
}
内容来源于网络,如有侵权,请联系作者删除!