Commit e90d82f5 authored by Aliaksandr Halavatyi's avatar Aliaksandr Halavatyi
Browse files

Parameters saving in prefs and visualisation in GUI

parent d99d11ff
......@@ -8,7 +8,7 @@
<version>5.0</version> <relativePath /> </parent> -->
<groupId>embl.almf</groupId>
<artifactId>AutoMicTools_</artifactId>
<version>1.1.30-SNAPSHOT</version>
<version>1.1.31-SNAPSHOT</version>
<name>plugins/AutoMicTools_.jar</name>
<description>Collection of tools for automated (feedback) microscopy data acquisition and analysis</description>
......
......@@ -46,7 +46,7 @@ public class ParameterGuiManager{
switch (currentParameter.getType()) {
case ParameterType.STRING_PARAMETER:
gd.addStringField(key, (String)currentParameter.getValue());
gd.addStringField(key, (String)currentParameter.getValue(),25);
break;
......@@ -55,19 +55,20 @@ public class ParameterGuiManager{
break;
case ParameterType.DOUBLE_PARAMETER:
gd.addNumericField(key, (double)currentParameter.getValue(), 3);
gd.addNumericField(key, (double)currentParameter.getValue(), 3,25,"");
break;
case ParameterType.INT_PARAMETER:
gd.addNumericField(key, (int)currentParameter.getValue(), 0);
gd.addNumericField(key, (int)currentParameter.getValue(), 0,25,"");
break;
case ParameterType.FILEPATH_PARAMETER:
gd.addFileField(key,(String)currentParameter.getValue());
gd.addFileField(key,(String)currentParameter.getValue(),25);
break;
case ParameterType.FOLDERPATH_PARAMETER:
gd.addDirectoryField(key,(String)currentParameter.getValue());
gd.addDirectoryField(key,(String)currentParameter.getValue(),25);
break;
......
......@@ -33,7 +33,8 @@ public abstract class ParameterPrefsManager{
break;
case ParameterType.INT_PARAMETER:
currentParameter.setValue(Prefs.get(prefsKey, (Integer)currentParameter.getValue()));
//need to cast here because Prefs.get returns double value
currentParameter.setValue((int)(Prefs.get(prefsKey, (Integer)currentParameter.getValue())));
break;
case ParameterType.FILEPATH_PARAMETER:
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment