commit-classpath
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[commit-cp] classpath ChangeLog javax/swing/JComponent.java


From: David Gilbert
Subject: [commit-cp] classpath ChangeLog javax/swing/JComponent.java
Date: Tue, 06 Jun 2006 09:19:58 +0000

CVSROOT:        /sources/classpath
Module name:    classpath
Changes by:     David Gilbert <trebligd>        06/06/06 09:19:58

Modified files:
        .              : ChangeLog 
        javax/swing    : JComponent.java 

Log message:
        2006-06-06  David Gilbert  <address@hidden>
        
                * javax/swing/JComponent.java
                (getInputMap(int)): Throw IllegalArgumentException for unknown 
                condition argument, and added API docs,
                (getInputMap()): Added API docs.

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/classpath/ChangeLog?cvsroot=classpath&r1=1.7664&r2=1.7665
http://cvs.savannah.gnu.org/viewcvs/classpath/javax/swing/JComponent.java?cvsroot=classpath&r1=1.122&r2=1.123

Patches:
Index: ChangeLog
===================================================================
RCS file: /sources/classpath/classpath/ChangeLog,v
retrieving revision 1.7664
retrieving revision 1.7665
diff -u -b -r1.7664 -r1.7665
--- ChangeLog   6 Jun 2006 07:53:41 -0000       1.7664
+++ ChangeLog   6 Jun 2006 09:19:57 -0000       1.7665
@@ -1,3 +1,10 @@
+2006-06-06  David Gilbert  <address@hidden>
+
+       * javax/swing/JComponent.java
+       (getInputMap(int)): Throw IllegalArgumentException for unknown 
+       condition argument, and added API docs,
+       (getInputMap()): Added API docs.
+
 2006-06-06  Robert Schuster  <address@hidden>
 
        * java/awt/BufferedImage.java: Added fourth 8 to bits4 field.

Index: javax/swing/JComponent.java
===================================================================
RCS file: /sources/classpath/classpath/javax/swing/JComponent.java,v
retrieving revision 1.122
retrieving revision 1.123
diff -u -b -r1.122 -r1.123
--- javax/swing/JComponent.java 19 May 2006 11:35:43 -0000      1.122
+++ javax/swing/JComponent.java 6 Jun 2006 09:19:58 -0000       1.123
@@ -2361,6 +2361,19 @@
       }
   }
 
+  /**
+   * Returns the input map associated with this component for the given
+   * state/condition.
+   * 
+   * @param condition  the state (one of address@hidden #WHEN_FOCUSED}, 
+   *     address@hidden #WHEN_ANCESTOR_OF_FOCUSED_COMPONENT} and 
+   *     address@hidden #WHEN_IN_FOCUSED_WINDOW}).
+   * 
+   * @return The input map.
+   * @throws IllegalArgumentException if <code>condition</code> is not one of 
+   *             the specified values.
+   * @since 1.3
+   */
   public final InputMap getInputMap(int condition)
   {
     enableEvents(AWTEvent.KEY_EVENT_MASK);
@@ -2383,10 +2396,20 @@
 
       case UNDEFINED_CONDITION:
       default:
-        return null;
+        throw new IllegalArgumentException("Invalid 'condition' argument: " 
+                                           + condition);
       }
   }
 
+  /**
+   * Returns the input map associated with this component for the 
+   * address@hidden #WHEN_FOCUSED} state.
+   * 
+   * @return The input map.
+   * 
+   * @since 1.3
+   * @see #getInputMap(int)
+   */
   public final InputMap getInputMap()
   {
     return getInputMap(WHEN_FOCUSED);




reply via email to

[Prev in Thread] Current Thread [Next in Thread]