Browse Source

Add option to switch between system laf and darklaf in tests.

pull/187/head
weisj 4 years ago
parent
commit
14ad4ca785
  1. 20
      core/src/test/java/ui/ComponentDemo.java

20
core/src/test/java/ui/ComponentDemo.java

@ -225,6 +225,26 @@ public interface ComponentDemo {
isSelected()));
}
});
dev.add(new JCheckBoxMenuItem("Darklaf/System Laf"){
{
setSelected(true);
addActionListener(e -> {
if (isSelected()) {
LafManager.install();
} else {
try {
UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
LafManager.updateLaf();
} catch (ClassNotFoundException
| UnsupportedLookAndFeelException
| IllegalAccessException
| InstantiationException classNotFoundException) {
classNotFoundException.printStackTrace();
}
}
});
}
});
return dev;
}

Loading…
Cancel
Save