本文整理了Java中javax.swing.JLayeredPane.getInputMap()
方法的一些代码示例,展示了JLayeredPane.getInputMap()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。JLayeredPane.getInputMap()
方法的具体详情如下:
包路径:javax.swing.JLayeredPane
类名称:JLayeredPane
方法名:getInputMap
暂无
代码示例来源:origin: net.anwiba.commons/anwiba-commons-swing-core
private void addKeyAction(final IKeyActionConfiguration configuration) {
getLayeredPane()
.getInputMap(JComponent.WHEN_IN_FOCUSED_WINDOW)
.put(configuration.getKeyStroke(), configuration.getActionKey());
getLayeredPane().getActionMap().put(configuration.getActionKey(), configuration.getAction());
}
代码示例来源:origin: openstreetmap/osmembrane
/**
* common constructor for all dialog view elements
*/
public AbstractDialog(Window owner) {
super(owner);
setDefaultCloseOperation(WindowConstants.HIDE_ON_CLOSE);
setModalityType(ModalityType.APPLICATION_MODAL);
setResizable(false);
// close dialog on escape
this.getLayeredPane().getActionMap().put("close", new AbstractAction() {
@Override
public void actionPerformed(ActionEvent e) {
hideWindow();
}
});
this.getLayeredPane()
.getInputMap(JComponent.WHEN_ANCESTOR_OF_FOCUSED_COMPONENT)
.put(KeyStroke.getKeyStroke(KeyEvent.VK_ESCAPE, 0), "close");
}
代码示例来源:origin: org.jboss.errai/errai-tools
getLayeredPane().getInputMap(JComponent.WHEN_IN_FOCUSED_WINDOW)
.put(escKeyStroke, "esc-pressed");
代码示例来源:origin: errai/errai
getLayeredPane().getInputMap(JComponent.WHEN_IN_FOCUSED_WINDOW)
.put(escKeyStroke, "esc-pressed");
代码示例来源:origin: org.jboss.errai/errai-tools
getLayeredPane().getInputMap(JComponent.WHEN_IN_FOCUSED_WINDOW)
.put(escKeyStroke, "esc-pressed");
代码示例来源:origin: errai/errai
getLayeredPane().getInputMap(JComponent.WHEN_IN_FOCUSED_WINDOW)
.put(escKeyStroke, "esc-pressed");
代码示例来源:origin: icza/scelight
getLayeredPane().getInputMap( JComponent.WHEN_ANCESTOR_OF_FOCUSED_COMPONENT ).put( KeyStroke.getKeyStroke( KeyEvent.VK_P, InputEvent.CTRL_MASK ),
actionKey );
getLayeredPane().getActionMap().put( actionKey, new AbstractAction() {
代码示例来源:origin: icza/scelight
getLayeredPane().getInputMap( JComponent.WHEN_ANCESTOR_OF_FOCUSED_COMPONENT ).put( KeyStroke.getKeyStroke( KeyEvent.VK_ESCAPE, 0 ), actionKey );
getLayeredPane().getActionMap().put( actionKey, new AbstractAction() {
@Override
内容来源于网络,如有侵权,请联系作者删除!