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; }
int getVScrollBarWidth() { int result = 0; if( verticalBar != null && verticalBar.getVisible() ) { result = verticalBar.getSize().x; } return result; }
int getHScrollBarHeight() { int result = 0; if( horizontalBar != null && horizontalBar.getVisible() ) { result = horizontalBar.getSize().y; } return result; } }
@Override int getVScrollBarWidth() { int result = 0; if( ( style & SWT.V_SCROLL ) != 0 ) { result = getVerticalBar().getSize().x; } return result; }
@Override int getHScrollBarHeight() { int result = 0; if( hasHScrollBar() ) { result = getHorizontalBar().getSize().y; } return result; }
@Override int getVScrollBarWidth() { int result = 0; if( hasVScrollBar() ) { result = getVerticalBar().getSize().x; } return result; }
@Override int getVScrollBarWidth() { int result = 0; if( hasVScrollBar() ) { result = getVerticalBar().getSize().x; } return result; }
@Override int getHScrollBarHeight() { int result = 0; if( hasHScrollBar() ) { result = getHorizontalBar().getSize().y; } return result; }
@Override int getHScrollBarHeight() { int result = 0; if( hasHScrollBar() ) { result = getHorizontalBar().getSize().y; } return result; }
@Override int getVScrollBarWidth() { int result = 0; if( hasVScrollBar() ) { result = getVerticalBar().getSize().x; } return result; }
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; }
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; }
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; }
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; }
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; }
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; }
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; }
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; }
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; }
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; }