本文整理了Java中javax.swing.JDialog.createRootPane()
方法的一些代码示例,展示了JDialog.createRootPane()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。JDialog.createRootPane()
方法的具体详情如下:
包路径:javax.swing.JDialog
类名称:JDialog
方法名:createRootPane
暂无
代码示例来源:origin: christian-schlichtherle/truelicense
@Override protected JRootPane createRootPane() {
final JRootPane rootPane = super.createRootPane();
class Listener implements ActionListener, Serializable {
static final long serialVersionUID = 0L;
@Override public void actionPerformed(ActionEvent evt) {
onEscapeKeyPressed();
}
};
final Listener listener = new Listener();
final KeyStroke keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_ESCAPE, 0);
final int condition = JComponent.WHEN_ANCESTOR_OF_FOCUSED_COMPONENT;
rootPane.registerKeyboardAction(listener, keyStroke, condition);
return rootPane;
}
代码示例来源:origin: tinyMediaManager/tinyMediaManager
@Override
protected JRootPane createRootPane() {
JRootPane rootPane = super.createRootPane();
KeyStroke stroke = KeyStroke.getKeyStroke("ESCAPE");
Action actionListener = new AbstractAction() {
private static final long serialVersionUID = 3943345336176709047L;
@Override
public void actionPerformed(ActionEvent actionEvent) {
setVisible(false);
}
};
InputMap inputMap = rootPane.getInputMap(JComponent.WHEN_IN_FOCUSED_WINDOW);
inputMap.put(stroke, "ESCAPE");
rootPane.getActionMap().put("ESCAPE", actionListener);
return rootPane;
}
代码示例来源:origin: net.sf.cuf/cuf-swing
/**
* Called by the constructor methods to create the default <code>rootPane</code>.
* We add a escape listener that reacts on ESC and calls processDialogCancel().
*/
protected JRootPane createRootPane()
{
KeyStroke stroke = KeyStroke.getKeyStroke(KeyEvent.VK_ESCAPE, 0);
JRootPane newRootPane = super.createRootPane();
ActionListener escapeListener= pEvent -> processDialogCancel();
newRootPane.registerKeyboardAction(escapeListener, stroke, JComponent.WHEN_IN_FOCUSED_WINDOW);
return newRootPane;
}
}
代码示例来源:origin: stackoverflow.com
"Thread-289-Pool-3" prio=6 tid=0x60afe800 nid=0x12b8 waiting for monitor entry [0x623fe000]
java.lang.Thread.State: BLOCKED (on object monitor)
at java.awt.Component.setFont(Component.java:1777)
- waiting to lock <0x1fc87448> (a java.awt.Component$AWTTreeLock)
at java.awt.Container.setFont(Container.java:1554)
at javax.swing.JComponent.setFont(JComponent.java:2723)
at javax.swing.LookAndFeel.installColorsAndFont(LookAndFeel.java:191)
at javax.swing.plaf.basic.BasicPanelUI.installDefaults(BasicPanelUI.java:49)
at javax.swing.plaf.basic.BasicPanelUI.installUI(BasicPanelUI.java:39)
at com.ge.med.ptk.laf.CuiPanelUI.installUI(CuiPanelUI.java:53)
at javax.swing.JComponent.setUI(JComponent.java:662)
at javax.swing.JPanel.setUI(JPanel.java:136)
at javax.swing.JPanel.updateUI(JPanel.java:109)
at javax.swing.JPanel.<init>(JPanel.java:69)
at javax.swing.JPanel.<init>(JPanel.java:92)
at javax.swing.JPanel.<init>(JPanel.java:100)
at javax.swing.JRootPane.createGlassPane(JRootPane.java:528)
at javax.swing.JRootPane.<init>(JRootPane.java:348)
at javax.swing.JDialog.createRootPane(JDialog.java:611)
at javax.swing.JDialog.dialogInit(JDialog.java:593)
at com.ge.med.plaf.wrapper.WJDialog.dialogInit(WJDialog.java:42)
at javax.swing.JDialog.<init>(JDialog.java:545)
at javax.swing.JDialog.<init>(JDialog.java:515)
at com.ge.med.plaf.wrapper.WJDialog.<init>(WJDialog.java:424)
at com.ge.med.platinum.gui.util.PlatinumDialog.<init>(PlatinumDialog.java:138)
at com.ge.med.platinum.gui.util.EAOAlertManager$EAOAlertDialog.<init>(EAOAlertManager.java:450)
at com.ge.med.platinum.gui.util.EAOAlertManager.<clinit>(EAOAlertManager.java:77)
at com.ge.med.platinum.work.isu.ExamTransaction.getEAOTableLite(ExamTransaction.java:1514)
内容来源于网络,如有侵权,请联系作者删除!