japlot.jaxodraw
Class JaxoPrefs
- java.lang.Object
-
- japlot.jaxodraw.JaxoPrefs
-
public final class JaxoPrefs extends java.lang.ObjectResponsible for importing/exporting user preferences.
-
-
Field Summary
Fields Modifier and Type Field and Description static intPREF_AMPLITUDEThe preferred amplitude for photon and gluon objects.static intPREF_ANTIALIASA boolean preference indicating wether to use antialias or not.static intPREF_ARROWA boolean preference indicating wether to draw arrows or not.static intPREF_BROWSERThe preferred HTML browser.static intPREF_COLORThe preferred Object color.static intPREF_DEFAULTACTIONThe default action.static intPREF_DLSEPThe preferred separation of double line objects.static intPREF_DVIPSPATHThe preferred dvips path.static intPREF_EDITORThe preferred text editor.static java.lang.StringPREF_FILENAMEThe file where user-selected preferences will be stored.static intPREF_GRIDONOFFA boolean preference indicating wether the grid is on or off.static intPREF_GRIDSIZEThe preferred grid size.static intPREF_GRIDTYPEThe preferred grid type.static intPREF_LANGUAGEThe preferred language.static intPREF_LATEXPATHThe preferred latex path.static intPREF_LINEWIDTHThe preferred line width.static intPREF_LOOKNFEELThe preferred Look and Feel.static intPREF_PSFAMILYThe preferred Postscript font family.static intPREF_PSROTANGLEThe preferred postscript text rotation angle.static intPREF_PSSIZEThe preferred Postscript font size.static intPREF_PSSTYLEThe preferred Postscript font style.static intPREF_PSVIEWERThe preferred postscript viewer.static intPREF_SCREENSIZEXThe preferred screen size - x dimension.static intPREF_SCREENSIZEYThe preferred screen size - y dimension.static intPREF_SHOWBROWSERA boolean preference indicating wether to show the editor bar or not.static intPREF_SHOWEDITORA boolean preference indicating wether to show the editor bar or not.static intPREF_SHOWSTATUSA boolean preference indicating wether to show the status bar or not.static intPREF_SHOWTOOLA boolean preference indicating wether to show the tool bar or not.static intPREF_TEXALIGNThe preferred TeX alignment.static intPREF_TEXROTANGLEThe preferred LaTeX text rotation angle.static intPREF_TEXSIZEThe preferred TeX font size.static intPREF_TEXTCOLORThe preferred Text color.static intPREF_ZOOMFACTORThe preferred magnification factor for the zoom.static intPREF_ZOOMSIZEXThe preferred x-size of the zoom window.static intPREF_ZOOMSIZEYThe preferred y-size of the zoom window.
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method and Description static voidexportPrefs(java.lang.String fileName)Exports user preferences to the specified file fileName.static booleangetBooleanPref(int i)Returns the i'th preference as a boolean, or true, if the i'th preference does not correspond to a boolean.static floatgetFloatPref(int i)Returns the i'th preference as a float, or 0.f if the i'th preference does not correspond to a float.static intgetIntPref(int i)Returns the i'th preference as an integer, or -1 if the i'th preference does not correspond to an integer.static intgetNofPrefs()Returns the number of preferences defined by JaxoPrefs.static java.lang.StringgetPref(int i)Returns the i'th preference as a string.static java.lang.StringgetRecentFile(int i)Returns the absolute path of a recently opened file.static java.lang.StringgetStringPref(int i)Returns the i'th preference as a string.static voidimportPrefs(java.lang.String fileName)Imports user preferences from the specified file fileName.static voidreadRecentFiles()Imports the recently visited files from the .Jaxorc preferences file.static voidsaveRecentFiles()Saves the four last visited files into the preferences file .Jaxorc.static voidsetBooleanPref(int i, boolean newPref)Sets the i'th preference to the boolean value of newPref.static voidsetFloatPref(int i, float newPref)Sets the i'th preference to the float value of newPref.static voidsetIntPref(int i, int newPref)Sets the i'th preference to the int value newPref.static voidsetPref(int i, java.lang.String str)Sets the i'th preference to the string str.static voidsetRecentFile(int i, java.lang.String str)Sets a recently visited file.static voidsetSize(int sizeX, int sizeY)static voidsetVerbose(boolean verb)Sets the verbose error messaging.static booleanverbose()Returns the verbose error (exception) messaging.
-
-
-
Field Detail
-
PREF_FILENAME
public static final java.lang.String PREF_FILENAME
The file where user-selected preferences will be stored.- See Also:
- Constant Field Values
-
PREF_BROWSER
public static final int PREF_BROWSER
The preferred HTML browser.- See Also:
- Constant Field Values
-
PREF_EDITOR
public static final int PREF_EDITOR
The preferred text editor.- See Also:
- Constant Field Values
-
PREF_PSVIEWER
public static final int PREF_PSVIEWER
The preferred postscript viewer.- See Also:
- Constant Field Values
-
PREF_LOOKNFEEL
public static final int PREF_LOOKNFEEL
The preferred Look and Feel.- See Also:
- Constant Field Values
-
PREF_LANGUAGE
public static final int PREF_LANGUAGE
The preferred language.- See Also:
- Constant Field Values
-
PREF_GRIDTYPE
public static final int PREF_GRIDTYPE
The preferred grid type.- See Also:
- Constant Field Values
-
PREF_COLOR
public static final int PREF_COLOR
The preferred Object color.- See Also:
- Constant Field Values
-
PREF_PSFAMILY
public static final int PREF_PSFAMILY
The preferred Postscript font family.- See Also:
- Constant Field Values
-
PREF_TEXTCOLOR
public static final int PREF_TEXTCOLOR
The preferred Text color.- See Also:
- Constant Field Values
-
PREF_LATEXPATH
public static final int PREF_LATEXPATH
The preferred latex path.- See Also:
- Constant Field Values
-
PREF_DVIPSPATH
public static final int PREF_DVIPSPATH
The preferred dvips path.- See Also:
- Constant Field Values
-
PREF_SCREENSIZEX
public static final int PREF_SCREENSIZEX
The preferred screen size - x dimension.- See Also:
- Constant Field Values
-
PREF_SCREENSIZEY
public static final int PREF_SCREENSIZEY
The preferred screen size - y dimension.- See Also:
- Constant Field Values
-
PREF_GRIDSIZE
public static final int PREF_GRIDSIZE
The preferred grid size.- See Also:
- Constant Field Values
-
PREF_AMPLITUDE
public static final int PREF_AMPLITUDE
The preferred amplitude for photon and gluon objects.- See Also:
- Constant Field Values
-
PREF_PSSTYLE
public static final int PREF_PSSTYLE
The preferred Postscript font style.- See Also:
- Constant Field Values
-
PREF_PSSIZE
public static final int PREF_PSSIZE
The preferred Postscript font size.- See Also:
- Constant Field Values
-
PREF_TEXSIZE
public static final int PREF_TEXSIZE
The preferred TeX font size.- See Also:
- Constant Field Values
-
PREF_TEXALIGN
public static final int PREF_TEXALIGN
The preferred TeX alignment.- See Also:
- Constant Field Values
-
PREF_PSROTANGLE
public static final int PREF_PSROTANGLE
The preferred postscript text rotation angle.- See Also:
- Constant Field Values
-
PREF_ZOOMFACTOR
public static final int PREF_ZOOMFACTOR
The preferred magnification factor for the zoom.- See Also:
- Constant Field Values
-
PREF_ZOOMSIZEX
public static final int PREF_ZOOMSIZEX
The preferred x-size of the zoom window.- See Also:
- Constant Field Values
-
PREF_ZOOMSIZEY
public static final int PREF_ZOOMSIZEY
The preferred y-size of the zoom window.- See Also:
- Constant Field Values
-
PREF_TEXROTANGLE
public static final int PREF_TEXROTANGLE
The preferred LaTeX text rotation angle.- See Also:
- Constant Field Values
-
PREF_DEFAULTACTION
public static final int PREF_DEFAULTACTION
The default action.- See Also:
- Constant Field Values
-
PREF_LINEWIDTH
public static final int PREF_LINEWIDTH
The preferred line width.- See Also:
- Constant Field Values
-
PREF_DLSEP
public static final int PREF_DLSEP
The preferred separation of double line objects.- See Also:
- Constant Field Values
-
PREF_SHOWTOOL
public static final int PREF_SHOWTOOL
A boolean preference indicating wether to show the tool bar or not.- See Also:
- Constant Field Values
-
PREF_SHOWSTATUS
public static final int PREF_SHOWSTATUS
A boolean preference indicating wether to show the status bar or not.- See Also:
- Constant Field Values
-
PREF_ANTIALIAS
public static final int PREF_ANTIALIAS
A boolean preference indicating wether to use antialias or not.- See Also:
- Constant Field Values
-
PREF_ARROW
public static final int PREF_ARROW
A boolean preference indicating wether to draw arrows or not.- See Also:
- Constant Field Values
-
PREF_GRIDONOFF
public static final int PREF_GRIDONOFF
A boolean preference indicating wether the grid is on or off.- See Also:
- Constant Field Values
-
PREF_SHOWEDITOR
public static final int PREF_SHOWEDITOR
A boolean preference indicating wether to show the editor bar or not.- See Also:
- Constant Field Values
-
PREF_SHOWBROWSER
public static final int PREF_SHOWBROWSER
A boolean preference indicating wether to show the editor bar or not.- See Also:
- Constant Field Values
-
-
Method Detail
-
getNofPrefs
public static int getNofPrefs()
Returns the number of preferences defined by JaxoPrefs.- Returns:
- The number of preferences defined by JaxoPrefs.
-
verbose
public static boolean verbose()
Returns the verbose error (exception) messaging.- Returns:
- True, if verbose error (exception) messaging is on, false otherwise.
-
setVerbose
public static void setVerbose(boolean verb)
Sets the verbose error messaging.- Parameters:
verb- True, if verbose error messaging is to be switched on, false otherwise.
-
getRecentFile
public static java.lang.String getRecentFile(int i)
Returns the absolute path of a recently opened file.- Parameters:
i- The index of the file, 0<= i <=3- Returns:
- The absolute path of the file.
-
setRecentFile
public static void setRecentFile(int i, java.lang.String str)Sets a recently visited file.- Parameters:
i- The index of the file to be set, 0<= i <= 3str- The absolute path of the file to be set.
-
getPref
public static java.lang.String getPref(int i)
Returns the i'th preference as a string.- Parameters:
i- The index of the preference.- Returns:
- The i'th preference.
-
getStringPref
public static java.lang.String getStringPref(int i)
Returns the i'th preference as a string.- Parameters:
i- The index of the preference.- Returns:
- The i'th preference.
-
getIntPref
public static int getIntPref(int i)
Returns the i'th preference as an integer, or -1 if the i'th preference does not correspond to an integer.- Parameters:
i- The index of the preference.- Returns:
- The i'th preference.
-
getFloatPref
public static float getFloatPref(int i)
Returns the i'th preference as a float, or 0.f if the i'th preference does not correspond to a float.- Parameters:
i- The index of the preference.- Returns:
- The i'th preference.
-
getBooleanPref
public static boolean getBooleanPref(int i)
Returns the i'th preference as a boolean, or true, if the i'th preference does not correspond to a boolean.- Parameters:
i- The index of the preference.- Returns:
- The i'th preference.
-
setPref
public static void setPref(int i, java.lang.String str)Sets the i'th preference to the string str.- Parameters:
i- The index of the preference to be set.str- the String representation of the preference to be set.
-
setIntPref
public static void setIntPref(int i, int newPref)Sets the i'th preference to the int value newPref.- Parameters:
i- The index of the preference to be set.newPref- The preference to be set.
-
setFloatPref
public static void setFloatPref(int i, float newPref)Sets the i'th preference to the float value of newPref.- Parameters:
i- The index of the preference to be set.newPref- The preference to be set.
-
setBooleanPref
public static void setBooleanPref(int i, boolean newPref)Sets the i'th preference to the boolean value of newPref.- Parameters:
i- The index of the preference to be set.newPref- The preference to be set.
-
importPrefs
public static void importPrefs(java.lang.String fileName)
Imports user preferences from the specified file fileName.- Parameters:
fileName- The preferences file.
-
exportPrefs
public static void exportPrefs(java.lang.String fileName)
Exports user preferences to the specified file fileName.- Parameters:
fileName- The preferences file.
-
saveRecentFiles
public static void saveRecentFiles()
Saves the four last visited files into the preferences file .Jaxorc.
-
readRecentFiles
public static void readRecentFiles()
Imports the recently visited files from the .Jaxorc preferences file.
-
setSize
public static void setSize(int sizeX, int sizeY)
-
-
DMelt 3.0 © DataMelt by jWork.ORG