src/share/classes/sun/awt/AWTAccessor.java

Print this page

        

@@ -477,10 +477,25 @@
          */
         boolean isMultipleMode(FileDialog fileDialog);
     }
 
     /*
+     * An accessor for the SequencedEventAccessor class
+     */
+    public interface SequencedEventAccessor {
+        /*
+         * Returns the nested event.
+         */
+        AWTEvent getNested(AWTEvent sequencedEvent);
+
+        /*
+         * Returns true if the event is an instances of SequencedEvent.
+         */
+        boolean isSequencedEvent(AWTEvent event);
+    }
+
+    /*
      * Accessor instances are initialized in the static initializers of
      * corresponding AWT classes by using setters defined below.
      */
     private static ComponentAccessor componentAccessor;
     private static ContainerAccessor containerAccessor;

@@ -491,10 +506,11 @@
     private static KeyboardFocusManagerAccessor kfmAccessor;
     private static MenuComponentAccessor menuComponentAccessor;
     private static EventQueueAccessor eventQueueAccessor;
     private static PopupMenuAccessor popupMenuAccessor;
     private static FileDialogAccessor fileDialogAccessor;
+    private static SequencedEventAccessor sequencedEventAccessor;
 
     /*
      * Set an accessor object for the java.awt.Component class.
      */
     public static void setComponentAccessor(ComponentAccessor ca) {

@@ -681,6 +697,22 @@
             unsafe.ensureClassInitialized(FileDialog.class);
         }
         return fileDialogAccessor;
     }
 
+    /*
+     * Set an accessor object for the java.awt.SequencedEvent class.
+     */
+    public static void setSequencedEventAccessor(SequencedEventAccessor sea) {
+        sequencedEventAccessor = sea;
+    }
+ 
+    /*
+     * Get the accessor object for the java.awt.SequencedEvent class.
+     */
+    public static SequencedEventAccessor getSequencedEventAccessor() {
+        // The class is not public. So we can't ensure it's initialized.
+        // Null returned value means it's not initialized
+        // (so not a single instance of the event has been created).
+        return sequencedEventAccessor;
+    }
 }