jdk/src/share/classes/java/awt/SequencedEvent.java
changeset 22584 eed64ee05369
parent 20107 18e644411f0b
equal deleted inserted replaced
22583:e7d5af0b11e9 22584:eed64ee05369
     1 /*
     1 /*
     2  * Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved.
     2  * Copyright (c) 2000, 2014, Oracle and/or its affiliates. All rights reserved.
     3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     4  *
     4  *
     5  * This code is free software; you can redistribute it and/or modify it
     5  * This code is free software; you can redistribute it and/or modify it
     6  * under the terms of the GNU General Public License version 2 only, as
     6  * under the terms of the GNU General Public License version 2 only, as
     7  * published by the Free Software Foundation.  Oracle designates this
     7  * published by the Free Software Foundation.  Oracle designates this
   158         // getFirstWithContext can dispose this
   158         // getFirstWithContext can dispose this
   159         return this == getFirstWithContext() || disposed;
   159         return this == getFirstWithContext() || disposed;
   160     }
   160     }
   161 
   161 
   162     private final synchronized static SequencedEvent getFirst() {
   162     private final synchronized static SequencedEvent getFirst() {
   163         return (SequencedEvent)list.getFirst();
   163         return list.getFirst();
   164     }
   164     }
   165 
   165 
   166     /* Disposes all events from disposed AppContext
   166     /* Disposes all events from disposed AppContext
   167      * return first valid event
   167      * return first valid event
   168      */
   168      */
   209 
   209 
   210           if (list.getFirst() == this) {
   210           if (list.getFirst() == this) {
   211               list.removeFirst();
   211               list.removeFirst();
   212 
   212 
   213               if (!list.isEmpty()) {
   213               if (!list.isEmpty()) {
   214                     next = (SequencedEvent)list.getFirst();
   214                     next = list.getFirst();
   215               }
   215               }
   216           } else {
   216           } else {
   217               list.remove(this);
   217               list.remove(this);
   218           }
   218           }
   219       }
   219       }