Package sun.security.action

Examples of sun.security.action.GetPropertyAction


        // Using the fonts set by the user can potentially cause
        // performance and compatibility issues, so allow this feature
        // to be switched off either at runtime or programmatically
        //
        String systemFonts = java.security.AccessController.doPrivileged(
               new GetPropertyAction("swing.useSystemFontSettings"));
        useSystemFontSettings = (systemFonts == null ||
                                 Boolean.valueOf(systemFonts).booleanValue());

        if (useSystemFontSettings) {
            Object value = UIManager.get("Application.useSystemFontSettings");
View Full Code Here



        if (!(this instanceof WindowsClassicLookAndFeel) &&
            (OSInfo.getOSType() == OSInfo.OSType.WINDOWS &&
             OSInfo.getWindowsVersion().compareTo(OSInfo.WINDOWS_XP) >= 0) &&
            AccessController.doPrivileged(new GetPropertyAction("swing.noxp")) == null) {

            // These desktop properties are not used directly, but are needed to
            // trigger realoading of UI's.
            this.themeActive = new TriggerDesktopProperty("win.xpstyle.themeActive");
            this.dllName     = new TriggerDesktopProperty("win.xpstyle.dllName");
View Full Code Here

     * @see #setLookAndFeel
     * @see #getCrossPlatformLookAndFeelClassName
     */
    public static String getSystemLookAndFeelClassName() {
        String systemLAF = AccessController.doPrivileged(
                             new GetPropertyAction("swing.systemlaf"));
        if (systemLAF != null) {
            return systemLAF;
        }
        OSInfo.OSType osType = AccessController.doPrivileged(OSInfo.getOSTypeAction());
        if (osType == OSInfo.OSType.WINDOWS) {
            return "com.sun.java.swing.plaf.windows.WindowsLookAndFeel";
        } else {
            String desktop = AccessController.doPrivileged(new GetPropertyAction("sun.desktop"));
            Toolkit toolkit = Toolkit.getDefaultToolkit();
            if ("gnome".equals(desktop) &&
                    toolkit instanceof SunToolkit &&
                    ((SunToolkit) toolkit).isNativeGTKAvailable()) {
                // May be set on Linux and Solaris boxs.
View Full Code Here

     * @see #setLookAndFeel
     * @see #getSystemLookAndFeelClassName
     */
    public static String getCrossPlatformLookAndFeelClassName() {
        String laf = AccessController.doPrivileged(
                             new GetPropertyAction("swing.crossplatformlaf"));
        if (laf != null) {
            return laf;
        }
        return "javax.swing.plaf.metal.MetalLookAndFeel";
    }
View Full Code Here

    /**
     * Returns the default temporary (cache) directory as defined by the
     * java.io.tmpdir system property.
     */
    private static String getTempDir() {
        GetPropertyAction a = new GetPropertyAction("java.io.tmpdir");
        return (String)AccessController.doPrivileged(a);
    }
View Full Code Here

        if (!checkedWindows) {
            OSInfo.OSType osType = AccessController.doPrivileged(OSInfo.getOSTypeAction());
            if (osType == OSInfo.OSType.WINDOWS) {
                isWindows = true;
                String systemFonts = AccessController.doPrivileged(
                    new GetPropertyAction("swing.useSystemFontSettings"));
                useSystemFonts = (systemFonts != null &&
                               (Boolean.valueOf(systemFonts).booleanValue()));
            }
            checkedWindows = true;
        }
View Full Code Here

            }
            else {
                // Create the default theme. We prefer Ocean, but will
                // use DefaultMetalTheme if told to.
                String theme = AccessController.doPrivileged(
                               new GetPropertyAction("swing.metalTheme"));
                if ("steel".equals(theme)) {
                    currentTheme = new DefaultMetalTheme();
                }
                else {
                    currentTheme = new OceanTheme();
View Full Code Here

    /**
     * Simple utility method that reads system keys.
     */
    private String getSystemProperty(String key) {
        return AccessController.doPrivileged(new GetPropertyAction(key));
    }
View Full Code Here

     */
    private static boolean getSuppressDropTarget() {
        if (!checkedSuppressDropSupport) {
            suppressDropSupport = Boolean.valueOf(
                AccessController.doPrivileged(
                    new GetPropertyAction("suppressSwingDropSupport")));
            checkedSuppressDropSupport = true;
        }
        return suppressDropSupport;
    }
View Full Code Here

    static boolean atBugLevel(String bl) {              // package-private
        if (bugLevel == null) {
            if (!sun.misc.VM.isBooted())
                return false;
            java.security.PrivilegedAction pa =
                new GetPropertyAction("sun.nio.cs.bugLevel");
            String value = (String)AccessController.doPrivileged(pa);
            bugLevel = (value != null) ? value : "";
        }
        return bugLevel.equals(bl);
    }
View Full Code Here

TOP

Related Classes of sun.security.action.GetPropertyAction

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.