本文整理了Java中org.eclipse.swt.widgets.Tree.setColumnOrder()
方法的一些代码示例,展示了Tree.setColumnOrder()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Tree.setColumnOrder()
方法的具体详情如下:
包路径:org.eclipse.swt.widgets.Tree
类名称:Tree
方法名: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.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.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.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: stackoverflow.com
else break;
tree.setColumnOrder(order);
代码示例来源:origin: org.eclipse.rap/org.eclipse.rap.rwt.q07
static void moveColumn( final TreeColumn column, final int newLeft ) {
Tree tree = column.getParent();
int targetColumn = findMoveTarget( tree, newLeft );
int[] columnOrder = tree.getColumnOrder();
int index = tree.indexOf( column );
int orderIndex = arrayIndexOf( columnOrder, index );
columnOrder = arrayRemove( columnOrder, orderIndex );
if( orderIndex < targetColumn ) {
targetColumn--;
}
columnOrder = arrayInsert( columnOrder, targetColumn, index );
if( Arrays.equals( columnOrder, tree.getColumnOrder() ) ) {
// TODO [rh] HACK mark left as changed
TreeColumn[] columns = tree.getColumns();
for( int i = 0; i < columns.length; i++ ) {
IWidgetAdapter adapter = WidgetUtil.getAdapter( columns[ i ] );
adapter.preserve( PROP_LEFT, null );
}
} else {
tree.setColumnOrder( columnOrder );
}
}
代码示例来源:origin: org.eclipse.rap/org.eclipse.rap.rwt
static void moveColumn( TreeColumn column, int newLeft ) {
Tree tree = column.getParent();
int targetColumn = findMoveTarget( tree, newLeft );
int[] columnOrder = tree.getColumnOrder();
int index = tree.indexOf( column );
int orderIndex = arrayIndexOf( columnOrder, index );
columnOrder = arrayRemove( columnOrder, orderIndex );
if( orderIndex < targetColumn ) {
targetColumn--;
}
if( isFixed( column ) || isFixed( tree.getColumn( targetColumn ) ) ) {
targetColumn = tree.indexOf( column );
}
columnOrder = arrayInsert( columnOrder, targetColumn, index );
if( Arrays.equals( columnOrder, tree.getColumnOrder() ) ) {
// TODO [rh] HACK mark left as changed
TreeColumn[] columns = tree.getColumns();
for( int i = 0; i < columns.length; i++ ) {
getAdapter( columns[ i ] ).preserve( PROP_LEFT, null );
}
} else {
tree.setColumnOrder( columnOrder );
// [if] HACK mark left as changed - see bug 336340
getAdapter( column ).preserve( PROP_LEFT, null );
}
}
代码示例来源:origin: inspectIT/inspectIT
tree.setColumnOrder(columnOrder);
} else if (null != columnOrder) {
代码示例来源:origin: org.eclipse.platform/org.eclipse.debug.ui
tree.setColumnOrder(order);
内容来源于网络,如有侵权,请联系作者删除!