/** * Creates a list of recent searches and uses <code>saveName</code> to * persist this list under the <code>prefs</code> node. Existing entries * will be loaded automatically. * * @param prefsNode * the preferences node under which this list will be persisted. * If prefsNode is <code>null</code> the preferences node will * be set to the user root node * @param saveName * a unique name for saving this list of recent searches. If * saveName is <code>null</code>, the list will not be * persisted */ public RecentSearches(Preferences prefs, String saveName) { if (prefs == null) { try { prefs = Preferences.userRoot(); } catch (AccessControlException ace) { // disable persistency, if we aren't allowed to access // preferences. Logger.getLogger(getClass().getName()).warning("cannot acces preferences. persistency disabled."); } } if (prefs != null && saveName != null) { this.prefsNode = prefs.node(saveName); load(); } }
/** * Creates a list of recent searches and uses <code>saveName</code> to * persist this list under the <code>prefs</code> node. Existing entries * will be loaded automatically. * * @param prefsNode * the preferences node under which this list will be persisted. * If prefsNode is <code>null</code> the preferences node will * be set to the user root node * @param saveName * a unique name for saving this list of recent searches. If * saveName is <code>null</code>, the list will not be * persisted */ public RecentSearches(Preferences prefs, String saveName) { if (prefs == null) { try { prefs = Preferences.userRoot(); } catch (AccessControlException ace) { // disable persistency, if we aren't allowed to access // preferences. Logger.getLogger(getClass().getName()).warning("cannot acces preferences. persistency disabled."); } } if (prefs != null && saveName != null) { this.prefsNode = prefs.node(saveName); load(); } }
/** * Creates a list of recent searches and uses <code>saveName</code> to * persist this list under the <code>prefs</code> node. Existing entries * will be loaded automatically. * * @param prefsNode * the preferences node under which this list will be persisted. * If prefsNode is <code>null</code> the preferences node will * be set to the user root node * @param saveName * a unique name for saving this list of recent searches. If * saveName is <code>null</code>, the list will not be * persisted */ public RecentSearches(Preferences prefs, String saveName) { if (prefs == null) { try { prefs = Preferences.userRoot(); } catch (AccessControlException ace) { // disable persistency, if we aren't allowed to access // preferences. Logger.getLogger(getClass().getName()).warning("cannot acces preferences. persistency disabled."); } } if (prefs != null && saveName != null) { this.prefsNode = prefs.node(saveName); load(); } }
/** * Creates a list of recent searches and uses <code>saveName</code> to * persist this list under the <code>prefs</code> node. Existing entries * will be loaded automatically. * * @param prefsNode * the preferences node under which this list will be persisted. * If prefsNode is <code>null</code> the preferences node will * be set to the user root node * @param saveName * a unique name for saving this list of recent searches. If * saveName is <code>null</code>, the list will not be * persisted */ public RecentSearches(Preferences prefs, String saveName) { if (prefs == null) { try { prefs = Preferences.userRoot(); } catch (AccessControlException ace) { // disable persistency, if we aren't allowed to access // preferences. Logger.getLogger(getClass().getName()).warning("cannot acces preferences. persistency disabled."); } } if (prefs != null && saveName != null) { this.prefsNode = prefs.node(saveName); load(); } }