src/share/classes/javax/swing/PopupFactory.java
Print this page
*** 399,415 ****
/**
* Returns the cache to use for heavy weight popups. Maps from
* <code>Window</code> to a <code>List</code> of
* <code>HeavyWeightPopup</code>s.
*/
private static Map<Window, List<HeavyWeightPopup>> getHeavyWeightPopupCache() {
synchronized (HeavyWeightPopup.class) {
Map<Window, List<HeavyWeightPopup>> cache = (Map<Window, List<HeavyWeightPopup>>)SwingUtilities.appContextGet(
heavyWeightPopupCacheKey);
if (cache == null) {
! cache = new HashMap<Window, List<HeavyWeightPopup>>(2);
SwingUtilities.appContextPut(heavyWeightPopupCacheKey,
cache);
}
return cache;
}
--- 399,416 ----
/**
* Returns the cache to use for heavy weight popups. Maps from
* <code>Window</code> to a <code>List</code> of
* <code>HeavyWeightPopup</code>s.
*/
+ @SuppressWarnings("unchecked")
private static Map<Window, List<HeavyWeightPopup>> getHeavyWeightPopupCache() {
synchronized (HeavyWeightPopup.class) {
Map<Window, List<HeavyWeightPopup>> cache = (Map<Window, List<HeavyWeightPopup>>)SwingUtilities.appContextGet(
heavyWeightPopupCacheKey);
if (cache == null) {
! cache = new HashMap<>(2);
SwingUtilities.appContextPut(heavyWeightPopupCacheKey,
cache);
}
return cache;
}
*** 696,710 ****
}
/**
* Returns the cache to use for heavy weight popups.
*/
private static List<LightWeightPopup> getLightWeightPopupCache() {
List<LightWeightPopup> cache = (List<LightWeightPopup>)SwingUtilities.appContextGet(
lightWeightPopupCacheKey);
if (cache == null) {
! cache = new ArrayList<LightWeightPopup>();
SwingUtilities.appContextPut(lightWeightPopupCacheKey, cache);
}
return cache;
}
--- 697,712 ----
}
/**
* Returns the cache to use for heavy weight popups.
*/
+ @SuppressWarnings("unchecked")
private static List<LightWeightPopup> getLightWeightPopupCache() {
List<LightWeightPopup> cache = (List<LightWeightPopup>)SwingUtilities.appContextGet(
lightWeightPopupCacheKey);
if (cache == null) {
! cache = new ArrayList<>();
SwingUtilities.appContextPut(lightWeightPopupCacheKey, cache);
}
return cache;
}
*** 852,867 ****
}
/**
* Returns the cache to use for medium weight popups.
*/
private static List<MediumWeightPopup> getMediumWeightPopupCache() {
List<MediumWeightPopup> cache = (List<MediumWeightPopup>)SwingUtilities.appContextGet(
mediumWeightPopupCacheKey);
if (cache == null) {
! cache = new ArrayList<MediumWeightPopup>();
SwingUtilities.appContextPut(mediumWeightPopupCacheKey, cache);
}
return cache;
}
--- 854,870 ----
}
/**
* Returns the cache to use for medium weight popups.
*/
+ @SuppressWarnings("unchecked")
private static List<MediumWeightPopup> getMediumWeightPopupCache() {
List<MediumWeightPopup> cache = (List<MediumWeightPopup>)SwingUtilities.appContextGet(
mediumWeightPopupCacheKey);
if (cache == null) {
! cache = new ArrayList<>();
SwingUtilities.appContextPut(mediumWeightPopupCacheKey, cache);
}
return cache;
}