Package java.util.prefs

Examples of java.util.prefs.Preferences.node()


        if( storeInfo == null )
        {
            // Default to use system root + application name
            preferences = Preferences.systemRoot();
            String name = application.name();
            preferences = preferences.node( name );
        }
        else
        {
            preferences = storeInfo.rootNode();
        }
View Full Code Here


        if(args.length > 0 && args[0].equals("-r")) {
            index = 1 ;
            remove = true ;
        }
        for (;index < args.length; index++) {
            prefs = prefs.node(args[index]);
        }
        listPrefs(prefs, "");
        if(remove) {
            String[] args2 = new String[args.length - 1];
            System.arraycopy(args, 1, args2, 0, args.length - 1);
View Full Code Here

   
    public static void remove(String[] args) throws BackingStoreException {
        Preferences prefs;
        prefs = Preferences.userRoot();
        for (String arg : args) {
            prefs = prefs.node(arg);
        }
        prefs.removeNode();
        prefs.flush();
    }
}
View Full Code Here

    if ( type == SYSTEM_PREF_TYPE )
      directory_service_root = Preferences.systemNodeForPackage(Configuration.class);
    else
      directory_service_root = Preferences.userNodeForPackage(Configuration.class);
                                                                                                                                       
    result = directory_service_root.node(config);

    return result;
  }
}
View Full Code Here

        }
        ClientConfiguration conf = ClientConfiguration.getDefault();
        conf.restoreAutoUpdateFramePrefs(autoUpdateFrame);
        autoUpdateInterval = conf.getAutoUpdateInterval();
        Preferences prefs = ClientConfiguration.getDefaultPreferencesNode();
        prefs.node("autoupdate").addPreferenceChangeListener(this);
    }

    public static JPluckX getInstance() {
        if (instance == null) {
            instance = new JPluckX();
View Full Code Here

        String path = CayennePreference.filePathToPrefereceNodePath(descriptor
                .getConfigurationSource()
                .getURL()
                .getPath());
        Preferences pref = getPreferencesNode(getProject().getClass(), "");
        return pref.node(pref.absolutePath() + path);
    }

    /**
     * Returns a new instance of CodeTemplateManager.
     */
 
View Full Code Here

        String pathToProject = pref.absolutePath();
        String path = pathToProject
                + "/"
                + getView().getClass().getName().replace(".", "/");

        return pref.node(path);
    }

    /**
     * Utility method to provide a visual indication an execution error. This
     * implementation logs an error and pops up a dialog window with error message.
View Full Code Here

        }

        if (!cancelShutdown) {
            try {
                Preferences preferences = Preferences.userNodeForPackage(DesktopApplicationContext.class);
                preferences = preferences.node(applicationClassName);

                boolean maximized = (windowedHostFrame.getExtendedState()
                    & java.awt.Frame.MAXIMIZED_BOTH) == java.awt.Frame.MAXIMIZED_BOTH;
                if (!maximized) {
                    preferences.putInt(X_ARGUMENT, windowedHostFrame.getX());
View Full Code Here

        boolean maximized = false;
        boolean fullScreen = false;

        try {
            Preferences preferences = Preferences.userNodeForPackage(DesktopApplicationContext.class);
            preferences = preferences.node(applicationClassName);

            x = preferences.getInt(X_ARGUMENT, x);
            y = preferences.getInt(Y_ARGUMENT, y);
            width = preferences.getInt(WIDTH_ARGUMENT, width);
            height = preferences.getInt(HEIGHT_ARGUMENT, height);
View Full Code Here

        // "subchild1");
        Preferences child1 = pref.node("child1");

        pref.node("child2");
        pref.node("child3");
        child1.node("subchild1");

        assertSame(pref, child1.parent());
        assertEquals(3, pref.childrenNames().length);
    }
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.