From: Niki Roo Date: Sun, 3 May 2020 22:32:31 +0000 (+0200) Subject: java 1.6 compat X-Git-Tag: fanfix-swing-1.1.1~1 X-Git-Url: https://git.nikiroo.be/?a=commitdiff_plain;h=a7bf5784965914adc351af69cdbcac4bb3be795a;p=fanfix-swing.git java 1.6 compat --- diff --git a/src/be/nikiroo/fanfix_swing/gui/viewer/ViewerImages.java b/src/be/nikiroo/fanfix_swing/gui/viewer/ViewerImages.java index 752b5045..be9ec058 100644 --- a/src/be/nikiroo/fanfix_swing/gui/viewer/ViewerImages.java +++ b/src/be/nikiroo/fanfix_swing/gui/viewer/ViewerImages.java @@ -115,7 +115,9 @@ public class ViewerImages extends JFrame { private NavBar navbar; private JLabel area; private JScrollPane scroll; - private DefaultComboBoxModel 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.values(true)); - JComboBox zoomBox = new JComboBox(zoomBoxModel); + zoomBoxModel = new DefaultComboBoxModel(ZoomLevel.values(true)); + JComboBox zoomBox = new JComboBox(zoomBoxModel); zoomBox.setEditable(true); zoomBox.addActionListener(new ActionListener() { @Override