|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectxdat.UserPreferences
public class UserPreferences
This class stores all user preference settings. When the user makes changes to settings such as default background color of charts or delimiting characters for data imports these settings are stored using the java Preferences API.
Field Summary | |
---|---|
static int |
IMPORT_FROM_HOMEDIR
Open file import browse dialog in the user's home directory by default. |
static int |
IMPORT_FROM_LASTDIR
Open file import browse dialog in the last opened directory by default. |
static int |
IMPORT_FROM_USERDIR
Open file import browse dialog in a userspecified directory by default. |
private java.lang.String |
lastFile
The last file that was selected. |
private java.util.prefs.Preferences |
prefs
Preferences Object to store settings. |
(package private) static boolean |
printLog
Flag to enable debug message printing for this class. |
(package private) static long |
serialVersionUID
The version tracking unique identifier for Serialization. |
private java.lang.String |
userDir
User-specified setting where the file browsing dialog should start by default. |
private java.lang.String |
versionString
Current Release Version to be able to store version-specific boolean value for the click-wrap license. |
Constructor Summary | |
---|---|
UserPreferences(java.lang.String versionString)
Instantiates a new user preferences object. |
Method Summary | |
---|---|
java.awt.Color |
getActiveDesignDefaultColor()
Gets the active design default color. |
java.awt.Color |
getAxisColor()
Gets the axis color |
double |
getAxisDefaultMax()
Gets the axis default maximum value. |
double |
getAxisDefaultMin()
Gets the axis default minimum value. |
int |
getAxisHeight()
Gets the axis height. |
java.awt.Color |
getAxisLabelFontColor()
Gets the axis label font color. |
int |
getAxisLabelFontSize()
Gets the axis label font size. |
int |
getAxisTicCount()
Gets the axis tick count. |
java.awt.Color |
getAxisTicLabelFontColor()
Gets the axis tick label font color. |
int |
getAxisTicLabelFontSize()
Gets the axis tick label font size. |
java.lang.String |
getAxisTicLabelFormat()
Gets the axis tick label format. |
int |
getAxisTicLength()
Gets the axis tick length. |
int |
getAxisWidth()
Gets the width in pixels that is used by one axis. |
java.lang.String |
getCurrentDir()
Gets the directory for the file browsing dialog. |
java.awt.Color |
getDefaultBackgroundColor()
Gets the default background color. |
java.lang.String |
getDelimiter()
Gets the delimiter for importing data. |
int |
getDesignIDFontSize()
Gets the design id font size. |
int |
getDesignLabelFontSize()
Gets the design label font size. |
int |
getDirToImportFrom()
Gets the dir to import from. |
java.awt.Color |
getFilterDefaultColor()
Gets the filter default color. |
java.awt.Color |
getFilteredDesignDefaultColor()
Gets the filtered design default color. |
int |
getFilterHeight()
Gets the filter height. |
int |
getFilterWidth()
Gets the width of one half triangle that represents a filter in pixels. |
java.lang.String |
getHomeDir()
Gets the user home directory. |
java.lang.String |
getLastFile()
Gets the last file. |
java.lang.String |
getOtherDelimiter()
Gets the character that is used as delimiter when importing data. |
java.lang.String |
getUserDir()
Gets the user directory. |
boolean |
isAutoFitAxis()
Checks if axes are autofitted. |
boolean |
isAxisInverted()
Checks whether axes are inverted. |
boolean |
isFilterInverted()
True, when filters are inverted. |
boolean |
isLastFileInitialised()
Checks if the last file field has been initialised. |
boolean |
isLicenseAccepted()
Returns true, when the user has accepted the license |
boolean |
isShowDesignIDs()
Checks if design id numbers are shown left to the left-most axis. |
boolean |
isShowFilteredDesigns()
Checks if filtered designs should be shown. |
boolean |
isTreatConsecutiveAsOne()
Checks . |
private void |
log(java.lang.String message)
Prints debug information to stdout when printLog is set to true. |
void |
resetToDefault()
Restores all default settings. |
void |
setActiveDesignDefaultColor(java.awt.Color activeDesignDefaultColor)
Sets the active design default color. |
void |
setAutoFitAxis(boolean autoFitAxis)
Specifies whether axes should be autofitted. |
void |
setAxisColor(java.awt.Color axisColor)
Sets the axis color. |
void |
setAxisDefaultMax(double axisDefaultMax)
Sets the axis default max. |
void |
setAxisDefaultMin(double axisDefaultMin)
Sets the axis default minimum value. |
void |
setAxisHeight(int axisHeight)
Sets the axis height. |
void |
setAxisInverted(boolean axisInverted)
Specifies whether axes are inverted. |
void |
setAxisLabelFontColor(java.awt.Color axisLabelFontColor)
Sets the axis label font color. |
void |
setAxisLabelFontSize(int axisLabelFontSize)
Sets the axis label font size. |
void |
setAxisTicCount(int axisTicCount)
Sets the axis tick count. |
void |
setAxisTicLabelFontColor(java.awt.Color axisTicLabelFontColor)
Sets the axis tick label font color. |
void |
setAxisTicLabelFontSize(int ticLabelFontSize)
Sets the axis tick label font size. |
void |
setAxisTicLabelFormat(java.lang.String axisTicLabelFormat)
Sets the axis tick label format. |
void |
setAxisTicLength(int axisTicLength)
Sets the axis tick length. |
void |
setAxisWidth(int axisWidth)
Sets the axis width. |
void |
setDefaultBackgroundColor(java.awt.Color backgroundColor)
Sets the default background color. |
void |
setDelimiter(java.lang.String delimiter)
Sets the delimiter for importing data. |
void |
setDesignIDFontSize(int designIDFontSize)
Sets the design id font size. |
void |
setDesignLabelFontSize(int designLabelFontSize)
Sets the design label font size. |
void |
setDirToImportFrom(int dirToImportFrom)
Sets the dir to import from. |
void |
setFilterColor(java.awt.Color filterColor)
Sets the filter color. |
void |
setFilterHeight(int filterHeight)
Sets the filter height. |
void |
setFilterInverted(boolean filterInverted)
Specifies whether filters inverted. |
void |
setFilterWidth(int filterWidth)
Sets the filter width. |
void |
setHomeDir(java.lang.String homeDir)
Sets the home directory. |
void |
setInActiveDesignDefaultColor(java.awt.Color inActiveDesignDefaultColor)
Sets the in active design default color. |
void |
setLastFile(java.lang.String lastFileBrowsingDirectory)
Sets the last file. |
void |
setLicenseAccepted(boolean licenseAccepted)
Specifies whether the user has accepted the license. |
void |
setOtherDelimiter(java.lang.String otherDelimiter)
Sets the user-defined delimiter. |
void |
setShowDesignIDs(boolean showDesignIDs)
Specifies whether design id numbers are shown left to the left-most axis. |
void |
setShowFilteredDesigns(boolean showFilteredDesigns)
Sets whether filtered designs should be shown. |
void |
setTreatConsecutiveAsOne(boolean treatConsecutiveAsOne)
Sets whether consecutive delimiters should be treated as one. |
void |
setUserDir(java.lang.String userDir)
Sets the user directory. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
static final long serialVersionUID
static final boolean printLog
private java.util.prefs.Preferences prefs
private java.lang.String versionString
public static final int IMPORT_FROM_HOMEDIR
public static final int IMPORT_FROM_LASTDIR
public static final int IMPORT_FROM_USERDIR
private java.lang.String lastFile
private java.lang.String userDir
Constructor Detail |
---|
public UserPreferences(java.lang.String versionString)
Method Detail |
---|
public boolean isLicenseAccepted()
public void setLicenseAccepted(boolean licenseAccepted)
licenseAccepted
- the flag that specifies whether the user has accepted the licensepublic java.awt.Color getAxisColor()
public void setAxisColor(java.awt.Color axisColor)
axisColor
- the new axis colorpublic int getAxisHeight()
public void setAxisHeight(int axisHeight)
axisHeight
- the new axis heightpublic java.awt.Color getAxisLabelFontColor()
public void setAxisLabelFontColor(java.awt.Color axisLabelFontColor)
axisLabelFontColor
- the new axis label font colorpublic int getAxisLabelFontSize()
public void setAxisLabelFontSize(int axisLabelFontSize)
axisLabelFontSize
- the new axis label font sizepublic int getAxisTicCount()
public void setAxisTicCount(int axisTicCount)
axisTicCount
- the new axis tick countpublic java.awt.Color getAxisTicLabelFontColor()
public void setAxisTicLabelFontColor(java.awt.Color axisTicLabelFontColor)
axisTicLabelFontColor
- the new axis tick label font colorpublic java.lang.String getAxisTicLabelFormat()
public void setAxisTicLabelFormat(java.lang.String axisTicLabelFormat)
axisTicLabelFormat
- the new axis tick label formatpublic int getAxisTicLength()
public void setAxisTicLength(int axisTicLength)
axisTicLength
- the new axis tick lengthpublic int getAxisWidth()
public void setAxisWidth(int axisWidth)
axisWidth
- the new axis widthpublic java.awt.Color getFilterDefaultColor()
public void setFilterColor(java.awt.Color filterColor)
filterColor
- the new filter colorpublic int getFilterHeight()
public void setFilterHeight(int filterHeight)
filterHeight
- the new filter heightpublic int getFilterWidth()
public void setFilterWidth(int filterWidth)
filterWidth
- the new filter widthpublic int getAxisTicLabelFontSize()
public void setAxisTicLabelFontSize(int ticLabelFontSize)
ticLabelFontSize
- the new axis tick label font sizepublic int getDesignLabelFontSize()
public void setDesignLabelFontSize(int designLabelFontSize)
designLabelFontSize
- the new design label font sizepublic int getDirToImportFrom()
public void setDirToImportFrom(int dirToImportFrom)
dirToImportFrom
- the new dir to import frompublic java.lang.String getLastFile()
public void setLastFile(java.lang.String lastFileBrowsingDirectory)
lastFileBrowsingDirectory
- the new last filepublic boolean isLastFileInitialised()
public java.lang.String getHomeDir()
public void setHomeDir(java.lang.String homeDir)
homeDir
- the new home directorypublic java.lang.String getUserDir()
public void setUserDir(java.lang.String userDir)
userDir
- the new user directorypublic java.lang.String getCurrentDir()
public java.lang.String getDelimiter()
public void setDelimiter(java.lang.String delimiter)
delimiter
- the new delimiterpublic boolean isTreatConsecutiveAsOne()
public void setTreatConsecutiveAsOne(boolean treatConsecutiveAsOne)
treatConsecutiveAsOne
- flag for treating consecutive delimiters as onepublic java.lang.String getOtherDelimiter()
public void setOtherDelimiter(java.lang.String otherDelimiter)
otherDelimiter
- the user-defined delimiterpublic boolean isShowFilteredDesigns()
public void setShowFilteredDesigns(boolean showFilteredDesigns)
showFilteredDesigns
- flag to set whether filtered designs should be shown.public java.awt.Color getActiveDesignDefaultColor()
public void setActiveDesignDefaultColor(java.awt.Color activeDesignDefaultColor)
activeDesignDefaultColor
- the new active design default colorpublic java.awt.Color getFilteredDesignDefaultColor()
public void setInActiveDesignDefaultColor(java.awt.Color inActiveDesignDefaultColor)
inActiveDesignDefaultColor
- the new in active design default colorpublic boolean isShowDesignIDs()
public void setShowDesignIDs(boolean showDesignIDs)
showDesignIDs
- specifies whether design id numbers are shown left to the left-most axis.public int getDesignIDFontSize()
public void setDesignIDFontSize(int designIDFontSize)
designIDFontSize
- the new design id font sizepublic java.awt.Color getDefaultBackgroundColor()
public void setDefaultBackgroundColor(java.awt.Color backgroundColor)
backgroundColor
- the new default background colorpublic boolean isFilterInverted()
public void setFilterInverted(boolean filterInverted)
filterInverted
- Specifies whether filters inverted.public boolean isAxisInverted()
public void setAxisInverted(boolean axisInverted)
axisInverted
- Specifies whether axes are inverted.public boolean isAutoFitAxis()
public void setAutoFitAxis(boolean autoFitAxis)
autoFitAxis
- Specifies whether axes should be autofitted.public double getAxisDefaultMin()
public void setAxisDefaultMin(double axisDefaultMin)
axisDefaultMin
- the new axis default minimum valuepublic double getAxisDefaultMax()
public void setAxisDefaultMax(double axisDefaultMax)
axisDefaultMax
- the new axis default maxpublic void resetToDefault()
private void log(java.lang.String message)
message
- the message
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |