Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.jdesktop.swingx.auth
Class DefaultUserNameStore

    java.lang.Object
      org.jdesktop.beans.AbstractBean
          org.jdesktop.swingx.auth.UserNameStore
              org.jdesktop.swingx.auth.DefaultUserNameStore

    public class DefaultUserNameStore

extends UserNameStore

Saves the user names in Preferences. Because any string could be part of the user name, for every user name that must be saved a new Preferences key/value pair must be stored.

Author:
  Bino George, rbair

Constructor Summary
`DefaultUserNameStore()` Creates a new instance of DefaultUserNameStore

Method Summary
`void` | `addUserName(java.lang.String name)` Add a username to the store.
`boolean` | `containsUserName(java.lang.String name)`
`java.util.prefs.Preferences` | `getPreferences()`
`java.lang.String[]` | `getUserNames()` Gets the current list of users.
`void` | `loadUserNames()` Loads the user names from Preferences
`void` | `removeUserName(java.lang.String name)` Removes a username from the list.
`void` | `saveUserNames()` Saves the user names to Preferences
`void` | `setPreferences(java.util.prefs.Preferences prefs)`
`void` | `setUserNames(java.lang.String[] userNames)`

Methods inherited from class org.jdesktop.beans.AbstractBean
`addPropertyChangeListener, addPropertyChangeListener, addVetoableChangeListener, addVetoableChangeListener, clone, fireIndexedPropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, fireVetoableChange, getPropertyChangeListeners, getPropertyChangeListeners, getVetoableChangeListeners, getVetoableChangeListeners, hasPropertyChangeListeners, hasVetoableChangeListeners, removePropertyChangeListener, removePropertyChangeListener, removeVetoableChangeListener, removeVetoableChangeListener`

Methods inherited from class java.lang.Object
`equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### DefaultUserNameStore

    public DefaultUserNameStore()

  Creates a new instance of DefaultUserNameStore

Method Detail

### loadUserNames

    public void loadUserNames()

  Loads the user names from Preferences

  Specified by:
    `loadUserNames` in class `UserNameStore`

### saveUserNames

    public void saveUserNames()

  Saves the user names to Preferences

  Specified by:
    `saveUserNames` in class `UserNameStore`

### getUserNames

    public java.lang.String[] getUserNames()

  Gets the current list of users.

  Specified by:
    `getUserNames` in class `UserNameStore`

### setUserNames

    public void setUserNames(java.lang.String[] userNames)

  Specified by:
    `setUserNames` in class `UserNameStore`

### addUserName

    public void addUserName(java.lang.String name)

  Add a username to the store.

  Specified by:
    `addUserName` in class `UserNameStore`
  Parameters:
    `name` -

### removeUserName

    public void removeUserName(java.lang.String name)

  Removes a username from the list.

  Specified by:
    `removeUserName` in class `UserNameStore`
  Parameters:
    `name` -

### containsUserName

    public boolean containsUserName(java.lang.String name)

  Specified by:
    `containsUserName` in class `UserNameStore`

### getPreferences

    public java.util.prefs.Preferences getPreferences()

  Returns:
    Returns Preferences node in which the user names will be stored

### setPreferences

    public void setPreferences(java.util.prefs.Preferences prefs)

  Parameters:
    `prefs` - the Preferences node to store the user names in. If null, or undefined, then they are stored in /org/jdesktop/swingx/auth/DefaultUserNameStore.

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2010. All Rights Reserved.