use of sun.awt.AppContext in project jdk8u_jdk by JetBrains.
the class SwingPaintEventDispatcher method queueSurfaceDataReplacing.
public boolean queueSurfaceDataReplacing(Component c, Runnable r) {
if (c instanceof RootPaneContainer) {
AppContext appContext = SunToolkit.targetToAppContext(c);
RepaintManager.currentManager(appContext).nativeQueueSurfaceDataRunnable(appContext, c, r);
return true;
}
return super.queueSurfaceDataReplacing(c, r);
}
use of sun.awt.AppContext in project jdk8u_jdk by JetBrains.
the class BasicLabelUI method createUI.
/**
* Returns an instance of {@code BasicLabelUI}.
*
* @param c a component
* @return an instance of {@code BasicLabelUI}
*/
public static ComponentUI createUI(JComponent c) {
if (System.getSecurityManager() != null) {
AppContext appContext = AppContext.getAppContext();
BasicLabelUI safeBasicLabelUI = (BasicLabelUI) appContext.get(BASIC_LABEL_UI_KEY);
if (safeBasicLabelUI == null) {
safeBasicLabelUI = new BasicLabelUI();
appContext.put(BASIC_LABEL_UI_KEY, safeBasicLabelUI);
}
return safeBasicLabelUI;
}
return labelUI;
}
use of sun.awt.AppContext in project jdk8u_jdk by JetBrains.
the class BasicButtonUI method createUI.
// ********************************
// Create PLAF
// ********************************
public static ComponentUI createUI(JComponent c) {
AppContext appContext = AppContext.getAppContext();
BasicButtonUI buttonUI = (BasicButtonUI) appContext.get(BASIC_BUTTON_UI_KEY);
if (buttonUI == null) {
buttonUI = new BasicButtonUI();
appContext.put(BASIC_BUTTON_UI_KEY, buttonUI);
}
return buttonUI;
}
use of sun.awt.AppContext in project jdk8u_jdk by JetBrains.
the class BasicCheckBoxUI method createUI.
// ********************************
// Create PLAF
// ********************************
public static ComponentUI createUI(JComponent b) {
AppContext appContext = AppContext.getAppContext();
BasicCheckBoxUI checkboxUI = (BasicCheckBoxUI) appContext.get(BASIC_CHECK_BOX_UI_KEY);
if (checkboxUI == null) {
checkboxUI = new BasicCheckBoxUI();
appContext.put(BASIC_CHECK_BOX_UI_KEY, checkboxUI);
}
return checkboxUI;
}
use of sun.awt.AppContext in project jdk8u_jdk by JetBrains.
the class BasicToggleButtonUI method createUI.
// ********************************
// Create PLAF
// ********************************
public static ComponentUI createUI(JComponent b) {
AppContext appContext = AppContext.getAppContext();
BasicToggleButtonUI toggleButtonUI = (BasicToggleButtonUI) appContext.get(BASIC_TOGGLE_BUTTON_UI_KEY);
if (toggleButtonUI == null) {
toggleButtonUI = new BasicToggleButtonUI();
appContext.put(BASIC_TOGGLE_BUTTON_UI_KEY, toggleButtonUI);
}
return toggleButtonUI;
}
Aggregations