本文整理了Java中org.eclipse.swt.widgets.Tree.getVerticalBar()
方法的一些代码示例,展示了Tree.getVerticalBar()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Tree.getVerticalBar()
方法的具体详情如下:
包路径:org.eclipse.swt.widgets.Tree
类名称:Tree
方法名:getVerticalBar
暂无
代码示例来源: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 Tree tree ) {
boolean result = false;
ScrollBar horizontalBar = tree.getHorizontalBar();
if( horizontalBar != null ) {
result = result || SelectionEvent.hasListener( horizontalBar );
}
ScrollBar verticalBar = tree.getVerticalBar();
if( verticalBar != null ) {
result = result || SelectionEvent.hasListener( verticalBar );
}
return Boolean.valueOf( result );
}
代码示例来源:origin: org.apache.directory.studio/ldapbrowser.common
public void controlResized( ControlEvent e )
{
if ( tree.getClientArea().width > 0 )
{
int width = tree.getClientArea().width - 2 * tree.getBorderWidth();
if ( tree.getVerticalBar().isVisible() )
{
width -= tree.getVerticalBar().getSize().x;
}
tree.getColumn( EntryEditorWidgetTableMetadata.VALUE_COLUMN_INDEX ).setWidth(
width - tree.getColumn( EntryEditorWidgetTableMetadata.KEY_COLUMN_INDEX ).getWidth() );
}
}
} );
代码示例来源: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.rap/org.eclipse.rap.rwt
public void handleSetTopItemIndex( Tree tree, JsonObject properties ) {
JsonValue value = properties.get( PROP_TOP_ITEM_INDEX );
if( value != null ) {
int topItemIndex = value.asInt();
getTreeAdapter( tree ).setTopItemIndex( topItemIndex );
int scrollTop = topItemIndex * tree.getItemHeight();
setScrollBarSelection( tree.getVerticalBar(), scrollTop );
}
}
代码示例来源:origin: org.eclipse.rap/org.eclipse.rap.rwt.q07
private static void readTopItemIndex( final Tree tree ) {
String topItemIndex = WidgetLCAUtil.readPropertyValue( tree, "topItemIndex" );
if( topItemIndex != null ) {
final ITreeAdapter treeAdapter = getTreeAdapter( tree );
int newIndex = parsePosition( topItemIndex );
int topOffset = newIndex * tree.getItemHeight();
treeAdapter.setTopItemIndex( newIndex );
processScrollBarSelection( tree.getVerticalBar(), topOffset );
}
}
代码示例来源:origin: org.eclipse/org.eclipse.wst.xml.ui
hBar.addSelectionListener(selectionListener);
ScrollBar vBar = tree.getVerticalBar();
if (vBar != null) {
vBar.addSelectionListener(selectionListener);
代码示例来源:origin: org.eclipse/org.eclipse.jdt.ui
fTypeMethodsSplitter.setWeights(new int[] { ratio.intValue(), 1000 - ratio.intValue() });
ScrollBar bar= getCurrentViewer().getTree().getVerticalBar();
if (bar != null) {
Integer vScroll= memento.getInteger(TAG_VERTICAL_SCROLL);
代码示例来源:origin: org.eclipse.jdt/org.eclipse.jdt.ui
fTypeMethodsSplitter.setWeights(new int[] { ratio.intValue(), 1000 - ratio.intValue() });
ScrollBar bar= getCurrentViewer().getTree().getVerticalBar();
if (bar != null) {
Integer vScroll= memento.getInteger(TAG_VERTICAL_SCROLL);
代码示例来源:origin: org.eclipse.scout.sdk.deps/org.eclipse.jdt.ui
fTypeMethodsSplitter.setWeights(new int[] { ratio.intValue(), 1000 - ratio.intValue() });
ScrollBar bar= getCurrentViewer().getTree().getVerticalBar();
if (bar != null) {
Integer vScroll= memento.getInteger(TAG_VERTICAL_SCROLL);
代码示例来源:origin: org.eclipse.swt.cocoa.macosx/x86_64
void onDispose(Event event) {
removeListener(SWT.Dispose, listener);
notifyListeners(SWT.Dispose, event);
event.type = SWT.None;
tree.removeListener(SWT.Collapse, treeListener);
tree.removeListener(SWT.Expand, treeListener);
tree.removeListener(SWT.FocusIn, treeListener);
tree.removeListener(SWT.MouseDown, treeListener);
unhookRowColumnListeners();
ScrollBar hBar = tree.getHorizontalBar();
if (hBar != null) {
hBar.removeListener(SWT.Selection, resizeListener);
}
ScrollBar vBar = tree.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;
tree.removeListener(SWT.Collapse, treeListener);
tree.removeListener(SWT.Expand, treeListener);
tree.removeListener(SWT.FocusIn, treeListener);
tree.removeListener(SWT.MouseDown, treeListener);
unhookRowColumnListeners();
ScrollBar hBar = tree.getHorizontalBar();
if (hBar != null) {
hBar.removeListener(SWT.Selection, resizeListener);
}
ScrollBar vBar = tree.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;
tree.removeListener(SWT.Collapse, treeListener);
tree.removeListener(SWT.Expand, treeListener);
tree.removeListener(SWT.FocusIn, treeListener);
tree.removeListener(SWT.MouseDown, treeListener);
unhookRowColumnListeners();
ScrollBar hBar = tree.getHorizontalBar();
if (hBar != null) {
hBar.removeListener(SWT.Selection, resizeListener);
}
ScrollBar vBar = tree.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;
tree.removeListener(SWT.Collapse, treeListener);
tree.removeListener(SWT.Expand, treeListener);
tree.removeListener(SWT.FocusIn, treeListener);
tree.removeListener(SWT.MouseDown, treeListener);
unhookRowColumnListeners();
ScrollBar hBar = tree.getHorizontalBar();
if (hBar != null) {
hBar.removeListener(SWT.Selection, resizeListener);
}
ScrollBar vBar = tree.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;
tree.removeListener(SWT.Collapse, treeListener);
tree.removeListener(SWT.Expand, treeListener);
tree.removeListener(SWT.FocusIn, treeListener);
tree.removeListener(SWT.MouseDown, treeListener);
unhookRowColumnListeners();
ScrollBar hBar = tree.getHorizontalBar();
if (hBar != null) {
hBar.removeListener(SWT.Selection, resizeListener);
}
ScrollBar vBar = tree.getVerticalBar();
if (vBar != null) {
vBar.removeListener(SWT.Selection, resizeListener);
}
}
代码示例来源:origin: org.eclipse.rap/org.eclipse.rap.rwt
height += border.top + border.bottom;
if( ( style & SWT.V_SCROLL ) != 0 ) {
width += getVerticalBar().getSize().x;
代码示例来源:origin: org.eclipse.equinox.p2.ui.sdk/scheduler
Rectangle area = parent.getClientArea();
Point size = tree.computeSize(SWT.DEFAULT, SWT.DEFAULT);
ScrollBar vBar = tree.getVerticalBar();
int width = area.width - tree.computeTrim(0, 0, 0, 0).width - vBar.getSize().x;
if (size.y > area.height + tree.getHeaderHeight()) {
代码示例来源:origin: org.eclipse/org.eclipse.jdt.ui
memento.putInteger(TAG_RATIO, ratio);
ScrollBar bar= getCurrentViewer().getTree().getVerticalBar();
int position= bar != null ? bar.getSelection() : 0;
memento.putInteger(TAG_VERTICAL_SCROLL, position);
代码示例来源:origin: org.eclipse.scout.sdk.deps/org.eclipse.jdt.ui
memento.putInteger(TAG_RATIO, ratio);
ScrollBar bar= getCurrentViewer().getTree().getVerticalBar();
int position= bar != null ? bar.getSelection() : 0;
memento.putInteger(TAG_VERTICAL_SCROLL, position);
代码示例来源:origin: org.eclipse.jdt/org.eclipse.jdt.ui
memento.putInteger(TAG_RATIO, ratio);
ScrollBar bar= getCurrentViewer().getTree().getVerticalBar();
int position= bar != null ? bar.getSelection() : 0;
memento.putInteger(TAG_VERTICAL_SCROLL, position);
内容来源于网络,如有侵权,请联系作者删除!