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

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

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

Tree.getHeaderHeight介绍

[英]Returns the height of the receiver's header
[中]返回接收器标题的高度

代码示例

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

@Override
protected boolean allowMouseEvent( Tree tree, int x, int y ) {
 return super.allowMouseEvent( tree, x, y ) && y >= tree.getHeaderHeight();
}

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

private static void writeHeaderHeight( final Tree tree ) throws IOException {
 JSWriter writer = JSWriter.getWriterFor( tree );
 Integer newValue = new Integer( tree.getHeaderHeight() );
 writer.set( PROP_HEADER_HEIGHT, "headerHeight", newValue, null );
}

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

final int getVisibleRowCount( boolean includePartlyVisible ) {
 int clientHeight = getClientArea().height - getHeaderHeight();
 int result = 0;
 if( clientHeight >= 0 ) {
  int itemHeight = getItemHeight();
  result = clientHeight / itemHeight;
  if( includePartlyVisible && clientHeight % itemHeight != 0 ) {
   result++;
  }
 }
 return result;
}

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

int getItemTop() {
 int headerHeight = parent.getHeaderHeight();
 int itemHeight = parent.getItemHeight();
 return headerHeight + ( getFlatIndex() - parent.getTopItemIndex() ) * itemHeight;
}

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

boolean needsVScrollBar() {
 int availableHeight = getClientArea().height;
 int height = getHeaderHeight();
 height += itemCount * getItemHeight();
 for( int i = 0; i < itemCount; i++ ) {
  TreeItem item = items[ i ];
  if( item != null && item.getExpanded() ) {
   height += item.getInnerHeight();
  }
 }
 return height > availableHeight;
}

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

if (OS.GTK3 && hHint == SWT.DEFAULT && size.y == getHeaderHeight()) {
  size.y = getItemCount() * getItemHeightInPixels() + getHeaderHeight();

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

if (OS.GTK3 && hHint == SWT.DEFAULT && size.y == getHeaderHeight()) {
  size.y = getItemCount() * getItemHeightInPixels() + getHeaderHeight();

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

if (OS.GTK3 && hHint == SWT.DEFAULT && size.y == getHeaderHeight()) {
  size.y = getItemCount() * getItemHeightInPixels() + getHeaderHeight();

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

int index = ( point.y - getHeaderHeight() ) / getItemHeight() + getTopItemIndex();
List<TreeItem> visibleItems = collectVisibleItems( null );
if( 0 <= index && index < visibleItems.size() ) {

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

public void preserveValues( Widget widget ) {
 Tree tree = ( Tree )widget;
 ControlLCAUtil.preserveValues( ( Control )widget );
 IWidgetAdapter adapter = WidgetUtil.getAdapter( tree );
 adapter.preserve( PROP_SELECTION_LISTENERS,
          Boolean.valueOf( SelectionEvent.hasListener( tree ) ) );
 adapter.preserve( PROP_HEADER_HEIGHT, new Integer( tree.getHeaderHeight() ) );
 adapter.preserve( PROP_HEADER_VISIBLE, Boolean.valueOf( tree.getHeaderVisible() ) );
 adapter.preserve( PROP_LINES_VISIBLE, Boolean.valueOf( tree.getLinesVisible() ) );
 preserveItemMetrics( tree );
 adapter.preserve( PROP_COLUMN_COUNT, new Integer( tree.getColumnCount() ) );
 adapter.preserve( PROP_TREE_COLUMN, getTreeColumn( tree ) );
 adapter.preserve( PROP_ITEM_HEIGHT, new Integer( tree.getItemHeight() ) );
 adapter.preserve( PROP_ITEM_COUNT, new Integer( tree.getItemCount() ) );
 adapter.preserve( PROP_SCROLL_LEFT, getScrollLeft( tree ) );
 adapter.preserve( PROP_TOP_ITEM_INDEX, new Integer( getTopItemIndex( tree ) ) );
 adapter.preserve( PROP_HAS_H_SCROLL_BAR, hasHScrollBar( tree ) );
 adapter.preserve( PROP_HAS_V_SCROLL_BAR, hasVScrollBar( tree ) );
 adapter.preserve( PROP_SCROLLBARS_SELECTION_LISTENER, hasScrollBarsSelectionListener( tree ) );
 adapter.preserve( PROP_ENABLE_CELL_TOOLTIP,
          new Boolean( CellToolTipUtil.isEnabledFor( tree ) ) );
 WidgetLCAUtil.preserveCustomVariant( tree );
}

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

public Point computeSize (int wHint, int hHint, boolean changed) {
  checkWidget ();
  int width = 0, height = 0;
  if (wHint == SWT.DEFAULT) {
    if (columnCount != 0) {
      for (int i=0; i<columnCount; i++) {
        width += columns [i].getWidth ();
      }
    } else {
      GC gc = new GC (this);
      width = calculateWidth (items, 0, gc, true) + CELL_GAP;
      gc.dispose ();
    }
    if ((style & SWT.CHECK) != 0) width += getCheckColumnWidth ();
  } else {
    width = wHint;
  }
  if (hHint == SWT.DEFAULT) {
    height = (int)/*64*/((NSOutlineView) view).numberOfRows () * getItemHeight () + getHeaderHeight ();
  } else {
    height = hHint;
  }
  if (width <= 0) width = DEFAULT_WIDTH;
  if (height <= 0) height = DEFAULT_HEIGHT;
  Rectangle rect = computeTrim (0, 0, width, height);
  return new Point (rect.width, rect.height);
}

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

data.right = new FormAttachment(100, -5);
data.bottom = new FormAttachment(100, -5);
data.height = (10 * tree.getItemHeight()) + tree.getHeaderHeight();
providerViewer.getControl().setLayoutData(data);

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

height += getHeaderHeight();
height += itemCount * getItemHeight();
for( int i = 0; i < itemCount; i++ ) {

代码示例来源:origin: org.eclipse.equinox.p2.ui.sdk/scheduler

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.rap/org.eclipse.rap.rwt

renderProperty( tree, PROP_FIXED_COLUMNS, getFixedColumns( tree ), -1 );
renderProperty( tree, PROP_TREE_COLUMN, getTreeColumn( tree ), ZERO );
renderProperty( tree, PROP_HEADER_HEIGHT, tree.getHeaderHeight(), ZERO );
renderProperty( tree, PROP_HEADER_VISIBLE, tree.getHeaderVisible(), false );
renderProperty( tree, PROP_HEADER_FOREGROUND, tree.getHeaderForeground(), null );

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

@Override
public void preserveValues( Tree tree ) {
 preserveProperty( tree, PROP_ITEM_COUNT, tree.getItemCount() );
 preserveProperty( tree, PROP_ITEM_HEIGHT, tree.getItemHeight() );
 preserveProperty( tree, PROP_ITEM_METRICS, getItemMetrics( tree ) );
 preserveProperty( tree, PROP_COLUMN_COUNT, tree.getColumnCount() );
 preserveProperty( tree, PROP_COLUMN_ORDER, getColumnOrder( tree ) );
 preserveProperty( tree, PROP_FIXED_COLUMNS, getFixedColumns( tree ) );
 preserveProperty( tree, PROP_TREE_COLUMN, getTreeColumn( tree ) );
 preserveProperty( tree, PROP_HEADER_HEIGHT, tree.getHeaderHeight() );
 preserveProperty( tree, PROP_HEADER_VISIBLE, tree.getHeaderVisible() );
 preserveProperty( tree, PROP_HEADER_FOREGROUND, tree.getHeaderForeground() );
 preserveProperty( tree, PROP_HEADER_BACKGROUND, tree.getHeaderBackground() );
 preserveProperty( tree, PROP_LINES_VISIBLE, tree.getLinesVisible() );
 preserveProperty( tree, PROP_TOP_ITEM_INDEX, getTopItemIndex( tree ) );
 preserveProperty( tree, PROP_FOCUS_ITEM, getFocusItem( tree ) );
 preserveProperty( tree, PROP_SCROLL_LEFT, getScrollLeft( tree ) );
 preserveProperty( tree, PROP_SELECTION, getSelection( tree ) );
 preserveProperty( tree, PROP_SORT_DIRECTION, getSortDirection( tree ) );
 preserveProperty( tree, PROP_SORT_COLUMN, tree.getSortColumn() );
 preserveProperty( tree, PROP_ENABLE_CELL_TOOLTIP, CellToolTipUtil.isEnabledFor( tree ) );
 preserveProperty( tree, PROP_CELL_TOOLTIP_TEXT, null );
}

相关文章

Tree类方法