< prev index next >

src/java.desktop/share/classes/java/awt/AWTEvent.java

Print this page

        

@@ -290,12 +290,16 @@
      */
     private static native void initIDs();
 
     /**
      * Constructs an AWTEvent object from the parameters of a 1.0-style event.
+     *
      * @param event the old-style event
+     * @deprecated It is recommended that {@link #AWTEvent(Object, int)} be used
+     *             instead
      */
+    @Deprecated(since = "9")
     public AWTEvent(Event event) {
         this(event.target, event.id);
     }
 
     /**

@@ -434,10 +438,11 @@
      *
      * Note: this method is here instead of in each individual new
      * event class in java.awt.event because we don't want to make
      * it public and it needs to be called from java.awt.
      */
+    @SuppressWarnings("deprecation")
     Event convertToOld() {
         Object src = getSource();
         int newid = id;
 
         switch(id) {
< prev index next >