本文整理了Java中org.eclipse.swt.events.KeyListener
类的一些代码示例,展示了KeyListener
类的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。KeyListener
类的具体详情如下:
包路径:org.eclipse.swt.events.KeyListener
类名称:KeyListener
[英]Classes which implement this interface provide methods that deal with the events that are generated as keys are pressed on the system keyboard.
After creating an instance of a class that implements this interface it can be added to a control using the addKeyListener
method and removed using the removeKeyListener
method. When a key is pressed or released, the appropriate method will be invoked.
[中]实现此接口的类提供了处理在系统键盘上按下键时生成的事件的方法。
创建实现此接口的类的实例后,可以使用addKeyListener
方法将其添加到控件中,并使用removeKeyListener
方法将其删除。当按下或释放某个键时,将调用相应的方法。
代码示例来源:origin: org.eclipse.mylyn.commons/workbench
@Override
public void keyPressed(KeyEvent e) {
if (e.doit) {
oldKeyListener.keyPressed(e);
}
}
代码示例来源:origin: org.eclipse.mylyn.commons/workbench
@Override
public void keyReleased(KeyEvent e) {
if (e.doit) {
oldKeyListener.keyReleased(e);
}
}
});
代码示例来源:origin: org.eclipse.rap/org.eclipse.rap.rwt
((KeyListener) eventListener).keyPressed(event);
e.doit = event.doit;
break;
((KeyListener) eventListener).keyReleased(event);
e.doit = event.doit;
break;
代码示例来源:origin: org.eclipse.platform/org.eclipse.e4.ui.workbench.renderers.swt
fFilterText.setLayoutData(data);
fFilterText.addKeyListener(KeyListener.keyPressedAdapter(e -> {
switch (e.keyCode) {
case SWT.CR:
代码示例来源:origin: org.eclipse.pde/org.eclipse.pde.api.tools.ui
GridData gd = (GridData) table.getLayoutData();
gd.widthHint = 250;
table.addKeyListener(KeyListener.keyReleasedAdapter(e -> {
if (e.stateMask == SWT.NONE && e.keyCode == SWT.DEL) {
removeLocation();
代码示例来源:origin: org.eclipse.platform/org.eclipse.swt.gtk.aix.ppc
((KeyListener) eventListener).keyPressed(event);
e.doit = event.doit;
break;
((KeyListener) eventListener).keyReleased(event);
e.doit = event.doit;
break;
代码示例来源:origin: org.eclipse.pde/org.eclipse.pde.api.tools.ui
gd.heightHint = 200;
tree.setLayoutData(gd);
tree.addKeyListener(KeyListener.keyPressedAdapter(e -> {
if (e.character == SWT.DEL && e.stateMask == 0) {
handleRemove(fViewer.getStructuredSelection());
代码示例来源:origin: org.eclipse.pde/org.eclipse.pde.api.tools.ui
Table table = new Table(lcomp, SWT.FULL_SELECTION | SWT.MULTI | SWT.BORDER | SWT.CHECK);
table.setLayoutData(new GridData(GridData.FILL_BOTH));
table.addKeyListener(KeyListener.keyReleasedAdapter(e -> {
if (e.stateMask == SWT.NONE && e.keyCode == SWT.DEL) {
doRemove();
代码示例来源:origin: org.eclipse.swt.cocoa.macosx/x86_64
((KeyListener) eventListener).keyPressed(event);
e.doit = event.doit;
break;
((KeyListener) eventListener).keyReleased(event);
e.doit = event.doit;
break;
代码示例来源:origin: org.eclipse.scout.sdk.deps/org.eclipse.jface.text
iter.next().keyPressed(keyEvent);
代码示例来源:origin: BiglySoftware/BiglyBT
@Override
public void keyReleased(KeyEvent event) {
KeyListener[] listeners = tv.getKeyListeners();
for (KeyListener l : listeners) {
l.keyReleased(event);
if (!event.doit) {
return;
}
}
}
代码示例来源:origin: org.eclipse.pde/org.eclipse.pde.api.tools.ui
updatejob.schedule();
});
text.addKeyListener(KeyListener.keyPressedAdapter(e -> {
if (e.keyCode == SWT.ARROW_DOWN) {
if (tableviewer != null) {
代码示例来源:origin: org.eclipse.platform/org.eclipse.swt.gtk.linux.ppc
((KeyListener) eventListener).keyPressed(event);
e.doit = event.doit;
break;
((KeyListener) eventListener).keyReleased(event);
e.doit = event.doit;
break;
代码示例来源:origin: org.eclipse.platform/org.eclipse.jface.text
keyListener.keyPressed(keyEvent);
代码示例来源:origin: org.eclipse.pde/org.eclipse.pde.api.tools.ui
updatejob.schedule();
});
text.addKeyListener(KeyListener.keyPressedAdapter(e -> {
if (e.keyCode == SWT.ARROW_DOWN) {
if (tableviewer != null) {
代码示例来源:origin: org.eclipse.platform/org.eclipse.swt.gtk.linux.s390x
((KeyListener) eventListener).keyPressed(event);
e.doit = event.doit;
break;
((KeyListener) eventListener).keyReleased(event);
e.doit = event.doit;
break;
代码示例来源:origin: BiglySoftware/BiglyBT
l.keyPressed(event);
if (!event.doit) {
lCancelSelectionTriggeredOn = SystemTime.getCurrentTime();
代码示例来源:origin: org.eclipse.pde/org.eclipse.pde.api.tools.ui
table.addKeyListener(KeyListener.keyPressedAdapter(event -> {
if (event.character == SWT.DEL && event.stateMask == 0) {
doRemove();
代码示例来源:origin: org.eclipse.scout.sdk.deps/org.eclipse.swt.win32.win32.x86
((KeyListener) eventListener).keyPressed(event);
e.doit = event.doit;
break;
((KeyListener) eventListener).keyReleased(event);
e.doit = event.doit;
break;
代码示例来源:origin: org.eclipse.platform/org.eclipse.e4.ui.workbench.renderers.swt
table.addKeyListener(KeyListener.keyPressedAdapter(e -> {
switch (e.keyCode) {
case SWT.ESC:
内容来源于网络,如有侵权,请联系作者删除!