src/share/classes/sun/print/ServiceDialog.java

Print this page

        

@@ -1,7 +1,7 @@
 /*
- * Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2000, 2014, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
  * under the terms of the GNU General Public License version 2 only, as
  * published by the Free Software Foundation.  Oracle designates this

@@ -79,10 +79,11 @@
 /**
  * A class which implements a cross-platform print dialog.
  *
  * @author  Chris Campbell
  */
+@SuppressWarnings("serial") // Superclass is not serializable across versions
 public class ServiceDialog extends JDialog implements ActionListener {
 
     /**
      * Waiting print status (user response pending).
      */

@@ -305,10 +306,11 @@
 
     /**
      * Performs Cancel when Esc key is pressed.
      */
     private void handleEscKey(JButton btnCancel) {
+        @SuppressWarnings("serial") // anonymous class
         Action cancelKeyAction = new AbstractAction() {
             public void actionPerformed(ActionEvent e) {
                 dispose(CANCEL);
             }
         };

@@ -654,10 +656,11 @@
 
     /**
      * The "General" tab.  Includes the controls for PrintService,
      * PageRange, and Copies/Collate.
      */
+    @SuppressWarnings("serial") // Superclass is not serializable across versions
     private class GeneralPanel extends JPanel {
 
         private PrintServicePanel pnlPrintService;
         private PrintRangePanel pnlPrintRange;
         private CopiesPanel pnlCopies;

@@ -697,10 +700,11 @@
             pnlPrintRange.updateInfo();
             pnlCopies.updateInfo();
         }
     }
 
+    @SuppressWarnings("serial") // Superclass is not serializable across versions
     private class PrintServicePanel extends JPanel
         implements ActionListener, ItemListener, PopupMenuListener
     {
         private final String strTitle = getMsg("border.printservice");
         private FilePermission printToFilePermission;

@@ -954,10 +958,11 @@
             }
             btnProperties.setEnabled(uiFactory != null);
         }
     }
 
+    @SuppressWarnings("serial") // Superclass is not serializable across versions
     private class PrintRangePanel extends JPanel
         implements ActionListener, FocusListener
     {
         private final String strTitle = getMsg("border.printrange");
         private final PageRanges prAll = new PageRanges(1, Integer.MAX_VALUE);

@@ -1166,10 +1171,11 @@
             rbPages.setEnabled(prSupported);
             setupRangeWidgets();
         }
     }
 
+    @SuppressWarnings("serial") // Superclass is not serializable across versions
     private class CopiesPanel extends JPanel
         implements ActionListener, ChangeListener
     {
         private final String strTitle = getMsg("border.copies");
         private SpinnerNumberModel snModel;

@@ -1299,10 +1305,11 @@
 
     /**
      * The "Page Setup" tab.  Includes the controls for MediaSource/MediaTray,
      * OrientationRequested, and Sides.
      */
+    @SuppressWarnings("serial") // Superclass is not serializable across versions
     private class PageSetupPanel extends JPanel {
 
         private MediaPanel pnlMedia;
         private OrientationPanel pnlOrientation;
         private MarginsPanel pnlMargins;

@@ -1340,10 +1347,11 @@
             pnlOrientation.updateInfo();
             pnlMargins.updateInfo();
         }
     }
 
+    @SuppressWarnings("serial") // Superclass is not serializable across versions
     private class MarginsPanel extends JPanel
                                implements ActionListener, FocusListener {
 
         private final String strTitle = getMsg("border.margins");
         private JFormattedTextField leftMargin, rightMargin,

@@ -1870,10 +1878,11 @@
             topMargin.setValue(tmObj);
             bottomMargin.setValue(bmObj);
         }
     }
 
+    @SuppressWarnings("serial") // Superclass is not serializable across versions
     private class MediaPanel extends JPanel implements ItemListener {
 
         private final String strTitle = getMsg("border.media");
         private JLabel lblSize, lblSource;
         private JComboBox cbSize, cbSource;

@@ -2104,10 +2113,11 @@
             cbSize.addItemListener(this);
             cbSource.addItemListener(this);
         }
     }
 
+    @SuppressWarnings("serial") // Superclass is not serializable across versions
     private class OrientationPanel extends JPanel
         implements ActionListener
     {
         private final String strTitle = getMsg("border.orientation");
         private IconRadioButton rbPortrait, rbLandscape,

@@ -2262,10 +2272,11 @@
 
     /**
      * The "Appearance" tab.  Includes the controls for Chromaticity,
      * PrintQuality, JobPriority, JobName, and other related job attributes.
      */
+    @SuppressWarnings("serial") // Superclass is not serializable across versions
     private class AppearancePanel extends JPanel {
 
         private ChromaticityPanel pnlChromaticity;
         private QualityPanel pnlQuality;
         private JobAttributesPanel pnlJobAttributes;

@@ -2308,10 +2319,11 @@
             pnlSides.updateInfo();
             pnlJobAttributes.updateInfo();
         }
     }
 
+    @SuppressWarnings("serial") // Superclass is not serializable across versions
     private class ChromaticityPanel extends JPanel
         implements ActionListener
     {
         private final String strTitle = getMsg("border.chromaticity");
         private JRadioButton rbMonochrome, rbColor;

@@ -2398,10 +2410,11 @@
                 rbColor.setSelected(true);
             }
         }
     }
 
+    @SuppressWarnings("serial") // Superclass is not serializable across versions
     private class QualityPanel extends JPanel
         implements ActionListener
     {
         private final String strTitle = getMsg("border.quality");
         private JRadioButton rbDraft, rbNormal, rbHigh;

@@ -2499,10 +2512,12 @@
             }
         }
 
 
     }
+
+    @SuppressWarnings("serial") // Superclass is not serializable across versions
     private class SidesPanel extends JPanel
         implements ActionListener
     {
         private final String strTitle = getMsg("border.sides");
         private IconRadioButton rbOneSide, rbTumble, rbDuplex;

@@ -2601,11 +2616,11 @@
             }
         }
     }
 
 
-
+    @SuppressWarnings("serial") // Superclass is not serializable across versions
     private class JobAttributesPanel extends JPanel
         implements ActionListener, ChangeListener, FocusListener
     {
         private final String strTitle = getMsg("border.jobattributes");
         private JLabel lblPriority, lblJobName, lblUserName;

@@ -2789,10 +2804,11 @@
 
     /**
      * A special widget that groups a JRadioButton with an associated icon,
      * placed to the left of the radio button.
      */
+    @SuppressWarnings("serial") // Superclass is not serializable across versions
     private class IconRadioButton extends JPanel {
 
         private JRadioButton rb;
         private JLabel lbl;
 

@@ -2841,10 +2857,11 @@
     /**
      * Similar in functionality to the default JFileChooser, except this
      * chooser will pop up a "Do you want to overwrite..." dialog if the
      * user selects a file that already exists.
      */
+    @SuppressWarnings("serial") // JDK implementation class
     private class ValidatingFileChooser extends JFileChooser {
         public void approveSelection() {
             File selected = getSelectedFile();
             boolean exists;