本文整理了Java中org.eclipse.swt.widgets.Table.setColumnOrder()
方法的一些代码示例,展示了Table.setColumnOrder()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Table.setColumnOrder()
方法的具体详情如下:
包路径:org.eclipse.swt.widgets.Table
类名称:Table
方法名:setColumnOrder
[英]Sets the order that the items in the receiver should be displayed in to the given argument which is described in terms of the zero-relative ordering of when the items were added.
[中]设置接收器中的项在给定参数中的显示顺序,该参数是根据添加项时的零相对顺序描述的。
代码示例来源:origin: org.eclipse.platform/org.eclipse.jface
/**
* @param columnOrder
*/
private void setColumnOrder(int[] order) {
if (targetControl instanceof Table) {
((Table) targetControl).setColumnOrder(order);
} else if (targetControl instanceof Tree) {
((Tree) targetControl).setColumnOrder(order);
}
}
}
代码示例来源:origin: org.eclipse.scout.sdk.deps/org.eclipse.jface
/**
* @param columnOrder
*/
private void setColumnOrder(int[] order) {
if (targetControl instanceof Table) {
((Table) targetControl).setColumnOrder(order);
} else if (targetControl instanceof Tree) {
((Tree) targetControl).setColumnOrder(order);
}
}
}
代码示例来源:origin: org.eclipse.rap/org.eclipse.rap.jface
/**
* @param columnOrder
*/
private void setColumnOrder(int[] order) {
if (targetControl instanceof Table) {
((Table) targetControl).setColumnOrder(order);
} else if (targetControl instanceof Tree) {
((Tree) targetControl).setColumnOrder(order);
}
}
}
代码示例来源:origin: org.eclipse.rap/org.eclipse.rap.rwt.q07
static void moveColumn( final TableColumn column, final int newLeft ) {
Table table = column.getParent();
int targetColumn = findMoveTarget( table, newLeft );
int[] columnOrder = table.getColumnOrder();
int index = table.indexOf( column );
int orderIndex = arrayIndexOf( columnOrder, index );
columnOrder = arrayRemove( columnOrder, orderIndex );
if( orderIndex < targetColumn ) {
targetColumn--;
}
columnOrder = arrayInsert( columnOrder, targetColumn, index );
if( Arrays.equals( columnOrder, table.getColumnOrder() ) ) {
// TODO [rh] HACK mark left as changed
TableColumn[] columns = table.getColumns();
for( int i = 0; i < columns.length; i++ ) {
IWidgetAdapter adapter = WidgetUtil.getAdapter( columns[ i ] );
adapter.preserve( PROP_LEFT, null );
}
} else {
table.setColumnOrder( columnOrder );
// [if] HACK mark left as changed - see bug 336340
IWidgetAdapter adapter = WidgetUtil.getAdapter( column );
adapter.preserve( PROP_LEFT, null );
}
}
代码示例来源:origin: org.eclipse.rap/org.eclipse.rap.rwt
static void moveColumn( TableColumn column, int newLeft ) {
Table table = column.getParent();
int targetColumn = findMoveTarget( table, newLeft );
int[] columnOrder = table.getColumnOrder();
int index = table.indexOf( column );
int orderIndex = arrayIndexOf( columnOrder, index );
columnOrder = arrayRemove( columnOrder, orderIndex );
if( orderIndex < targetColumn ) {
targetColumn--;
}
if( isFixed( column ) || isFixed( table.getColumn( targetColumn ) ) ) {
targetColumn = table.indexOf( column );
}
columnOrder = arrayInsert( columnOrder, targetColumn, index );
if( Arrays.equals( columnOrder, table.getColumnOrder() ) ) {
// TODO [rh] HACK mark left as changed
TableColumn[] columns = table.getColumns();
for( int i = 0; i < columns.length; i++ ) {
getAdapter( columns[ i ] ).preserve( PROP_LEFT, null );
}
} else {
table.setColumnOrder( columnOrder );
// [if] HACK mark left as changed - see bug 336340
getAdapter( column ).preserve( PROP_LEFT, null );
}
}
代码示例来源:origin: inspectIT/inspectIT
table.setColumnOrder(columnOrder);
} else if (null != columnOrder) {
内容来源于网络,如有侵权,请联系作者删除!