Package sun.security.action

Examples of sun.security.action.GetPropertyAction


    /**
     * Returns the default SelectorProvider.
     */
    public static SelectorProvider create() {
        String osname = AccessController.doPrivileged(
            new GetPropertyAction("os.name"));
        if ("SunOS".equals(osname)) {
            return new sun.nio.ch.DevPollSelectorProvider();
        }

        // use EPollSelectorProvider for Linux kernels >= 2.6
        if ("Linux".equals(osname)) {
            String osversion = AccessController.doPrivileged(
                new GetPropertyAction("os.version"));
            String[] vers = osversion.split("\\.", 0);
            if (vers.length >= 2) {
                try {
                    int major = Integer.parseInt(vers[0]);
                    int minor = Integer.parseInt(vers[1]);
View Full Code Here


        return val;
    }

    private static synchronized void installAll() {
        if (!installedAll) {
            GetPropertyAction a = new GetPropertyAction("sun.nio.cs.map");
            String map = ((String)AccessController.doPrivileged(a));
            if (map != null) {
                sjisIsMS932 = map.equalsIgnoreCase("Windows-31J/Shift_JIS");
            } else {
                sjisIsMS932 = false;
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

        // 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

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

                (Boolean)toolkit.getDesktopProperty("win.xpstyle.themeActive");
            if (themeActive == null) {
                themeActive = Boolean.FALSE;
            }
            if (themeActive.booleanValue()) {
                GetPropertyAction propertyAction =
                    new GetPropertyAction("swing.noxp");
                if (AccessController.doPrivileged(propertyAction) == null &&
                    ThemeReader.isThemed() &&
                    !(UIManager.getLookAndFeel()
                      instanceof WindowsClassicLookAndFeel)) {
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

/*     */   {
/*  99 */     this.theTile = null;
/*     */
/* 101 */     this.input = input;
/*     */
/* 103 */     String ls = (String)AccessController.doPrivileged(new GetPropertyAction("line.separator"));
/*     */
/* 105 */     this.lineSeparator = ls.getBytes();
/*     */     try
/*     */     {
/* 109 */       if (this.input.read() != 80) {
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.