本文整理了Java中org.eclipse.swt.widgets.Table.select()
方法的一些代码示例,展示了Table.select()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Table.select()
方法的具体详情如下:
包路径:org.eclipse.swt.widgets.Table
类名称:Table
方法名:select
[英]Selects the item at the given zero-relative index in the receiver. If the item at the index was already selected, it remains selected. Indices that are out of range are ignored.
[中]选择接收器中给定零相对索引处的项目。如果索引中的项目已被选中,它将保持选中状态。超出范围的索引将被忽略。
代码示例来源:origin: pentaho/pentaho-kettle
public void setSelection( int[] selectedItems ) {
table.select( selectedItems );
}
代码示例来源:origin: pentaho/pentaho-kettle
private void selectRows( int from, int to ) {
table.deselectAll();
if ( from == to ) {
table.select( from );
} else {
if ( from > to ) {
table.select( to, from );
} else {
table.select( from, to );
}
}
}
代码示例来源:origin: pentaho/pentaho-kettle
void setUIText() {
wUseSSL.setSelection( sslEnabled );
sslTable.setEnabled( sslEnabled );
sslTable.table.setEnabled( sslEnabled );
sslTable.table.select( 0 );
sslTable.table.showSelection();
}
代码示例来源:origin: pentaho/pentaho-kettle
private void setUIText() {
wCheckBox.setSelection( isEnabled );
propertiesTable.setEnabled( isEnabled );
propertiesTable.table.setEnabled( isEnabled );
propertiesTable.table.select( 0 );
propertiesTable.table.showSelection();
}
代码示例来源:origin: pentaho/pentaho-kettle
model.logDisplayTableView.table.select( selectionIndex );
showLogEntry();
代码示例来源:origin: pentaho/pentaho-kettle
model.logDisplayTableView.table.select( selectionIndex );
showLogEntry();
代码示例来源:origin: pentaho/pentaho-kettle
table.select( activeTableRow );
table.showItem( table.getItem( activeTableRow ) );
e.doit = false;
代码示例来源:origin: org.eclipse.platform/org.eclipse.jface
@Override
protected void doSelect(int[] indices) {
table.select(indices);
}
代码示例来源:origin: org.eclipse.scout.sdk.deps/org.eclipse.jface
@Override
protected void doSelect(int[] indices) {
table.select(indices);
}
代码示例来源:origin: org.eclipse.rap/org.eclipse.rap.jface
protected void doSelect(int[] indices) {
table.select(indices);
}
代码示例来源:origin: org.eclipse/org.eclipse.wst.server.ui
protected void performDefaults() {
if (table != null) {
table.select(count);
server = defaultServer;
}
super.performDefaults();
}
代码示例来源:origin: openaudible/openaudible
public boolean select(E s) {
if (s != null) {
int count = 0;
for (E e : getList()) {
if (e.equals(s)) {
table.select(count);
return true;
}
count++;
}
}
return false;
}
代码示例来源:origin: org.eclipse/org.eclipse.jst.ws.consumption.ui
protected void traverseTabPrevious()
{
internalRefresh();
internalDispose();
if (!(editRow_ == 0 && editColumn_ == 0))
{
if (editColumn_ > 0)
editColumn_--;
else
{
editColumn_ = columns_.length-1;
editRow_--;
table_.select(editRow_);
}
editSelection(editRow_, editColumn_);
}
}
代码示例来源:origin: openaudible/openaudible
public boolean setSelected(Comparable<?> s) {
boolean found = false;
if (s != null) {
int c = getListCount();
for (int x = 0; x < c; x++) {
E dt = get(x);
if (dt.equals(s)) {
getTable().select(x);
found = true;
}
}
}
return found;
}
代码示例来源:origin: org.eclipse.platform/org.eclipse.ui.workbench
/**
* Add modify listener to the search text, trigger search each time text
* changes. After the search the first matching result is selected.
*/
protected void addModifyListener(Text text) {
text.addModifyListener(e -> {
String searchText = ((Text) e.widget).getText();
setMatcherString(searchText);
tableViewer.refresh();
if (tableViewer.getTable().getColumnCount() > 0) {
tableViewer.getTable().select(0);
}
});
}
代码示例来源:origin: org.eclipse.xtext/ui
public void run() {
if (getShell() != null) {
if (getTableViewer() != null) {
getTableViewer().setItemCount(matches.size());
getTableViewer().setInput(matches);
if (getTableViewer().getSelection().isEmpty() && matches.size() > 0)
getTableViewer().getTable().select(0);
}
searchStatusLabel
.setText((isFinished) ? "" : Messages.XtextEObjectSearchDialog_StatusMessageSearching); //$NON-NLS-1$
matchingElementsLabel.setText(Messages.XtextEObjectSearchDialog_MatchingElementsLabel
+ " (" + matches.size() + Messages.XtextEObjectSearchDialog_Matches); //$NON-NLS-1$
}
}
});
代码示例来源:origin: org.eclipse.platform/org.eclipse.team.ui
private void updateProjectList(IProject project) {
if (RepositoryProvider.isShared(project)) {
projectList.remove(project);
projectViewer.refresh();
if (hasUnsharedProjects()) {
projectViewer.getTable().select(0);
}
updateEnablements();
}
}
代码示例来源:origin: net.sf.okapi.lib/okapi-lib-segmentation-ui
private void removeRule () {
int n = tblRules.getSelectionIndex();
if ( n == -1 ) return;
String ruleName = cbGroup.getItem(cbGroup.getSelectionIndex());
srxDoc.getLanguageRules(ruleName).remove(n);
srxDoc.setModified(true);
tblRules.remove(n);
if ( n > tblRules.getItemCount()-1 )
n = tblRules.getItemCount()-1;
if ( tblRules.getItemCount() > 0 )
tblRules.select(n);
updateRulesButtons();
updateResults(true);
}
代码示例来源:origin: org.eclipse.pde/org.eclipse.pde.ui
private void update(IBuildEntry variable) {
int index = 0;
if (fFolderViewer.getInput() == variable)
index = fFolderViewer.getTable().getSelectionIndex();
fFolderViewer.setInput(variable);
int count = fFolderViewer.getTable().getItemCount();
if (index != -1 && count > 0) {
if (index == count)
index = index - 1;
fFolderViewer.getTable().select(index);
}
fFolderPart.setButtonEnabled(F_NEW_INDEX, !isReadOnly() && fEnabled && variable != null);
}
代码示例来源:origin: org.eclipse.platform/org.eclipse.team.ui
private void createProjectList(Composite composite) {
projectViewer = new TableViewer(composite, SWT.SINGLE | SWT.BORDER);
projectViewer.getControl().setLayoutData(SWTUtils.createHVFillGridData());
projectList = new AdaptableList(projects);
projectViewer.setContentProvider(new WorkbenchContentProvider());
projectViewer.setLabelProvider(new WorkbenchLabelProvider());
projectViewer.setComparator(new ResourceComparator(ResourceComparator.NAME));
projectViewer.setInput(projectList);
projectViewer.getTable().select(0);
projectViewer.addSelectionChangedListener(event -> updateEnablements());
}
内容来源于网络,如有侵权,请联系作者删除!