AbstractCellEditor.java, [...]: Merges from classpath.
authorMichael Koch <konqueror@gmx.de>
Mon, 31 Mar 2003 06:30:01 +0000 (06:30 +0000)
committerMichael Koch <mkoch@gcc.gnu.org>
Mon, 31 Mar 2003 06:30:01 +0000 (06:30 +0000)
2003-03-31  Michael Koch  <konqueror@gmx.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.

From-SVN: r65077

40 files changed:
libjava/ChangeLog
libjava/javax/swing/AbstractCellEditor.java
libjava/javax/swing/AbstractListModel.java
libjava/javax/swing/ActionMap.java
libjava/javax/swing/BorderFactory.java
libjava/javax/swing/ButtonGroup.java
libjava/javax/swing/DefaultBoundedRangeModel.java
libjava/javax/swing/DefaultButtonModel.java
libjava/javax/swing/DefaultCellEditor.java
libjava/javax/swing/DefaultComboBoxModel.java
libjava/javax/swing/DefaultDesktopManager.java
libjava/javax/swing/DefaultListCellRenderer.java
libjava/javax/swing/DefaultSingleSelectionModel.java
libjava/javax/swing/InputMap.java
libjava/javax/swing/JComponent.java
libjava/javax/swing/JMenu.java
libjava/javax/swing/JSlider.java
libjava/javax/swing/KeyStroke.java
libjava/javax/swing/OverlayLayout.java
libjava/javax/swing/ScrollPaneLayout.java
libjava/javax/swing/SizeRequirements.java
libjava/javax/swing/UIManager.java
libjava/javax/swing/ViewportLayout.java
libjava/javax/swing/border/AbstractBorder.java
libjava/javax/swing/colorchooser/DefaultColorSelectionModel.java
libjava/javax/swing/event/EventListenerList.java
libjava/javax/swing/table/AbstractTableModel.java
libjava/javax/swing/table/DefaultTableCellRenderer.java
libjava/javax/swing/table/DefaultTableColumnModel.java
libjava/javax/swing/table/DefaultTableModel.java
libjava/javax/swing/table/TableColumn.java
libjava/javax/swing/text/StyledEditorKit.java
libjava/javax/swing/tree/DefaultMutableTreeNode.java
libjava/javax/swing/tree/DefaultTreeModel.java
libjava/javax/swing/tree/DefaultTreeSelectionModel.java
libjava/javax/swing/tree/TreePath.java
libjava/javax/swing/undo/AbstractUndoableEdit.java
libjava/javax/swing/undo/StateEdit.java
libjava/javax/swing/undo/StateEditable.java
libjava/javax/swing/undo/UndoableEditSupport.java

index 84b6b6c270de8357c03a83ea522c4d7b458ad9c3..142e27c84b67f107d90ffdc7b71c91d032d2e448 100644 (file)
@@ -1,3 +1,46 @@
+2003-03-31  Michael Koch  <konqueror@gmx.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-30  Tom Tromey  <tromey@redhat.com>
 
        * java/lang/String.java (data, boffset, count): Documented.
index 098aa9901342e6341cc82d11f9a482113fe07f00..e25e97b18b37df11a8c12a2b20f8a6a37ae2b4cb 100644 (file)
@@ -47,7 +47,10 @@ import javax.swing.event.*;
  * @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 f1033cf978123c92797762d7cfd6f4e3f0c31a84..4f7e8271c32bee9faa1f394fa51a236f8c49d16a 100644 (file)
@@ -48,7 +48,10 @@ import javax.swing.event.*;
  * @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 b95144de4f6d74cf66f74fdd63a906805283fea9..ea9e0aa362dd041a93ef02c384b9b9fc2ac3e06b 100644 (file)
@@ -46,7 +46,9 @@ import java.util.*;
  * @author     Andrew Selkirk
  * @version    1.0
  */
-public class ActionMap implements Serializable {
+public class ActionMap implements Serializable
+{
+  static final long serialVersionUID = -6277518704513986346L;
 
        //-------------------------------------------------------------
        // Variables --------------------------------------------------
index 4a4433c7bff2f59121ecd36c1b1916fd1faf5001..808144fdd7ad504c7c01fb5b9817661101fbcb72 100644 (file)
@@ -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 2301e5194ef708f03c15144979adc72f0c0fb3ba..502d0840933f77c890a93b73a0e404f0ff68e0ee 100644 (file)
@@ -44,6 +44,8 @@ import javax.swing.event.*;
 
 public class ButtonGroup implements Serializable 
 {
+  static final long serialVersionUID = 4259076101881721375L;
+
     Vector v = new Vector();
     ButtonModel sel;
     
index a0b1abd618dbc661d28565307a858d4724c33239..c6ea1d03177054e08366276cf354ac164a36f59d 100644 (file)
@@ -47,7 +47,10 @@ import javax.swing.event.*;
  * @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 1dc0c8c97b6c3e08ccb824119fc9b94391520e7a..9d6f4089da7204f0e14f7d42c2f1b13426d4e0d5 100644 (file)
@@ -42,9 +42,11 @@ import java.awt.event.*;
 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 3f9442e08d130a833a0cfa9cecb182fcc97602e4..5e35701ff5e0bc66019ea8aa15aa51ff1aac593a 100644 (file)
@@ -50,7 +50,11 @@ import javax.swing.tree.*;
  * @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 2ceb15a6573193320cdff3300c5f4e2a9de06aed..5c8361a2deeb46527fc580b0f0c5aed79085ae52 100644 (file)
@@ -47,7 +47,9 @@ import java.util.*;
  * @version    1.0
  */
 public class DefaultComboBoxModel extends AbstractListModel 
-               implements MutableComboBoxModel, Serializable {
+               implements MutableComboBoxModel, Serializable
+{
+  static final long serialVersionUID = 6698657703676921904L;
 
        //-------------------------------------------------------------
        // Variables --------------------------------------------------
index 5581e580c4b29d384a823ea90119ab1bd14b4d29..132fb61920c719e155bd4e933defc6f9ae0ef172 100644 (file)
@@ -46,7 +46,9 @@ import java.io.*;
  * @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 c6f8809e743a378d12fcec1166effc9306da05ba..204c4ec23bf893fd19ac6e164e414be9335805b0 100644 (file)
@@ -49,7 +49,9 @@ import javax.swing.plaf.*;
  * @version    1.0
  */
 public class DefaultListCellRenderer extends JLabel 
-               implements ListCellRenderer, Serializable {
+               implements ListCellRenderer, Serializable
+{
+  static final long serialVersionUID = 7708947179685189462L;
 
        //-------------------------------------------------------------
        // Classes ----------------------------------------------------
index a55c911c3a89df8d1b94739e5d85c5b021293e2f..0f6e280c951ca630dfa62869cca8d471742a6c15 100644 (file)
@@ -48,7 +48,9 @@ import javax.swing.event.*;
  * @version    1.0
  */
 public class DefaultSingleSelectionModel implements 
-               SingleSelectionModel, Serializable {
+               SingleSelectionModel, Serializable
+{
+  static final long serialVersionUID = 3676229404753786004L;
 
        //-------------------------------------------------------------
        // Variables --------------------------------------------------
index 9f81121c5a9b513bacdc4fcfdffea43458578729..861fe57ea849af9b1adfb03d4b3538479c06102c 100644 (file)
@@ -46,7 +46,9 @@ import java.io.*;
  * @author     Andrew Selkirk
  * @version    1.0
  */
-public class InputMap implements Serializable {
+public class InputMap implements Serializable
+{
+  static final long serialVersionUID = -5429059542008604257L;
 
        //-------------------------------------------------------------
        // Variables --------------------------------------------------
index fad7b6cb2a5b723f55540e458f1a407d21bb7a6e..119e385919382c0e6873260ac829dd5ddf633c2f 100644 (file)
@@ -61,6 +61,7 @@ import javax.accessibility.*;
  */
 public abstract class JComponent extends Container implements Serializable
 {
+  static final long serialVersionUID = -5242478962609715464L;
         /**
          * accessibleContext
          */
index 0d4d86863005a1f6e00abb51d690feca6e3cae77..961d8025e708640ecd4c73f36700ee4e17fd5193 100644 (file)
@@ -51,7 +51,11 @@ import javax.swing.event.*;
  * @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 e0588288d6019cd84dab084a3d18c83db3ec52c1..58475b67f16bfe9fc0201dbff668a537b00744b7 100644 (file)
@@ -49,7 +49,11 @@ import javax.swing.plaf.*;
  * @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 b2687cdc18cc5dff7c9dbdb40e086d816522c7c9..7fe06995a9f98ba15e1b0aca49ba716254dbeffb 100644 (file)
@@ -46,7 +46,9 @@ import java.io.*;
  * @author     Andrew Selkirk
  * @version    1.0
  */
-public class KeyStroke implements Serializable {
+public class KeyStroke implements Serializable
+{
+  static final long serialVersionUID = -9060180771037902530L;
 
        //-------------------------------------------------------------
        // Variables --------------------------------------------------
index a238a436a4744058c8cb7a4d9accd11beee30aad..4698e10bf45589990cb53a9b34bb763c52c4cc35 100644 (file)
@@ -46,7 +46,10 @@ import java.io.*;
  * @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 503113e4545f3eeb9d2031cb11fb046edb1fe11f..bd65471d05f3225ce9ccdb8a445015872ea47e88 100644 (file)
@@ -47,7 +47,10 @@ import javax.swing.plaf.*;
  * @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 4b5edf56a7e763f84b5f04a336a60eb2be1be035..da6d1129d0f9fa5d90c01d4c16dd3ec9eb95478e 100644 (file)
@@ -45,7 +45,9 @@ import java.io.*;
  * @author     Andrew Selkirk
  * @version    1.0
  */
-public class SizeRequirements implements Serializable {
+public class SizeRequirements implements Serializable
+{
+  static final long serialVersionUID = 9217749429906736553L;
 
        //-------------------------------------------------------------
        // Variables --------------------------------------------------
index 18eebe358393a7f404f8b941d379ec8fafd3922f..8feaccf30e3f8731de5920665504baba51b1b5cb 100644 (file)
@@ -51,6 +51,8 @@ import java.beans.*;
 
 public class UIManager implements Serializable
 {
+  static final long serialVersionUID = -5547433830339189365L;
+
     static class LookAndFeelInfo
     {
        String name, clazz;
index f5beb76db13fdc91131f5216184d0fb55d72a56e..f735fe6207dd51c57435a416af2e4290116f46b0 100644 (file)
@@ -46,7 +46,9 @@ import java.io.*;
  * @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 971665414b6a11be91277f511e7c5832c3a1f773..d0285b33a5cc57b39ba2ab3dc4e02339b7b32794 100644 (file)
@@ -42,6 +42,8 @@ import java.awt.*;
 
 public abstract class AbstractBorder implements Border, Serializable
 {
+  static final long serialVersionUID = -545885975315191844L;
+
     AbstractBorder()
     {
     }
index 74bf0642a0777d037e023e80dcf642d7617b752a..1df4e325e942ad0f2a679a6125f6e4c26803d771 100644 (file)
@@ -48,7 +48,9 @@ import javax.swing.event.*;
  * @version    1.0
  */
 public class DefaultColorSelectionModel 
-               implements ColorSelectionModel, Serializable {
+  implements ColorSelectionModel, Serializable
+{
+  static final long serialVersionUID = 580150227676302096L;
 
        //-------------------------------------------------------------
        // Variables --------------------------------------------------
index 5017aa543360a48b82cf82938a1ccc157aa081b5..1197ccb353a0cccb96bd2a9c5347391247cc4b39 100644 (file)
@@ -45,8 +45,9 @@ import java.util.EventListener;
  * 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 790568f88b4313b18f775e1fceea7db3043f8706..08eeb829a743947ce3b308b65cc80b34f5f97806 100644 (file)
@@ -46,7 +46,9 @@ import javax.swing.event.*;
  * 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 63c8db2c252609b79e26ccf0b00d7742897317b2..a7bcc5c36b7cb17aa28b8f4332ec107f1adb505a 100644 (file)
@@ -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 @@ import javax.swing.JTable;
 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 0ead6bd9ee6f7af4dd6eeac13df67b82b71dc0c2..9ab2fff81166bebb76ce15b1ceca6692b76615b9 100644 (file)
@@ -49,7 +49,11 @@ import javax.swing.event.*;
  * @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 3815bb98c04427cfca673709a043677a5027517c..1587310856efab2e6f7b7acf0a51eba76ff89cba 100644 (file)
@@ -46,7 +46,10 @@ import javax.swing.event.*;
  * 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 8be7c19233f412cb7220b289ee1bae1746c2a4cb..f5ace625675847853a5ee07aff2d1a7a6912f232 100644 (file)
@@ -47,7 +47,9 @@ import javax.swing.event.*;
  * @author     Andrew Selkirk
  * @version    1.0
  */
-public class TableColumn implements Serializable {
+public class TableColumn implements Serializable
+{
+  static final long serialVersionUID = -6113660025878112608L;
 
        //-------------------------------------------------------------
        // Variables --------------------------------------------------
index 84b27bd11a0d95de2dad82ced4d276daf6603576..16af630456ac179018a358ec0bc52905d9080e71 100644 (file)
@@ -50,7 +50,9 @@ import javax.swing.event.*;
  * @author     Andrew Selkirk
  * @version    1.0
  */
-public class StyledEditorKit extends DefaultEditorKit {
+public class StyledEditorKit extends DefaultEditorKit
+{
+  static final long serialVersionUID = 7002391892985555948L;
 
        //-------------------------------------------------------------
        // Classes ----------------------------------------------------
index 288b0edc1c98bf3dc8d8e631dcef09834a52b5a0..0c2b5459f9921f92f26bea35fa2ca3ce8f0e4e00 100644 (file)
@@ -45,7 +45,10 @@ import java.util.*;
  * 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 daf3f1100b5ef39afdd1591da5ae33f50c04ad58..d905be96cb87a62ab4df0272d697c8aecc3141f7 100644 (file)
@@ -46,7 +46,9 @@ import javax.swing.event.*;
  * DefaultTreeModel
  * @author Andrew Selkirk
  */
-public class DefaultTreeModel implements Serializable, TreeModel {
+public class DefaultTreeModel implements Serializable, TreeModel
+{
+  static final long serialVersionUID = -2621068368932566998L;
 
        //-------------------------------------------------------------
        // Variables --------------------------------------------------
index f772c188c1371d8062bf0d224b39a1bcfab53a3a..9b5358241bddb5676f9e85b76b97c9721d14c070 100644 (file)
@@ -48,7 +48,10 @@ import javax.swing.event.*;
  * 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 56899cf92804540e093398c49a1494f6637380cd..77627db77b11442a503d2fce2f0e15edd7698531 100644 (file)
@@ -44,7 +44,9 @@ import java.io.*;
  * TreePath
  * @author Andrew Selkirk
  */
-public class TreePath implements Serializable {
+public class TreePath implements Serializable
+{
+  static final long serialVersionUID = 4380036194768077479L;
 
        //-------------------------------------------------------------
        // Variables --------------------------------------------------
index e98b87cb3ae2c96cbf9897dbb55e4306c8b59b54..68c28130e0f59602138c94ea60b7911452a120d4 100644 (file)
@@ -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 @@ import java.io.Serializable;
  * 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 a56564b45fdb33f18e37aef2a1902e42c54163ff..f617bc3a455482184116a5986c6aafbdddc0e62a 100644 (file)
@@ -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 @@ import java.util.*;
  * StateEdit
  * @author     Andrew Selkirk
  */
-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
+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 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 76eedade716667b37c2500a5886d341af429fb0e..d757438ff73efd4b8ba2c3bcaefe51bae4799594 100644 (file)
@@ -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 @@ import java.util.Hashtable;
  */
 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 6f873988e5f31750b984ee31ca654641f4d1ce02..f09f3ffad4b00b9f634413226374642cc1933928 100644 (file)
@@ -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 @@ import javax.swing.event.*;
  * UndoableEditSupport
  * @author     Andrew Selkirk
  */
-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
+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()
+  {
+  }
+
+  /**
+   * 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);
+  }
+}