java 1.6 compat
authorNiki Roo <niki@nikiroo.be>
Sun, 3 May 2020 22:32:31 +0000 (00:32 +0200)
committerNiki Roo <niki@nikiroo.be>
Sun, 3 May 2020 22:32:31 +0000 (00:32 +0200)
src/be/nikiroo/fanfix_swing/gui/viewer/ViewerImages.java

index 752b50453b5e9740a5f9a1801e5e0b0b66a5d18b..be9ec05866b9d5665d1c04f006b0852c8386c0d5 100644 (file)
@@ -115,7 +115,9 @@ public class ViewerImages extends JFrame {
        private NavBar navbar;
        private JLabel area;
        private JScrollPane scroll;
-       private DefaultComboBoxModel<ZoomLevel> zoomBoxModel;
+
+       @SuppressWarnings("rawtypes") // JComboBox<?> not compatible java 1.6
+       private DefaultComboBoxModel zoomBoxModel;
 
        private DelayWorker worker;
 
@@ -172,6 +174,8 @@ public class ViewerImages extends JFrame {
                listen();
        }
 
+       @SuppressWarnings({ "unchecked", "rawtypes" }) // JComboBox<?> not
+                                                                                                       // compatible java 1.6
        private JToolBar createToolBar() {
                JToolBar toolBar = new JToolBar();
 
@@ -238,9 +242,8 @@ public class ViewerImages extends JFrame {
                        }
                });
 
-               zoomBoxModel = new DefaultComboBoxModel<ZoomLevel>(
-                               ZoomLevel.values(true));
-               JComboBox<ZoomLevel> zoomBox = new JComboBox<ZoomLevel>(zoomBoxModel);
+               zoomBoxModel = new DefaultComboBoxModel(ZoomLevel.values(true));
+               JComboBox zoomBox = new JComboBox(zoomBoxModel);
                zoomBox.setEditable(true);
                zoomBox.addActionListener(new ActionListener() {
                        @Override