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.JComponent


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

Hi list,


I just commited the attached patch to add three missing methods to 
javax.swing.JComponent.


Michael


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

	* javax/swing/JComponent.java
	(isMaximumSizeSet): New method.
	(isMinimumSizeSet): Likewise.
	(isPreferredSizeSet): Likewise.
- -- 
Homepage: http://www.worldforge.org/
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (GNU/Linux)

iD8DBQFBRbYPWSOgCCdjSDsRAqa+AJ0eHwfzP23pOtyXY5KUCZ3H7h/KPQCgi+p/
UxCkKbahqFoFmdyMJfEdbNw=
=MAzs
-----END PGP SIGNATURE-----
Index: javax/swing/JComponent.java
===================================================================
RCS file: /cvs/gcc/gcc/libjava/javax/swing/JComponent.java,v
retrieving revision 1.7.2.19
diff -u -r1.7.2.19 JComponent.java
--- javax/swing/JComponent.java	13 Sep 2004 13:18:08 -0000	1.7.2.19
+++ javax/swing/JComponent.java	13 Sep 2004 14:49:38 -0000
@@ -1023,6 +1023,45 @@
   }
 
   /**
+   * Checks if a maximum size was explicitely set on the component.
+   *
+   * @return <code>true</code> if a maximum size was set,
+   * <code>false</code> otherwise
+   * 
+   * @since 1.3
+   */
+  public boolean isMaximumSizeSet()
+  {
+    return maximumSize != null;
+  }
+
+  /**
+   * Checks if a minimum size was explicitely set on the component.
+   *
+   * @return <code>true</code> if a minimum size was set,
+   * <code>false</code> otherwise
+   * 
+   * @since 1.3
+   */
+  public boolean isMinimumSizeSet()
+  {
+    return minimumSize != null;
+  }
+
+  /**
+   * Checks if a preferred size was explicitely set on the component.
+   *
+   * @return <code>true</code> if a preferred size was set,
+   * <code>false</code> otherwise
+   * 
+   * @since 1.3
+   */
+  public boolean isPreferredSizeSet()
+  {
+    return preferredSize != null;
+  }
+  
+  /**
    * Return the value of the {@link #nextFocusableComponent} property.
    * 
    * @deprecated See {@link java.awt.FocusTraversalPolicy}

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