git://source.jalview.org
/
jalview.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
JAL-3683 retrieve job status to output stream
[jalview.git]
/
src
/
jalview
/
gui
/
OptsAndParamsPage.java
diff --git
a/src/jalview/gui/OptsAndParamsPage.java
b/src/jalview/gui/OptsAndParamsPage.java
index
00c5a92
..
046eb81
100644
(file)
--- a/
src/jalview/gui/OptsAndParamsPage.java
+++ b/
src/jalview/gui/OptsAndParamsPage.java
@@
-126,7
+126,7
@@
public class OptsAndParamsPage
OptionI option;
OptionI option;
- JComboBox<String> val;
+ JComboBox<Object> val;
/**
* Constructs and adds labels and controls to the panel for one Option
/**
* Constructs and adds labels and controls to the panel for one Option
@@
-137,7
+137,7
@@
public class OptsAndParamsPage
{
option = opt;
setLayout(new FlowLayout(FlowLayout.LEFT));
{
option = opt;
setLayout(new FlowLayout(FlowLayout.LEFT));
- enabled = new JCheckBox(opt.getName());
+ enabled = new JCheckBox(opt.getLabel());
enabled.setSelected(opt.isRequired());
/*
enabled.setSelected(opt.isRequired());
/*
@@
-147,7
+147,7
@@
public class OptsAndParamsPage
if (opt.isRequired() && !(opt instanceof JabaOption))
{
finfo = null;
if (opt.isRequired() && !(opt instanceof JabaOption))
{
finfo = null;
- add(new JLabel(opt.getName()));
+ add(new JLabel(opt.getLabel()));
}
else
{
}
else
{
@@
-357,7
+357,7
@@
public class OptsAndParamsPage
/*
* drop-down list of choice options (if applicable)
*/
/*
* drop-down list of choice options (if applicable)
*/
- JComboBox<String> choicebox;
+ JComboBox<Object> choicebox;
/*
* radio buttons as an alternative to combo box
/*
* radio buttons as an alternative to combo box
@@
-903,6
+903,11
@@
public class OptsAndParamsPage
return valueField.getText().trim();
}
return valueField.getText().trim();
}
+ if (validator.getMin() == null || validator.getMax() == null)
+ {
+ slider.setVisible(false);
+ }
+
valueField.setText(valueField.getText().trim());
/*
valueField.setText(valueField.getText().trim());
/*
@@
-951,7
+956,7
@@
public class OptsAndParamsPage
{
slider.setVisible(false);
}
{
slider.setVisible(false);
}
- return new Integer(iVal);
+ return Integer.valueOf(iVal);
}
if (isLogarithmicParameter)
}
if (isLogarithmicParameter)
@@
-960,7
+965,7
@@
public class OptsAndParamsPage
try
{
double eValue = Double.valueOf(valueField.getText());
try
{
double eValue = Double.valueOf(valueField.getText());
- dVal = Math.log(eValue) * sliderScaleFactor;
+ dVal = Math.log(eValue);
} catch (Exception e)
{
// shouldn't be possible here
} catch (Exception e)
{
// shouldn't be possible here
@@
-973,14
+978,15
@@
public class OptsAndParamsPage
* sliderScaleFactor;
double scaleMax = Math.log(validator.getMax().doubleValue())
* sliderScaleFactor;
* sliderScaleFactor;
double scaleMax = Math.log(validator.getMax().doubleValue())
* sliderScaleFactor;
- slider.getModel().setRangeProperties((int) (dVal), 1,
+ slider.getModel().setRangeProperties(
+ (int) (sliderScaleFactor * dVal), 1,
(int) scaleMin, 1 + (int) scaleMax, true);
}
else
{
slider.setVisible(false);
}
(int) scaleMin, 1 + (int) scaleMax, true);
}
else
{
slider.setVisible(false);
}
- return new Double(dVal);
+ return Double.valueOf(dVal);
}
float fVal = 0f;
}
float fVal = 0f;
@@
-1005,7
+1011,7
@@
public class OptsAndParamsPage
{
slider.setVisible(false);
}
{
slider.setVisible(false);
}
- return new Float(fVal);
+ return Float.valueOf(fVal);
}
}
}
}
@@
-1172,13
+1178,15
@@
public class OptsAndParamsPage
* @param opt
* @return
*/
* @param opt
* @return
*/
- protected static JComboBox<String> buildComboBox(OptionI opt)
+ protected static JComboBox<Object> buildComboBox(OptionI opt)
{
{
- JComboBox<String> cb = null;
+ JComboBox<Object> cb = null;
List<String> displayNames = opt.getDisplayNames();
if (displayNames != null)
{
List<String> displayNames = opt.getDisplayNames();
if (displayNames != null)
{
- cb = JvSwingUtils.buildComboWithTooltips(displayNames,
+ List<Object> displayNamesObjects = new ArrayList<>();
+ displayNamesObjects.addAll(displayNames);
+ cb = JvSwingUtils.buildComboWithTooltips(displayNamesObjects,
opt.getPossibleValues());
}
else
opt.getPossibleValues());
}
else