本文整理了Java中org.eclipse.swt.widgets.Table.getHorizontalBar()
方法的一些代码示例,展示了Table.getHorizontalBar()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Table.getHorizontalBar()
方法的具体详情如下:
包路径:org.eclipse.swt.widgets.Table
类名称:Table
方法名:getHorizontalBar
暂无
代码示例来源:origin: pentaho/pentaho-kettle
@Override
public ScrollBar getHorizontalBar() {
return table.getHorizontalBar();
}
代码示例来源:origin: org.eclipse.rap/org.eclipse.rap.rwt
@Override
int getHScrollBarHeight() {
int result = 0;
if( hasHScrollBar() ) {
result = getHorizontalBar().getSize().y;
}
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.jface.text
return preferedSize;
if (fTable.getVerticalBar() == null || fTable.getHorizontalBar() == null)
return Geometry.min(constraints, preferedSize);
int scrollBarHeight= fTable.getHorizontalBar().getSize().y;
if (preferedSize.x - scrollBarWidth <= constraints.x) {
height= preferedSize.y - scrollBarHeight;
fTable.getHorizontalBar().setVisible(false);
} else {
height= Math.min(preferedSize.y, constraints.y);
代码示例来源:origin: org.eclipse.rap/org.eclipse.rap.rwt
public void handleSetScrollLeft( Table table, JsonObject properties ) {
JsonValue value = properties.get( PROP_SCROLL_LEFT );
if( value != null ) {
int scrollLeft = value.asInt();
getTableAdapter( table ).setLeftOffset( scrollLeft );
setScrollBarSelection( table.getHorizontalBar(), scrollLeft );
}
}
代码示例来源:origin: org.eclipse.rap/org.eclipse.rap.rwt.q07
private static void readLeftOffset( final Table table ) {
String value = WidgetLCAUtil.readPropertyValue( table, "leftOffset" );
if( value != null ) {
int leftOffset = NumberFormatUtil.parseInt( value );
Object adapter = table.getAdapter( ITableAdapter.class );
ITableAdapter tableAdapter = ( ITableAdapter )adapter;
tableAdapter.setLeftOffset( leftOffset );
processScrollBarSelection( table.getHorizontalBar(), leftOffset );
}
}
代码示例来源:origin: org.eclipse.platform/org.eclipse.jface.text
return preferedSize;
if (fTable.getVerticalBar() == null || fTable.getHorizontalBar() == null)
return Geometry.min(constraints, preferedSize);
int scrollBarHeight= fTable.getHorizontalBar().getSize().y;
if (preferedSize.x - scrollBarWidth <= constraints.x) {
height= preferedSize.y - scrollBarHeight;
fTable.getHorizontalBar().setVisible(false);
} else {
height= Math.min(preferedSize.y, constraints.y);
代码示例来源:origin: anb0s/LogViewer
table.getHorizontalBar().setVisible(calculatedtableWidth > clientAreaWidth);
} finally {
fIsResizing= false;
代码示例来源: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: org.eclipse.platform/org.eclipse.debug.ui
/**
* @param table the table
* @param height the current height of the table
* @return the number of visible lines in the table
*/
private int doGetNumberOfVisibleLines(Table table, int height) {
// height of border
int border = fTableViewer.getTable().getHeaderHeight();
// height of scroll bar
int scroll = fTableViewer.getTable().getHorizontalBar().getSize().y;
// height of table is table's area minus border and scroll bar height
height = height-border-scroll;
// calculate number of visible lines
int lineHeight = getMinTableItemHeight(table);
int numberOfLines = height/lineHeight;
return numberOfLines;
}
代码示例来源: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);
}
}
代码示例来源:origin: org.eclipse.platform/org.eclipse.swt.gtk.linux.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.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.platform/org.eclipse.debug.ui
private int getNumberOfVisibleLines() {
Table table = getTable();
int height = table.getSize().y;
// when table is not yet created, height is zero
if (height == 0) {
// make use of the table viewer to estimate table size
height = table.getParent().getSize().y;
}
// height of border
int border = table.getHeaderHeight();
// height of scroll bar
int scroll = table.getHorizontalBar().getSize().y;
// height of table is table's area minus border and scroll bar height
height = height - border - scroll;
// calculate number of visible lines
int lineHeight = getMinTableItemHeight(table);
int numberOfLines = height / lineHeight;
if (numberOfLines <= 0) {
return 20;
}
return numberOfLines;
}
代码示例来源:origin: org.eclipse.scout.sdk.s2e/org.eclipse.scout.sdk.s2e.nls
@Override
protected void layout(Composite composite, boolean flushCache) {
Rectangle parentBounds = composite.getClientArea();
TableColumn[] columns = m_tableViewer.getTable().getColumns();
int[] colOrder = m_tableViewer.getTable().getColumnOrder();
int x = -m_tableViewer.getTable().getHorizontalBar().getSelection();
for (int i = 0; i < columns.length; i++) {
TableColumn column = columns[colOrder[i]];
if (i == NlsTable.AMOUNT_UTILITY_COLS) {
// layout button
m_resetButton.setBounds(1, 1, x - 2, parentBounds.height - 2);
}
if (i >= NlsTable.AMOUNT_UTILITY_COLS) {
Language lang = (Language) column.getData(NlsTable.LANGUAGE_COLUMN_ID);
Text text = m_filterFields.get(lang);
if (text != null) {
text.setBounds(x + 1, 1, column.getWidth() - 2, parentBounds.height - 2);
}
}
x += column.getWidth();
}
composite.update();
}
} // end P_FilterComponentLayout
代码示例来源:origin: openaudible/openaudible
ScrollBar hb = t.getHorizontalBar();
if (hb != null) {
hb.setVisible(false);
代码示例来源:origin: org.eclipse.rap/org.eclipse.rap.rwt
height += getHorizontalBar().getSize().y;
代码示例来源:origin: org.eclipse.platform/org.eclipse.debug.ui
int scroll = fTableViewer.getTable().getHorizontalBar().getSize().y;
内容来源于网络,如有侵权,请联系作者删除!