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

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

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

ScrollBar.isVisible介绍

[英]Returns true if the receiver is visible and all of the receiver's ancestors are visible and false otherwise.
[中]如果接收器可见且所有接收器的祖先都可见,则返回true,否则返回false

代码示例

代码示例来源: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: BiglySoftware/BiglyBT

final boolean was_visible = getVerticalBar().isVisible();

代码示例来源:origin: org.eclipse.scout.sdk.deps/org.eclipse.ui.workbench.texteditor

private int computeTrim(Rectangle area, Table table, int tableWidth) {
  Point preferredSize= computeTableSize(table, area.width, area.height);
  int trim;
  if (tableWidth > 1) {
    trim= tableWidth - table.getClientArea().width;
  } else {
    // initially, the table has no extend and no client area - use the border with
    // plus some padding as educated guess
    trim= 2 * table.getBorderWidth() + 1 ;
  }
  if (preferredSize.y > area.height) {
    // Subtract the scrollbar width from the total column width
    // if a vertical scrollbar will be required, but is not currently showing
    // (in which case it is already subtracted above)
    ScrollBar vBar= table.getVerticalBar();
    if (!vBar.isVisible()) {
      Point vBarSize= vBar.getSize();
      trim += vBarSize.x;
    }
  }
  return trim;
}

代码示例来源:origin: org.eclipse/org.eclipse.ui.workbench.texteditor

private int computeTrim(Rectangle area, Table table, int tableWidth) {
  Point preferredSize= computeTableSize(table, area.width, area.height);
  int trim;
  if (tableWidth > 1) {
    trim= tableWidth - table.getClientArea().width;
  } else {
    // initially, the table has no extend and no client area - use the border with
    // plus some padding as educated guess
    trim= 2 * table.getBorderWidth() + 1 ;
  }
  if (preferredSize.y > area.height) {
    // Subtract the scrollbar width from the total column width
    // if a vertical scrollbar will be required, but is not currently showing
    // (in which case it is already subtracted above)
    ScrollBar vBar= table.getVerticalBar();
    if (!vBar.isVisible()) {
      Point vBarSize= vBar.getSize();
      trim += vBarSize.x;
    }
  }
  return trim;
}

代码示例来源:origin: org.eclipse.platform/org.eclipse.ui.workbench.texteditor

private int computeTrim(Rectangle area, Table table, int tableWidth) {
  Point preferredSize= computeTableSize(table, area.width, area.height);
  int trim;
  if (tableWidth > 1) {
    trim= tableWidth - table.getClientArea().width;
  } else {
    // initially, the table has no extend and no client area - use the border with
    // plus some padding as educated guess
    trim= 2 * table.getBorderWidth() + 1 ;
  }
  if (preferredSize.y > area.height) {
    // Subtract the scrollbar width from the total column width
    // if a vertical scrollbar will be required, but is not currently showing
    // (in which case it is already subtracted above)
    ScrollBar vBar= table.getVerticalBar();
    if (!vBar.isVisible()) {
      Point vBarSize= vBar.getSize();
      trim += vBarSize.x;
    }
  }
  return trim;
}

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

return;
if (this.fScrollBar.isVisible()) {
  if (fCheckedTimes > 20) {

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

&& (verticalBar == null || !verticalBar.isVisible())) {
  showItem (0);
} else {

代码示例来源:origin: org.apache.directory.studio/ldapbrowser.common

public void controlResized( ControlEvent e )
  {
    if ( tree.getClientArea().width > 0 )
    {
      int width = tree.getClientArea().width - 2 * tree.getBorderWidth();
      if ( tree.getVerticalBar().isVisible() )
      {
        width -= tree.getVerticalBar().getSize().x;
      }
      tree.getColumn( EntryEditorWidgetTableMetadata.VALUE_COLUMN_INDEX ).setWidth(
        width - tree.getColumn( EntryEditorWidgetTableMetadata.KEY_COLUMN_INDEX ).getWidth() );
    }
  }
} );

代码示例来源: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: BiglySoftware/BiglyBT

vBar.setVisible(false);
} else {
  if (!vBar.isVisible()) {
    vBar.setVisible(true);
    vBar.setEnabled(true);
int tableSize = cTable.getSize().x;
int max = columnsWidth;
if (vBarValid && vBar.isVisible() && getScrollbarsMode() == SWT.NONE) {
  int vBarW = vBar.getSize().x;
  hBar.setVisible(false);
} else {
  if (!hBar.isVisible()) {
    hBar.setVisible(true);
    hBar.setEnabled(true);
if (vBarValid && hBar.isVisible()) {
  int hBarW = getScrollbarsMode() == SWT.NONE ? hBar.getSize().y : 0;

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

if (verticalBar != null && scrollable.getScrollbarsMode() == SWT.NONE && !verticalBar.isVisible()) {
  fixedWidth += verticalBar.getSize().x;

代码示例来源:origin: org.eclipse.scout.sdk.deps/org.eclipse.jface

if (verticalBar != null && scrollable.getScrollbarsMode() == SWT.NONE && !verticalBar.isVisible()) {
  fixedWidth += verticalBar.getSize().x;

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

int emptyHBarSpace = hBar.isVisible () ? 0 : hBar.getSize ().y;
list.setSize (listRect.width, listRect.height - emptyHBarSpace);
popup.setBounds (x, y, width, height - emptyHBarSpace);

代码示例来源:origin: org.eclipse.platform/org.eclipse.swt.gtk.linux.s390x

int emptyHBarSpace = hBar.isVisible () ? 0 : hBar.getSize ().y;
list.setSize (listRect.width, listRect.height - emptyHBarSpace);
popup.setBounds (x, y, width, height - emptyHBarSpace);

代码示例来源:origin: org.eclipse.platform/org.eclipse.swt.gtk.linux.ppc

int emptyHBarSpace = hBar.isVisible () ? 0 : hBar.getSize ().y;
list.setSize (listRect.width, listRect.height - emptyHBarSpace);
popup.setBounds (x, y, width, height - emptyHBarSpace);

代码示例来源:origin: org.eclipse.platform/org.eclipse.swt.gtk.aix.ppc

int emptyHBarSpace = hBar.isVisible () ? 0 : hBar.getSize ().y;
list.setSize (listRect.width, listRect.height - emptyHBarSpace);
popup.setBounds (x, y, width, height - emptyHBarSpace);

相关文章