本文整理了Java中org.eclipse.swt.widgets.Table.selectAll()
方法的一些代码示例,展示了Table.selectAll()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Table.selectAll()
方法的具体详情如下:
包路径:org.eclipse.swt.widgets.Table
类名称:Table
方法名:selectAll
[英]Selects all of the items in the receiver.
If the receiver is single-select, do nothing.
[中]选择接收器中的所有项目。
如果接收器是单选的,什么也不做。
代码示例来源:origin: pentaho/pentaho-kettle
private void selectAll() {
table.selectAll();
}
代码示例来源:origin: openaudible/openaudible
@Override
public void keyPressed(KeyEvent e) {
boolean ctlDown = ((e.stateMask & SWT.CTRL) != 0);
if (e.keyCode == 97 && ctlDown) {
table.selectAll();
}
// System.err.println(e.toString()+" char="+e.character);
}
代码示例来源:origin: BiglySoftware/BiglyBT
@Override
public void
keyPressed(
KeyEvent event )
{
int key = event.character;
if ( key <= 26 && key > 0 ){
key += 'a' - 1;
}
if ( key == 'a' && event.stateMask == SWT.MOD1 ){
event.doit = false;
buddy_table.selectAll();
}
}
});
代码示例来源:origin: org.eclipse.egit/ui
@Override
public void run() {
if (af == ActionFactory.SELECT_ALL)
table.getTable().selectAll();
if (af == ActionFactory.COPY)
doCopy();
}
};
代码示例来源:origin: openaudible/openaudible
public void selectAll() {
table.selectAll();
selectionChanged();
}
代码示例来源:origin: openaudible/openaudible
public void selectAll() {
table.selectAll();
rowsSelected(null); // signal that selection changed.
}
代码示例来源:origin: org.eclipse.swt.cocoa.macosx/x86_64
/**
* Selects all of the items in the receiver.
* <p>
* If the receiver is single-select, do nothing.
*
* @exception SWTException <ul>
* <li>ERROR_THREAD_INVALID_ACCESS when called from the wrong thread
* <li>ERROR_WIDGET_DISPOSED when the widget has been disposed
* </ul>
*/
public void selectAll () {
checkWidget();
table.selectAll();
}
public void setBackground (Color color) {
代码示例来源:origin: org.eclipse.platform/org.eclipse.swt.gtk.linux.s390x
/**
* Selects all of the items in the receiver.
* <p>
* If the receiver is single-select, do nothing.
*
* @exception SWTException <ul>
* <li>ERROR_THREAD_INVALID_ACCESS when called from the wrong thread
* <li>ERROR_WIDGET_DISPOSED when the widget has been disposed
* </ul>
*/
public void selectAll () {
checkWidget();
table.selectAll();
}
@Override
代码示例来源:origin: org.eclipse.platform/org.eclipse.swt.gtk.aix.ppc
/**
* Selects all of the items in the receiver.
* <p>
* If the receiver is single-select, do nothing.
*
* @exception SWTException <ul>
* <li>ERROR_THREAD_INVALID_ACCESS when called from the wrong thread
* <li>ERROR_WIDGET_DISPOSED when the widget has been disposed
* </ul>
*/
public void selectAll () {
checkWidget();
table.selectAll();
}
@Override
代码示例来源:origin: org.eclipse.platform/org.eclipse.swt.gtk.linux.ppc
/**
* Selects all of the items in the receiver.
* <p>
* If the receiver is single-select, do nothing.
*
* @exception SWTException <ul>
* <li>ERROR_THREAD_INVALID_ACCESS when called from the wrong thread
* <li>ERROR_WIDGET_DISPOSED when the widget has been disposed
* </ul>
*/
public void selectAll () {
checkWidget();
table.selectAll();
}
@Override
代码示例来源:origin: org.eclipse.scout.sdk.deps/org.eclipse.swt.win32.win32.x86
/**
* Selects all of the items in the receiver.
* <p>
* If the receiver is single-select, do nothing.
*
* @exception SWTException <ul>
* <li>ERROR_THREAD_INVALID_ACCESS when called from the wrong thread
* <li>ERROR_WIDGET_DISPOSED when the widget has been disposed
* </ul>
*/
public void selectAll () {
checkWidget();
table.selectAll();
}
@Override
代码示例来源:origin: org.eclipse.pde/org.eclipse.pde.ui
@Override
protected void handleSelectAll() {
TableViewer viewer = fViewer;
if (viewer == null) {
return;
}
Table table = viewer.getTable();
if (table == null) {
return;
}
table.selectAll();
handleSelectionChanged();
}
}
代码示例来源:origin: org.apache.uima/uimaj-ep-cas-editor-ide
/**
* Selects all elements in the file table viewer.
*/
public void widgetSelected(SelectionEvent e) {
fileTable.getTable().selectAll();
fileTable.setSelection(fileTable.getSelection());
}
});
代码示例来源:origin: org.eclipse.scout.sdk.deps/org.eclipse.ui.ide
@Override
public void run() {
Viewer viewer = getView().getViewer();
Control control = viewer.getControl();
if (control instanceof Table) {
((Table) control).selectAll();
viewer.setSelection(viewer.getSelection(), false);
}
}
}
代码示例来源:origin: org.eclipse.scout.sdk.deps/org.eclipse.jdt.ui
/**
* Selects all resources in the view.
*/
@Override
public void run() {
if (fViewer instanceof TreeViewer) {
ArrayList<TreeItem> allVisible= new ArrayList<>();
Tree tree= ((TreeViewer) fViewer).getTree();
collectExpandedAndVisible(tree.getItems(), allVisible);
tree.setSelection(allVisible.toArray(new TreeItem[allVisible.size()]));
fViewer.setSelection(fViewer.getSelection());
} else if (fViewer instanceof TableViewer) {
((TableViewer) fViewer).getTable().selectAll();
// force viewer selection change
fViewer.setSelection(fViewer.getSelection());
}
}
}
代码示例来源:origin: org.eclipse/org.eclipse.jdt.ui
/**
* Selects all resources in the view.
*/
public void run() {
if (fViewer instanceof TreeViewer) {
ArrayList allVisible= new ArrayList();
Tree tree= ((TreeViewer) fViewer).getTree();
collectExpandedAndVisible(tree.getItems(), allVisible);
tree.setSelection((TreeItem[]) allVisible.toArray(new TreeItem[allVisible.size()]));
fViewer.setSelection(fViewer.getSelection());
} else if (fViewer instanceof TableViewer) {
((TableViewer) fViewer).getTable().selectAll();
// force viewer selection change
fViewer.setSelection(fViewer.getSelection());
}
}
}
代码示例来源:origin: org.eclipse.pde/org.eclipse.pde.ui
@Override
protected void handleSelectAll() {
TableViewer viewer = getTablePart().getTableViewer();
if (viewer == null) {
return;
}
Table table = viewer.getTable();
if (table == null) {
return;
}
table.selectAll();
selectionChanged(viewer.getStructuredSelection());
}
}
代码示例来源:origin: org.eclipse.platform/org.eclipse.search
/**
* Selects all resources in the view.
*/
@Override
public void run() {
if (fViewer == null || fViewer.getControl().isDisposed()) {
return;
}
if (fViewer instanceof TreeViewer) {
ArrayList<TreeItem> allVisible= new ArrayList<>();
Tree tree= ((TreeViewer) fViewer).getTree();
collectExpandedAndVisible(tree.getItems(), allVisible);
tree.setSelection(allVisible.toArray(new TreeItem[allVisible.size()]));
} else if (fViewer instanceof TableViewer) {
((TableViewer) fViewer).getTable().selectAll();
// force viewer selection change
fViewer.setSelection(fViewer.getSelection());
}
}
}
代码示例来源:origin: anb0s/LogViewer
@SuppressWarnings("unchecked")
private void exportSelected() {
IStructuredSelection selection= (IStructuredSelection)tableViewer.getSelection();
if(selection.isEmpty()) {
if (askSelectAll()) {
tableViewer.getTable().selectAll();
selection= (IStructuredSelection)tableViewer.getSelection();
} else {
MessageDialog.openError(getShell(),
LogViewerPlugin.getResourceString("preferences.ruleseditor.export.error.title"), //$NON-NLS-1$
LogViewerPlugin.getResourceString("preferences.ruleseditor.export.error.select.items.text")); //$NON-NLS-1$
return;
}
}
Collection<RulePreferenceData> itemArray= new ArrayList<RulePreferenceData>();
itemArray.addAll(selection.toList());
export(itemArray.toArray(new RulePreferenceData[itemArray.size()]));
}
代码示例来源:origin: org.eclipse.scout.sdk.deps/org.eclipse.ui.ide
/**
* Selects all resources in the view.
*/
@Override
public void run() {
getTaskList().cancelEditing();
TableViewer viewer = getTaskList().getTableViewer();
viewer.getTable().selectAll();
// force viewer selection change
viewer.setSelection(viewer.getSelection());
}
}
内容来源于网络,如有侵权,请联系作者删除!