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

x33g5p2x  于2022-01-29 转载在 其他  
字(8.6k)|赞(0)|评价(0)|浏览(240)

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

Table.getVerticalBar介绍

暂无

代码示例

代码示例来源:origin: pentaho/pentaho-kettle

  1. @Override
  2. public ScrollBar getVerticalBar() {
  3. return table.getVerticalBar();
  4. }

代码示例来源:origin: pentaho/pentaho-kettle

  1. protected int getTableWidth( Table table ) {
  2. int width = table.getSize().x - 2;
  3. if ( table.getVerticalBar() != null && table.getVerticalBar().isVisible() ) {
  4. width -= table.getVerticalBar().getSize().x;
  5. }
  6. return width;
  7. }

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

  1. private void initScrollBarListener() {
  2. ScrollBar scroll = getTable().getVerticalBar();
  3. fScrollSelectionListener = new SelectionAdapter() {
  4. @Override
  5. public void widgetSelected(SelectionEvent e) {
  6. handleScrollBarSelection();
  7. }
  8. };
  9. scroll.addSelectionListener(fScrollSelectionListener);
  10. }

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

  1. @Override
  2. int getVScrollBarWidth() {
  3. int result = 0;
  4. if( hasVScrollBar() ) {
  5. result = getVerticalBar().getSize().x;
  6. }
  7. return result;
  8. }

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

  1. private static Boolean hasScrollBarsSelectionListener( final Table table ) {
  2. boolean result = false;
  3. ScrollBar horizontalBar = table.getHorizontalBar();
  4. if( horizontalBar != null ) {
  5. result = result || SelectionEvent.hasListener( horizontalBar );
  6. }
  7. ScrollBar verticalBar = table.getVerticalBar();
  8. if( verticalBar != null ) {
  9. result = result || SelectionEvent.hasListener( verticalBar );
  10. }
  11. return Boolean.valueOf( result );
  12. }

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

  1. /**
  2. * Saves the state of the filter actions
  3. * @param memento the memento
  4. */
  5. public void saveState(IMemento memento) {
  6. fMemberFilterActionGroup.saveState(memento);
  7. memento.putString(TAG_SHOWINHERITED, String.valueOf(isShowInheritedMethods()));
  8. memento.putString(TAG_SORTBYDEFININGTYPE, String.valueOf(isShowDefiningTypes()));
  9. ScrollBar bar= getTable().getVerticalBar();
  10. int position= bar != null ? bar.getSelection() : 0;
  11. memento.putString(TAG_VERTICAL_SCROLL, String.valueOf(position));
  12. }

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

  1. /**
  2. * Saves the state of the filter actions
  3. * @param memento the memento
  4. */
  5. public void saveState(IMemento memento) {
  6. fMemberFilterActionGroup.saveState(memento);
  7. memento.putString(TAG_SHOWINHERITED, String.valueOf(isShowInheritedMethods()));
  8. memento.putString(TAG_SORTBYDEFININGTYPE, String.valueOf(isShowDefiningTypes()));
  9. ScrollBar bar= getTable().getVerticalBar();
  10. int position= bar != null ? bar.getSelection() : 0;
  11. memento.putString(TAG_VERTICAL_SCROLL, String.valueOf(position));
  12. }

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

  1. /**
  2. * Saves the state of the filter actions
  3. * @param memento the memento
  4. */
  5. public void saveState(IMemento memento) {
  6. fMemberFilterActionGroup.saveState(memento);
  7. memento.putString(TAG_SHOWINHERITED, String.valueOf(isShowInheritedMethods()));
  8. memento.putString(TAG_SORTBYDEFININGTYPE, String.valueOf(isShowDefiningTypes()));
  9. ScrollBar bar= getTable().getVerticalBar();
  10. int position= bar != null ? bar.getSelection() : 0;
  11. memento.putString(TAG_VERTICAL_SCROLL, String.valueOf(position));
  12. }

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

  1. private static void readTopIndex( final Table table ) {
  2. String value = WidgetLCAUtil.readPropertyValue( table, "topIndex" );
  3. if( value != null ) {
  4. int topIndex = NumberFormatUtil.parseInt( value );
  5. int topOffset = topIndex * table.getItemHeight();
  6. table.setTopIndex( topIndex );
  7. processScrollBarSelection( table.getVerticalBar(), topOffset );
  8. }
  9. }

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

  1. public void handleSetTopItemIndex( Table table, JsonObject properties ) {
  2. JsonValue value = properties.get( PROP_TOP_ITEM_INDEX );
  3. if( value != null ) {
  4. int topItemIndex = value.asInt();
  5. table.setTopIndex( topItemIndex );
  6. int scrollTop = topItemIndex * table.getItemHeight();
  7. setScrollBarSelection( table.getVerticalBar(), scrollTop );
  8. }
  9. }

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

  1. @Override
  2. public void controlResized(ControlEvent e) {
  3. Rectangle area= getClientArea();
  4. Table table= (Table)getChildren()[0];
  5. Point preferredSize= computeTableSize(table);
  6. int width= area.width - 2 * table.getBorderWidth();
  7. if (preferredSize.y > area.height) {
  8. // Subtract the scrollbar width from the total column width
  9. // if a vertical scrollbar will be required
  10. Point vBarSize = table.getVerticalBar().getSize();
  11. width -= vBarSize.x;
  12. }
  13. layoutTable(table, width, area, table.getSize().x < area.width);
  14. }
  15. });

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

  1. @Override
  2. public void controlResized(ControlEvent e) {
  3. Rectangle area= getClientArea();
  4. Table table= (Table)getChildren()[0];
  5. Point preferredSize= computeTableSize(table);
  6. int width= area.width - 2 * table.getBorderWidth();
  7. if (preferredSize.y > area.height) {
  8. // Subtract the scrollbar width from the total column width
  9. // if a vertical scrollbar will be required
  10. Point vBarSize = table.getVerticalBar().getSize();
  11. width -= vBarSize.x;
  12. }
  13. layoutTable(table, width, area, table.getSize().x < area.width);
  14. }
  15. });

代码示例来源:origin: org.eclipse/org.eclipse.datatools.sqltools.common.ui

  1. public void controlResized(ControlEvent e)
  2. {
  3. Rectangle area = getClientArea();
  4. Table table = (Table) getChildren()[0];
  5. Point preferredSize = computeTableSize(table);
  6. int width = area.width - 2 * table.getBorderWidth();
  7. if (preferredSize.y > area.height)
  8. {
  9. // Subtract the scrollbar width from the total column width
  10. // if a vertical scrollbar will be required
  11. Point vBarSize = table.getVerticalBar().getSize();
  12. width -= vBarSize.x;
  13. }
  14. layoutTable(table, width, area, table.getSize().x < area.width);
  15. }
  16. }

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

  1. public void controlResized(ControlEvent e) {
  2. Rectangle area= getClientArea();
  3. Table table= (Table)getChildren()[0];
  4. Point preferredSize= computeTableSize(table);
  5. int width= area.width - 2 * table.getBorderWidth();
  6. if (preferredSize.y > area.height) {
  7. // Subtract the scrollbar width from the total column width
  8. // if a vertical scrollbar will be required
  9. Point vBarSize = table.getVerticalBar().getSize();
  10. width -= vBarSize.x;
  11. }
  12. layoutTable(table, width, area, table.getSize().x < area.width);
  13. }
  14. });

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

  1. void updateScrollBars() {
  2. if( ( style & SWT.NO_SCROLL ) == 0 ) {
  3. hasVScrollBar = false;
  4. hasHScrollBar = needsHScrollBar();
  5. if( needsVScrollBar() ) {
  6. hasVScrollBar = true;
  7. hasHScrollBar = needsHScrollBar();
  8. }
  9. getHorizontalBar().setVisible( hasHScrollBar );
  10. getVerticalBar().setVisible( hasVScrollBar );
  11. }
  12. }

代码示例来源:origin: oyse/yedit

  1. @Override
  2. public void controlResized(ControlEvent e) {
  3. Rectangle area= getClientArea();
  4. Table table= (Table)getChildren()[0];
  5. Point preferredSize= computeTableSize(table);
  6. int width= area.width - 2 * table.getBorderWidth();
  7. if (preferredSize.y > area.height) {
  8. // Subtract the scrollbar width from the total column width
  9. // if a vertical scrollbar will be required
  10. Point vBarSize = table.getVerticalBar().getSize();
  11. width -= vBarSize.x;
  12. }
  13. layoutTable(table, width, area, table.getSize().x < area.width);
  14. }
  15. });

代码示例来源:origin: org.eclipse.swt.cocoa.macosx/x86_64

  1. void onDispose(Event event) {
  2. removeListener(SWT.Dispose, listener);
  3. notifyListeners(SWT.Dispose, event);
  4. event.type = SWT.None;
  5. table.removeListener(SWT.FocusIn, tableListener);
  6. table.removeListener(SWT.MouseDown, tableListener);
  7. unhookRowColumnListeners();
  8. ScrollBar hBar = table.getHorizontalBar();
  9. if (hBar != null) {
  10. hBar.removeListener(SWT.Selection, resizeListener);
  11. }
  12. ScrollBar vBar = table.getVerticalBar();
  13. if (vBar != null) {
  14. vBar.removeListener(SWT.Selection, resizeListener);
  15. }
  16. }

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

  1. void onDispose(Event event) {
  2. removeListener(SWT.Dispose, listener);
  3. notifyListeners(SWT.Dispose, event);
  4. event.type = SWT.None;
  5. table.removeListener(SWT.FocusIn, tableListener);
  6. table.removeListener(SWT.MouseDown, tableListener);
  7. unhookRowColumnListeners();
  8. ScrollBar hBar = table.getHorizontalBar();
  9. if (hBar != null) {
  10. hBar.removeListener(SWT.Selection, resizeListener);
  11. }
  12. ScrollBar vBar = table.getVerticalBar();
  13. if (vBar != null) {
  14. vBar.removeListener(SWT.Selection, resizeListener);
  15. }
  16. }

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

  1. void onDispose(Event event) {
  2. removeListener(SWT.Dispose, listener);
  3. notifyListeners(SWT.Dispose, event);
  4. event.type = SWT.None;
  5. table.removeListener(SWT.FocusIn, tableListener);
  6. table.removeListener(SWT.MouseDown, tableListener);
  7. unhookRowColumnListeners();
  8. ScrollBar hBar = table.getHorizontalBar();
  9. if (hBar != null) {
  10. hBar.removeListener(SWT.Selection, resizeListener);
  11. }
  12. ScrollBar vBar = table.getVerticalBar();
  13. if (vBar != null) {
  14. vBar.removeListener(SWT.Selection, resizeListener);
  15. }
  16. }

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

  1. void onDispose(Event event) {
  2. removeListener(SWT.Dispose, listener);
  3. notifyListeners(SWT.Dispose, event);
  4. event.type = SWT.None;
  5. table.removeListener(SWT.FocusIn, tableListener);
  6. table.removeListener(SWT.MouseDown, tableListener);
  7. unhookRowColumnListeners();
  8. ScrollBar hBar = table.getHorizontalBar();
  9. if (hBar != null) {
  10. hBar.removeListener(SWT.Selection, resizeListener);
  11. }
  12. ScrollBar vBar = table.getVerticalBar();
  13. if (vBar != null) {
  14. vBar.removeListener(SWT.Selection, resizeListener);
  15. }
  16. }

相关文章

Table类方法