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-2714 HMMSearch cutoff by E-Value, Score or None
[jalview.git]
/
src
/
jalview
/
gui
/
OptsAndParamsPage.java
diff --git
a/src/jalview/gui/OptsAndParamsPage.java
b/src/jalview/gui/OptsAndParamsPage.java
index
34af13d
..
39b8ed5
100644
(file)
--- a/
src/jalview/gui/OptsAndParamsPage.java
+++ b/
src/jalview/gui/OptsAndParamsPage.java
@@
-101,7
+101,7
@@
public class OptsAndParamsPage
public class OptionBox extends JPanel
implements MouseListener, ActionListener
{
public class OptionBox extends JPanel
implements MouseListener, ActionListener
{
- JCheckBox enabled = new JCheckBox();
+ JCheckBox enabled;
final URL finfo;
final URL finfo;
@@
-113,14
+113,13
@@
public class OptsAndParamsPage
OptionI option;
OptionI option;
- JLabel optlabel = new JLabel();
-
- JComboBox<String> val = new JComboBox<>();
+ JComboBox<String> val;
public OptionBox(OptionI opt)
{
option = opt;
setLayout(new FlowLayout(FlowLayout.LEFT));
public OptionBox(OptionI opt)
{
option = opt;
setLayout(new FlowLayout(FlowLayout.LEFT));
+ enabled = new JCheckBox();
enabled.setSelected(opt.isRequired()); // TODO: lock required options
enabled.setFont(new Font("Verdana", Font.PLAIN, 11));
enabled.setText("");
enabled.setSelected(opt.isRequired()); // TODO: lock required options
enabled.setFont(new Font("Verdana", Font.PLAIN, 11));
enabled.setText("");
@@
-149,6
+148,9
@@
public class OptsAndParamsPage
}
}
add(enabled);
}
}
add(enabled);
+
+ // todo combo or radio buttons?
+ val = new JComboBox<>();
for (String str : opt.getPossibleValues())
{
val.addItem(str);
for (String str : opt.getPossibleValues())
{
val.addItem(str);
@@
-366,7
+368,8
@@
public class OptsAndParamsPage
* ensure slider has an integer range corresponding to
* the min-max range of the parameter
*/
* ensure slider has an integer range corresponding to
* the min-max range of the parameter
*/
- if (validator.getMin() != null && !isIntegerParameter
+ if (validator.getMin() != null && validator.getMax() != null
+ // && !isIntegerParameter
&& !isStringParameter)
{
double min = validator.getMin().doubleValue();
&& !isStringParameter)
{
double min = validator.getMin().doubleValue();
@@
-380,10
+383,10
@@
public class OptsAndParamsPage
// todo scaleMin, scaleMax could also be final fields
}
}
// todo scaleMin, scaleMax could also be final fields
}
}
- else
- {
- isChoiceParameter = parameter.getPossibleValues() != null;
- }
+
+ List<String> possibleValues = parameter.getPossibleValues();
+ isChoiceParameter = possibleValues != null
+ && possibleValues.size() > 1;
if (compact)
{
if (compact)
{