diff --git a/core/src/test/java/ui/ComponentDemo.java b/core/src/test/java/ui/ComponentDemo.java index adfc18e4..81547e6c 100644 --- a/core/src/test/java/ui/ComponentDemo.java +++ b/core/src/test/java/ui/ComponentDemo.java @@ -52,6 +52,10 @@ public interface ComponentDemo { themeStyle.getColorToneRule())); } + default Theme createTheme() { + return getTheme(); + } + JComponent createComponent(); static void showDemo(final ComponentDemo demo) { @@ -169,10 +173,6 @@ public interface ComponentDemo { } default JMenuBar createMenuBar() { - return getDefaultMenuBar(); - } - - static JMenuBar getDefaultMenuBar() { JMenuBar menuBar = new JMenuBar(); menuBar.add(createThemeMenu()); menuBar.add(createSettingsMenu()); @@ -180,7 +180,7 @@ public interface ComponentDemo { return menuBar; } - static JMenu createDevSettings() { + default JMenu createDevSettings() { JMenu dev = new JMenu("Dev"); JMenu logging = new JMenu("Logging"); ButtonGroup bg = new ButtonGroup(); @@ -207,10 +207,6 @@ public interface ComponentDemo { return dev; } - default Theme createTheme() { - return getTheme(); - } - String getTitle(); class ThemeMenuItem extends JRadioButtonMenuItem { diff --git a/core/src/test/java/ui/button/HelpButtonDemo.java b/core/src/test/java/ui/button/HelpButtonDemo.java index da1d1552..511d02e2 100644 --- a/core/src/test/java/ui/button/HelpButtonDemo.java +++ b/core/src/test/java/ui/button/HelpButtonDemo.java @@ -67,7 +67,7 @@ public class HelpButtonDemo implements ComponentDemo { @Override public JMenuBar createMenuBar() { - JMenuBar menuBar = ComponentDemo.getDefaultMenuBar(); + JMenuBar menuBar = ComponentDemo.super.createMenuBar(); menuBar.add(new JMenu("Help") { { add(new HelpMenuItem("View Help")); diff --git a/core/src/test/java/ui/checkBox/CheckBoxDemo.java b/core/src/test/java/ui/checkBox/CheckBoxDemo.java index 93039718..f8479630 100644 --- a/core/src/test/java/ui/checkBox/CheckBoxDemo.java +++ b/core/src/test/java/ui/checkBox/CheckBoxDemo.java @@ -86,7 +86,7 @@ public class CheckBoxDemo implements ComponentDemo { @Override public JMenuBar createMenuBar() { - JMenuBar menuBar = ComponentDemo.getDefaultMenuBar(); + JMenuBar menuBar = ComponentDemo.super.createMenuBar(); menuBar.add(new JMenu("Demo") { { add(new JCheckBoxMenuItem("CheckBox menu item")); diff --git a/core/src/test/java/ui/checkBox/TriCheckBoxDemo.java b/core/src/test/java/ui/checkBox/TriCheckBoxDemo.java index 248d5dbe..4e4989c8 100644 --- a/core/src/test/java/ui/checkBox/TriCheckBoxDemo.java +++ b/core/src/test/java/ui/checkBox/TriCheckBoxDemo.java @@ -88,7 +88,7 @@ public class TriCheckBoxDemo implements ComponentDemo { @Override public JMenuBar createMenuBar() { - JMenuBar menuBar = ComponentDemo.getDefaultMenuBar(); + JMenuBar menuBar = ComponentDemo.super.createMenuBar(); menuBar.add(new JMenu("Demo") { { add(new TristateCheckBoxMenuItem("TristateCheckBox menu item")); diff --git a/core/src/test/java/ui/internalFrame/InternalFrameDemo.java b/core/src/test/java/ui/internalFrame/InternalFrameDemo.java index 4cafc89f..3bad8b98 100644 --- a/core/src/test/java/ui/internalFrame/InternalFrameDemo.java +++ b/core/src/test/java/ui/internalFrame/InternalFrameDemo.java @@ -64,14 +64,13 @@ public class InternalFrameDemo implements ActionListener, ComponentDemo { createFrame(); - // Make dragging a little faster but perhaps uglier. desktop.setDragMode(JDesktopPane.LIVE_DRAG_MODE); return new DemoPanel(desktop, new BorderLayout(), 10); } @Override public JMenuBar createMenuBar() { - JMenuBar menuBar = ComponentDemo.getDefaultMenuBar(); + JMenuBar menuBar = ComponentDemo.super.createMenuBar(); // Set up the lone menu. JMenu menu = new JMenu("Document"); diff --git a/core/src/test/java/ui/popupMenu/PopupMenuDemo.java b/core/src/test/java/ui/popupMenu/PopupMenuDemo.java index 2c2a0cb9..e4639e44 100644 --- a/core/src/test/java/ui/popupMenu/PopupMenuDemo.java +++ b/core/src/test/java/ui/popupMenu/PopupMenuDemo.java @@ -130,7 +130,7 @@ public class PopupMenuDemo implements ComponentDemo { @Override public JMenuBar createMenuBar() { - JMenuBar menuBar = ComponentDemo.getDefaultMenuBar(); + JMenuBar menuBar = ComponentDemo.super.createMenuBar(); menuBar.add(new JMenu("CheckBoxes") { { for (int i = 0; i < 10; i++) { diff --git a/core/src/test/java/ui/radioButton/RadioButtonDemo.java b/core/src/test/java/ui/radioButton/RadioButtonDemo.java index 03995dbf..8398536e 100644 --- a/core/src/test/java/ui/radioButton/RadioButtonDemo.java +++ b/core/src/test/java/ui/radioButton/RadioButtonDemo.java @@ -86,7 +86,7 @@ public class RadioButtonDemo implements ComponentDemo { @Override public JMenuBar createMenuBar() { - JMenuBar menuBar = ComponentDemo.getDefaultMenuBar(); + JMenuBar menuBar = ComponentDemo.super.createMenuBar(); menuBar.add(new JMenu("Demo") { { add(new JRadioButtonMenuItem("RadioButton menu item"));