|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.mozilla.jrex.pref.JRexPreference
JRexPreference wraps the nsIPref. This class is used read and write embedded engine Preferences.
Field Summary | |
static int |
PREF_BOOL
A contant representing boolean preference type |
static int |
PREF_INT
A contant representing int preference type |
static int |
PREF_INVALID
A contant representing invalid preference type |
static int |
PREF_STRING
A contant representing string preference type |
Method Summary | |
void |
clearUserPref(String prefName)
Called to clear a user set value from a specific preference. |
boolean |
getBoolPref(String prefName)
Called to get the state of an individual boolean preference. |
String |
getCharPref(String prefName)
Called to get the state of an individual string preference. |
boolean |
getDefaultBoolPref(String prefName)
Called to get the state of an Default individual boolean preference. |
String |
getDefaultCharPref(String prefName)
Called to get the state of an Default individual string preference. |
long |
getDefaultIntPref(String prefName)
Called to get the state of an Default individual integer preference. |
static JRexPreference |
getInstance()
Returns an JRexPreference instance. |
long |
getIntPref(String prefName)
Called to get the state of an individual integer preference. |
Collection |
getPrefChildren(String parentPrefName)
Called to get the list of preferences. |
long |
getPrefType(String prefName)
Called to determine the type of a specific preference. |
String |
getRoot()
Called to get the root on which this branch is based, such as "browser.startup." |
boolean |
isPrefLocked(String prefName)
Called to get the state of is preference is locked. |
void |
lockPref(String prefName)
Called to lock a specific preference. |
void |
readUserPrefs(String file)
Reads user preference from given file. |
void |
resetPrefs()
Called to reset preferences |
void |
resetUserPrefs()
Called to reset user preferences |
void |
savePrefFile(String file)
Saves the preference to given file. |
void |
setBoolPref(String prefName,
boolean value)
Called to set the state of an individual boolean preference. |
void |
setCharPref(String prefName,
String value)
Called to set the state of an individual string preference. |
void |
setDefaultBoolPref(String prefName,
boolean value)
Called to set the state of an Default individual boolean preference. |
void |
setDefaultCharPref(String prefName,
String value)
Called to set the state of an Default individual string preference. |
void |
setDefaultIntPref(String prefName,
long value)
Called to set the state of an Default individual integer preference. |
void |
setIntPref(String prefName,
long value)
Called to set the state of an individual integer preference. |
void |
unlockPref(String prefName)
Called to unlock a specific preference. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final int PREF_INVALID
public static final int PREF_STRING
public static final int PREF_INT
public static final int PREF_BOOL
Method Detail |
public static JRexPreference getInstance()
public void readUserPrefs(String file) throws JRexException
file
- The complete path of file from which preference should be read.
JRexException
public void resetPrefs() throws JRexException
JRexException
public void resetUserPrefs() throws JRexException
JRexException
public void savePrefFile(String file) throws JRexException
file
- The complete path of file to which preference should be saved.
JRexException
public String getRoot() throws JRexException
JRexException
public long getPrefType(String prefName) throws JRexException
prefName
- The preference to get the type of.
JRexException
public boolean getBoolPref(String prefName) throws JRexException
prefName
- The boolean preference to get the state of.
JRexException
setBoolPref(java.lang.String, boolean)
public void setBoolPref(String prefName, boolean value) throws JRexException
prefName
- The boolean preference to set the state of.value
- The boolean value to set the preference to.
JRexException
getBoolPref(java.lang.String)
public String getCharPref(String prefName) throws JRexException
prefName
- The string preference to retrieve.
JRexException
setCharPref(java.lang.String, java.lang.String)
public void setCharPref(String prefName, String value) throws JRexException
prefName
- The string preference to set.value
- The string value to set the preference to.
JRexException
getCharPref(java.lang.String)
public long getIntPref(String prefName) throws JRexException
prefName
- The integer preference to get the value of.
JRexException
setIntPref(java.lang.String, long)
public void setIntPref(String prefName, long value) throws JRexException
prefName
- The integer preference to set the value of.value
- The integer value to set the preference to.
JRexException
getIntPref(java.lang.String)
public void clearUserPref(String prefName) throws JRexException
prefName
- The preference to be cleared.
Note:- This method does nothing if this object is a default branch.
JRexException
public boolean isPrefLocked(String prefName) throws JRexException
prefName
- The boolean preference to get the state of.
true
if preference is locked else false.
JRexException
public void lockPref(String prefName) throws JRexException
prefName
- The preference to be locked.
Note:- This method can be called on either a default or user branch but, in
effect, always operates on the default branch.
JRexException
unlockPref(java.lang.String)
public void unlockPref(String prefName) throws JRexException
prefName
- The preference to be unlocked.
Note:- This method can be called on either a default or user branch but, in
effect, always operates on the default branch.
JRexException
lockPref(java.lang.String)
public boolean getDefaultBoolPref(String prefName) throws JRexException
prefName
- The boolean preference to get the state of.
JRexException
setBoolPref(java.lang.String, boolean)
public void setDefaultBoolPref(String prefName, boolean value) throws JRexException
prefName
- The boolean preference to set the state of.value
- The boolean value to set the preference to.
JRexException
getBoolPref(java.lang.String)
public String getDefaultCharPref(String prefName) throws JRexException
prefName
- The string preference to retrieve.
JRexException
setCharPref(java.lang.String, java.lang.String)
public void setDefaultCharPref(String prefName, String value) throws JRexException
prefName
- The string preference to set.value
- The string value to set the preference to.
JRexException
getCharPref(java.lang.String)
public long getDefaultIntPref(String prefName) throws JRexException
prefName
- The integer preference to get the value of.
JRexException
setIntPref(java.lang.String, long)
public void setDefaultIntPref(String prefName, long value) throws JRexException
prefName
- The integer preference to set the value of.value
- The integer value to set the preference to.
JRexException
getIntPref(java.lang.String)
public Collection getPrefChildren(String parentPrefName) throws JRexException
parentPrefName
- The parent preference to be enumerated.
JRexException
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |