|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectikayaki.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 Runnable |
autosaveRunnable
Operation that will save the properties/sequences. |
private static StyledWrapper |
defaultWrapper
|
private static int |
DIRECTORY_HISTORY_SIZE
|
private static List<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 List<File> |
projectHistory
List for holding the recently used project files. |
private static Properties |
properties
All properties in a map. |
private static 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 List<MeasurementSequence> |
sequences
All saved sequences |
private static File |
sequencesFile
File where the sequences will be saved in XML format |
private static boolean |
sequencesModified
true if the sequences have been modified, otherwise false |
Constructor Summary | |
---|---|
Settings()
|
Method Summary | |
---|---|
static void |
addSequence(MeasurementSequence sequence)
Adds a sequence to the sequence list. |
static void |
firePropertiesModified()
Invokes autosaving for the properities. |
static void |
fireSequencesModified()
Invokes autosaving for the sequences. |
static File[] |
getCalibrationProjectFiles()
|
static List<SequenceColumn> |
getDefaultColumns()
|
static StyledWrapper |
getDefaultWrapperInstance()
Returns a copy of the default StyledWrapper. |
static int |
getDegausserDelay()
|
static double |
getDegausserMaximumField()
|
static double |
getDegausserMinimumField()
|
static double |
getDegausserMinimumFieldIncrement()
|
static String |
getDegausserPort()
|
static int |
getDegausserRamp()
|
static File[] |
getDirectoryHistory()
|
static StyledWrapper |
getDoneRecentlyWrapperInstance()
Returns a copy of the StyledWrapper for recently measured projects. |
static int |
getHandlerAcceleration()
|
static int |
getHandlerAxialAFPosition()
|
static int |
getHandlerBackgroundPosition()
|
static int |
getHandlerDeceleration()
|
static int |
getHandlerMeasurementPosition()
|
static int |
getHandlerMeasurementVelocity()
|
static String |
getHandlerPort()
|
static int |
getHandlerRightLimit()
|
static int |
getHandlerRotation()
|
static int |
getHandlerRotationAcceleration()
|
static int |
getHandlerRotationDeceleration()
|
static int |
getHandlerRotationVelocity()
|
static int |
getHandlerSampleLoadPosition()
|
static int |
getHandlerTransverseYAFPosition()
|
static int |
getHandlerVelocity()
|
static MeasurementResult |
getHolderCalibration()
|
static File |
getHolderCalibrationFile()
|
static File |
getLastDirectory()
|
static String |
getMagnetometerPort()
|
static double |
getMagnetometerXAxisCalibration()
|
static double |
getMagnetometerYAxisCalibration()
|
static double |
getMagnetometerZAxisCalibration()
|
static int |
getMeasurementRotations()
How many times the handler should rotate itself when taking the measurements. |
static StyledWrapper |
getMeasuringWrapperInstance()
Returns a copy of the StyledWrapper for measuring projects. |
static File[] |
getProjectHistory()
|
private static String |
getProperty(String key)
Returns the value that maps to the specified key. |
private static String |
getProperty(String key,
String defaultValue)
Returns the value that maps to the specified key. |
static MeasurementSequence[] |
getSequences()
Returns all saved sequences in sorted order. |
static int |
getWindowHeight()
|
static boolean |
getWindowMaximized()
|
static int |
getWindowWidth()
|
static Object |
getXXX()
Generic accessor for all properties. |
private static void |
loadDirectoryHistory()
|
private static void |
loadProjectHistory()
|
static void |
removeSequence(MeasurementSequence sequence)
Removes a sequence from the sequence list. |
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 void |
setDefaultColumn(SequenceColumn column,
boolean enabled)
|
static boolean |
setDegausserDelay(int value)
|
static boolean |
setDegausserMaximumField(double value)
|
static boolean |
setDegausserPort(String value)
|
static boolean |
setDegausserRamp(int value)
|
static boolean |
setHandlerAcceleration(int value)
|
static boolean |
setHandlerAxialAFPosition(int value)
|
static boolean |
setHandlerBackgroundPosition(int value)
|
static boolean |
setHandlerDeceleration(int value)
|
static boolean |
setHandlerMeasurementPosition(int value)
|
static boolean |
setHandlerMeasurementVelocity(int value)
|
static boolean |
setHandlerPort(String value)
|
static boolean |
setHandlerRightLimit(int value)
|
static boolean |
setHandlerRotation(int value)
|
static boolean |
setHandlerRotationAcceleration(int value)
|
static boolean |
setHandlerRotationDeceleration(int value)
|
static boolean |
setHandlerRotationVelocity(int value)
|
static boolean |
setHandlerSampleLoadPosition(int value)
|
static boolean |
setHandlerTransverseYAFPosition(int value)
|
static boolean |
setHandlerVelocity(int value)
|
static void |
setHolderCalibrationFile(File file)
|
static boolean |
setMagnetometerPort(String value)
|
static boolean |
setMagnetometerXAxisCalibration(double value)
|
static boolean |
setMagnetometerYAxisCalibration(double value)
|
static boolean |
setMagnetometerZAxisCalibration(double value)
|
static boolean |
setMeasurementRotations(int value)
|
private static void |
setProperty(String key,
String value)
Associates the specified value with the specified key. |
static boolean |
setWindowHeight(int value)
|
static boolean |
setWindowMaximized(boolean value)
|
static boolean |
setWindowWidth(int value)
|
static boolean |
setXXX(Object value)
Generic accessor for all properties. |
static boolean |
updateDirectoryHistory(File visited)
|
static boolean |
updateProjectHistory(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 Properties properties
private static File propertiesFile
private static boolean propertiesModified
private static List<MeasurementSequence> sequences
private static File sequencesFile
private static boolean sequencesModified
private static List<File> directoryHistory
private static List<File> projectHistory
private static LastExecutor autosaveQueue
private static 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 String getProperty(String key)
key
- key whose associated value is to be returned.
private static String getProperty(String key, String defaultValue)
key
- key whose associated value is to be returned.defaultValue
- a default value
private static void setProperty(String key, 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.
NullPointerException
- if key is null.public static Object getXXX()
public static boolean setXXX(Object value)
public static String getMagnetometerPort()
public static boolean setMagnetometerPort(String value)
public static String getHandlerPort()
public static boolean setHandlerPort(String value)
public static String getDegausserPort()
public static boolean setDegausserPort(String value)
public static double getMagnetometerXAxisCalibration()
public static boolean setMagnetometerXAxisCalibration(double value)
public static double getMagnetometerYAxisCalibration()
public static boolean setMagnetometerYAxisCalibration(double value)
public static double getMagnetometerZAxisCalibration()
public static boolean setMagnetometerZAxisCalibration(double value)
public static int getDegausserRamp()
public static boolean setDegausserRamp(int value)
public static int getDegausserDelay()
public static boolean setDegausserDelay(int value)
public static boolean setDegausserMaximumField(double value)
public static double getDegausserMaximumField()
public static double getDegausserMinimumField()
public static double getDegausserMinimumFieldIncrement()
public static int getHandlerAcceleration()
public static boolean setHandlerAcceleration(int value)
public static int getHandlerDeceleration()
public static boolean setHandlerDeceleration(int value)
public static int getHandlerVelocity()
public static boolean setHandlerVelocity(int value)
public static int getHandlerMeasurementVelocity()
public static boolean setHandlerMeasurementVelocity(int value)
public static int getHandlerRotationVelocity()
public static boolean setHandlerRotationVelocity(int value)
public static int getHandlerRotationAcceleration()
public static boolean setHandlerRotationAcceleration(int value)
public static int getHandlerRotationDeceleration()
public static boolean setHandlerRotationDeceleration(int value)
public static int getHandlerTransverseYAFPosition()
public static boolean setHandlerTransverseYAFPosition(int value)
public static int getHandlerAxialAFPosition()
public static boolean setHandlerAxialAFPosition(int value)
public static int getHandlerSampleLoadPosition()
public static boolean setHandlerSampleLoadPosition(int value)
public static int getHandlerBackgroundPosition()
public static boolean setHandlerBackgroundPosition(int value)
public static int getHandlerMeasurementPosition()
public static boolean setHandlerMeasurementPosition(int value)
public static int getHandlerRightLimit()
public static boolean setHandlerRightLimit(int value)
public static int getHandlerRotation()
public static boolean setHandlerRotation(int value)
public static int getMeasurementRotations()
public static boolean setMeasurementRotations(int value)
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 File getLastDirectory()
public static File[] getDirectoryHistory()
public static boolean updateDirectoryHistory(File visited)
private static void loadDirectoryHistory()
public static File[] getProjectHistory()
public static boolean updateProjectHistory(File visited)
private static void loadProjectHistory()
public static MeasurementSequence[] getSequences()
public static void addSequence(MeasurementSequence sequence)
public static void removeSequence(MeasurementSequence sequence)
public static List<SequenceColumn> getDefaultColumns()
public static void setDefaultColumn(SequenceColumn column, boolean enabled)
public static File[] getCalibrationProjectFiles()
public static File getHolderCalibrationFile()
public static void setHolderCalibrationFile(File file)
public static MeasurementResult getHolderCalibration()
public static StyledWrapper getDefaultWrapperInstance()
public static StyledWrapper getMeasuringWrapperInstance()
public static StyledWrapper getDoneRecentlyWrapperInstance()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |