本文整理了Java中org.eclipse.swt.widgets.Shell.addKeyListener()
方法的一些代码示例,展示了Shell.addKeyListener()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Shell.addKeyListener()
方法的具体详情如下:
包路径:org.eclipse.swt.widgets.Shell
类名称:Shell
方法名:addKeyListener
暂无
代码示例来源:origin: stackoverflow.com
shell.addKeyListener(new KeyListener() {
public void keyReleased(KeyEvent e) {
if(((e.stateMask & SWT.CTRL) == SWT.CTRL) && (e.keyCode == 'f'))
代码示例来源:origin: stefanhaustein/flowgrid
public SwtFlowgrid(Display display, File flowgridRootDir, boolean dark, float pixelPerDp, Callback<Model>... setup) {
this.display = display;
flowgridRoot = flowgridRootDir;
settings = new Settings(new File(flowgridRoot, "settings.json"));
storageRoot = new File(flowgridRoot, "files");
cacheRoot = new File(flowgridRoot, "cache");
resourceManager = new ResourceManager(display, dark, pixelPerDp);
shell = new Shell(display, SWT.SHELL_TRIM);
shell.setText("FlowGrid");
this.pixelPerDp = pixelPerDp;
this.setup = setup;
Rectangle clientArea = display.getClientArea();
shell.setBounds(clientArea.width / 6, clientArea.height / 6,
Math.min(clientArea.width * 3 / 2, Math.round(800 * pixelPerDp)),
Math.min(clientArea.height * 3 / 2, Math.round(480 * pixelPerDp)));
shell.open();
shell.addKeyListener(new KeyAdapter() {
@Override
public void keyReleased(KeyEvent e) {
if (e.keyCode == SWT.ARROW_LEFT && (e.stateMask & SWT.MODIFIER_MASK) == SWT.ALT && backStack.size() > 1) {
openArtifact(model.artifact(backStack.get(backStack.size() - 2)));
e.doit = false;
}
}
});
}
代码示例来源:origin: BiglySoftware/BiglyBT
shell.addKeyListener(new KeyListener() {
代码示例来源:origin: org.microemu/microemu-javase-swt
shell.setLocation(window.x, window.y);
shell.addKeyListener(keyListener);
内容来源于网络,如有侵权,请联系作者删除!