本文整理了Java中org.eclipse.swt.widgets.Tree.getHeaderVisible()
方法的一些代码示例,展示了Tree.getHeaderVisible()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Tree.getHeaderVisible()
方法的具体详情如下:
包路径:org.eclipse.swt.widgets.Tree
类名称:Tree
方法名: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 Tree tree ) throws IOException {
JSWriter writer = JSWriter.getWriterFor( tree );
Boolean newValue = Boolean.valueOf( tree.getHeaderVisible() );
writer.set( PROP_HEADER_VISIBLE, "headerVisible", newValue, Boolean.FALSE );
}
代码示例来源:origin: org.eclipse.platform/org.eclipse.swt.examples
resizableColumns.setSelection (column.getResizable());
} catch (IllegalArgumentException ex) {}
headerVisibleButton.setSelection (tree1.getHeaderVisible());
linesVisibleButton.setSelection (tree1.getLinesVisible());
代码示例来源: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.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.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.s390x
int x = point.x;
int y = point.y;
if (getHeaderVisible() && OS.GTK_VERSION > OS.VERSION(3, 9, 0)) {
y -= getHeaderHeightInPixels();
代码示例来源:origin: org.eclipse.platform/org.eclipse.swt.gtk.aix.ppc
int x = point.x;
int y = point.y;
if (getHeaderVisible() && OS.GTK_VERSION > OS.VERSION(3, 9, 0)) {
y -= 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.ppc
int x = point.x;
int y = point.y;
if (getHeaderVisible() && OS.GTK_VERSION > OS.VERSION(3, 9, 0)) {
y -= 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.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.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.rap/org.eclipse.rap.rwt
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 );
renderProperty( tree, PROP_HEADER_BACKGROUND, tree.getHeaderBackground(), 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 );
}
内容来源于网络,如有侵权,请联系作者删除!