Examples of nodeExists()


Examples of java.util.prefs.AbstractPreferences.nodeExists()

    public void test_nodeExists() throws BackingStoreException {
        AbstractPreferences test = (AbstractPreferences) Preferences.userRoot()
                .node("test");
        try {
            test.nodeExists(null);
            fail("should throw NullPointerException");
        } catch (NullPointerException e) {
            // Expected
        }
View Full Code Here

Examples of java.util.prefs.AbstractPreferences.nodeExists()

            // Expected
        }

        test.removeNode();
        try {
            test.nodeExists(null);
            fail("should throw NullPointerException");
        } catch (NullPointerException e) {
            // Expected
        }
    }
View Full Code Here

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

            /* If required, convert from the old preferences node to the new
             * file (version 0.2.5)
             */
            versionsFile = new File(ContextHolder.getContext().getDBDirectory(), "versions.log");
            Preferences p = ContextHolder.getContext().getPreferences().node("dbupgrader");
            if (p.nodeExists("currentDataVersion")) {
                log.warn("Migrating database versions from preferences to properties file in "
                                + ContextHolder.getContext().getDBDirectory().getAbsolutePath() + ".");
                versions = new Properties();
                p = p.node("currentDataVersion");
                String[] c = p.keys();
View Full Code Here

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

    // audioboxes
    value = AudioBoxConfig.ID_DEFAULT;
    putDontOverwrite( childPrefs, KEY_AUDIOBOX, value );
    try {
      if( !childPrefs.nodeExists( NODE_AUDIOBOXES )) {
        childPrefs2  = childPrefs.node( NODE_AUDIOBOXES );
        new AudioBoxConfig( value, "Default", 8, 8, true ).toPrefs( childPrefs2.node( value ));
      }
    }
    catch( BackingStoreException e1 ) {
View Full Code Here

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

    // outputconfigs
    value = "out1to2";
    putDontOverwrite( childPrefs, KEY_OUTPUTCONFIG, value );
    try {
      if( !childPrefs.nodeExists( NODE_OUTPUTCONFIGS )) {
        childPrefs2 = childPrefs.node( NODE_OUTPUTCONFIGS );
        new RoutingConfig( value, "Out 1-2", new int[] { 0, 1 }, -90f ).toPrefs(
          childPrefs2.node( value ));
        value = "out1to8";
        new RoutingConfig( value, "Out 1-8", new int[] { 0, 1, 2, 3, 4, 5, 6, 7 }, -45f ).toPrefs(
View Full Code Here

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

      warnings.add( e1.toString() );
    }

    // inputconfigs
    try {
      if( !childPrefs.nodeExists( NODE_INPUTCONFIGS )) {
        childPrefs2 = childPrefs.node( NODE_INPUTCONFIGS );
        value = "in1";
        new RoutingConfig( value, "In 1", new int[] { 0 }, 0f ).toPrefs(
          childPrefs2.node( value ));
        value = "in1to2";
View Full Code Here

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

    }
   
    // view
    childPrefs  = mainPrefs.node( NODE_VIEW );
    try {
      if( !childPrefs.nodeExists( NODE_SONAGRAM )) {
        childPrefs2 = childPrefs.node( NODE_SONAGRAM );
        new ConstQ().writePrefs( childPrefs2 );
      }
    }
    catch( BackingStoreException e1 ) {
View Full Code Here

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

      oCfgDynPrefs.setPreferences( null );
      oCfgNode = null;
    }

    try {
      if( (cfgID != null) && childPrefs.nodeExists( cfgID )) {
        oCfgNode  = childPrefs.node( cfgID );
        newCfg    = new RoutingConfig( oCfgNode );
//        oCfgNode.addPreferenceChangeListener( oCfgListener );
        oCfgDynPrefs.setPreferences( oCfgNode );
        oCfgDynPrefs.startListening();
View Full Code Here

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

        assertTrue(pref.nodeExists("child"));
        assertTrue(pref.nodeExists("child/grandchild"));
        grandchild.removeNode();
        assertTrue(pref.nodeExists("child"));
        assertFalse(pref.nodeExists("child/grandchild"));
        assertFalse(grandchild.nodeExists(""));

        assertFalse(pref.nodeExists("child2/grandchild"));
        pref.node("child2/grandchild");
        assertTrue(pref.nodeExists("child2/grandchild"));
    }
View Full Code Here

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

        pref.removeNode();

        assertFalse(child.nodeExists(""));
        assertFalse(child1.nodeExists(""));
        assertFalse(grandchild.nodeExists(""));
        assertFalse(pref.nodeExists(""));
    }

    // public void testAddNodeChangeListener() throws BackingStoreException {
    // try {
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.