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

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

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

Table.getHeaderVisible介绍

[英]Returns true if the receiver's header is visible, and false otherwise.

If one of the receiver's ancestors is not visible or some other condition makes the receiver not visible, this method may still indicate that it is considered visible even though it may not actually be showing.
[中]如果接收者的标题可见,则返回true,否则返回false
如果接收者的祖先之一不可见,或者某些其他条件使接收者不可见,则此方法可能仍然表明它被认为是可见的,即使它实际上可能没有显示。

代码示例

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

private static void writeHeaderVisible( final Table table )
 throws IOException
{
 JSWriter writer = JSWriter.getWriterFor( table );
 Boolean newValue = Boolean.valueOf( table.getHeaderVisible() );
 writer.set( PROP_HEADER_VISIBLE, "headerVisible", newValue, null );
}

代码示例来源:origin: org.eclipse.platform/org.eclipse.swt.examples

resizableColumns.setSelection (column.getResizable());
} catch (IllegalArgumentException ex) {}
headerVisibleButton.setSelection (table1.getHeaderVisible());
linesVisibleButton.setSelection (table1.getLinesVisible());

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

public void preserveValues( final Widget widget ) {
 Table table = ( Table )widget;
 ControlLCAUtil.preserveValues( table );
 IWidgetAdapter adapter = WidgetUtil.getAdapter( table );
 adapter.preserve( PROP_HEADER_HEIGHT,
          new Integer( table.getHeaderHeight() ) );
 adapter.preserve( PROP_HEADER_VISIBLE,
          Boolean.valueOf( table.getHeaderVisible() ) );
 adapter.preserve( PROP_LINES_VISIBLE,
          Boolean.valueOf( table.getLinesVisible() ) );
 adapter.preserve( PROP_ITEM_HEIGHT, new Integer( table.getItemHeight() ) );
 TableLCAUtil.preserveItemMetrics( table );
 adapter.preserve( PROP_ITEM_COUNT, new Integer( table.getItemCount() ) );
 adapter.preserve( PROP_TOP_INDEX, new Integer( table.getTopIndex() ) );
 adapter.preserve( PROP_SELECTION_LISTENERS,
          Boolean.valueOf( SelectionEvent.hasListener( table ) ) );
 adapter.preserve( PROP_DEFAULT_COLUMN_WIDTH,
          new Integer( getDefaultColumnWidth( table ) ) );
 TableLCAUtil.preserveFocusIndex( table );
 WidgetLCAUtil.preserveCustomVariant( table );
 adapter.preserve( PROP_ALWAYS_HIDE_SELECTION,
          alwaysHideSelection( table ) );
 adapter.preserve( PROP_HAS_H_SCROLL_BAR, hasHScrollBar( table ) );
 adapter.preserve( PROP_HAS_V_SCROLL_BAR, hasVScrollBar( table ) );
 adapter.preserve( PROP_LEFT_OFFSET, getLeftOffset( table ) );
 adapter.preserve( PROP_SCROLLBARS_SELECTION_LISTENER,
          hasScrollBarsSelectionListener( table ) );
 adapter.preserve( PROP_ENABLE_CELL_TOOLTIP, 
          new Boolean( CellToolTipUtil.isEnabledFor( table ) ) );
}

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

TableItem getItemInPixels (Point point) {
  checkWidget();
  if (point == null) error (SWT.ERROR_NULL_ARGUMENT);
  int /*long*/ [] path = new int /*long*/ [1];
  OS.gtk_widget_realize (handle);
  int y = point.y;
  if (getHeaderVisible() && OS.GTK_VERSION > OS.VERSION(3, 9, 0)) {
    y -= getHeaderHeightInPixels();
  }
  if (!OS.gtk_tree_view_get_path_at_pos (handle, point.x, y, path, null, null, null)) return null;
  if (path [0] == 0) return null;
  int /*long*/ indices = OS.gtk_tree_path_get_indices (path [0]);
  TableItem item = null;
  if (indices != 0) {
    int [] index = new int [1];
    OS.memmove (index, indices, 4);
    item = _getItem (index [0]);
  }
  OS.gtk_tree_path_free (path [0]);
  return item;
}

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

TableItem getItemInPixels (Point point) {
  checkWidget();
  if (point == null) error (SWT.ERROR_NULL_ARGUMENT);
  long /*int*/ [] path = new long /*int*/ [1];
  OS.gtk_widget_realize (handle);
  int y = point.y;
  if (getHeaderVisible() && OS.GTK_VERSION > OS.VERSION(3, 9, 0)) {
    y -= getHeaderHeightInPixels();
  }
  if (!OS.gtk_tree_view_get_path_at_pos (handle, point.x, y, path, null, null, null)) return null;
  if (path [0] == 0) return null;
  long /*int*/ indices = OS.gtk_tree_path_get_indices (path [0]);
  TableItem item = null;
  if (indices != 0) {
    int [] index = new int [1];
    OS.memmove (index, indices, 4);
    item = _getItem (index [0]);
  }
  OS.gtk_tree_path_free (path [0]);
  return item;
}

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

TableItem getItemInPixels (Point point) {
  checkWidget();
  if (point == null) error (SWT.ERROR_NULL_ARGUMENT);
  int /*long*/ [] path = new int /*long*/ [1];
  OS.gtk_widget_realize (handle);
  int y = point.y;
  if (getHeaderVisible() && OS.GTK_VERSION > OS.VERSION(3, 9, 0)) {
    y -= getHeaderHeightInPixels();
  }
  if (!OS.gtk_tree_view_get_path_at_pos (handle, point.x, y, path, null, null, null)) return null;
  if (path [0] == 0) return null;
  int /*long*/ indices = OS.gtk_tree_path_get_indices (path [0]);
  TableItem item = null;
  if (indices != 0) {
    int [] index = new int [1];
    OS.memmove (index, indices, 4);
    item = _getItem (index [0]);
  }
  OS.gtk_tree_path_free (path [0]);
  return item;
}

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

@Override
Rectangle getClientAreaInPixels () {
  checkWidget ();
  forceResize ();
  OS.gtk_widget_realize (handle);
  long /*int*/ fixedWindow = gtk_widget_get_window (fixedHandle);
  long /*int*/ binWindow = OS.gtk_tree_view_get_bin_window (handle);
  int [] binX = new int [1], binY = new int [1];
  OS.gdk_window_get_origin (binWindow, binX, binY);
  int [] fixedX = new int [1], fixedY = new int [1];
  OS.gdk_window_get_origin (fixedWindow, fixedX, fixedY);
  long /*int*/ clientHandle = clientHandle ();
  GtkAllocation allocation = new GtkAllocation ();
  OS.gtk_widget_get_allocation (clientHandle, allocation);
  int width = (state & ZERO_WIDTH) != 0 ? 0 : allocation.width;
  int height = (state & ZERO_HEIGHT) != 0 ? 0 : allocation.height;
  Rectangle rect = new Rectangle (fixedX [0] - binX [0], fixedY [0] - binY [0], width, height);
  if (getHeaderVisible() && OS.GTK_VERSION > OS.VERSION(3, 9, 0)) {
    rect.y += getHeaderHeightInPixels();
  }
  return rect;
}

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

@Override
Rectangle getClientAreaInPixels () {
  checkWidget ();
  forceResize ();
  OS.gtk_widget_realize (handle);
  int /*long*/ fixedWindow = gtk_widget_get_window (fixedHandle);
  int /*long*/ binWindow = OS.gtk_tree_view_get_bin_window (handle);
  int [] binX = new int [1], binY = new int [1];
  OS.gdk_window_get_origin (binWindow, binX, binY);
  int [] fixedX = new int [1], fixedY = new int [1];
  OS.gdk_window_get_origin (fixedWindow, fixedX, fixedY);
  int /*long*/ clientHandle = clientHandle ();
  GtkAllocation allocation = new GtkAllocation ();
  OS.gtk_widget_get_allocation (clientHandle, allocation);
  int width = (state & ZERO_WIDTH) != 0 ? 0 : allocation.width;
  int height = (state & ZERO_HEIGHT) != 0 ? 0 : allocation.height;
  Rectangle rect = new Rectangle (fixedX [0] - binX [0], fixedY [0] - binY [0], width, height);
  if (getHeaderVisible() && OS.GTK_VERSION > OS.VERSION(3, 9, 0)) {
    rect.y += getHeaderHeightInPixels();
  }
  return rect;
}

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

@Override
Rectangle getClientAreaInPixels () {
  checkWidget ();
  forceResize ();
  OS.gtk_widget_realize (handle);
  int /*long*/ fixedWindow = gtk_widget_get_window (fixedHandle);
  int /*long*/ binWindow = OS.gtk_tree_view_get_bin_window (handle);
  int [] binX = new int [1], binY = new int [1];
  OS.gdk_window_get_origin (binWindow, binX, binY);
  int [] fixedX = new int [1], fixedY = new int [1];
  OS.gdk_window_get_origin (fixedWindow, fixedX, fixedY);
  int /*long*/ clientHandle = clientHandle ();
  GtkAllocation allocation = new GtkAllocation ();
  OS.gtk_widget_get_allocation (clientHandle, allocation);
  int width = (state & ZERO_WIDTH) != 0 ? 0 : allocation.width;
  int height = (state & ZERO_HEIGHT) != 0 ? 0 : allocation.height;
  Rectangle rect = new Rectangle (fixedX [0] - binX [0], fixedY [0] - binY [0], width, height);
  if (getHeaderVisible() && OS.GTK_VERSION > OS.VERSION(3, 9, 0)) {
    rect.y += getHeaderHeightInPixels();
  }
  return rect;
}

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

if (parent.getHeaderVisible() && OS.GTK_VERSION > OS.VERSION(3, 9, 0)) {
  r.y += parent.getHeaderHeightInPixels();

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

if (parent.getHeaderVisible() && OS.GTK_VERSION > OS.VERSION(3, 9, 0)) {
  r.y += parent.getHeaderHeightInPixels();

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

if (parent.getHeaderVisible() && OS.GTK_VERSION > OS.VERSION(3, 9, 0)) {
  r.y += parent.getHeaderHeightInPixels();

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

Point point = table.toControl(new Point(event.x, event.y));
Rectangle bounds = table.getClientArea();
if (table.getHeaderVisible())

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

if (parent.getHeaderVisible() && OS.GTK_VERSION > OS.VERSION(3, 9, 0)) {
  r.y += parent.getHeaderHeightInPixels();

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

if (parent.getHeaderVisible() && OS.GTK_VERSION > OS.VERSION(3, 9, 0)) {
  r.y += parent.getHeaderHeightInPixels();

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

if (parent.getHeaderVisible() && OS.GTK_VERSION > OS.VERSION(3, 9, 0)) {
  r.y += parent.getHeaderHeightInPixels();

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

renderProperty( table, PROP_FIXED_COLUMNS, getFixedColumns( table ), -1 );
renderProperty( table, PROP_HEADER_HEIGHT, table.getHeaderHeight(), ZERO );
renderProperty( table, PROP_HEADER_VISIBLE, table.getHeaderVisible(), false );
renderProperty( table, PROP_HEADER_FOREGROUND, table.getHeaderForeground(), null );
renderProperty( table, PROP_HEADER_BACKGROUND, table.getHeaderBackground(), null );

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

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

相关文章

Table类方法