This is the mail archive of the java-patches@gcc.gnu.org mailing list for the Java project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

FYI: Patch: javax.swing - merges from classpath


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi list,


I commited the attache patch to trunk to merge javax.swing again with 
classpath.


Michael
- -- 
Homepage: http://www.worldforge.org/
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.1 (GNU/Linux)

iD8DBQE+h+CSWSOgCCdjSDsRAiiSAJ9iaxU/o4m+v6aEHSmwu7xKzqBYMwCfTZ9U
rw1Un47ZhF8N5kY4ccMsk/g=
=acU/
-----END PGP SIGNATURE-----
Index: ChangeLog
===================================================================
RCS file: /cvs/gcc/gcc/libjava/ChangeLog,v
retrieving revision 1.1826
diff -u -r1.1826 ChangeLog
--- ChangeLog	30 Mar 2003 06:43:44 -0000	1.1826
+++ ChangeLog	31 Mar 2003 06:27:20 -0000
@@ -1,3 +1,46 @@
+2003-03-31  Michael Koch  <konqueror at gmx dot de>
+
+	* javax/swing/AbstractCellEditor.java,
+	javax/swing/AbstractListModel.java,
+	javax/swing/ActionMap.java,
+	javax/swing/BorderFactory.java,
+	javax/swing/ButtonGroup.java,
+	javax/swing/DefaultBoundedRangeModel.java,
+	javax/swing/DefaultButtonModel.java,
+	javax/swing/DefaultCellEditor.java,
+	javax/swing/DefaultComboBoxModel.java,
+	javax/swing/DefaultDesktopManager.java,
+	javax/swing/DefaultListCellRenderer.java,
+	javax/swing/DefaultSingleSelectionModel.java,
+	javax/swing/InputMap.java,
+	javax/swing/JComponent.java,
+	javax/swing/JMenu.java,
+	javax/swing/JSlider.java,
+	javax/swing/KeyStroke.java,
+	javax/swing/OverlayLayout.java,
+	javax/swing/ScrollPaneLayout.java,
+	javax/swing/SizeRequirements.java,
+	javax/swing/UIManager.java,
+	javax/swing/ViewportLayout.java,
+	javax/swing/border/AbstractBorder.java,
+	javax/swing/colorchooser/DefaultColorSelectionModel.java,
+	javax/swing/event/EventListenerList.java,
+	javax/swing/table/AbstractTableModel.java,
+	javax/swing/table/DefaultTableCellRenderer.java,
+	javax/swing/table/DefaultTableColumnModel.java,
+	javax/swing/table/DefaultTableModel.java,
+	javax/swing/table/TableColumn.java,
+	javax/swing/text/StyledEditorKit.java,
+	javax/swing/tree/DefaultMutableTreeNode.java,
+	javax/swing/tree/DefaultTreeModel.java,
+	javax/swing/tree/DefaultTreeSelectionModel.java,
+	javax/swing/tree/TreePath.java,
+	javax/swing/undo/AbstractUndoableEdit.java,
+	javax/swing/undo/StateEdit.java,
+	javax/swing/undo/StateEditable.java,
+	javax/swing/undo/UndoableEditSupport.java:
+	Merges from classpath.
+
 2003-03-29  Eric Blake  <ebb9 at email dot byu dot edu>
 	    Tom Tromey  <tromey at redhat dot com>
 
Index: javax/swing/AbstractCellEditor.java
===================================================================
RCS file: /cvs/gcc/gcc/libjava/javax/swing/AbstractCellEditor.java,v
retrieving revision 1.1
diff -u -r1.1 AbstractCellEditor.java
--- javax/swing/AbstractCellEditor.java	9 Aug 2002 04:26:10 -0000	1.1
+++ javax/swing/AbstractCellEditor.java	31 Mar 2003 06:27:20 -0000
@@ -47,7 +47,10 @@
  * @author	Andrew Selkirk
  * @version	1.0
  */
-public abstract class AbstractCellEditor implements CellEditor, Serializable {
+public abstract class AbstractCellEditor
+  implements CellEditor, Serializable
+{
+  static final long serialVersionUID = -1048006551406220959L;
 
 	//-------------------------------------------------------------
 	// Variables --------------------------------------------------
Index: javax/swing/AbstractListModel.java
===================================================================
RCS file: /cvs/gcc/gcc/libjava/javax/swing/AbstractListModel.java,v
retrieving revision 1.2
diff -u -r1.2 AbstractListModel.java
--- javax/swing/AbstractListModel.java	10 Oct 2002 12:08:37 -0000	1.2
+++ javax/swing/AbstractListModel.java	31 Mar 2003 06:27:20 -0000
@@ -48,7 +48,10 @@
  * @author	Andrew Selkirk
  * @version	1.0
  */
-public abstract class AbstractListModel implements ListModel, Serializable {
+public abstract class AbstractListModel
+  implements ListModel, Serializable
+{
+  static final long serialVersionUID = -3285184064379168730L;
 
 	//-------------------------------------------------------------
 	// Variables --------------------------------------------------
Index: javax/swing/ActionMap.java
===================================================================
RCS file: /cvs/gcc/gcc/libjava/javax/swing/ActionMap.java,v
retrieving revision 1.1
diff -u -r1.1 ActionMap.java
--- javax/swing/ActionMap.java	9 Aug 2002 04:26:10 -0000	1.1
+++ javax/swing/ActionMap.java	31 Mar 2003 06:27:20 -0000
@@ -46,7 +46,9 @@
  * @author	Andrew Selkirk
  * @version	1.0
  */
-public class ActionMap implements Serializable {
+public class ActionMap implements Serializable
+{
+  static final long serialVersionUID = -6277518704513986346L;
 
 	//-------------------------------------------------------------
 	// Variables --------------------------------------------------
Index: javax/swing/BorderFactory.java
===================================================================
RCS file: /cvs/gcc/gcc/libjava/javax/swing/BorderFactory.java,v
retrieving revision 1.1
diff -u -r1.1 BorderFactory.java
--- javax/swing/BorderFactory.java	9 Aug 2002 04:26:10 -0000	1.1
+++ javax/swing/BorderFactory.java	31 Mar 2003 06:27:20 -0000
@@ -1,3 +1,41 @@
+/* BorderFactory.java
+   Copyright (C) 2002 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING.  If not, write to the
+Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+02111-1307 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library.  Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module.  An independent module is a module which is not derived from
+or based on this library.  If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so.  If you do not wish to do so, delete this
+exception statement from your version. */
+
+
 package javax.swing;
 
 import java.awt.*;
Index: javax/swing/ButtonGroup.java
===================================================================
RCS file: /cvs/gcc/gcc/libjava/javax/swing/ButtonGroup.java,v
retrieving revision 1.1
diff -u -r1.1 ButtonGroup.java
--- javax/swing/ButtonGroup.java	9 Aug 2002 04:26:10 -0000	1.1
+++ javax/swing/ButtonGroup.java	31 Mar 2003 06:27:20 -0000
@@ -44,6 +44,8 @@
 
 public class ButtonGroup implements Serializable 
 {
+  static final long serialVersionUID = 4259076101881721375L;
+
     Vector v = new Vector();
     ButtonModel sel;
     
Index: javax/swing/DefaultBoundedRangeModel.java
===================================================================
RCS file: /cvs/gcc/gcc/libjava/javax/swing/DefaultBoundedRangeModel.java,v
retrieving revision 1.2
diff -u -r1.2 DefaultBoundedRangeModel.java
--- javax/swing/DefaultBoundedRangeModel.java	10 Oct 2002 12:08:37 -0000	1.2
+++ javax/swing/DefaultBoundedRangeModel.java	31 Mar 2003 06:27:20 -0000
@@ -47,7 +47,10 @@
  * @author	Andrew Selkirk
  * @version	1.0
  */
-public class DefaultBoundedRangeModel implements BoundedRangeModel, Serializable {
+public class DefaultBoundedRangeModel
+  implements BoundedRangeModel, Serializable
+{
+  static final long serialVersionUID = 5034068491295259790L;
 
 	//-------------------------------------------------------------
 	// Variables --------------------------------------------------
Index: javax/swing/DefaultButtonModel.java
===================================================================
RCS file: /cvs/gcc/gcc/libjava/javax/swing/DefaultButtonModel.java,v
retrieving revision 1.1
diff -u -r1.1 DefaultButtonModel.java
--- javax/swing/DefaultButtonModel.java	9 Aug 2002 04:26:10 -0000	1.1
+++ javax/swing/DefaultButtonModel.java	31 Mar 2003 06:27:20 -0000
@@ -42,9 +42,11 @@
 import java.awt.*;
 import javax.swing.event.*;
 
-public 
-class DefaultButtonModel implements ButtonModel, java.io.Serializable
+public class DefaultButtonModel
+  implements ButtonModel, java.io.Serializable
 {
+  static final long serialVersionUID = -5342609566534980231L;
+
     Vector actions          = new Vector();
 
     Vector items    = new Vector();
Index: javax/swing/DefaultCellEditor.java
===================================================================
RCS file: /cvs/gcc/gcc/libjava/javax/swing/DefaultCellEditor.java,v
retrieving revision 1.1
diff -u -r1.1 DefaultCellEditor.java
--- javax/swing/DefaultCellEditor.java	9 Aug 2002 04:26:10 -0000	1.1
+++ javax/swing/DefaultCellEditor.java	31 Mar 2003 06:27:20 -0000
@@ -50,7 +50,11 @@
  * @author	Andrew Selkirk
  * @version	1.0
  */
-public class DefaultCellEditor extends AbstractCellEditor implements TableCellEditor, TreeCellEditor {
+public class DefaultCellEditor
+  extends AbstractCellEditor
+  implements TableCellEditor, TreeCellEditor
+{
+  static final long serialVersionUID = 3564035141373880027L;
 
 	//-------------------------------------------------------------
 	// Classes ----------------------------------------------------
Index: javax/swing/DefaultComboBoxModel.java
===================================================================
RCS file: /cvs/gcc/gcc/libjava/javax/swing/DefaultComboBoxModel.java,v
retrieving revision 1.1
diff -u -r1.1 DefaultComboBoxModel.java
--- javax/swing/DefaultComboBoxModel.java	9 Aug 2002 04:26:10 -0000	1.1
+++ javax/swing/DefaultComboBoxModel.java	31 Mar 2003 06:27:21 -0000
@@ -47,7 +47,9 @@
  * @version	1.0
  */
 public class DefaultComboBoxModel extends AbstractListModel 
-		implements MutableComboBoxModel, Serializable {
+		implements MutableComboBoxModel, Serializable
+{
+  static final long serialVersionUID = 6698657703676921904L;
 
 	//-------------------------------------------------------------
 	// Variables --------------------------------------------------
Index: javax/swing/DefaultDesktopManager.java
===================================================================
RCS file: /cvs/gcc/gcc/libjava/javax/swing/DefaultDesktopManager.java,v
retrieving revision 1.1
diff -u -r1.1 DefaultDesktopManager.java
--- javax/swing/DefaultDesktopManager.java	9 Aug 2002 04:26:10 -0000	1.1
+++ javax/swing/DefaultDesktopManager.java	31 Mar 2003 06:27:21 -0000
@@ -46,7 +46,9 @@
  * @author	Andrew Selkirk
  * @version	1.0
  */
-public class DefaultDesktopManager implements DesktopManager, Serializable {
+public class DefaultDesktopManager implements DesktopManager, Serializable
+{
+  static final long serialVersionUID = 4657624909838017887L;
 
 	//-------------------------------------------------------------
 	// Variables --------------------------------------------------
Index: javax/swing/DefaultListCellRenderer.java
===================================================================
RCS file: /cvs/gcc/gcc/libjava/javax/swing/DefaultListCellRenderer.java,v
retrieving revision 1.1
diff -u -r1.1 DefaultListCellRenderer.java
--- javax/swing/DefaultListCellRenderer.java	9 Aug 2002 04:26:10 -0000	1.1
+++ javax/swing/DefaultListCellRenderer.java	31 Mar 2003 06:27:21 -0000
@@ -49,7 +49,9 @@
  * @version	1.0
  */
 public class DefaultListCellRenderer extends JLabel 
-		implements ListCellRenderer, Serializable {
+		implements ListCellRenderer, Serializable
+{
+  static final long serialVersionUID = 7708947179685189462L;
 
 	//-------------------------------------------------------------
 	// Classes ----------------------------------------------------
Index: javax/swing/DefaultSingleSelectionModel.java
===================================================================
RCS file: /cvs/gcc/gcc/libjava/javax/swing/DefaultSingleSelectionModel.java,v
retrieving revision 1.2
diff -u -r1.2 DefaultSingleSelectionModel.java
--- javax/swing/DefaultSingleSelectionModel.java	10 Oct 2002 12:08:37 -0000	1.2
+++ javax/swing/DefaultSingleSelectionModel.java	31 Mar 2003 06:27:21 -0000
@@ -48,7 +48,9 @@
  * @version	1.0
  */
 public class DefaultSingleSelectionModel implements 
-		SingleSelectionModel, Serializable {
+		SingleSelectionModel, Serializable
+{
+  static final long serialVersionUID = 3676229404753786004L;
 
 	//-------------------------------------------------------------
 	// Variables --------------------------------------------------
Index: javax/swing/InputMap.java
===================================================================
RCS file: /cvs/gcc/gcc/libjava/javax/swing/InputMap.java,v
retrieving revision 1.1
diff -u -r1.1 InputMap.java
--- javax/swing/InputMap.java	9 Aug 2002 04:26:10 -0000	1.1
+++ javax/swing/InputMap.java	31 Mar 2003 06:27:21 -0000
@@ -46,7 +46,9 @@
  * @author	Andrew Selkirk
  * @version	1.0
  */
-public class InputMap implements Serializable {
+public class InputMap implements Serializable
+{
+  static final long serialVersionUID = -5429059542008604257L;
 
 	//-------------------------------------------------------------
 	// Variables --------------------------------------------------
Index: javax/swing/JComponent.java
===================================================================
RCS file: /cvs/gcc/gcc/libjava/javax/swing/JComponent.java,v
retrieving revision 1.1
diff -u -r1.1 JComponent.java
--- javax/swing/JComponent.java	9 Aug 2002 04:26:10 -0000	1.1
+++ javax/swing/JComponent.java	31 Mar 2003 06:27:21 -0000
@@ -61,6 +61,7 @@
  */
 public abstract class JComponent extends Container implements Serializable
 {
+  static final long serialVersionUID = -5242478962609715464L;
         /**
          * accessibleContext
          */
Index: javax/swing/JMenu.java
===================================================================
RCS file: /cvs/gcc/gcc/libjava/javax/swing/JMenu.java,v
retrieving revision 1.1
diff -u -r1.1 JMenu.java
--- javax/swing/JMenu.java	9 Aug 2002 04:26:10 -0000	1.1
+++ javax/swing/JMenu.java	31 Mar 2003 06:27:21 -0000
@@ -51,7 +51,11 @@
  * @author	Andrew Selkirk
  * @version	1.0
  */
-public class JMenu extends JMenuItem implements Accessible, MenuElement {
+public class JMenu
+  extends JMenuItem
+  implements Accessible, MenuElement
+{
+  static final long serialVersionUID = 4227225638931828014L;
 
 	//-------------------------------------------------------------
 	// Classes ----------------------------------------------------
Index: javax/swing/JSlider.java
===================================================================
RCS file: /cvs/gcc/gcc/libjava/javax/swing/JSlider.java,v
retrieving revision 1.1
diff -u -r1.1 JSlider.java
--- javax/swing/JSlider.java	9 Aug 2002 04:26:10 -0000	1.1
+++ javax/swing/JSlider.java	31 Mar 2003 06:27:21 -0000
@@ -49,7 +49,11 @@
  * @author	Andrew Selkirk
  * @version	1.0
  */
-public class JSlider extends JComponent implements SwingConstants, Accessible {
+public class JSlider
+  extends JComponent
+  implements SwingConstants, Accessible
+{
+  static final long serialVersionUID = -1441275936141218479L;
 
 	//-------------------------------------------------------------
 	// Classes ----------------------------------------------------
Index: javax/swing/KeyStroke.java
===================================================================
RCS file: /cvs/gcc/gcc/libjava/javax/swing/KeyStroke.java,v
retrieving revision 1.1
diff -u -r1.1 KeyStroke.java
--- javax/swing/KeyStroke.java	9 Aug 2002 04:26:10 -0000	1.1
+++ javax/swing/KeyStroke.java	31 Mar 2003 06:27:21 -0000
@@ -46,7 +46,9 @@
  * @author	Andrew Selkirk
  * @version	1.0
  */
-public class KeyStroke implements Serializable {
+public class KeyStroke implements Serializable
+{
+  static final long serialVersionUID = -9060180771037902530L;
 
 	//-------------------------------------------------------------
 	// Variables --------------------------------------------------
Index: javax/swing/OverlayLayout.java
===================================================================
RCS file: /cvs/gcc/gcc/libjava/javax/swing/OverlayLayout.java,v
retrieving revision 1.1
diff -u -r1.1 OverlayLayout.java
--- javax/swing/OverlayLayout.java	9 Aug 2002 04:26:10 -0000	1.1
+++ javax/swing/OverlayLayout.java	31 Mar 2003 06:27:21 -0000
@@ -46,7 +46,10 @@
  * @author	Andrew Selkirk
  * @version	1.0
  */
-public class OverlayLayout implements LayoutManager2, Serializable {
+public class OverlayLayout
+  implements LayoutManager2, Serializable
+{
+  static final long serialVersionUID = 18082829169631543L;
 
 	//-------------------------------------------------------------
 	// Variables --------------------------------------------------
Index: javax/swing/ScrollPaneLayout.java
===================================================================
RCS file: /cvs/gcc/gcc/libjava/javax/swing/ScrollPaneLayout.java,v
retrieving revision 1.1
diff -u -r1.1 ScrollPaneLayout.java
--- javax/swing/ScrollPaneLayout.java	9 Aug 2002 04:26:10 -0000	1.1
+++ javax/swing/ScrollPaneLayout.java	31 Mar 2003 06:27:22 -0000
@@ -47,7 +47,10 @@
  * @author	Andrew Selkirk
  * @version	1.0
  */
-public class ScrollPaneLayout implements LayoutManager, ScrollPaneConstants, Serializable {
+public class ScrollPaneLayout
+  implements LayoutManager, ScrollPaneConstants, Serializable
+{
+  static final long serialVersionUID = -4480022884523193743L;
 
 	//-------------------------------------------------------------
 	// Classes ----------------------------------------------------
Index: javax/swing/SizeRequirements.java
===================================================================
RCS file: /cvs/gcc/gcc/libjava/javax/swing/SizeRequirements.java,v
retrieving revision 1.1
diff -u -r1.1 SizeRequirements.java
--- javax/swing/SizeRequirements.java	9 Aug 2002 04:26:10 -0000	1.1
+++ javax/swing/SizeRequirements.java	31 Mar 2003 06:27:22 -0000
@@ -45,7 +45,9 @@
  * @author	Andrew Selkirk
  * @version	1.0
  */
-public class SizeRequirements implements Serializable {
+public class SizeRequirements implements Serializable
+{
+  static final long serialVersionUID = 9217749429906736553L;
 
 	//-------------------------------------------------------------
 	// Variables --------------------------------------------------
Index: javax/swing/UIManager.java
===================================================================
RCS file: /cvs/gcc/gcc/libjava/javax/swing/UIManager.java,v
retrieving revision 1.1
diff -u -r1.1 UIManager.java
--- javax/swing/UIManager.java	9 Aug 2002 04:26:10 -0000	1.1
+++ javax/swing/UIManager.java	31 Mar 2003 06:27:22 -0000
@@ -51,6 +51,8 @@
 
 public class UIManager implements Serializable
 {
+  static final long serialVersionUID = -5547433830339189365L;
+
     static class LookAndFeelInfo
     {
 	String name, clazz;
Index: javax/swing/ViewportLayout.java
===================================================================
RCS file: /cvs/gcc/gcc/libjava/javax/swing/ViewportLayout.java,v
retrieving revision 1.1
diff -u -r1.1 ViewportLayout.java
--- javax/swing/ViewportLayout.java	9 Aug 2002 04:26:10 -0000	1.1
+++ javax/swing/ViewportLayout.java	31 Mar 2003 06:27:22 -0000
@@ -46,7 +46,9 @@
  * @author	Andrew Selkirk
  * @version	1.0
  */
-public class ViewportLayout implements LayoutManager, Serializable {
+public class ViewportLayout implements LayoutManager, Serializable
+{
+  static final long serialVersionUID = -788225906076097229L;
 
 	//-------------------------------------------------------------
 	// Initialization ---------------------------------------------
Index: javax/swing/border/AbstractBorder.java
===================================================================
RCS file: /cvs/gcc/gcc/libjava/javax/swing/border/AbstractBorder.java,v
retrieving revision 1.1
diff -u -r1.1 AbstractBorder.java
--- javax/swing/border/AbstractBorder.java	9 Aug 2002 04:26:11 -0000	1.1
+++ javax/swing/border/AbstractBorder.java	31 Mar 2003 06:27:22 -0000
@@ -42,6 +42,8 @@
 
 public abstract class AbstractBorder implements Border, Serializable
 {
+  static final long serialVersionUID = -545885975315191844L;
+
     AbstractBorder()
     {
     }
Index: javax/swing/colorchooser/DefaultColorSelectionModel.java
===================================================================
RCS file: /cvs/gcc/gcc/libjava/javax/swing/colorchooser/DefaultColorSelectionModel.java,v
retrieving revision 1.1
diff -u -r1.1 DefaultColorSelectionModel.java
--- javax/swing/colorchooser/DefaultColorSelectionModel.java	9 Aug 2002 04:26:11 -0000	1.1
+++ javax/swing/colorchooser/DefaultColorSelectionModel.java	31 Mar 2003 06:27:22 -0000
@@ -48,7 +48,9 @@
  * @version	1.0
  */
 public class DefaultColorSelectionModel 
-		implements ColorSelectionModel, Serializable {
+  implements ColorSelectionModel, Serializable
+{
+  static final long serialVersionUID = 580150227676302096L;
 
 	//-------------------------------------------------------------
 	// Variables --------------------------------------------------
Index: javax/swing/event/EventListenerList.java
===================================================================
RCS file: /cvs/gcc/gcc/libjava/javax/swing/event/EventListenerList.java,v
retrieving revision 1.1
diff -u -r1.1 EventListenerList.java
--- javax/swing/event/EventListenerList.java	9 Aug 2002 04:26:11 -0000	1.1
+++ javax/swing/event/EventListenerList.java	31 Mar 2003 06:27:22 -0000
@@ -45,8 +45,9 @@
  * EventListenerList
  * @author Andrew Selkirk
  */
-public class EventListenerList	extends		Object
-								implements	Serializable {
+public class EventListenerList extends Object implements Serializable
+{
+  static final long serialVersionUID = -5677132037850737084L;
 
 	//-------------------------------------------------------------
 	// Variables --------------------------------------------------
Index: javax/swing/table/AbstractTableModel.java
===================================================================
RCS file: /cvs/gcc/gcc/libjava/javax/swing/table/AbstractTableModel.java,v
retrieving revision 1.1
diff -u -r1.1 AbstractTableModel.java
--- javax/swing/table/AbstractTableModel.java	9 Aug 2002 04:26:12 -0000	1.1
+++ javax/swing/table/AbstractTableModel.java	31 Mar 2003 06:27:22 -0000
@@ -46,7 +46,9 @@
  * AbstractTableModel
  * @author Andrew Selkirk
  */
-public abstract class AbstractTableModel implements TableModel, Serializable {
+public abstract class AbstractTableModel implements TableModel, Serializable
+{
+  static final long serialVersionUID = -5798593159423650347L;
 
 	//-------------------------------------------------------------
 	// Variables --------------------------------------------------
Index: javax/swing/table/DefaultTableCellRenderer.java
===================================================================
RCS file: /cvs/gcc/gcc/libjava/javax/swing/table/DefaultTableCellRenderer.java,v
retrieving revision 1.1
diff -u -r1.1 DefaultTableCellRenderer.java
--- javax/swing/table/DefaultTableCellRenderer.java	9 Aug 2002 04:26:12 -0000	1.1
+++ javax/swing/table/DefaultTableCellRenderer.java	31 Mar 2003 06:27:22 -0000
@@ -1,3 +1,41 @@
+/* DefaultTableCellRenderer.java
+   Copyright (C) 2002 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING.  If not, write to the
+Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+02111-1307 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library.  Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module.  An independent module is a module which is not derived from
+or based on this library.  If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so.  If you do not wish to do so, delete this
+exception statement from your version. */
+
+
 package javax.swing.table;
 import java.awt.Component;
 import java.io.Serializable;
@@ -9,6 +47,8 @@
 public class DefaultTableCellRenderer extends JLabel
   implements TableCellRenderer, Serializable
 {
+  static final long serialVersionUID = 7878911414715528324L;
+
   public static class UIResource extends DefaultTableCellRenderer
     implements javax.swing.plaf.UIResource
   {
Index: javax/swing/table/DefaultTableColumnModel.java
===================================================================
RCS file: /cvs/gcc/gcc/libjava/javax/swing/table/DefaultTableColumnModel.java,v
retrieving revision 1.1
diff -u -r1.1 DefaultTableColumnModel.java
--- javax/swing/table/DefaultTableColumnModel.java	9 Aug 2002 04:26:12 -0000	1.1
+++ javax/swing/table/DefaultTableColumnModel.java	31 Mar 2003 06:27:22 -0000
@@ -49,7 +49,11 @@
  * @author	Andrew Selkirk
  * @version	1.0
  */
-public class DefaultTableColumnModel implements TableColumnModel, PropertyChangeListener, ListSelectionListener, Serializable {
+public class DefaultTableColumnModel
+  implements TableColumnModel, PropertyChangeListener,
+             ListSelectionListener, Serializable
+{
+  static final long serialVersionUID = 6580012493508960512L;
 
 	//-------------------------------------------------------------
 	// Variables --------------------------------------------------
Index: javax/swing/table/DefaultTableModel.java
===================================================================
RCS file: /cvs/gcc/gcc/libjava/javax/swing/table/DefaultTableModel.java,v
retrieving revision 1.1
diff -u -r1.1 DefaultTableModel.java
--- javax/swing/table/DefaultTableModel.java	9 Aug 2002 04:26:12 -0000	1.1
+++ javax/swing/table/DefaultTableModel.java	31 Mar 2003 06:27:22 -0000
@@ -46,7 +46,10 @@
  * DefaultTableModel
  * @author	Andrew Selkirk
  */
-public class DefaultTableModel extends AbstractTableModel implements Serializable {
+public class DefaultTableModel extends AbstractTableModel
+  implements Serializable
+{
+  static final long serialVersionUID = 6680042567037222321L;
 
 	//-------------------------------------------------------------
 	// Variables --------------------------------------------------
Index: javax/swing/table/TableColumn.java
===================================================================
RCS file: /cvs/gcc/gcc/libjava/javax/swing/table/TableColumn.java,v
retrieving revision 1.1
diff -u -r1.1 TableColumn.java
--- javax/swing/table/TableColumn.java	9 Aug 2002 04:26:12 -0000	1.1
+++ javax/swing/table/TableColumn.java	31 Mar 2003 06:27:22 -0000
@@ -47,7 +47,9 @@
  * @author	Andrew Selkirk
  * @version	1.0
  */
-public class TableColumn implements Serializable {
+public class TableColumn implements Serializable
+{
+  static final long serialVersionUID = -6113660025878112608L;
 
 	//-------------------------------------------------------------
 	// Variables --------------------------------------------------
Index: javax/swing/text/StyledEditorKit.java
===================================================================
RCS file: /cvs/gcc/gcc/libjava/javax/swing/text/StyledEditorKit.java,v
retrieving revision 1.1
diff -u -r1.1 StyledEditorKit.java
--- javax/swing/text/StyledEditorKit.java	9 Aug 2002 04:26:12 -0000	1.1
+++ javax/swing/text/StyledEditorKit.java	31 Mar 2003 06:27:22 -0000
@@ -50,7 +50,9 @@
  * @author	Andrew Selkirk
  * @version	1.0
  */
-public class StyledEditorKit extends DefaultEditorKit {
+public class StyledEditorKit extends DefaultEditorKit
+{
+  static final long serialVersionUID = 7002391892985555948L;
 
 	//-------------------------------------------------------------
 	// Classes ----------------------------------------------------
Index: javax/swing/tree/DefaultMutableTreeNode.java
===================================================================
RCS file: /cvs/gcc/gcc/libjava/javax/swing/tree/DefaultMutableTreeNode.java,v
retrieving revision 1.1
diff -u -r1.1 DefaultMutableTreeNode.java
--- javax/swing/tree/DefaultMutableTreeNode.java	9 Aug 2002 04:26:12 -0000	1.1
+++ javax/swing/tree/DefaultMutableTreeNode.java	31 Mar 2003 06:27:22 -0000
@@ -45,7 +45,10 @@
  * DefaultMutableTreeNode
  * @author Andrew Selkirk
  */
-public class DefaultMutableTreeNode implements Cloneable, MutableTreeNode, Serializable {
+public class DefaultMutableTreeNode
+  implements Cloneable, MutableTreeNode, Serializable
+{
+  static final long serialVersionUID = -4298474751201349152L;
 
 	//-------------------------------------------------------------
 	// Variables --------------------------------------------------
Index: javax/swing/tree/DefaultTreeModel.java
===================================================================
RCS file: /cvs/gcc/gcc/libjava/javax/swing/tree/DefaultTreeModel.java,v
retrieving revision 1.1
diff -u -r1.1 DefaultTreeModel.java
--- javax/swing/tree/DefaultTreeModel.java	9 Aug 2002 04:26:12 -0000	1.1
+++ javax/swing/tree/DefaultTreeModel.java	31 Mar 2003 06:27:22 -0000
@@ -46,7 +46,9 @@
  * DefaultTreeModel
  * @author Andrew Selkirk
  */
-public class DefaultTreeModel implements Serializable, TreeModel {
+public class DefaultTreeModel implements Serializable, TreeModel
+{
+  static final long serialVersionUID = -2621068368932566998L;
 
 	//-------------------------------------------------------------
 	// Variables --------------------------------------------------
Index: javax/swing/tree/DefaultTreeSelectionModel.java
===================================================================
RCS file: /cvs/gcc/gcc/libjava/javax/swing/tree/DefaultTreeSelectionModel.java,v
retrieving revision 1.1
diff -u -r1.1 DefaultTreeSelectionModel.java
--- javax/swing/tree/DefaultTreeSelectionModel.java	9 Aug 2002 04:26:12 -0000	1.1
+++ javax/swing/tree/DefaultTreeSelectionModel.java	31 Mar 2003 06:27:22 -0000
@@ -48,7 +48,10 @@
  * DefaultTreeSelectionModel
  * @author Andrew Selkirk
  */
-public class DefaultTreeSelectionModel implements Cloneable, Serializable, TreeSelectionModel {
+public class DefaultTreeSelectionModel
+  implements Cloneable, Serializable, TreeSelectionModel
+{
+  static final long serialVersionUID = 3288129636638950196L;
 
 	//-------------------------------------------------------------
 	// Variables --------------------------------------------------
Index: javax/swing/tree/TreePath.java
===================================================================
RCS file: /cvs/gcc/gcc/libjava/javax/swing/tree/TreePath.java,v
retrieving revision 1.1
diff -u -r1.1 TreePath.java
--- javax/swing/tree/TreePath.java	9 Aug 2002 04:26:12 -0000	1.1
+++ javax/swing/tree/TreePath.java	31 Mar 2003 06:27:22 -0000
@@ -44,7 +44,9 @@
  * TreePath
  * @author Andrew Selkirk
  */
-public class TreePath implements Serializable {
+public class TreePath implements Serializable
+{
+  static final long serialVersionUID = 4380036194768077479L;
 
 	//-------------------------------------------------------------
 	// Variables --------------------------------------------------
Index: javax/swing/undo/AbstractUndoableEdit.java
===================================================================
RCS file: /cvs/gcc/gcc/libjava/javax/swing/undo/AbstractUndoableEdit.java,v
retrieving revision 1.1
diff -u -r1.1 AbstractUndoableEdit.java
--- javax/swing/undo/AbstractUndoableEdit.java	9 Aug 2002 04:26:13 -0000	1.1
+++ javax/swing/undo/AbstractUndoableEdit.java	31 Mar 2003 06:27:22 -0000
@@ -1,5 +1,5 @@
 /* AbstractTableModel.java --
-   Copyright (C) 2002 Free Software Foundation, Inc.
+   Copyright (C) 2002, 2003 Free Software Foundation, Inc.
 
 This file is part of GNU Classpath.
 
@@ -44,171 +44,175 @@
  * AbstractUndoableEdit
  * @author Andrew Selkirk
  */
-public class AbstractUndoableEdit	extends		Object
-									implements	UndoableEdit,
-												Serializable {
-
-	//-------------------------------------------------------------
-	// Constants --------------------------------------------------
-	//-------------------------------------------------------------
-
-	/**
-	 * String returned by getRedoPresentationName()
-	 */
-	protected static	String	RedoName	= "Redo";
-
-	/**
-	 * String returned by getUndoPresentationName()
-	 */
-	protected static	String	UndoName	= "Undo";
-
-
-	//-------------------------------------------------------------
-	// Variables --------------------------------------------------
-	//-------------------------------------------------------------
-
-	/**
-	 * TODO
-	 */
-	private 			boolean	hasBeenDone	= false;
-
-	/**
-	 * The edit is alive
-	 */
-	private				boolean	alive 		= true;
-
-
-	//-------------------------------------------------------------
-	// Initialization ---------------------------------------------
-	//-------------------------------------------------------------
-
-	/**
-	 * Create new AbstractUndoableEdit
-	 */
-	public AbstractUndoableEdit() {
-	} // AbstractUndoableEdit()
-
-
-	//-------------------------------------------------------------
-	// Interface: UndoableEdit ------------------------------------
-	//-------------------------------------------------------------
-
-	/**
-	 * addEdit
-	 * @param anEdit TODO
-	 * @returns TODO
-	 */
-	public boolean addEdit(UndoableEdit anEdit) {
-		return false;
-	} // addEdit()
-
-	/**
-	 * canRedo()
-	 * @returns true if redoable, false otherwise
-	 */
-	public boolean canRedo() {
-		if (alive == true && hasBeenDone == false) {
-			return true;
-		} // if
-		return false;
-	} // canRedo()
-
-	/**
-	 * canUndo()
-	 * @returns true if undoable, false otherwise
-	 */
-	public boolean canUndo() {
-		if (alive == true && hasBeenDone == true) {
-			return true;
-		} // if
-		return false;
-	} // canUndo()
-
-	/**
-	 * die
-	 */
-	public void die() {
-		alive = false;
-	} // die()
-
-	/**
-	 * getPresentation
-	 * @returns TODO
-	 */
-	public String getPresentationName() {
-		return "";
-	} // getPresentationName()
-
-	/**
-	 * getRedoPresentationName
-	 * @returns TODO
-	 */
-	public String getRedoPresentationName()	{
-		if (getPresentationName().equals("") == true) {
-			return RedoName;
-		} else {
-			return RedoName + " " + getPresentationName();
-		}
-	} // getRedoPresentationName()
-
-	/**
-	 * getUndoPresentationName
-	 * @returns TODO
-	 */
-	public String getUndoPresentationName()	{
-		if (getPresentationName().equals("") == true) {
-			return UndoName;
-		} else {
-			return UndoName + " " + getPresentationName();
-		}
-	} // getUndoPresentationName()
-
-	/**
-	 * isSignificant
-	 * @returns true
-	 */
-	public boolean isSignificant() {
-		return true;
-	} // isSignificant()
-
-	/**
-	 * redo
-	 * @throws CannotRedoException TODO
-	 */
-	public void redo() throws CannotRedoException {
-		if (canRedo() == false) {
-			throw new CannotRedoException();
-		}
-		hasBeenDone = true;
-	} // redo()
-
-	/**
-	 * replaceEdit
-	 * @param anEdit TODO
-	 * @returns TODO
-	 */
-	public boolean replaceEdit(UndoableEdit anEdit) {
-		return false;
-	} // replaceEdit()
-
-	/**
-	 * String representation
-	 * @returns String representation
-	 */
-	public String toString() {
-		return null; // TODO
-	} // toString()
-
-	/**
-	 * undo
-	 * @throws CannotUndoException TODO
-	 */
-	public void undo() throws CannotUndoException {
-		if (canUndo() == false) {
-			throw new CannotUndoException();
-		}
-		hasBeenDone = false;
-	} // undo()
-
-
+public class AbstractUndoableEdit implements UndoableEdit, Serializable
+{
+  static final long serialVersionUID = 580150227676302096L;
+
+  //-------------------------------------------------------------
+  // Constants --------------------------------------------------
+  //-------------------------------------------------------------
+
+  /**
+   * String returned by getRedoPresentationName()
+   */
+  protected static final String RedoName = "Redo";
+
+  /**
+   * String returned by getUndoPresentationName()
+   */
+  protected static final String UndoName = "Undo";
+
+
+  //-------------------------------------------------------------
+  // Variables --------------------------------------------------
+  //-------------------------------------------------------------
+
+  /**
+   * TODO
+   */
+  private boolean hasBeenDone = false;
+
+  /**
+   * The edit is alive
+   */
+  private boolean alive = true;
+
+
+  //-------------------------------------------------------------
+  // Initialization ---------------------------------------------
+  //-------------------------------------------------------------
+
+  /**
+   * Create new AbstractUndoableEdit
+   */
+  public AbstractUndoableEdit()
+  {
+  } // AbstractUndoableEdit()
+
+
+  //-------------------------------------------------------------
+  // Interface: UndoableEdit ------------------------------------
+  //-------------------------------------------------------------
+
+  /**
+   * addEdit
+   * @param anEdit TODO
+   * @returns TODO
+   */
+  public boolean addEdit(UndoableEdit anEdit)
+  {
+    return false;
+  } // addEdit()
+
+  /**
+   * canRedo()
+   * @returns true if redoable, false otherwise
+   */
+  public boolean canRedo()
+  {
+    if (alive == true && hasBeenDone == false)
+      return true;
+    return false;
+  } // canRedo()
+
+  /**
+   * canUndo()
+   * @returns true if undoable, false otherwise
+   */
+  public boolean canUndo()
+  {
+    if (alive == true && hasBeenDone == true)
+      return true;
+    return false;
+  } // canUndo()
+
+  /**
+   * die
+   */
+  public void die()
+  {
+    alive = false;
+  } // die()
+
+  /**
+   * getPresentation
+   * @returns TODO
+   */
+  public String getPresentationName()
+  {
+    return "";
+  } // getPresentationName()
+
+  /**
+   * getRedoPresentationName
+   * @returns TODO
+   */
+  public String getRedoPresentationName()
+  {
+    if (getPresentationName().equals(""))
+      return RedoName;
+    return RedoName + " " + getPresentationName();
+  } // getRedoPresentationName()
+
+  /**
+   * getUndoPresentationName
+   * @returns TODO
+   */
+  public String getUndoPresentationName()
+  {
+    if (getPresentationName().equals(""))
+      return UndoName;
+    return UndoName + " " + getPresentationName();
+  } // getUndoPresentationName()
+
+  /**
+   * isSignificant
+   * @returns true
+   */
+  public boolean isSignificant()
+  {
+    return true;
+  } // isSignificant()
+
+  /**
+   * redo
+   * @throws CannotRedoException TODO
+   */
+  public void redo() throws CannotRedoException
+  {
+    if (! canRedo())
+      throw new CannotRedoException();
+    hasBeenDone = true;
+  } // redo()
+
+  /**
+   * replaceEdit
+   * @param anEdit TODO
+   * @returns TODO
+   */
+  public boolean replaceEdit(UndoableEdit anEdit)
+  {
+    return false;
+  } // replaceEdit()
+
+  /**
+   * String representation
+   * @returns String representation
+   */
+  public String toString()
+  {
+    return (super.toString() + " hasBeenDone: " + hasBeenDone
+	    + " alive: " + alive);
+  }
+
+  /**
+   * undo
+   * @throws CannotUndoException TODO
+   */
+  public void undo() throws CannotUndoException
+  {
+    if (! canUndo())
+      throw new CannotUndoException();
+    hasBeenDone = false;
+  } // undo()
 } // AbstractUndoableEdit
Index: javax/swing/undo/StateEdit.java
===================================================================
RCS file: /cvs/gcc/gcc/libjava/javax/swing/undo/StateEdit.java,v
retrieving revision 1.1
diff -u -r1.1 StateEdit.java
--- javax/swing/undo/StateEdit.java	9 Aug 2002 04:26:13 -0000	1.1
+++ javax/swing/undo/StateEdit.java	31 Mar 2003 06:27:22 -0000
@@ -1,5 +1,5 @@
-/* AbstractTableModel.java --
-   Copyright (C) 2002 Free Software Foundation, Inc.
+/* StateEdit.java --
+   Copyright (C) 2002, 2003 Free Software Foundation, Inc.
 
 This file is part of GNU Classpath.
 
@@ -44,108 +44,133 @@
  * StateEdit
  * @author	Andrew Selkirk
  */
-public class StateEdit extends AbstractUndoableEdit {
+public class StateEdit extends AbstractUndoableEdit
+{
 
-	//-------------------------------------------------------------
-	// Variables --------------------------------------------------
-	//-------------------------------------------------------------
-
-	/**
-	 * RCSID
-	 */
-	protected static final String RCSID = ""; // TODO
-
-	/**
-	 * object
-	 */
-	protected StateEditable object;
-
-	/**
-	 * preState
-	 */
-	protected Hashtable preState;
-
-	/**
-	 * postState
-	 */
-	protected Hashtable postState;
-
-	/**
-	 * undoRedoName
-	 */
-	protected String undoRedoName;
-
-
-	//-------------------------------------------------------------
-	// Initialization ---------------------------------------------
-	//-------------------------------------------------------------
-
-	/**
-	 * Constructor StateEdit
-	 * @param value0 TODO
-	 */
-	public StateEdit(StateEditable value0) {
-		// TODO
-	} // StateEdit()
-
-	/**
-	 * Constructor StateEdit
-	 * @param value0 TODO
-	 * @param value1 TODO
-	 */
-	public StateEdit(StateEditable value0, String value1) {
-		// TODO
-	} // StateEdit()
-
-
-	//-------------------------------------------------------------
-	// Methods ----------------------------------------------------
-	//-------------------------------------------------------------
-
-	/**
-	 * init
-	 * @param value0 TODO
-	 * @param value1 TODO
-	 */
-	protected void init(StateEditable value0, String value1) {
-		// TODO
-	} // init()
-
-	/**
-	 * end
-	 */
-	public void end() {
-		// TODO
-	} // end()
-
-	/**
-	 * undo
-	 */
-	public void undo() {
-		// TODO
-	} // undo()
-
-	/**
-	 * redo
-	 */
-	public void redo() {
-		// TODO
-	} // redo()
-
-	/**
-	 * getPresentationName
-	 * @returns String
-	 */
-	public String getPresentationName() {
-		return null; // TODO
-	} // getPresentationName()
-
-	/**
-	 * removeRedundantState
-	 */
-	protected void removeRedundantState() {
-		// TODO
-	} // removeRedundantState()
-
-
-} // StateEdit
+  //-------------------------------------------------------------
+  // Variables --------------------------------------------------
+  //-------------------------------------------------------------
+
+  /**
+   * RCSID
+   */
+  protected static final String RCSID = ""; // TODO
+
+  /**
+   * object
+   */
+  protected StateEditable object;
+
+  /**
+   * preState
+   */
+  protected Hashtable preState;
+
+  /**
+   * postState
+   */
+  protected Hashtable postState;
+
+  /**
+   * undoRedoName
+   */
+  protected String undoRedoName;
+
+
+  //-------------------------------------------------------------
+  // Initialization ---------------------------------------------
+  //-------------------------------------------------------------
+
+  /**
+   * Constructor StateEdit
+   * @param obj Object to edit
+   */
+  public StateEdit(StateEditable obj)
+  {
+    init(obj, null);
+  }
+
+  /**
+   * Constructor StateEdit
+   * @param obj Object to edit
+   * @param name Presentation name
+   */
+  public StateEdit(StateEditable obj, String name)
+  {
+    init(obj, name);
+  }
+
+
+  //-------------------------------------------------------------
+  // Methods ----------------------------------------------------
+  //-------------------------------------------------------------
+
+  /**
+   * Initialize this object.
+   * @param obj Object to edit
+   * @param name Presentation name
+   */
+  protected void init(StateEditable obj, String name)
+  {
+    object = obj;
+    undoRedoName = name;
+    preState = new Hashtable();
+    postState = new Hashtable();
+    obj.storeState(preState);
+  }
+
+  /**
+   * Indicate that all edits are finished, and update this object
+   * with final state.
+   */
+  public void end()
+  {
+    object.storeState(postState);
+    removeRedundantState();
+  }
+
+  /**
+   * Undo this edit by applying the initial state to the edited object.
+   */
+  public void undo()
+  {
+    object.restoreState(preState);
+  }
+
+  /**
+   * Undo this edit by applying the final state to the edited object.
+   */
+  public void redo()
+  {
+    object.restoreState(postState);
+  }
+
+  /**
+   * Return the presentation name of this object.
+   * @returns The name, or null if not set
+   */
+  public String getPresentationName()
+  {
+    return undoRedoName;
+  }
+
+  /**
+   * removeRedundantState
+   */
+  protected void removeRedundantState()
+  {
+    Iterator i = preState.keySet().iterator();
+    while (i.hasNext())
+      {
+	Object key = i.next();
+	if (postState.containsKey(key))
+	  {
+	    if (preState.get(key).equals(postState.get(key)))
+	      {
+		i.remove();
+		postState.remove(key);
+	      }
+	  }
+      }
+  }
+}
Index: javax/swing/undo/StateEditable.java
===================================================================
RCS file: /cvs/gcc/gcc/libjava/javax/swing/undo/StateEditable.java,v
retrieving revision 1.2
diff -u -r1.2 StateEditable.java
--- javax/swing/undo/StateEditable.java	24 Mar 2003 14:05:02 -0000	1.2
+++ javax/swing/undo/StateEditable.java	31 Mar 2003 06:27:22 -0000
@@ -1,5 +1,5 @@
-/* AbstractTableModel.java --
-   Copyright (C) 2002 Free Software Foundation, Inc.
+/* StateEditable.java --
+   Copyright (C) 2002, 2003 Free Software Foundation, Inc.
 
 This file is part of GNU Classpath.
 
@@ -46,20 +46,20 @@
  */
 public interface StateEditable
 {
-
   /**
-   * Upon receiving this message the receiver should extract any relevant
-   * state out of state
-   * 
+   * Restore State
    * @param state State
    */
   public void restoreState(Hashtable state);
 
   /**
-   * Upon receiving this message the receiver should place any relevant state
-   * into state
-   * 
+   * Store State
    * @param state State
    */
   public void storeState(Hashtable state);
+
+  /**
+   * For some reason, Sun made the RCS IDs visible.
+   */
+  public static final String RCSID = "We aren't compatible";
 } // StateEditable
Index: javax/swing/undo/UndoableEditSupport.java
===================================================================
RCS file: /cvs/gcc/gcc/libjava/javax/swing/undo/UndoableEditSupport.java,v
retrieving revision 1.1
diff -u -r1.1 UndoableEditSupport.java
--- javax/swing/undo/UndoableEditSupport.java	9 Aug 2002 04:26:13 -0000	1.1
+++ javax/swing/undo/UndoableEditSupport.java	31 Mar 2003 06:27:22 -0000
@@ -1,5 +1,5 @@
-/* AbstractTableModel.java --
-   Copyright (C) 2002 Free Software Foundation, Inc.
+/* UndoableEditSupport.java --
+   Copyright (C) 2002, 2003 Free Software Foundation, Inc.
 
 This file is part of GNU Classpath.
 
@@ -45,126 +45,169 @@
  * UndoableEditSupport
  * @author	Andrew Selkirk
  */
-public class UndoableEditSupport {
+public class UndoableEditSupport
+{
 
-	//-------------------------------------------------------------
-	// Variables --------------------------------------------------
-	//-------------------------------------------------------------
-
-	/**
-	 * updateLevel
-	 */
-	protected int updateLevel;
-
-	/**
-	 * compoundEdit
-	 */
-	protected CompoundEdit compoundEdit;
-
-	/**
-	 * listeners
-	 */
-	protected Vector listeners = new Vector();
-
-	/**
-	 * realSource
-	 */
-	protected Object realSource;
-
-
-	//-------------------------------------------------------------
-	// Initialization ---------------------------------------------
-	//-------------------------------------------------------------
-
-	/**
-	 * Constructor UndoableEditSupport
-	 */
-	public UndoableEditSupport() {
-		// TODO
-	} // UndoableEditSupport()
-
-	/**
-	 * Constructor UndoableEditSupport
-	 * @param object TODO
-	 */
-	public UndoableEditSupport(Object object) {
-		realSource = object;
-	} // UndoableEditSupport()
-
-
-	//-------------------------------------------------------------
-	// Methods ----------------------------------------------------
-	//-------------------------------------------------------------
-
-	/**
-	 * toString
-	 * @returns String
-	 */
-	public String toString() {
-		return null; // TODO
-	} // toString()
-
-	/**
-	 * addUndoableEditListener
-	 * @param value0 TODO
-	 */
-	public synchronized void addUndoableEditListener(UndoableEditListener value0) {
-		// TODO
-	} // addUndoableEditListener()
-
-	/**
-	 * removeUndoableEditListener
-	 * @param value0 TODO
-	 */
-	public synchronized void removeUndoableEditListener(UndoableEditListener value0) {
-		// TODO
-	} // removeUndoableEditListener()
-
-	/**
-	 * _postEdit
-	 * @param value0 TODO
-	 */
-	protected void _postEdit(UndoableEdit value0) {
-		// TODO
-	} // _postEdit()
-
-	/**
-	 * postEdit
-	 * @param value0 TODO
-	 */
-	public synchronized void postEdit(UndoableEdit value0) {
-		// TODO
-	} // postEdit()
-
-	/**
-	 * getUpdateLevel
-	 * @returns int
-	 */
-	public int getUpdateLevel() {
-		return 0; // TODO
-	} // getUpdateLevel()
-
-	/**
-	 * beginUpdate
-	 */
-	public synchronized void beginUpdate() {
-		// TODO
-	} // beginUpdate()
-
-	/**
-	 * createCompoundEdit
-	 * @returns CompoundEdit
-	 */
-	protected CompoundEdit createCompoundEdit() {
-		return null; // TODO
-	} // createCompoundEdit()
-
-	/**
-	 * endUpdate
-	 */
-	public synchronized void endUpdate() {
-		// TODO
-	} // endUpdate()
-
-
-} // UndoableEditSupport
+  //-------------------------------------------------------------
+  // Variables --------------------------------------------------
+  //-------------------------------------------------------------
+
+  /**
+   * updateLevel
+   */
+  protected int updateLevel;
+
+  /**
+   * compoundEdit
+   */
+  protected CompoundEdit compoundEdit;
+
+  /**
+   * listeners
+   */
+  protected Vector listeners = new Vector();
+
+  /**
+   * realSource
+   */
+  protected Object realSource;
+
+
+  //-------------------------------------------------------------
+  // Initialization ---------------------------------------------
+  //-------------------------------------------------------------
+
+  /**
+   * Constructor UndoableEditSupport
+   */
+  public UndoableEditSupport()
+  {
+  }
+
+  /**
+   * Constructor UndoableEditSupport
+   * @param object TODO
+   */
+  public UndoableEditSupport(Object object)
+  {
+    realSource = object;
+  }
+
+
+  //-------------------------------------------------------------
+  // Methods ----------------------------------------------------
+  //-------------------------------------------------------------
+
+  /**
+   * toString
+   * @returns String
+   */
+  public String toString()
+  {
+    return (super.toString() + " realSource: " + realSource
+	    + " updateLevel: " + updateLevel);
+  }
+
+  /**
+   * Add a listener.
+   * @param val the listener
+   */
+  public synchronized void addUndoableEditListener(UndoableEditListener val)
+  {
+    listeners.add(val);
+  }
+
+  /**
+   * Remove a listener.
+   * @param val the listener
+   */
+  public synchronized void removeUndoableEditListener(UndoableEditListener val)
+  {
+    listeners.removeElement(val);
+  }
+
+  /**
+   * Return an array of all listeners.
+   * @returns all the listeners
+   */
+  public synchronized UndoableEditListener[] getUndoableEditListeners()
+  {
+    UndoableEditListener[] result = new UndoableEditListener[listeners.size()];
+    return (UndoableEditListener[]) listeners.toArray(result);
+  }
+
+  /**
+   * _postEdit
+   * @param value0 TODO
+   */
+  protected void _postEdit(UndoableEdit edit)
+  {
+    UndoableEditEvent event = new UndoableEditEvent(realSource, edit);
+    int max = listeners.size();
+    for (int i = 0; i < max; ++i)
+      {
+	UndoableEditListener l
+	  = (UndoableEditListener) (listeners.elementAt(i));
+	l.undoableEditHappened(event);
+      }
+  }
+
+  /**
+   * postEdit
+   * @param value0 TODO
+   */
+  public synchronized void postEdit(UndoableEdit edit)
+  {
+    if (compoundEdit == null)
+      compoundEdit.addEdit(edit);
+    else
+      _postEdit(edit);
+  }
+
+  /**
+   * getUpdateLevel
+   * @returns int
+   */
+  public int getUpdateLevel()
+  {
+    return updateLevel;
+  }
+
+  /**
+   * beginUpdate
+   */
+  public synchronized void beginUpdate()
+  {
+    if (compoundEdit != null)
+      {
+	// FIXME: what?  We can't push a new one.  This isn't even
+	// documented anyway.
+	endUpdate();
+      }
+
+    compoundEdit = createCompoundEdit();
+    ++updateLevel;
+  }
+
+  /**
+   * createCompoundEdit
+   * @returns CompoundEdit
+   */
+  protected CompoundEdit createCompoundEdit()
+  {
+    return new CompoundEdit();
+  }
+
+  /**
+   * endUpdate
+   */
+  public synchronized void endUpdate()
+  {
+    // FIXME: assert updateLevel == 1;
+    compoundEdit.end();
+    CompoundEdit c = compoundEdit;
+    compoundEdit = null;
+    --updateLevel;
+    _postEdit(c);
+  }
+}

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]