jdk/src/share/classes/java/awt/PopupMenu.java
changeset 3084 67ca55732362
parent 2 90ce3da70b43
child 5506 202f599c92aa
equal deleted inserted replaced
3083:1954edd3b7a7 3084:67ca55732362
    26 package java.awt;
    26 package java.awt;
    27 
    27 
    28 import java.awt.peer.PopupMenuPeer;
    28 import java.awt.peer.PopupMenuPeer;
    29 import javax.accessibility.*;
    29 import javax.accessibility.*;
    30 
    30 
       
    31 import sun.awt.AWTAccessor;
    31 
    32 
    32 /**
    33 /**
    33  * A class that implements a menu which can be dynamically popped up
    34  * A class that implements a menu which can be dynamically popped up
    34  * at a specified position within a component.
    35  * at a specified position within a component.
    35  * <p>
    36  * <p>
    45 
    46 
    46     private static final String base = "popup";
    47     private static final String base = "popup";
    47     static int nameCounter = 0;
    48     static int nameCounter = 0;
    48 
    49 
    49     transient boolean isTrayIconPopup = false;
    50     transient boolean isTrayIconPopup = false;
       
    51 
       
    52     static {
       
    53         AWTAccessor.setPopupMenuAccessor(
       
    54             new AWTAccessor.PopupMenuAccessor() {
       
    55                 public boolean isTrayIconPopup(PopupMenu popupMenu) {
       
    56                     return popupMenu.isTrayIconPopup;
       
    57                 }
       
    58             });
       
    59     }
    50 
    60 
    51     /*
    61     /*
    52      * JDK 1.1 serialVersionUID
    62      * JDK 1.1 serialVersionUID
    53      */
    63      */
    54     private static final long serialVersionUID = -4620452533522760060L;
    64     private static final long serialVersionUID = -4620452533522760060L;