javax.swing.JLayeredPane.getInputMap()方法的使用及代码示例

x33g5p2x  于2022-01-21 转载在 其他  
字(2.3k)|赞(0)|评价(0)|浏览(99)

本文整理了Java中javax.swing.JLayeredPane.getInputMap()方法的一些代码示例,展示了JLayeredPane.getInputMap()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。JLayeredPane.getInputMap()方法的具体详情如下:
包路径:javax.swing.JLayeredPane
类名称:JLayeredPane
方法名:getInputMap

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

相关文章