Patch: FYI: Classpath mergelet

Tom Tromey tromey@redhat.com
Sun Jan 5 01:09:00 GMT 2003


I'm checking this in.

This is a minor AWT merge with Classpath.  I missed this class last
time.

Tom

Index: ChangeLog
from  Tom Tromey  <tromey@redhat.com>

	* java/awt/List.java: Merged with Classpath.

Index: java/awt/List.java
===================================================================
RCS file: /cvs/gcc/gcc/libjava/java/awt/List.java,v
retrieving revision 1.8
diff -u -r1.8 List.java
--- java/awt/List.java 9 Nov 2002 23:23:32 -0000 1.8
+++ java/awt/List.java 5 Jan 2003 01:09:24 -0000
@@ -113,6 +113,8 @@
 /**
   * Initializes a new instance of <code>List</code> with no visible lines
   * and multi-select disabled.
+  *
+  * @exception HeadlessException If GraphicsEnvironment.isHeadless() is true.
   */
 public
 List()
@@ -127,6 +129,8 @@
   * number of visible lines and multi-select disabled.
   *
   * @param lines The number of visible lines in the list.
+  *
+  * @exception HeadlessException If GraphicsEnvironment.isHeadless() is true.
   */
 public
 List(int rows)
@@ -143,12 +147,17 @@
   * @param lines The number of visible lines in the list.
   * @param multipleMode <code>true</code> if multiple lines can be selected
   * simultaneously, <code>false</code> otherwise.
+  *
+  * @exception HeadlessException If GraphicsEnvironment.isHeadless() is true.
   */
 public 
 List(int rows, boolean multipleMode)
 {
   this.rows = rows;
   this.multipleMode = multipleMode;
+
+  if (GraphicsEnvironment.isHeadless())
+    throw new HeadlessException ();
 }
 
 /*************************************************************************/



More information about the Java-patches mailing list