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

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

本文整理了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

  1. private static void handleScrollBars( Widget root, WidgetTreeVisitor visitor ) {
  2. if( root instanceof Scrollable ) {
  3. Scrollable scrollable = ( Scrollable )root;
  4. ScrollBar horizontalBar = scrollable.getHorizontalBar();
  5. if( horizontalBar != null && horizontalBar.getParent() == scrollable ) {
  6. accept( horizontalBar, visitor );
  7. }
  8. ScrollBar verticalBar = scrollable.getVerticalBar();
  9. if( verticalBar != null && verticalBar.getParent() == scrollable ) {
  10. accept( verticalBar, visitor );
  11. }
  12. }
  13. }

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

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

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

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

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

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

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

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

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

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

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

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

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

  1. @Override
  2. public void saveState(IMemento memento) {
  3. if (viewer == null) {
  4. if (this.memento != null) {
  5. memento.putMemento(this.memento);
  6. }
  7. return;
  8. }
  9. Scrollable scrollable = (Scrollable) viewer.getControl();
  10. Object markers[] = ((IStructuredSelection) viewer.getSelection())
  11. .toArray();
  12. if (markers.length > 0) {
  13. IMemento selectionMem = memento.createChild(TAG_SELECTION);
  14. for (int i = 0; i < markers.length; i++) {
  15. IMemento elementMem = selectionMem.createChild(TAG_MARKER);
  16. IMarker marker = (IMarker) markers[i];
  17. elementMem.putString(TAG_RESOURCE, marker.getResource()
  18. .getFullPath().toString());
  19. elementMem.putString(TAG_ID, String.valueOf(marker.getId()));
  20. }
  21. }
  22. //save vertical position
  23. ScrollBar bar = scrollable.getVerticalBar();
  24. int position = bar != null ? bar.getSelection() : 0;
  25. memento.putString(TAG_VERTICAL_POSITION, String.valueOf(position));
  26. //save horizontal position
  27. bar = scrollable.getHorizontalBar();
  28. position = bar != null ? bar.getSelection() : 0;
  29. memento.putString(TAG_HORIZONTAL_POSITION, String.valueOf(position));
  30. }

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

  1. switch (flags) {
  2. case OS.SB_HORZ:
  3. bar = parent.getVerticalBar ();
  4. break;
  5. case OS.SB_VERT:

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

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

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

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

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

  1. if (fSubjectControl instanceof Scrollable) {
  2. Scrollable scrollable= (Scrollable) fSubjectControl;
  3. ScrollBar vBar= scrollable.getVerticalBar();
  4. if (vBar != null)
  5. vBar.removeSelectionListener(this);

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

  1. if (fSubjectControl instanceof Scrollable) {
  2. Scrollable scrollable= (Scrollable) fSubjectControl;
  3. ScrollBar vBar= scrollable.getVerticalBar();
  4. if (vBar != null)
  5. vBar.removeSelectionListener(this);

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

  1. if (fSubjectControl instanceof Scrollable) {
  2. Scrollable scrollable= (Scrollable) fSubjectControl;
  3. ScrollBar vBar= scrollable.getVerticalBar();
  4. if (vBar != null)
  5. vBar.addSelectionListener(this);

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

  1. if (fSubjectControl instanceof Scrollable) {
  2. Scrollable scrollable= (Scrollable) fSubjectControl;
  3. ScrollBar vBar= scrollable.getVerticalBar();
  4. if (vBar != null)
  5. vBar.addSelectionListener(this);

相关文章

Scrollable类方法