src/share/classes/com/sun/java/swing/plaf/motif/MotifInternalFrameTitlePane.java

Print this page

        

@@ -1,7 +1,7 @@
 /*
- * Copyright (c) 1997, 2008, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 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

@@ -40,10 +40,11 @@
 /**
  * Class that manages a Motif title bar
  *
  * @since 1.3
  */
+@SuppressWarnings("serial") // Superclass is not serializable across versions
 public class MotifInternalFrameTitlePane
     extends BasicInternalFrameTitlePane implements LayoutManager, ActionListener, PropertyChangeListener
 {
     SystemButton systemButton;
     MinimizeButton minimizeButton;

@@ -230,10 +231,11 @@
       systemMenu.setVisible(false);
     }
 
     static Dimension buttonDimension = new Dimension(BUTTON_SIZE, BUTTON_SIZE);
 
+    @SuppressWarnings("serial") // Superclass is not serializable across versions
     private abstract class FrameButton extends JButton {
 
         FrameButton() {
             super();
             setFocusPainted(false);

@@ -274,10 +276,11 @@
             g.drawLine(1, maxY, maxX, maxY);
             g.drawLine(maxX, 1, maxX, maxY);
         }
     }
 
+    @SuppressWarnings("serial") // Superclass is not serializable across versions
     private class MinimizeButton extends FrameButton {
         public void paintComponent(Graphics g) {
             super.paintComponent(g);
             g.setColor(highlight);
             g.drawLine(7, 8, 7, 11);

@@ -286,10 +289,11 @@
             g.drawLine(8, 11, 10, 11);
             g.drawLine(11, 9, 11, 11);
         }
     }
 
+    @SuppressWarnings("serial") // Superclass is not serializable across versions
     private class MaximizeButton extends FrameButton {
         public void paintComponent(Graphics g) {
             super.paintComponent(g);
             int max = BUTTON_SIZE - 5;
             boolean isMaxed = frame.isMaximum();

@@ -300,10 +304,11 @@
             g.drawLine(5, max, max, max);
             g.drawLine(max, 5, max, max);
         }
     }
 
+    @SuppressWarnings("serial") // Superclass is not serializable across versions
     private class SystemButton extends FrameButton {
         public boolean isFocusTraversable() { return false; }
         public void requestFocus() {}
 
         public void paintComponent(Graphics g) {

@@ -315,10 +320,11 @@
             g.drawLine(5, 11, BUTTON_SIZE - 5, 11);
             g.drawLine(BUTTON_SIZE - 5, 9, BUTTON_SIZE - 5, 11);
         }
     }
 
+    @SuppressWarnings("serial") // Superclass is not serializable across versions
     private class Title extends FrameButton {
         Title(String title) {
             super();
             setText(title);
             setHorizontalAlignment(SwingConstants.CENTER);