本文整理了Java中org.eclipse.swt.widgets.Table.getVerticalBar()
方法的一些代码示例,展示了Table.getVerticalBar()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Table.getVerticalBar()
方法的具体详情如下:
包路径:org.eclipse.swt.widgets.Table
类名称:Table
方法名:getVerticalBar
暂无
代码示例来源:origin: pentaho/pentaho-kettle
@Override
public ScrollBar getVerticalBar() {
return table.getVerticalBar();
}
代码示例来源: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: org.eclipse.platform/org.eclipse.debug.ui
private void initScrollBarListener() {
ScrollBar scroll = getTable().getVerticalBar();
fScrollSelectionListener = new SelectionAdapter() {
@Override
public void widgetSelected(SelectionEvent e) {
handleScrollBarSelection();
}
};
scroll.addSelectionListener(fScrollSelectionListener);
}
代码示例来源:origin: org.eclipse.rap/org.eclipse.rap.rwt
@Override
int getVScrollBarWidth() {
int result = 0;
if( hasVScrollBar() ) {
result = getVerticalBar().getSize().x;
}
return result;
}
代码示例来源:origin: org.eclipse.rap/org.eclipse.rap.rwt.q07
private static Boolean hasScrollBarsSelectionListener( final Table table ) {
boolean result = false;
ScrollBar horizontalBar = table.getHorizontalBar();
if( horizontalBar != null ) {
result = result || SelectionEvent.hasListener( horizontalBar );
}
ScrollBar verticalBar = table.getVerticalBar();
if( verticalBar != null ) {
result = result || SelectionEvent.hasListener( verticalBar );
}
return Boolean.valueOf( result );
}
代码示例来源:origin: org.eclipse.scout.sdk.deps/org.eclipse.jdt.ui
/**
* Saves the state of the filter actions
* @param memento the memento
*/
public void saveState(IMemento memento) {
fMemberFilterActionGroup.saveState(memento);
memento.putString(TAG_SHOWINHERITED, String.valueOf(isShowInheritedMethods()));
memento.putString(TAG_SORTBYDEFININGTYPE, String.valueOf(isShowDefiningTypes()));
ScrollBar bar= getTable().getVerticalBar();
int position= bar != null ? bar.getSelection() : 0;
memento.putString(TAG_VERTICAL_SCROLL, String.valueOf(position));
}
代码示例来源:origin: org.eclipse.jdt/org.eclipse.jdt.ui
/**
* Saves the state of the filter actions
* @param memento the memento
*/
public void saveState(IMemento memento) {
fMemberFilterActionGroup.saveState(memento);
memento.putString(TAG_SHOWINHERITED, String.valueOf(isShowInheritedMethods()));
memento.putString(TAG_SORTBYDEFININGTYPE, String.valueOf(isShowDefiningTypes()));
ScrollBar bar= getTable().getVerticalBar();
int position= bar != null ? bar.getSelection() : 0;
memento.putString(TAG_VERTICAL_SCROLL, String.valueOf(position));
}
代码示例来源:origin: org.eclipse/org.eclipse.jdt.ui
/**
* Saves the state of the filter actions
* @param memento the memento
*/
public void saveState(IMemento memento) {
fMemberFilterActionGroup.saveState(memento);
memento.putString(TAG_SHOWINHERITED, String.valueOf(isShowInheritedMethods()));
memento.putString(TAG_SORTBYDEFININGTYPE, String.valueOf(isShowDefiningTypes()));
ScrollBar bar= getTable().getVerticalBar();
int position= bar != null ? bar.getSelection() : 0;
memento.putString(TAG_VERTICAL_SCROLL, String.valueOf(position));
}
代码示例来源:origin: org.eclipse.rap/org.eclipse.rap.rwt.q07
private static void readTopIndex( final Table table ) {
String value = WidgetLCAUtil.readPropertyValue( table, "topIndex" );
if( value != null ) {
int topIndex = NumberFormatUtil.parseInt( value );
int topOffset = topIndex * table.getItemHeight();
table.setTopIndex( topIndex );
processScrollBarSelection( table.getVerticalBar(), topOffset );
}
}
代码示例来源:origin: org.eclipse.rap/org.eclipse.rap.rwt
public void handleSetTopItemIndex( Table table, JsonObject properties ) {
JsonValue value = properties.get( PROP_TOP_ITEM_INDEX );
if( value != null ) {
int topItemIndex = value.asInt();
table.setTopIndex( topItemIndex );
int scrollTop = topItemIndex * table.getItemHeight();
setScrollBarSelection( table.getVerticalBar(), scrollTop );
}
}
代码示例来源:origin: org.eclipse.jdt/org.eclipse.jdt.ui
@Override
public void controlResized(ControlEvent e) {
Rectangle area= getClientArea();
Table table= (Table)getChildren()[0];
Point preferredSize= computeTableSize(table);
int width= area.width - 2 * table.getBorderWidth();
if (preferredSize.y > area.height) {
// Subtract the scrollbar width from the total column width
// if a vertical scrollbar will be required
Point vBarSize = table.getVerticalBar().getSize();
width -= vBarSize.x;
}
layoutTable(table, width, area, table.getSize().x < area.width);
}
});
代码示例来源:origin: org.eclipse.scout.sdk.deps/org.eclipse.jdt.ui
@Override
public void controlResized(ControlEvent e) {
Rectangle area= getClientArea();
Table table= (Table)getChildren()[0];
Point preferredSize= computeTableSize(table);
int width= area.width - 2 * table.getBorderWidth();
if (preferredSize.y > area.height) {
// Subtract the scrollbar width from the total column width
// if a vertical scrollbar will be required
Point vBarSize = table.getVerticalBar().getSize();
width -= vBarSize.x;
}
layoutTable(table, width, area, table.getSize().x < area.width);
}
});
代码示例来源:origin: org.eclipse/org.eclipse.datatools.sqltools.common.ui
public void controlResized(ControlEvent e)
{
Rectangle area = getClientArea();
Table table = (Table) getChildren()[0];
Point preferredSize = computeTableSize(table);
int width = area.width - 2 * table.getBorderWidth();
if (preferredSize.y > area.height)
{
// Subtract the scrollbar width from the total column width
// if a vertical scrollbar will be required
Point vBarSize = table.getVerticalBar().getSize();
width -= vBarSize.x;
}
layoutTable(table, width, area, table.getSize().x < area.width);
}
}
代码示例来源:origin: org.eclipse/org.eclipse.jdt.ui
public void controlResized(ControlEvent e) {
Rectangle area= getClientArea();
Table table= (Table)getChildren()[0];
Point preferredSize= computeTableSize(table);
int width= area.width - 2 * table.getBorderWidth();
if (preferredSize.y > area.height) {
// Subtract the scrollbar width from the total column width
// if a vertical scrollbar will be required
Point vBarSize = table.getVerticalBar().getSize();
width -= vBarSize.x;
}
layoutTable(table, width, area, table.getSize().x < area.width);
}
});
代码示例来源:origin: org.eclipse.rap/org.eclipse.rap.rwt
void updateScrollBars() {
if( ( style & SWT.NO_SCROLL ) == 0 ) {
hasVScrollBar = false;
hasHScrollBar = needsHScrollBar();
if( needsVScrollBar() ) {
hasVScrollBar = true;
hasHScrollBar = needsHScrollBar();
}
getHorizontalBar().setVisible( hasHScrollBar );
getVerticalBar().setVisible( hasVScrollBar );
}
}
代码示例来源:origin: oyse/yedit
@Override
public void controlResized(ControlEvent e) {
Rectangle area= getClientArea();
Table table= (Table)getChildren()[0];
Point preferredSize= computeTableSize(table);
int width= area.width - 2 * table.getBorderWidth();
if (preferredSize.y > area.height) {
// Subtract the scrollbar width from the total column width
// if a vertical scrollbar will be required
Point vBarSize = table.getVerticalBar().getSize();
width -= vBarSize.x;
}
layoutTable(table, width, area, table.getSize().x < area.width);
}
});
代码示例来源:origin: org.eclipse.swt.cocoa.macosx/x86_64
void onDispose(Event event) {
removeListener(SWT.Dispose, listener);
notifyListeners(SWT.Dispose, event);
event.type = SWT.None;
table.removeListener(SWT.FocusIn, tableListener);
table.removeListener(SWT.MouseDown, tableListener);
unhookRowColumnListeners();
ScrollBar hBar = table.getHorizontalBar();
if (hBar != null) {
hBar.removeListener(SWT.Selection, resizeListener);
}
ScrollBar vBar = table.getVerticalBar();
if (vBar != null) {
vBar.removeListener(SWT.Selection, resizeListener);
}
}
代码示例来源:origin: org.eclipse.platform/org.eclipse.swt.gtk.linux.s390x
void onDispose(Event event) {
removeListener(SWT.Dispose, listener);
notifyListeners(SWT.Dispose, event);
event.type = SWT.None;
table.removeListener(SWT.FocusIn, tableListener);
table.removeListener(SWT.MouseDown, tableListener);
unhookRowColumnListeners();
ScrollBar hBar = table.getHorizontalBar();
if (hBar != null) {
hBar.removeListener(SWT.Selection, resizeListener);
}
ScrollBar vBar = table.getVerticalBar();
if (vBar != null) {
vBar.removeListener(SWT.Selection, resizeListener);
}
}
代码示例来源:origin: org.eclipse.platform/org.eclipse.swt.gtk.aix.ppc
void onDispose(Event event) {
removeListener(SWT.Dispose, listener);
notifyListeners(SWT.Dispose, event);
event.type = SWT.None;
table.removeListener(SWT.FocusIn, tableListener);
table.removeListener(SWT.MouseDown, tableListener);
unhookRowColumnListeners();
ScrollBar hBar = table.getHorizontalBar();
if (hBar != null) {
hBar.removeListener(SWT.Selection, resizeListener);
}
ScrollBar vBar = table.getVerticalBar();
if (vBar != null) {
vBar.removeListener(SWT.Selection, resizeListener);
}
}
代码示例来源:origin: org.eclipse.scout.sdk.deps/org.eclipse.swt.win32.win32.x86
void onDispose(Event event) {
removeListener(SWT.Dispose, listener);
notifyListeners(SWT.Dispose, event);
event.type = SWT.None;
table.removeListener(SWT.FocusIn, tableListener);
table.removeListener(SWT.MouseDown, tableListener);
unhookRowColumnListeners();
ScrollBar hBar = table.getHorizontalBar();
if (hBar != null) {
hBar.removeListener(SWT.Selection, resizeListener);
}
ScrollBar vBar = table.getVerticalBar();
if (vBar != null) {
vBar.removeListener(SWT.Selection, resizeListener);
}
}
内容来源于网络,如有侵权,请联系作者删除!