Search in sources :

Example 11 with AppContext

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);
}
Also used : AppContext(sun.awt.AppContext)

Example 12 with AppContext

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;
}
Also used : AppContext(sun.awt.AppContext)

Example 13 with AppContext

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;
}
Also used : AppContext(sun.awt.AppContext)

Example 14 with AppContext

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;
}
Also used : AppContext(sun.awt.AppContext)

Example 15 with AppContext

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;
}
Also used : AppContext(sun.awt.AppContext)

Aggregations

AppContext (sun.awt.AppContext)74 HashMap (java.util.HashMap)3 Hashtable (java.util.Hashtable)3 Locale (java.util.Locale)3 ConcurrentHashMap (java.util.concurrent.ConcurrentHashMap)3 EventListenerAggregate (sun.awt.EventListenerAggregate)3 FlavorListener (java.awt.datatransfer.FlavorListener)2 WeakReference (java.lang.ref.WeakReference)2 Map (java.util.Map)2 DefaultComboBoxModel (javax.swing.DefaultComboBoxModel)2 LookAndFeel (javax.swing.LookAndFeel)2 MetalLookAndFeel (javax.swing.plaf.metal.MetalLookAndFeel)2 MetalTheme (javax.swing.plaf.metal.MetalTheme)2 ValueNamePair (org.compiere.util.ValueNamePair)2 PeerEvent (sun.awt.PeerEvent)2 AccumulativeRunnable (sun.swing.AccumulativeRunnable)2 Container (java.awt.Container)1 EventQueue (java.awt.EventQueue)1 Font (java.awt.Font)1 Rectangle (java.awt.Rectangle)1