本文整理了Java中org.eclipse.swt.widgets.Table.addKeyListener()
方法的一些代码示例,展示了Table.addKeyListener()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Table.addKeyListener()
方法的具体详情如下:
包路径:org.eclipse.swt.widgets.Table
类名称:Table
方法名:addKeyListener
暂无
代码示例来源:origin: pentaho/pentaho-kettle
wSteps.table.addKeyListener( new KeyAdapter() {
代码示例来源:origin: openaudible/openaudible
public void addSelectAllListener() {
table.addKeyListener(new KeyListener() {
@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);
}
@Override
public void keyReleased(KeyEvent e) {
}
});
}
代码示例来源:origin: openaudible/openaudible
public void addSelectAllListener() {
table.addKeyListener(new KeyListener() {
@Override
public void keyPressed(KeyEvent e) {
int m = e.stateMask & SWT.CTRL;
boolean ctlDown = (m == SWT.CTRL);
if (e.keyCode == 97 && ctlDown) {
selectAll();
}
}
@Override
public void keyReleased(KeyEvent e) {
}
});
}
代码示例来源:origin: pentaho/pentaho-kettle
table.addKeyListener( lsKeyTable );
代码示例来源:origin: org.eclipse.scout.sdk.deps/org.eclipse.jface.text
@Override
public void focusGained(FocusEvent e) {
if (Helper.okToUse(control)) {
if (fCommandKeyListener == null) {
fCommandKeyListener= new CommandKeyListener(commandSequence);
fProposalTable.addKeyListener(fCommandKeyListener);
}
}
}
@Override
代码示例来源:origin: org.eclipse.platform/org.eclipse.jface.text
@Override
public void focusGained(FocusEvent e) {
if (Helper.okToUse(control)) {
if (fCommandKeyListener == null) {
fCommandKeyListener= new CommandKeyListener(commandSequence);
fProposalTable.addKeyListener(fCommandKeyListener);
}
}
}
@Override
代码示例来源:origin: org.eclipse.platform/org.eclipse.ant.ui
propertyTableViewer.getTable().addKeyListener(keyListener);
fileTableViewer.getTable().addKeyListener(keyListener);
代码示例来源:origin: org.eclipse.platform/org.eclipse.ui.workbench
@Override
protected Control createDialogArea(Composite parent) {
Composite composite = (Composite) super.createDialogArea(parent);
boolean isWin32 = Util.isWindows();
GridLayoutFactory.fillDefaults().extendedMargins(isWin32 ? 0 : 3, 3, 2, 2)
.applyTo(composite);
Table table = contents.createTable(composite, getDefaultOrientation());
table.addKeyListener(getKeyAdapter());
return composite;
}
代码示例来源:origin: org.eclipse/org.eclipse.jdt.debug.ui
/**
* Creates a runtime classpath viewer with the given parent.
*
* @param parent the parent control
*/
public RuntimeClasspathViewer(Composite parent) {
super(parent);
setContentProvider(new ContentProvider());
RuntimeClasspathEntryLabelProvider lp = new RuntimeClasspathEntryLabelProvider();
setLabelProvider(lp);
setInput(fEntries);
getTable().addKeyListener(new KeyAdapter() {
public void keyPressed(KeyEvent event) {
if (isEnabled() && event.character == SWT.DEL && event.stateMask == 0) {
List selection= getSelectionFromWidget();
fEntries.removeAll(selection);
setInput(fEntries);
notifyChanged();
}
}
});
}
代码示例来源:origin: tvrenamer/tvrenamer
private void setupResultsTable() {
swtTable.setHeaderVisible(true);
swtTable.setLinesVisible(true);
GridData gridData = new GridData(GridData.FILL_BOTH);
// gridData.widthHint = 780;
gridData.heightHint = 350;
gridData.horizontalSpan = 3;
swtTable.setLayoutData(gridData);
createColumns();
setColumnDestText();
setSortColumn();
// Allow deleting of elements
swtTable.addKeyListener(new KeyAdapter() {
@Override
public void keyReleased(KeyEvent e) {
super.keyReleased(e);
if ((e.keyCode == '\u0008') // backspace
|| (e.keyCode == '\u007F')) // delete
{
deleteSelectedTableItems();
}
}
});
// editable table
final TableEditor editor = new TableEditor(swtTable);
editor.horizontalAlignment = SWT.CENTER;
editor.grabHorizontal = true;
setupSelectionListener();
}
代码示例来源:origin: org.eclipse.platform/org.eclipse.search
void fillToolBar(IToolBarManager tbm) {
tbm.add(fShowNextResultAction);
tbm.add(fShowPreviousResultAction);
// tbm.add(fGotoMarkerAction); see bug 15275
tbm.add(fRemoveSelectedMatchesAction);
tbm.add(fRemoveAllResultsAction);
tbm.add(new Separator());
tbm.add(new OpenSearchDialogAction());
tbm.add(fSearchDropDownAction);
// need to hook F5 to table
getTable().addKeyListener(new KeyAdapter() {
@Override
public void keyReleased(KeyEvent e) {
if (e.keyCode == SWT.F5) {
fSearchAgainAction.run();
return; // performance
}
if (e.character == SWT.DEL) {
new RemoveResultAction(SearchResultViewer.this, true).run();
return; // performance
}
}
});
}
代码示例来源:origin: org.eclipse/org.eclipse.search
void fillToolBar(IToolBarManager tbm) {
tbm.add(fShowNextResultAction);
tbm.add(fShowPreviousResultAction);
// tbm.add(fGotoMarkerAction); see bug 15275
tbm.add(fRemoveSelectedMatchesAction);
tbm.add(fRemoveAllResultsAction);
tbm.add(new Separator());
tbm.add(new OpenSearchDialogAction());
tbm.add(fSearchDropDownAction);
// need to hook F5 to table
getTable().addKeyListener(new KeyAdapter() {
public void keyReleased(KeyEvent e) {
if (e.keyCode == SWT.F5) {
fSearchAgainAction.run();
return; // performance
}
if (e.character == SWT.DEL) {
new RemoveResultAction(SearchResultViewer.this, true).run();
return; // performance
}
}
});
}
代码示例来源:origin: inspectIT/inspectIT
tableViewer.getTable().addKeyListener(new KeyAdapter() {
@Override
public void keyPressed(KeyEvent e) {
代码示例来源:origin: heeckhau/mousefeed
tableViewer = createTableViewer();
resizeTableColumns();
table.addKeyListener(new KeyAdapter() {
代码示例来源:origin: inspectIT/inspectIT
table.addKeyListener(new KeyAdapter() {
@Override
public void keyPressed(KeyEvent e) {
代码示例来源:origin: org.eclipse.pde/org.eclipse.pde.ui
fElementViewer.getTable().addKeyListener(new KeyAdapter() {
@Override
public void keyPressed(KeyEvent e) {
代码示例来源:origin: org.eclipse.scout.sdk.deps/org.eclipse.jdt.ui
table.addKeyListener(new KeyAdapter() {
@Override
public void keyPressed(KeyEvent e) {
代码示例来源:origin: org.eclipse/org.eclipse.jdt.ui
table.addKeyListener(new KeyAdapter() {
public void keyPressed(KeyEvent e) {
if (e.keyCode == SWT.F2 && e.stateMask == SWT.NONE) {
代码示例来源:origin: org.eclipse/org.eclipse.jdt.ui
fTable.getTable().addKeyListener(new KeyAdapter() {
public void keyPressed(KeyEvent e) {
handleKeyPressed(e);
代码示例来源:origin: org.eclipse.scout.sdk.deps/org.eclipse.jdt.ui
fTable.getTable().addKeyListener(new KeyAdapter() {
@Override
public void keyPressed(KeyEvent e) {
内容来源于网络,如有侵权,请联系作者删除!