本文整理了Java中org.eclipse.swt.widgets.Tree.indexOf()
方法的一些代码示例,展示了Tree.indexOf()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Tree.indexOf()
方法的具体详情如下:
包路径:org.eclipse.swt.widgets.Tree
类名称:Tree
方法名:indexOf
[英]Searches the receiver's list starting at the first column (index 0) until a column is found that is equal to the argument, and returns the index of that column. If no column is found, returns -1.
[中]从第一列(索引0)开始搜索接收方列表,直到找到与参数相等的列,并返回该列的索引。如果没有找到列,则返回-1。
代码示例来源:origin: org.eclipse.rap/org.eclipse.rap.rwt
@Override
public boolean isFixedColumn( TreeColumn column ) {
return Tree.this.isFixedColumn( Tree.this.indexOf( column ) );
}
代码示例来源:origin: org.eclipse.platform/org.eclipse.swt.gtk.linux.ppc
@Override
public void getName(AccessibleEvent e) {
if (row == null) return;
int columnIndex = column == null ? 0 : tree.indexOf(column);
e.result = row.getText(columnIndex);
}
});
代码示例来源:origin: org.eclipse.scout.sdk.deps/org.eclipse.swt.win32.win32.x86
@Override
public void getName(AccessibleEvent e) {
if (row == null) return;
int columnIndex = column == null ? 0 : tree.indexOf(column);
e.result = row.getText(columnIndex);
}
});
代码示例来源:origin: org.eclipse.swt.cocoa.macosx/x86_64
public void getName(AccessibleEvent e) {
if (row == null) return;
int columnIndex = column == null ? 0 : tree.indexOf(column);
e.result = row.getText(columnIndex);
}
});
代码示例来源:origin: org.eclipse.platform/org.eclipse.swt.gtk.linux.s390x
@Override
public void getName(AccessibleEvent e) {
if (row == null) return;
int columnIndex = column == null ? 0 : tree.indexOf(column);
e.result = row.getText(columnIndex);
}
});
代码示例来源:origin: org.eclipse.platform/org.eclipse.swt.gtk.aix.ppc
@Override
public void getName(AccessibleEvent e) {
if (row == null) return;
int columnIndex = column == null ? 0 : tree.indexOf(column);
e.result = row.getText(columnIndex);
}
});
代码示例来源:origin: org.eclipse.rap/org.eclipse.rap.rwt
@Override
public int getColumnLeft( TreeColumn column ) {
int index = Tree.this.indexOf( column );
return getColumn( index ).getLeft();
}
代码示例来源:origin: org.eclipse.scout.sdk.deps/org.eclipse.swt.win32.win32.x86
int getWidthInPixels () {
int index = parent.indexOf (this);
if (index == -1) return 0;
int /*long*/ hwndHeader = parent.hwndHeader;
if (hwndHeader == 0) return 0;
HDITEM hdItem = new HDITEM ();
hdItem.mask = OS.HDI_WIDTH;
OS.SendMessage (hwndHeader, OS.HDM_GETITEM, index, hdItem);
return hdItem.cxy;
}
代码示例来源:origin: org.eclipse.jdt/org.eclipse.jdt.ui
@Override
public void keyPressed(KeyEvent e) {
if (e.keyCode == SWT.ARROW_UP) {
TreeItem[] selection= tree.getSelection();
if (selection.length != 1)
return;
int selectionIndex= tree.indexOf(selection[0]);
if (selectionIndex != 0)
return;
fShell.close();
}
}
代码示例来源:origin: org.eclipse.scout.sdk.deps/org.eclipse.jdt.ui
@Override
public void keyPressed(KeyEvent e) {
if (e.keyCode == SWT.ARROW_UP) {
TreeItem[] selection= tree.getSelection();
if (selection.length != 1)
return;
int selectionIndex= tree.indexOf(selection[0]);
if (selectionIndex != 0)
return;
fShell.close();
}
}
代码示例来源:origin: org.apache.uima/uimaj-ep-configurator
/**
* Gets the type priority list from tree item.
*
* @param item the item
* @return the type priority list from tree item
*/
public TypePriorityList getTypePriorityListFromTreeItem(TreeItem item) {
TypePriorityList[] typePriorityLists = getAnalysisEngineMetaData().getTypePriorities()
.getPriorityLists();
return typePriorityLists[tree.indexOf(item)];
}
代码示例来源:origin: org.eclipse.swt.cocoa.macosx/x86_64
void _resize() {
if (row == null) {
setBounds(-200, -200, 0, 0);
} else {
int columnIndex = column == null ? 0 : tree.indexOf(column);
setBounds(row.getBounds(columnIndex));
}
}
代码示例来源:origin: org.eclipse.platform/org.eclipse.swt.gtk.aix.ppc
void _resize() {
if (row == null) {
setBounds(-200, -200, 0, 0);
} else {
int columnIndex = column == null ? 0 : tree.indexOf(column);
setBounds(row.getBounds(columnIndex));
}
}
代码示例来源:origin: org.eclipse.scout.sdk.deps/org.eclipse.swt.win32.win32.x86
boolean checkData (TreeItem item, boolean redraw) {
if ((style & SWT.VIRTUAL) == 0) return true;
if (!item.cached) {
TreeItem parentItem = item.getParentItem ();
return checkData (item, parentItem == null ? indexOf (item) : parentItem.indexOf (item), redraw);
}
return true;
}
代码示例来源:origin: org.eclipse.scout.sdk.deps/org.eclipse.swt.win32.win32.x86
void _resize() {
if (row == null) {
setBounds(-200, -200, 0, 0);
} else {
int columnIndex = column == null ? 0 : tree.indexOf(column);
setBounds(row.getBounds(columnIndex));
}
}
代码示例来源:origin: org.eclipse.platform/org.eclipse.swt.gtk.linux.s390x
void _resize() {
if (row == null) {
setBounds(-200, -200, 0, 0);
} else {
int columnIndex = column == null ? 0 : tree.indexOf(column);
setBounds(row.getBounds(columnIndex));
}
}
代码示例来源:origin: org.eclipse.platform/org.eclipse.swt.gtk.linux.ppc
void _resize() {
if (row == null) {
setBounds(-200, -200, 0, 0);
} else {
int columnIndex = column == null ? 0 : tree.indexOf(column);
setBounds(row.getBounds(columnIndex));
}
}
代码示例来源:origin: BiglySoftware/BiglyBT
@Override
public Object runSupport() {
TreeItem treeItem = ((SideBarEntrySWT) entry).getTreeItem();
if (treeItem == null) {
return -1;
}
TreeItem parentItem = treeItem.getParentItem();
if (parentItem != null) {
return parentItem.indexOf(treeItem);
}
return tree.indexOf(treeItem);
}
}, 500);
代码示例来源:origin: org.eclipse.rap/org.eclipse.rap.rwt
private static int getIndex( TreeItem item ) {
int result;
if( item.getParentItem() == null ) {
result = item.getParent().indexOf( item );
} else {
result = item.getParentItem().indexOf( item );
}
return result;
}
代码示例来源:origin: org.eclipse.swt.cocoa.macosx/x86_64
public void setImage (Image image) {
checkWidget();
if (image != null && image.isDisposed ()) {
error (SWT.ERROR_INVALID_ARGUMENT);
}
super.setImage (image);
NSTableHeaderView headerView = ((NSOutlineView) parent.view).headerView ();
if (headerView == null) return;
int index = parent.indexOf (nsColumn);
NSRect rect = headerView.headerRectOfColumn (index);
headerView.setNeedsDisplayInRect (rect);
}
内容来源于网络,如有侵权,请联系作者删除!