Examples of absolutePath()


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

        Preferences prefs = Preferences.userNodeForPackage(JmeClientMain.class);
       
        // first try a preference
        String requestedFPS = null;
        try {
            if (prefs.node(prefs.absolutePath()).get("fps", null) != null) {
                requestedFPS = prefs.get("fps", DESIRED_FPS_DEFAULT);
            }
        } catch (Exception e) {
        }
       
View Full Code Here

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

        assertEquals(8192, Preferences.MAX_VALUE_LENGTH);
    }

    public void testUserNodeForPackage() throws BackingStoreException {
        Preferences p = Preferences.userNodeForPackage(Object.class);
        assertEquals("/java/lang", p.absolutePath());
        assertTrue(p instanceof AbstractPreferences);
        Preferences root = Preferences.userRoot();
        Preferences parent = root.node("java");
        assertSame(parent, p.parent());
        assertTrue(p.isUserNode());
View Full Code Here

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

    }

    public void testUserRoot() throws BackingStoreException {
        Preferences p = Preferences.userRoot();
        assertTrue(p instanceof AbstractPreferences);
        assertEquals("/", p.absolutePath());
        assertSame(null, p.parent());
        assertTrue(p.isUserNode());
        assertEquals("", p.name());
        assertEquals("User Preference Node: " + p.absolutePath(), p.toString());
    }
View Full Code Here

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

        assertTrue(p instanceof AbstractPreferences);
        assertEquals("/", p.absolutePath());
        assertSame(null, p.parent());
        assertTrue(p.isUserNode());
        assertEquals("", p.name());
        assertEquals("User Preference Node: " + p.absolutePath(), p.toString());
    }

    public void testImportPreferences() throws Exception {
        Preferences prefs = null;
        try {
View Full Code Here

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

            p = Preferences.systemNodeForPackage(Object.class);
        } catch (SecurityException e) {
            // may be caused by absence of privileges on the underlying OS
            return;
        }
        assertEquals("/java/lang", p.absolutePath());
        assertTrue(p instanceof AbstractPreferences);
        Preferences root = Preferences.systemRoot();
        Preferences parent = root.node("java");
        assertSame(parent, p.parent());
        assertFalse(p.isUserNode());
View Full Code Here

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

    }

    public void testSystemRoot() throws BackingStoreException {
        Preferences p = Preferences.systemRoot();
        assertTrue(p instanceof AbstractPreferences);
        assertEquals("/", p.absolutePath());
        assertSame(null, p.parent());
        assertFalse(p.isUserNode());
        assertEquals("", p.name());
        assertEquals("System Preference Node: " + p.absolutePath(), p
                .toString());
View Full Code Here

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

        assertTrue(p instanceof AbstractPreferences);
        assertEquals("/", p.absolutePath());
        assertSame(null, p.parent());
        assertFalse(p.isUserNode());
        assertEquals("", p.name());
        assertEquals("System Preference Node: " + p.absolutePath(), p
                .toString());
    }

    public void testConsts() {
        assertEquals(80, Preferences.MAX_KEY_LENGTH);
View Full Code Here

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

    // add 3 new nodes, these will be direct children of the current node

    // node 1
    Preferences pref1 = this.prefs.node("children_1");
    this.harness.check("children_1".compareTo(pref1.name()) == 0);
    absolutePath = pref1.absolutePath();
    this.harness
        .check((FULL_PATH + "/children_1").compareTo(absolutePath) == 0);

    // node 2
    Preferences pref2 = this.prefs.node("children_2");
View Full Code Here

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

        .check((FULL_PATH + "/children_1").compareTo(absolutePath) == 0);

    // node 2
    Preferences pref2 = this.prefs.node("children_2");
    this.harness.check("children_2".compareTo(pref2.name()) == 0);
    absolutePath = pref2.absolutePath();
    this.harness
        .check((FULL_PATH + "/children_2").compareTo(absolutePath) == 0);

    // node 3
    Preferences pref3 = this.prefs.node("children_3");
View Full Code Here

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

        .check((FULL_PATH + "/children_2").compareTo(absolutePath) == 0);

    // node 3
    Preferences pref3 = this.prefs.node("children_3");
    this.harness.check("children_3".compareTo(pref3.name()) == 0);
    absolutePath = pref3.absolutePath();
    this.harness
        .check((FULL_PATH + "/children_3").compareTo(absolutePath) == 0);

    // now add a preference key to each of these new nodes
    pref1.put("key1", "value1");
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.