use of com.intellij.ui.ShowUIDefaultsAction in project intellij-community by JetBrains.
the class DarculaTest method main.
public static void main(String[] args) {
try {
UIManager.setLookAndFeel(new DarculaLaf());
} catch (UnsupportedLookAndFeelException ignored) {
}
final JFrame frame = new JFrame("Darcula Demo");
frame.setSize(900, 500);
final DarculaTest form = new DarculaTest();
final JPanel root = form.myRoot;
frame.setContentPane(root);
frame.getRootPane().setDefaultButton(form.myDefaultButton);
frame.setDefaultCloseOperation(WindowConstants.EXIT_ON_CLOSE);
Toolkit.getDefaultToolkit().addAWTEventListener(new AWTEventListener() {
@Override
public void eventDispatched(AWTEvent event) {
if (event instanceof KeyEvent && event.getID() == KeyEvent.KEY_PRESSED && ((KeyEvent) event).getKeyCode() == KeyEvent.VK_F1) {
new ShowUIDefaultsAction().actionPerformed(null);
}
}
}, AWTEvent.KEY_EVENT_MASK);
SwingUtilities.invokeLater(() -> frame.setVisible(true));
}
Aggregations