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]

Patch: javax.swing.


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

Hi list,


I just commited the attached patch to add a missing method to 
javax.swing.JSpinner and to make an inner class of 
javax.swing.SpringLayout non-final.


Michael


2004-09-11  Michael Koch  <konqueror@gmx.de>

	* javax/swing/JSpinner.java
	(setModel): New method.
	* javax/swing/SpringLayout.java
	(Constraints): May not be final.
- -- 
Homepage: http://www.worldforge.org/
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (GNU/Linux)

iD8DBQFBQsReWSOgCCdjSDsRAoxEAJ9f0k2IKihI1BMZN9RF6AtoGMkShgCfYmVc
GwhyXuoBJrN9BDxZA9ichx8=
=Rd/q
-----END PGP SIGNATURE-----
Index: javax/swing/JSpinner.java
===================================================================
RCS file: /cvs/gcc/gcc/libjava/javax/swing/JSpinner.java,v
retrieving revision 1.1.2.3
diff -u -r1.1.2.3 JSpinner.java
--- javax/swing/JSpinner.java	25 Aug 2004 21:49:46 -0000	1.1.2.3
+++ javax/swing/JSpinner.java	11 Sep 2004 09:17:08 -0000
@@ -337,6 +337,29 @@
   }
 
   /**
+   * Sets a new underlying model.
+   *
+   * @param newModel the new model to set
+   *
+   * @exception IllegalArgumentException if newModel is <code>null</code>
+   */
+  public void setModel(SpinnerModel newModel)
+  {
+    if (newModel == null)
+      throw new IllegalArgumentException();
+    
+    if (model == newModel)
+      return;
+
+    SpinnerModel oldModel = model;
+    model = newModel;
+    firePropertyChange("model", oldModel, newModel);
+
+    if (editor == null)
+      setEditor(createEditor(model));
+  }
+
+  /**
    * Gets the next value without changing the current value.
    *
    * @return the next value
Index: javax/swing/SpringLayout.java
===================================================================
RCS file: /cvs/gcc/gcc/libjava/javax/swing/SpringLayout.java,v
retrieving revision 1.1.2.1
diff -u -r1.1.2.1 SpringLayout.java
--- javax/swing/SpringLayout.java	16 Jul 2004 04:47:03 -0000	1.1.2.1
+++ javax/swing/SpringLayout.java	11 Sep 2004 09:17:08 -0000
@@ -91,7 +91,7 @@
    *
    * @author Roman Kennke (roman@ontographics.com)
    */
-  public final static class Constraints
+  public static class Constraints
   {
 
     // The constraints for each edge, and width and height.

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