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

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

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

Scrollable.getVerticalBar介绍

[英]Returns the receiver's vertical scroll bar if it has one, and null if it does not.
[中]返回接收器的垂直滚动条(如果有),如果没有则返回null。

代码示例

代码示例来源:origin: org.eclipse.rap/org.eclipse.rap.rwt

private static void handleScrollBars( Widget root, WidgetTreeVisitor visitor ) {
 if( root instanceof Scrollable ) {
  Scrollable scrollable = ( Scrollable )root;
  ScrollBar horizontalBar = scrollable.getHorizontalBar();
  if( horizontalBar != null && horizontalBar.getParent() == scrollable ) {
   accept( horizontalBar, visitor );
  }
  ScrollBar verticalBar = scrollable.getVerticalBar();
  if( verticalBar != null && verticalBar.getParent() == scrollable ) {
   accept( verticalBar, visitor );
  }
 }
}

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

maxWidth= Math.max(maxWidth, convertWidthInCharsToPixels(item.getDisplayName().length()));
ScrollBar vBar= ((Scrollable) fListViewer.getControl()).getVerticalBar();
if (vBar != null)
  maxWidth += vBar.getSize().x * 3; // scrollbars and tree indentation guess

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

maxWidth= Math.max(maxWidth, convertWidthInCharsToPixels(item.getDisplayName().length()));
ScrollBar vBar= ((Scrollable) fTreeViewer.getControl()).getVerticalBar();
if (vBar != null)
  maxWidth += vBar.getSize().x * 3; // scrollbars and tree indentation guess

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

if (adjustForScrollBar && scrollable.getVerticalBar() != null) {
  width += scrollable.getVerticalBar().getSize().x;

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

if (adjustForScrollBar && scrollable.getVerticalBar() != null) {
  width += scrollable.getVerticalBar().getSize().x;

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

maxWidth= Math.max(maxWidth, convertWidthInCharsToPixels(item.getDisplayName().length()));
ScrollBar vBar= ((Scrollable) fTreeViewer.getControl()).getVerticalBar();
if (vBar != null)
  maxWidth += vBar.getSize().x * 3; // scrollbars and tree indentation guess

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

ScrollBar bar = scrollable.getVerticalBar();
if (bar != null) {
  try {

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

@Override
public void saveState(IMemento memento) {
  if (viewer == null) {
    if (this.memento != null) {
      memento.putMemento(this.memento);
    }
    return;
  }
  Scrollable scrollable = (Scrollable) viewer.getControl();
  Object markers[] = ((IStructuredSelection) viewer.getSelection())
      .toArray();
  if (markers.length > 0) {
    IMemento selectionMem = memento.createChild(TAG_SELECTION);
    for (int i = 0; i < markers.length; i++) {
      IMemento elementMem = selectionMem.createChild(TAG_MARKER);
      IMarker marker = (IMarker) markers[i];
      elementMem.putString(TAG_RESOURCE, marker.getResource()
          .getFullPath().toString());
      elementMem.putString(TAG_ID, String.valueOf(marker.getId()));
    }
  }
  //save vertical position
  ScrollBar bar = scrollable.getVerticalBar();
  int position = bar != null ? bar.getSelection() : 0;
  memento.putString(TAG_VERTICAL_POSITION, String.valueOf(position));
  //save horizontal position
  bar = scrollable.getHorizontalBar();
  position = bar != null ? bar.getSelection() : 0;
  memento.putString(TAG_HORIZONTAL_POSITION, String.valueOf(position));
}

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

switch (flags) {
  case OS.SB_HORZ:
    bar = parent.getVerticalBar ();
    break;
  case OS.SB_VERT:

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

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

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

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

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

if (fSubjectControl instanceof Scrollable) {
  Scrollable scrollable= (Scrollable) fSubjectControl;
  ScrollBar vBar= scrollable.getVerticalBar();
  if (vBar != null)
    vBar.removeSelectionListener(this);

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

if (fSubjectControl instanceof Scrollable) {
  Scrollable scrollable= (Scrollable) fSubjectControl;
  ScrollBar vBar= scrollable.getVerticalBar();
  if (vBar != null)
    vBar.removeSelectionListener(this);

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

if (fSubjectControl instanceof Scrollable) {
  Scrollable scrollable= (Scrollable) fSubjectControl;
  ScrollBar vBar= scrollable.getVerticalBar();
  if (vBar != null)
    vBar.addSelectionListener(this);

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

if (fSubjectControl instanceof Scrollable) {
  Scrollable scrollable= (Scrollable) fSubjectControl;
  ScrollBar vBar= scrollable.getVerticalBar();
  if (vBar != null)
    vBar.addSelectionListener(this);

相关文章

Scrollable类方法