Package java.util.prefs

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


            }
        }

        public void restore() {
            Preferences prefs = Preferences.userNodeForPackage(LoggerTableModel.class);
            prefs = prefs.node("loggerTable");

            try {
                for (String loggerName : prefs.keys()) {
                    Level level = Level.parse(prefs.get(loggerName, "WARNING"));
                    Logger createLogger = Logger.getLogger(loggerName);
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

  private LinkedHashSet<String> hosts;

  private PasswordPolicyManager()
  {
    final Preferences preferences = Preferences.userNodeForPackage(PasswordPolicyManager.class);
    properties = preferences.node("PasswordPolicy"); // NON-NLS

    hosts = new LinkedHashSet<String>();
    try
    {
      hosts.addAll(getFilesAsList());
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 fullScreen = false;
        boolean preserveSplashScreen = 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

                .doPrivileged(new PrivilegedAction<Preferences>() {
                    public Preferences run() {
                        return Preferences.systemRoot();
                    }
                });
            pluginPrefs = root.node("plugins");
        }
        return pluginPrefs.node(getDescriptor().getId().replace('.', '-'));
    }

    /**
 
View Full Code Here

    smg.add( new MenuRadioItem( rg, "freqspect", ia ));
    ia.setRadioGroup( rg );
    ia.setPreferences( prefs, PrefsUtil.KEY_VERTSCALE );
    final IntPrefsMenuAction freqSpectAction = ia;
//    ia.setEnabled( prefs.node( PrefsUtil.NODE_VIEW ).getBoolean( PrefsUtil.KEY_SONAENABLED, false ));
    new DynamicPrefChangeManager( prefs.node( PrefsUtil.NODE_VIEW ), new String[] {
      PrefsUtil.KEY_SONAENABLED }, new PreferenceChangeListener() {
      public void preferenceChange( PreferenceChangeEvent pce )
      {
        freqSpectAction.setEnabled( prefs.node( PrefsUtil.NODE_VIEW ).getBoolean( PrefsUtil.KEY_SONAENABLED, false ));
      }
View Full Code Here

//    ia.setEnabled( prefs.node( PrefsUtil.NODE_VIEW ).getBoolean( PrefsUtil.KEY_SONAENABLED, false ));
    new DynamicPrefChangeManager( prefs.node( PrefsUtil.NODE_VIEW ), new String[] {
      PrefsUtil.KEY_SONAENABLED }, new PreferenceChangeListener() {
      public void preferenceChange( PreferenceChangeEvent pce )
      {
        freqSpectAction.setEnabled( prefs.node( PrefsUtil.NODE_VIEW ).getBoolean( PrefsUtil.KEY_SONAENABLED, false ));
      }
    }).startListening();
   
    mg.add( smg );
View Full Code Here

    key2  = "prefsSonaSettings";
    lb    = new JLabel( getResourceString( key2 ), CENTER );
    tab.gridAdd( lb, 0, row, 2, 1 );
    row++;
    final ConstQPane prefConstQ = new ConstQPane();
    prefConstQ.setPreferences( prefs.node( key ));
    tab.gridAdd( prefConstQ, 0, row, -1, 1 );
   
    addTab( ggTabPane, tab, "prefsView" );

    // ---------- generic gadgets ----------
View Full Code Here

      }
      childPrefs  = audioPrefs.node( PrefsUtil.NODE_OUTPUTCONFIGS );
      cfgIDs    = childPrefs.childrenNames();
      cfgItems  = new TreeSet( StringItem.valueComparator );
      for( int i = 0; i < cfgIDs.length; i++ ) {
        cfgItems.add( new StringItem( cfgIDs[ i ], childPrefs.node( cfgIDs[ i ]).get( RoutingConfig.KEY_NAME, cfgIDs[ i ])));
      }
      ggOutputConfig.removeAllItems();
      for( Iterator iter = cfgItems.iterator(); iter.hasNext(); ) {
        ggOutputConfig.addItem( iter.next() );
      }
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.