|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Object
|
+--org.stringer.util.AbstractPreferences
|
+--org.stringer.Preferences
Provides access to the global settings.
This class makes use of the singleton pattern.
If you hack around, make sure all pathes are returned with a trailing file separator and all values are initialized to something other than null.
Most important, keep all preferences sorted alphabetically everywhere.
| Field Summary | |
private long |
lastLaunchReleaseNr
The release number of the last version of XNap that was launched prior to this session. |
static int |
PREFS_VERSION
The current version of the preferences file. |
private static Preferences |
singleton
|
static java.lang.String |
STRINGER_FEEDS
|
static java.lang.String |
STRINGER_FILENAME
The name of the preferences file used by Stringer |
static java.lang.String |
STRINGER_HOME
|
| Fields inherited from class org.stringer.util.AbstractPreferences |
ARRAY_SEPARATOR, isDirtyFlag, logger, namespace, oldVersion, prefsFile, propertyChange, props, version |
| Constructor Summary | |
private |
Preferences(java.lang.String filename)
|
| Method Summary | |
void |
defaults()
Sets the defaults. |
boolean |
getAutoVersionCheck()
|
int |
getAvailableCount()
|
java.lang.String |
getBackupDir()
|
java.awt.Color |
getColor(java.lang.String key)
|
java.lang.String |
getEmail()
|
java.lang.String[] |
getExpandedRows()
|
java.util.List |
getFeedSources()
|
java.awt.Font |
getFont(java.lang.String key)
Always returns a valid font. |
int |
getHorizontalDividerLocation()
|
java.lang.String |
getHttpProxyHost()
|
int |
getHttpProxyPort()
|
static Preferences |
getInstance()
Returns the preferences. |
long |
getLastLaunchReleaseNr()
|
long |
getLastUpdateCheck()
|
int |
getMaxSwarmedConnects()
|
java.lang.String |
getPassword()
|
boolean |
getShowSplash()
|
boolean |
getShowToolTips()
|
java.lang.String |
getSocksProxyHost()
|
int |
getSocksProxyPort()
|
int |
getSubscribedCount()
|
java.lang.String |
getSubscribedFeeds()
|
boolean |
getUseEmacsKeyBindings()
|
boolean |
getUseHttpProxy()
|
java.lang.String |
getUsername()
|
boolean |
getUseSocksProxy()
|
boolean |
getUseViKeyBindings()
|
int |
getVerticalDividerLocation()
|
int |
getWindowHeight()
|
int |
getWindowWidth()
|
int |
getWindowX()
|
int |
getWindowY()
|
boolean |
isFirewalled()
|
void |
read()
Sets the preferences from the default preferences file. |
void |
setAutoVersionCheck(boolean newValue)
|
void |
setAvailableCount(int count)
set the total number of subscribed newsfeeds |
void |
setBackupDir(java.lang.String s)
|
void |
setColor(java.lang.String key,
java.awt.Color newValue)
|
void |
setEmail(java.lang.String newValue)
|
void |
setExpandedRows(java.lang.String s)
|
void |
setFirewalled(boolean newValue)
|
void |
setFont(java.lang.String key,
java.awt.Font newValue)
|
void |
setHorizontalDividerLocation(int newValue)
|
void |
setHttpProxyHost(java.lang.String newValue)
|
void |
setHttpProxyPort(int newValue)
|
void |
setLastUpdateCheck(long newValue)
|
void |
setPassword(java.lang.String newValue)
|
void |
setShowSplash(boolean newValue)
|
void |
setShowToolTips(boolean newValue)
|
void |
setSocksProxyHost(java.lang.String newValue)
|
void |
setSocksProxyPort(int newValue)
|
void |
setSubscribedCount(int count)
set the total number of subscribed newsfeeds |
void |
setSubscribedFeeds(java.lang.String s)
|
void |
setUseEmacsKeyBindings(boolean newValue)
|
void |
setUseHttpProxy(boolean newValue)
|
void |
setUsername(java.lang.String newValue)
|
void |
setUseSocksProxy(boolean newValue)
|
void |
setUseViKeyBindings(boolean newValue)
|
void |
setVerticalDividerLocation(int newValue)
|
void |
setWindowHeight(int newValue)
|
void |
setWindowWidth(int newValue)
|
void |
setWindowX(int newValue)
|
void |
setWindowY(int newValue)
|
| Methods inherited from class org.stringer.util.AbstractPreferences |
addPropertyChangeListener, addPropertyChangeListener, areObjectsEqual, areObjectsEqual, firePropertyChange, get, getBoolean, getFilename, getInt, getIntArray, getList, getLong, getOldVersion, getProperty, getStringArray, getVersion, read, removeProperty, removePropertyChangeListener, renameProperty, set, set, set, set, set, set, set, set, setDefault, setList, setProperty, write |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
public static final java.lang.String STRINGER_FILENAME
public static final java.lang.String STRINGER_HOME
public static final java.lang.String STRINGER_FEEDS
public static final int PREFS_VERSION
private static Preferences singleton
private long lastLaunchReleaseNr
| Constructor Detail |
private Preferences(java.lang.String filename)
| Method Detail |
public static Preferences getInstance()
public void read()
read in class AbstractPreferencespublic void defaults()
public boolean getAutoVersionCheck()
public void setAutoVersionCheck(boolean newValue)
public java.util.List getFeedSources()
public java.awt.Color getColor(java.lang.String key)
getColor in class AbstractPreferences
public void setColor(java.lang.String key,
java.awt.Color newValue)
public void setExpandedRows(java.lang.String s)
public java.lang.String[] getExpandedRows()
public java.lang.String getEmail()
public void setEmail(java.lang.String newValue)
public java.lang.String getSubscribedFeeds()
public void setSubscribedFeeds(java.lang.String s)
public int getAvailableCount()
public void setAvailableCount(int count)
public int getSubscribedCount()
public void setSubscribedCount(int count)
public java.lang.String getBackupDir()
public void setBackupDir(java.lang.String s)
public java.awt.Font getFont(java.lang.String key)
AbstractPreferences
getFont in class AbstractPreferences
public void setFont(java.lang.String key,
java.awt.Font newValue)
public boolean isFirewalled()
public void setFirewalled(boolean newValue)
public java.lang.String getHttpProxyHost()
public void setHttpProxyHost(java.lang.String newValue)
public int getHttpProxyPort()
public void setHttpProxyPort(int newValue)
public long getLastLaunchReleaseNr()
public java.lang.String getPassword()
public void setPassword(java.lang.String newValue)
public long getLastUpdateCheck()
public void setLastUpdateCheck(long newValue)
public boolean getShowSplash()
public void setShowSplash(boolean newValue)
public boolean getShowToolTips()
public void setShowToolTips(boolean newValue)
public int getMaxSwarmedConnects()
public java.lang.String getSocksProxyHost()
public void setSocksProxyHost(java.lang.String newValue)
public int getSocksProxyPort()
public void setSocksProxyPort(int newValue)
public int getVerticalDividerLocation()
public void setVerticalDividerLocation(int newValue)
public int getHorizontalDividerLocation()
public void setHorizontalDividerLocation(int newValue)
public boolean getUseEmacsKeyBindings()
public void setUseEmacsKeyBindings(boolean newValue)
public boolean getUseViKeyBindings()
public void setUseViKeyBindings(boolean newValue)
public java.lang.String getUsername()
public void setUsername(java.lang.String newValue)
public boolean getUseHttpProxy()
public void setUseHttpProxy(boolean newValue)
public boolean getUseSocksProxy()
public void setUseSocksProxy(boolean newValue)
public int getWindowHeight()
public void setWindowHeight(int newValue)
public int getWindowWidth()
public void setWindowWidth(int newValue)
public int getWindowX()
public void setWindowX(int newValue)
public int getWindowY()
public void setWindowY(int newValue)
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||