From a7bf5784965914adc351af69cdbcac4bb3be795a Mon Sep 17 00:00:00 2001 From: Niki Roo Date: Mon, 4 May 2020 00:32:31 +0200 Subject: [PATCH] java 1.6 compat --- .../nikiroo/fanfix_swing/gui/viewer/ViewerImages.java | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) 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 -- 2.27.0