|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.sf.jaxodraw.util.JaxoPrefs
public final class JaxoPrefs
Responsible for importing/exporting user preferences.
Field Summary | |
---|---|
static int |
MAX_RECENT_FILES
Defines the maximum numbers of recent files presented in the recent file menu. |
static String |
PREF_AMPLITUDE
The preferred amplitude for photon and gluon objects. |
static String |
PREF_ANTIALIAS
A boolean preference indicating whether to use antialias or not. |
static String |
PREF_ARROW
A boolean preference indicating whether to draw arrows or not. |
static String |
PREF_ARROWINSET
The preferred arrow inset. |
static String |
PREF_ARROWLENGTH
The preferred arrow length. |
static String |
PREF_ARROWPOSITION
The preferred arrow poaition. |
static String |
PREF_ARROWWIDTH
The preferred arrow width. |
static String |
PREF_BROWSER
The preferred HTML browser. |
static String |
PREF_CANVASBACKGROUND
The preferred canvas background color. |
static String |
PREF_COLOR
The preferred Object color. |
static String |
PREF_COLORSPACE
The preferred color space. |
static String |
PREF_DEFAULTACTION
The default action. |
static String |
PREF_DLSEP
The preferred separation of double line objects. |
static String |
PREF_DVIPSPATH
The preferred dvips path. |
static String |
PREF_EDITOR
The preferred text editor. |
static String |
PREF_GRIDCOLOR
The preferred canvas background color. |
static String |
PREF_GRIDONOFF
A boolean preference indicating whether the grid is on or off. |
static String |
PREF_GRIDSIZE
The preferred grid size. |
static String |
PREF_GRIDSTYLE
The preferred grid style. |
static String |
PREF_GRIDTYPE
The preferred grid type. |
static String |
PREF_LANGUAGE
The preferred language. |
static String |
PREF_LATEXPATH
The preferred latex path. |
static String |
PREF_LINEWIDTH
The preferred line width. |
static String |
PREF_LOOKNFEEL
The preferred Look and Feel (as of 2.0, the Class Name). |
static String |
PREF_PSFAMILY
The preferred Postscript font family. |
static String |
PREF_PSROTANGLE
The preferred postscript text rotation angle. |
static String |
PREF_PSSIZE
The preferred Postscript font size. |
static String |
PREF_PSSTYLE
The preferred Postscript font style. |
static String |
PREF_PSVIEWER
The preferred postscript viewer. |
static String |
PREF_SCREENSIZEX
The preferred screen size - x dimension. |
static String |
PREF_SCREENSIZEY
The preferred screen size - y dimension. |
static String |
PREF_SHOWGRIDBAR
A boolean preference indicating whether to show the gridbar bar or not. |
static String |
PREF_SHOWSPLASHWINDOW
A boolean preference indicating whether to show the start-up splash window or not. |
static String |
PREF_SHOWSTATUS
A boolean preference indicating whether to show the status bar or not. |
static String |
PREF_SHOWTOOL
A boolean preference indicating whether to show the tool bar or not. |
static String |
PREF_SNAPONOFF
A boolean preference indicating whether snapping is on or off. |
static String |
PREF_TEXALIGN
The preferred TeX alignment. |
static String |
PREF_TEXROTANGLE
The preferred LaTeX text rotation angle. |
static String |
PREF_TEXSIZE
The preferred TeX font size. |
static String |
PREF_TEXTCOLOR
The preferred Text color. |
static String |
PREF_UNDODEPTH
The preferred undo depth. |
static String |
PREF_USER_DIR
The current user directory. |
static String |
PREF_VERSION
The version of the preferences. |
static String |
PREF_VERTEXSIZE
The preferred default vertex size. |
Method Summary | |
---|---|
static void |
addRecentFile(String st)
Adds the given absolute path name to the list of recntly opened files. |
static void |
clearRecentFiles()
Sets all recent files to empty Strings. |
static boolean |
getBooleanPref(String name)
Returns the preference with 'name' as a boolean, or throws a IllegalArgumentException if it does not correspond to a boolean. |
static float |
getFloatPref(String name)
Returns the preference with 'name' as a float, or throws a IllegalArgumentException if it does not correspond to a float. |
static int |
getIntPref(String name)
Returns the preference with 'name' as an integer, or throws a IllegalArgumentException if it does not correspond to an int. |
static String[] |
getRecentFiles()
Returns an array of recently opened files. |
static Map<String,Object> |
getState()
State of preferences. |
static String |
getStringPref(String name)
Returns the preference with 'name' as a String, or throws a IllegalArgumentException if it does not correspond to a String. |
static void |
initSessionPrefs()
Sets the Preferences for the current session from the Preferences node. |
static void |
resetPref(String name)
Re-sets the given Preference to its default value. |
static void |
savePrefs()
Saves the current set of Preferences to the user Preferences node, so they will be used in later sessions. |
static void |
saveRecentFiles()
Saves the last visited files in the Preferences node. |
static void |
setBooleanPref(String name,
boolean newPref)
Sets the preference with 'name' to the boolean value of newPref. |
static void |
setFloatPref(String name,
float newPref)
Sets the preference with 'name' to the float value of newPref. |
static void |
setIntPref(String name,
int newPref)
Sets the preference with 'name' to the int value newPref. |
static void |
setRecentFiles(String[] filePaths)
Set the recently opened files to the given array of absolute path names. |
static void |
setState(Map<String,Object> value)
Restore the preferences to a previous state. |
static void |
setStringPref(String name,
String str)
Sets the preference with 'name' to the string str. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final String PREF_BROWSER
public static final String PREF_EDITOR
public static final String PREF_PSVIEWER
public static final String PREF_LOOKNFEEL
public static final String PREF_LANGUAGE
public static final String PREF_GRIDTYPE
public static final String PREF_COLOR
public static final String PREF_PSFAMILY
public static final String PREF_TEXTCOLOR
public static final String PREF_LATEXPATH
public static final String PREF_DVIPSPATH
public static final String PREF_CANVASBACKGROUND
public static final String PREF_VERSION
public static final String PREF_GRIDCOLOR
public static final String PREF_USER_DIR
public static final String PREF_SCREENSIZEX
public static final String PREF_SCREENSIZEY
public static final String PREF_GRIDSIZE
public static final String PREF_AMPLITUDE
public static final String PREF_PSSTYLE
public static final String PREF_PSSIZE
public static final String PREF_TEXSIZE
public static final String PREF_TEXALIGN
public static final String PREF_PSROTANGLE
public static final String PREF_TEXROTANGLE
public static final String PREF_DEFAULTACTION
public static final String PREF_UNDODEPTH
public static final String PREF_COLORSPACE
public static final String PREF_GRIDSTYLE
public static final String PREF_VERTEXSIZE
public static final String PREF_LINEWIDTH
public static final String PREF_DLSEP
public static final String PREF_ARROWPOSITION
public static final String PREF_ARROWLENGTH
public static final String PREF_ARROWWIDTH
public static final String PREF_ARROWINSET
public static final String PREF_SHOWTOOL
public static final String PREF_SHOWSTATUS
public static final String PREF_ANTIALIAS
public static final String PREF_ARROW
public static final String PREF_GRIDONOFF
public static final String PREF_SNAPONOFF
public static final String PREF_SHOWGRIDBAR
public static final String PREF_SHOWSPLASHWINDOW
public static final int MAX_RECENT_FILES
Method Detail |
---|
public static String[] getRecentFiles()
public static void setRecentFiles(String[] filePaths)
filePaths
- the absolute path names.
If an entry is null, it will be replaced by an empty String.public static void clearRecentFiles()
public static void addRecentFile(String st)
st
- an absolute path name.public static String getStringPref(String name)
name
- The name of the preference.
public static int getIntPref(String name)
name
- The name of the preference.
public static float getFloatPref(String name)
name
- The name of the preference.
public static boolean getBooleanPref(String name)
name
- The name of the preference.
public static void setStringPref(String name, String str)
name
- The name of the preference to be set.str
- the preference to be set.public static void setIntPref(String name, int newPref)
name
- The name of the preference to be set.newPref
- The preference to be set.public static void setFloatPref(String name, float newPref)
name
- The name of the preference to be set.newPref
- The preference to be set.public static void setBooleanPref(String name, boolean newPref)
name
- The name of the preference to be set.newPref
- The preference to be set.public static Map<String,Object> getState()
setState(java.util.Map)
.
public static void setState(Map<String,Object> value)
value
- previous state to be set, obtained from getState()
.public static void initSessionPrefs()
public static void resetPref(String name)
name
- the name of the preference to re-set.public static void savePrefs()
public static void saveRecentFiles()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |