|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object mavis.Settings
public class Settings
Singleton class for holding all global settings. All changes are automatically written to file after a short delay.
Field Summary | |
---|---|
private static LastExecutor |
autosaveQueue
Queue for scheduling save operations after properties/sequences have been changed |
private static java.lang.Runnable |
autosaveRunnable
Operation that will save the properties/sequences. |
private static StyledWrapper |
defaultWrapper
|
private static int |
DIRECTORY_HISTORY_SIZE
|
private static java.util.List<java.io.File> |
directoryHistory
List for holding the recently used directories. |
private static StyledWrapper |
doneRecentlyWrapper
|
private static StyledWrapper |
measuringWrapper
|
private static int |
PROJECT_HISTORY_SIZE
|
private static java.util.List<java.io.File> |
projectHistory
List for holding the recently used project files. |
private static java.util.Properties |
properties
All properties in a map. |
private static java.io.File |
propertiesFile
File where the properties will be saved in XML format |
private static boolean |
propertiesModified
true if the properties have been modified, otherwise false |
private static java.util.List<MeasurementSequence> |
sequences
All saved sequences |
private static boolean |
sequencesModified
true if the sequences have been modified, otherwise false |
private static java.util.List<java.io.File> |
tableDirectoryHistory
List for holding the recently used directories. |
private static StyledWrapper |
warningWrapper
|
Constructor Summary | |
---|---|
Settings()
|
Method Summary | |
---|---|
static void |
firePropertiesModified()
Invokes autosaving for the properities. |
static void |
fireSequencesModified()
Invokes autosaving for the sequences. |
static java.io.File[] |
getCalibrationProjectFiles()
|
static java.lang.String |
getCSVfileSeparator()
Formatting - CSV file field separator used in exported ASCII measurement data |
static java.util.List<SequenceColumn> |
getDefaultColumns()
|
static StyledWrapper |
getDefaultWrapperInstance()
Returns a copy of the default StyledWrapper. |
static java.io.File[] |
getDirectoryHistory()
|
static StyledWrapper |
getDoneRecentlyWrapperInstance()
Returns a copy of the StyledWrapper for recently measured projects. |
static boolean |
getGraphsCheckBox()
|
static MeasurementResult |
getHolderCalibration()
|
static java.io.File |
getHolderCalibrationFile()
|
static java.io.File |
getLastDirectory()
|
static java.io.File |
getLastTableDirectory()
|
static StyledWrapper |
getMeasuringWrapperInstance()
Returns a copy of the StyledWrapper for measuring projects. |
static java.lang.String |
getPrintoutNumberFormat()
Formatting - Number format for printouts |
static java.io.File[] |
getProjectHistory()
|
private static java.lang.String |
getProperty(java.lang.String key)
Returns the value that maps to the specified key. |
private static java.lang.String |
getProperty(java.lang.String key,
java.lang.String defaultValue)
Returns the value that maps to the specified key. |
static boolean |
getSampleDataCheckBox()
|
static MeasurementSequence[] |
getSequences()
Returns all saved sequences in sorted order. |
static java.io.File[] |
getTableDirectoryHistory()
|
static java.lang.String |
getTableNumberFormat()
Formatting - Number format for table |
static StyledWrapper |
getWarningWrapperInstance()
Returns a copy of the StyledWrapper for projects with warnings. |
static int |
getWindowHeight()
|
static boolean |
getWindowMaximized()
|
static int |
getWindowWidth()
|
static java.lang.Object |
getXXX()
Generic accessor for all properties. |
private static void |
loadDirectoryHistory()
|
private static void |
loadProjectHistory()
|
private static void |
loadTableDirectoryHistory()
|
static void |
save()
Saves the settings after a while when no changes have come. |
static boolean |
saveNow()
Saves the settings and keeps waiting until its done. |
static boolean |
setCSVfileSeparator(java.lang.String newSeparator)
|
static void |
setGraphsCheckBox(boolean tick)
|
static boolean |
setPrintoutNumberFormat(java.lang.String format)
|
private static void |
setProperty(java.lang.String key,
java.lang.String value)
Associates the specified value with the specified key. |
static void |
setSampleDataCheckBox(boolean tick)
|
static boolean |
setTableNumberFormat(java.lang.String format)
|
static boolean |
setWindowHeight(int value)
|
static boolean |
setWindowMaximized(boolean value)
|
static boolean |
setWindowWidth(int value)
|
static boolean |
setXXX(java.lang.Object value)
Generic accessor for all properties. |
static boolean |
updateDirectoryHistory(java.io.File visited)
|
static boolean |
updateProjectHistory(java.io.File visited)
|
static boolean |
updateTableDirectoryHistory(java.io.File visited)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private static final int DIRECTORY_HISTORY_SIZE
private static final int PROJECT_HISTORY_SIZE
private static final StyledWrapper defaultWrapper
private static final StyledWrapper measuringWrapper
private static final StyledWrapper doneRecentlyWrapper
private static final StyledWrapper warningWrapper
private static java.util.Properties properties
private static java.io.File propertiesFile
private static boolean propertiesModified
private static java.util.List<MeasurementSequence> sequences
private static boolean sequencesModified
private static java.util.List<java.io.File> directoryHistory
private static java.util.List<java.io.File> tableDirectoryHistory
private static java.util.List<java.io.File> projectHistory
private static LastExecutor autosaveQueue
private static java.lang.Runnable autosaveRunnable
Constructor Detail |
---|
public Settings()
Method Detail |
---|
public static void firePropertiesModified()
public static void fireSequencesModified()
public static void save()
public static boolean saveNow()
private static java.lang.String getProperty(java.lang.String key)
key
- key whose associated value is to be returned.
private static java.lang.String getProperty(java.lang.String key, java.lang.String defaultValue)
key
- key whose associated value is to be returned.defaultValue
- a default value
private static void setProperty(java.lang.String key, java.lang.String value)
key
- key with which the specified value is to be associated.value
- value to be associated with the specified key, or null to remove the value.
java.lang.NullPointerException
- if key is null.public static java.lang.Object getXXX()
public static boolean setXXX(java.lang.Object value)
public static java.lang.String getCSVfileSeparator()
public static boolean setCSVfileSeparator(java.lang.String newSeparator)
public static java.lang.String getPrintoutNumberFormat()
public static boolean setPrintoutNumberFormat(java.lang.String format)
public static java.lang.String getTableNumberFormat()
public static boolean setTableNumberFormat(java.lang.String format)
public static int getWindowWidth()
public static boolean setWindowWidth(int value)
public static int getWindowHeight()
public static boolean setWindowHeight(int value)
public static boolean getWindowMaximized()
public static boolean setWindowMaximized(boolean value)
public static java.io.File getLastDirectory()
public static java.io.File[] getDirectoryHistory()
public static java.io.File getLastTableDirectory()
public static java.io.File[] getTableDirectoryHistory()
public static boolean updateDirectoryHistory(java.io.File visited)
public static boolean updateTableDirectoryHistory(java.io.File visited)
private static void loadDirectoryHistory()
private static void loadTableDirectoryHistory()
public static java.io.File[] getProjectHistory()
public static boolean updateProjectHistory(java.io.File visited)
private static void loadProjectHistory()
public static void setSampleDataCheckBox(boolean tick)
public static void setGraphsCheckBox(boolean tick)
public static boolean getSampleDataCheckBox()
public static boolean getGraphsCheckBox()
public static MeasurementSequence[] getSequences()
public static java.util.List<SequenceColumn> getDefaultColumns()
public static java.io.File[] getCalibrationProjectFiles()
public static java.io.File getHolderCalibrationFile()
public static MeasurementResult getHolderCalibration()
public static StyledWrapper getDefaultWrapperInstance()
public static StyledWrapper getMeasuringWrapperInstance()
public static StyledWrapper getDoneRecentlyWrapperInstance()
public static StyledWrapper getWarningWrapperInstance()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |