本文整理汇总了Java中com.intellij.ui.ShowUIDefaultsAction类的典型用法代码示例。如果您正苦于以下问题:Java ShowUIDefaultsAction类的具体用法?Java ShowUIDefaultsAction怎么用?Java ShowUIDefaultsAction使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
ShowUIDefaultsAction类属于com.intellij.ui包,在下文中一共展示了ShowUIDefaultsAction类的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: main
import com.intellij.ui.ShowUIDefaultsAction; //导入依赖的package包/类
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(new Runnable() {
@Override
public void run() {
frame.setVisible(true);
}
});
}
示例2: main
import com.intellij.ui.ShowUIDefaultsAction; //导入依赖的package包/类
public static void main(String[] args) {
try {
UIManager.setLookAndFeel(new ModernDarkLaf());
}
catch (UnsupportedLookAndFeelException ignored) {
}
final JFrame frame = new JFrame("Modern White Demo");
frame.setSize(900, 500);
final ModernTest form = new ModernTest();
final JPanel root = form.myRoot;
frame.setContentPane(root);
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(new Runnable() {
@Override
public void run() {
frame.setVisible(true);
}
});
}