86 private static Field menuComponentAppContextField; |
86 private static Field menuComponentAppContextField; |
87 private static Field isPostedField; |
87 private static Field isPostedField; |
88 /* The key to put()/get() the PostEventQueue into/from the AppContext. |
88 /* The key to put()/get() the PostEventQueue into/from the AppContext. |
89 */ |
89 */ |
90 private static final String POST_EVENT_QUEUE_KEY = "PostEventQueue"; |
90 private static final String POST_EVENT_QUEUE_KEY = "PostEventQueue"; |
|
91 |
|
92 /** |
|
93 * Number of buttons. |
|
94 * By default it's taken from the system. If system value does not |
|
95 * fit into int type range, use our own MAX_BUTTONS_SUPPORT value. |
|
96 */ |
|
97 protected static int numberOfButtons = 0; |
|
98 |
|
99 |
|
100 /* XFree standard mention 24 buttons as maximum: |
|
101 * http://www.xfree86.org/current/mouse.4.html |
|
102 * We workaround systems supporting more than 24 buttons. |
|
103 * Otherwise, we have to use long type values as masks |
|
104 * which leads to API change. |
|
105 * InputEvent.BUTTON_DOWN_MASK may contain only 21 masks due to |
|
106 * the 4-bytes limit for the int type. (CR 6799099) |
|
107 * One more bit is reserved for FIRST_HIGH_BIT. |
|
108 */ |
|
109 public final static int MAX_BUTTONS_SUPPORTED = 20; |
91 |
110 |
92 public SunToolkit() { |
111 public SunToolkit() { |
93 /* If awt.threadgroup is set to class name the instance of |
112 /* If awt.threadgroup is set to class name the instance of |
94 * this class is created (should be subclass of ThreadGroup) |
113 * this class is created (should be subclass of ThreadGroup) |
95 * and EventDispatchThread is created inside of it |
114 * and EventDispatchThread is created inside of it |