This fixes a couple of API errors in Swing, like non-final stuff that should be final, wrong access modifiers etc.
2006-01-27 Roman Kennke <[EMAIL PROTECTED]> * javax/swing/AbstractButton.java (ButtonChangeListener.ButtonChangeListener()): Made constructor package private. * javax/swing/ImageIcon.java (component): Made field final. (tracker): Made field final. * javax/swing/JApplet.java (AccessibleJApplet.AccessibleJApplet): Made constructor protected. * javax/swing/JCheckBox.java (AccessibleJCheckBox.AccessibleJCheckBox): Made constructor protected. * javax/swing/JDialog.java (AccessibleJDialog.AccessibleJDialog): Made constructor protected. * javax/swing/JFrame.java (AccessibleJFrame.AccessibleJFrame): Made constructor protected. * javax/swing/JLayeredPane.java (AccessibleJLayered.AccessibleJLayeredPane): Made constructor protected. (DEFAULT_LAYER): Made field final. (PALETTE_LAYER): Made field final. (MODAL_LAYER): Made field final. (POPUP_LAYER): Made field final. (DRAG_LAYER): Made field final. * javax/swing/JMenu.java (ActionChangeListener): Made class private. * javax/swing/JOptionPane.java (UNITITIALIZED_VALUE): Made field final. * javax/swing/JPanel.java (AccessibleJPanel.AccessibleJPanel): Made constructor protected. * javax/swing/JPopupMenu.java (ActionChangeListener): Made class private. * javax/swing/JTree.java (paramString): Made method protected. * javax/swing/JViewport.java (AccessibleJViewport.AccessibleJViewport): Made constructor protected. * javax/swing/JWindow.java (AccessibleJWindow.AccessibleJWindow): Made constructor protected. * javax/swing/RepaintManager.java (RepaintWorker): Made class private. /Roman
Index: javax/swing/AbstractButton.java =================================================================== RCS file: /cvsroot/classpath/classpath/javax/swing/AbstractButton.java,v retrieving revision 1.49 diff -u -r1.49 AbstractButton.java --- javax/swing/AbstractButton.java 14 Nov 2005 11:54:40 -0000 1.49 +++ javax/swing/AbstractButton.java 27 Jan 2006 10:04:48 -0000 @@ -159,6 +159,14 @@ private static final long serialVersionUID = 1471056094226600578L; /** + * The spec has no public/protected constructor for this class, so do we. + */ + ButtonChangeListener() + { + // Nothing to do here. + } + + /** * Notified when the target of the listener changes its state. * * @param ev the ChangeEvent describing the change Index: javax/swing/ImageIcon.java =================================================================== RCS file: /cvsroot/classpath/classpath/javax/swing/ImageIcon.java,v retrieving revision 1.22 diff -u -r1.22 ImageIcon.java --- javax/swing/ImageIcon.java 19 Oct 2005 15:45:03 -0000 1.22 +++ javax/swing/ImageIcon.java 27 Jan 2006 10:04:48 -0000 @@ -205,13 +205,13 @@ private static final long serialVersionUID = 532615968316031794L; /** A dummy Component that is used in the MediaTracker. */ - protected static Component component = new Component() + protected static final Component component = new Component() { // No need to implement this. }; /** The MediaTracker used to monitor the loading of images. */ - protected static MediaTracker tracker = new MediaTracker(component); + protected static final MediaTracker tracker = new MediaTracker(component); /** The ID that is used in the tracker. */ private static int id; Index: javax/swing/JApplet.java =================================================================== RCS file: /cvsroot/classpath/classpath/javax/swing/JApplet.java,v retrieving revision 1.23 diff -u -r1.23 JApplet.java --- javax/swing/JApplet.java 17 Nov 2005 12:22:25 -0000 1.23 +++ javax/swing/JApplet.java 27 Jan 2006 10:04:48 -0000 @@ -66,7 +66,7 @@ /** * Creates a new instance of <code>AccessibleJApplet</code>. */ - public AccessibleJApplet() + protected AccessibleJApplet() { super(); // Nothing to do here. Index: javax/swing/JCheckBox.java =================================================================== RCS file: /cvsroot/classpath/classpath/javax/swing/JCheckBox.java,v retrieving revision 1.18 diff -u -r1.18 JCheckBox.java --- javax/swing/JCheckBox.java 30 Sep 2005 13:11:05 -0000 1.18 +++ javax/swing/JCheckBox.java 27 Jan 2006 10:04:48 -0000 @@ -67,7 +67,7 @@ /** * Creates a new instance of <code>AccessibleJCheckBox</code>. */ - public AccessibleJCheckBox() + protected AccessibleJCheckBox() { // Nothing to do here. } Index: javax/swing/JDialog.java =================================================================== RCS file: /cvsroot/classpath/classpath/javax/swing/JDialog.java,v retrieving revision 1.21 diff -u -r1.21 JDialog.java --- javax/swing/JDialog.java 19 Jan 2006 22:27:27 -0000 1.21 +++ javax/swing/JDialog.java 27 Jan 2006 10:04:48 -0000 @@ -74,7 +74,7 @@ /** * Creates a new instance of <code>AccessibleJDialog</code>. */ - public AccessibleJDialog() + protected AccessibleJDialog() { super(); // Nothing to do here. Index: javax/swing/JFrame.java =================================================================== RCS file: /cvsroot/classpath/classpath/javax/swing/JFrame.java,v retrieving revision 1.31 diff -u -r1.31 JFrame.java --- javax/swing/JFrame.java 7 Nov 2005 22:05:10 -0000 1.31 +++ javax/swing/JFrame.java 27 Jan 2006 10:04:48 -0000 @@ -76,7 +76,7 @@ /** * Creates a new instance of <code>AccessibleJFrame</code>. */ - public AccessibleJFrame() + protected AccessibleJFrame() { super(); // Nothing to do here. Index: javax/swing/JLayeredPane.java =================================================================== RCS file: /cvsroot/classpath/classpath/javax/swing/JLayeredPane.java,v retrieving revision 1.34 diff -u -r1.34 JLayeredPane.java --- javax/swing/JLayeredPane.java 22 Dec 2005 20:58:29 -0000 1.34 +++ javax/swing/JLayeredPane.java 27 Jan 2006 10:04:48 -0000 @@ -131,7 +131,7 @@ /** * Creates a new instance of <code>AccessibleJLayeredPane</code>. */ - public AccessibleJLayeredPane() + protected AccessibleJLayeredPane() { // Nothing to do here. } @@ -152,11 +152,11 @@ public static Integer FRAME_CONTENT_LAYER = new Integer (-30000); - public static Integer DEFAULT_LAYER = new Integer (0); - public static Integer PALETTE_LAYER = new Integer (100); - public static Integer MODAL_LAYER = new Integer (200); - public static Integer POPUP_LAYER = new Integer (300); - public static Integer DRAG_LAYER = new Integer (400); + public static final Integer DEFAULT_LAYER = new Integer (0); + public static final Integer PALETTE_LAYER = new Integer (100); + public static final Integer MODAL_LAYER = new Integer (200); + public static final Integer POPUP_LAYER = new Integer (300); + public static final Integer DRAG_LAYER = new Integer (400); TreeMap layers; // Layer Number (Integer) -> Layer Size (Integer) Hashtable componentToLayer; // Component -> Layer Number (Integer) Index: javax/swing/JMenu.java =================================================================== RCS file: /cvsroot/classpath/classpath/javax/swing/JMenu.java,v retrieving revision 1.22 diff -u -r1.22 JMenu.java --- javax/swing/JMenu.java 16 Nov 2005 15:36:42 -0000 1.22 +++ javax/swing/JMenu.java 27 Jan 2006 10:04:48 -0000 @@ -906,7 +906,7 @@ /** * This class listens to PropertyChangeEvents occuring in menu's action */ - protected class ActionChangedListener implements PropertyChangeListener + private class ActionChangedListener implements PropertyChangeListener { /** menu item associated with the action */ private JMenuItem menuItem; Index: javax/swing/JOptionPane.java =================================================================== RCS file: /cvsroot/classpath/classpath/javax/swing/JOptionPane.java,v retrieving revision 1.25 diff -u -r1.25 JOptionPane.java --- javax/swing/JOptionPane.java 19 Jan 2006 22:29:26 -0000 1.25 +++ javax/swing/JOptionPane.java 27 Jan 2006 10:04:48 -0000 @@ -197,7 +197,7 @@ public static final String WANTS_INPUT_PROPERTY = "wantsInput"; /** The value returned when the inputValue is uninitialized. */ - public static Object UNINITIALIZED_VALUE = "uninitializedValue"; + public static final Object UNINITIALIZED_VALUE = "uninitializedValue"; /** The icon displayed in the dialog/internal frame. */ protected Icon icon; Index: javax/swing/JPanel.java =================================================================== RCS file: /cvsroot/classpath/classpath/javax/swing/JPanel.java,v retrieving revision 1.14 diff -u -r1.14 JPanel.java --- javax/swing/JPanel.java 17 Nov 2005 12:22:25 -0000 1.14 +++ javax/swing/JPanel.java 27 Jan 2006 10:04:48 -0000 @@ -63,7 +63,7 @@ /** * Creates a new instance of <code>AccessibleJPanel</code>. */ - public AccessibleJPanel() + protected AccessibleJPanel() { // Nothing to do here. } Index: javax/swing/JPopupMenu.java =================================================================== RCS file: /cvsroot/classpath/classpath/javax/swing/JPopupMenu.java,v retrieving revision 1.32 diff -u -r1.32 JPopupMenu.java --- javax/swing/JPopupMenu.java 1 Nov 2005 20:56:26 -0000 1.32 +++ javax/swing/JPopupMenu.java 27 Jan 2006 10:04:48 -0000 @@ -866,7 +866,7 @@ /* This class resizes popup menu and repaints popup menu appropriately if one of item's action has changed */ - protected class ActionChangeListener implements PropertyChangeListener + private class ActionChangeListener implements PropertyChangeListener { public void propertyChange(PropertyChangeEvent evt) { Index: javax/swing/JTree.java =================================================================== RCS file: /cvsroot/classpath/classpath/javax/swing/JTree.java,v retrieving revision 1.54 diff -u -r1.54 JTree.java --- javax/swing/JTree.java 25 Jan 2006 19:17:56 -0000 1.54 +++ javax/swing/JTree.java 27 Jan 2006 10:04:48 -0000 @@ -2740,7 +2740,7 @@ * * @return a String representation of this JTree */ - public String paramString() + protected String paramString() { // TODO: this is completely legal, but it would possibly be nice // to return some more content, like the tree structure, some properties Index: javax/swing/JViewport.java =================================================================== RCS file: /cvsroot/classpath/classpath/javax/swing/JViewport.java,v retrieving revision 1.39 diff -u -r1.39 JViewport.java --- javax/swing/JViewport.java 10 Jan 2006 13:03:22 -0000 1.39 +++ javax/swing/JViewport.java 27 Jan 2006 10:04:48 -0000 @@ -113,7 +113,7 @@ /** * Creates a new instance of <code>AccessibleJViewport</code>. */ - public AccessibleJViewport() + protected AccessibleJViewport() { // Nothing to do here. } Index: javax/swing/JWindow.java =================================================================== RCS file: /cvsroot/classpath/classpath/javax/swing/JWindow.java,v retrieving revision 1.25 diff -u -r1.25 JWindow.java --- javax/swing/JWindow.java 19 Jan 2006 22:27:27 -0000 1.25 +++ javax/swing/JWindow.java 27 Jan 2006 10:04:48 -0000 @@ -68,7 +68,7 @@ /** * Creates a new instance of <code>AccessibleJWindow</code>. */ - public AccessibleJWindow() + protected AccessibleJWindow() { super(); // Nothing to do here. Index: javax/swing/RepaintManager.java =================================================================== RCS file: /cvsroot/classpath/classpath/javax/swing/RepaintManager.java,v retrieving revision 1.21 diff -u -r1.21 RepaintManager.java --- javax/swing/RepaintManager.java 10 Jan 2006 13:06:13 -0000 1.21 +++ javax/swing/RepaintManager.java 27 Jan 2006 10:04:48 -0000 @@ -84,7 +84,7 @@ * swing paint thread, which revalidates all invalid components and * repaints any damage in the swing scene.</p> */ - protected class RepaintWorker + private class RepaintWorker implements Runnable {