|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.norvelle.textcite.PreferenceManager
public class PreferenceManager
PreferenceManager: A Facade interface for setting and retrieving the various TextCite user preferences. We centralize all interaction with the Preferences store here, in order to avoid spreading the responsibility for setting defaults all around the application. All default preferences are set here; in addition, only those preferences made available here are valid.
Field Summary | |
---|---|
protected java.util.prefs.Preferences |
prefs
|
Constructor Summary | |
---|---|
PreferenceManager()
Create an instance of the Preference Manager, using the Java Preference API for storage. |
Method Summary | |
---|---|
boolean |
getAllowUsagePings()
Returns the user preference as to whether TextCite is allowed to send usage info. |
boolean |
getCheckForUpdates()
Returns the user preference as to whether TextCite should check for updates on the Web. |
java.awt.Font |
getCitationDisplayFont()
Get currently selected default Citation display font. |
java.lang.String |
getCustomReferenceGeneratorTemplate()
|
java.lang.String |
getDefaultDirectory()
Return the default directory for saving and loading CiteBooks |
java.lang.String |
getDefaultLocale()
|
java.lang.String |
getDefaultReferenceGenerator()
|
java.lang.String |
getExportDirectory()
Return the default directory for exports |
java.lang.String |
getFontSampleText()
|
int |
getNumberOfBackups()
Returns the user preference as to how many backups to make automatically. |
boolean |
getPerformBackups()
Returns the user preference as to how many backups to make automatically. |
java.lang.String |
getRecentDocument(int docNum)
Get the Nth recent document |
boolean |
getShowTip()
Returns the user preference as to whether to show the tip of the day. |
int |
getUniqueInstanceId()
Get the unique identifier for this instance of TextCite |
void |
save()
Save all prefs to the backing store. |
void |
setAllowUsagePings(boolean l)
Sets the user preference as to whether TextCite is allowed to send usage info. |
void |
setCheckForUpdates(boolean l)
Sets the user preference as to whether TextCite should check for updates on the Web. |
void |
setCitationDisplayFont(java.awt.Font f)
Sets the user preference as to whether to show the tip of the day. |
void |
setCustomReferenceGeneratorTemplate(java.lang.String l)
|
void |
setDefaultDirectory(java.lang.String d)
Set the default directory for saving and loading CiteBooks |
void |
setDefaultLocale(java.lang.String l)
|
void |
setDefaultReferenceGenerator(java.lang.String l)
|
void |
setExportDirectory(java.lang.String d)
Set the default directory for exports |
void |
setFontSampleText(java.lang.String l)
|
void |
setNumberOfBackups(int l)
Sets the user preference as to how many backups to make automatically. |
void |
setPerformBackups(boolean l)
Sets the user preference as to how many backups to make automatically. |
void |
setRecentDocument(int docNum,
java.lang.String name)
Set the Nth recent document |
void |
setShowTip(boolean l)
Sets the user preference as to whether to show the tip of the day. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected java.util.prefs.Preferences prefs
Constructor Detail |
---|
public PreferenceManager()
Method Detail |
---|
public void save()
public java.lang.String getDefaultDirectory()
public void setDefaultDirectory(java.lang.String d)
public java.lang.String getExportDirectory()
public void setExportDirectory(java.lang.String d)
public java.lang.String getDefaultLocale()
public void setDefaultLocale(java.lang.String l)
public java.lang.String getCustomReferenceGeneratorTemplate()
public void setCustomReferenceGeneratorTemplate(java.lang.String l)
public java.lang.String getDefaultReferenceGenerator()
public void setDefaultReferenceGenerator(java.lang.String l)
public boolean getCheckForUpdates()
public void setCheckForUpdates(boolean l)
public boolean getAllowUsagePings()
public void setAllowUsagePings(boolean l)
public int getNumberOfBackups()
public void setNumberOfBackups(int l)
public boolean getPerformBackups()
public void setPerformBackups(boolean l)
public boolean getShowTip()
public void setShowTip(boolean l)
public java.awt.Font getCitationDisplayFont()
public void setCitationDisplayFont(java.awt.Font f)
public java.lang.String getFontSampleText()
public void setFontSampleText(java.lang.String l)
public int getUniqueInstanceId()
public java.lang.String getRecentDocument(int docNum)
public void setRecentDocument(int docNum, java.lang.String name)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |