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
Merge commit 'alpha/update_2_12_for_2_11_2_series_merge^2' into HEAD
[jalview.git]
/
src
/
jalview
/
gui
/
OptsAndParamsPage.java
diff --git
a/src/jalview/gui/OptsAndParamsPage.java
b/src/jalview/gui/OptsAndParamsPage.java
index
046eb81
..
400c858
100644
(file)
--- a/
src/jalview/gui/OptsAndParamsPage.java
+++ b/
src/jalview/gui/OptsAndParamsPage.java
@@
-133,6
+133,7
@@
public class OptsAndParamsPage
*
* @param opt
*/
*
* @param opt
*/
+
public OptionBox(OptionI opt)
{
option = opt;
public OptionBox(OptionI opt)
{
option = opt;
@@
-190,6
+191,7
@@
public class OptsAndParamsPage
if (finfo != null)
{
hasLink = true;
if (finfo != null)
{
hasLink = true;
+
String description = desc;
if (desc == null || desc.trim().isEmpty())
{
String description = desc;
if (desc == null || desc.trim().isEmpty())
{
@@
-275,11
+277,13
@@
public class OptsAndParamsPage
@Override
public void mouseEntered(MouseEvent e)
{
@Override
public void mouseEntered(MouseEvent e)
{
+
}
@Override
public void mouseExited(MouseEvent e)
{
}
@Override
public void mouseExited(MouseEvent e)
{
+
}
@Override
}
@Override
@@
-329,7
+333,6
@@
public class OptsAndParamsPage
{
return option == null ? super.toString() : option.toString();
}
{
return option == null ? super.toString() : option.toString();
}
-
}
/**
}
/**
@@
-397,9
+400,7
@@
public class OptsAndParamsPage
finfo = parm.getFurtherDetails();
validator = parm.getValidValue();
parameter = parm;
finfo = parm.getFurtherDetails();
validator = parm.getValidValue();
parameter = parm;
-
isLogarithmicParameter = parm instanceof LogarithmicParameter;
isLogarithmicParameter = parm instanceof LogarithmicParameter;
-
if (validator != null)
{
ValueType type = validator.getType();
if (validator != null)
{
ValueType type = validator.getType();
@@
-438,6
+439,7
@@
public class OptsAndParamsPage
else
{
addExpandableParam(parm);
else
{
addExpandableParam(parm);
+
}
}
}
}
@@
-449,6
+451,7
@@
public class OptsAndParamsPage
private void addCompactParameter(ParameterI parm)
{
setLayout(new MigLayout("", "[][grow]"));
private void addCompactParameter(ParameterI parm)
{
setLayout(new MigLayout("", "[][grow]"));
+
String ttipText = null;
controlsPanel.setLayout(new BorderLayout());
String ttipText = null;
controlsPanel.setLayout(new BorderLayout());
@@
-498,6
+501,7
@@
public class OptsAndParamsPage
firstrow.setBounds(new Rectangle(10, 20, PARAM_WIDTH - 30,
PARAM_CLOSEDHEIGHT - 30));
firstrow.setBounds(new Rectangle(10, 20, PARAM_WIDTH - 30,
PARAM_CLOSEDHEIGHT - 30));
+
if (parm.getDescription() != null
&& parm.getDescription().trim().length() > 0)
{
if (parm.getDescription() != null
&& parm.getDescription().trim().length() > 0)
{
@@
-574,7
+578,6
@@
public class OptsAndParamsPage
showDescBtn.setBounds(new Rectangle(10, 10, 16, 16));
container.add(showDescBtn);
}
showDescBtn.setBounds(new Rectangle(10, 10, 16, 16));
container.add(showDescBtn);
}
-
@Override
public void actionPerformed(ActionEvent e)
{
@Override
public void actionPerformed(ActionEvent e)
{
@@
-638,7
+641,6
@@
public class OptsAndParamsPage
value = valueField.getText();
}
prm.setValue(value);
value = valueField.getText();
}
prm.setValue(value);
-
return prm;
}
return prm;
}
@@
-660,11
+662,13
@@
public class OptsAndParamsPage
@Override
public void mouseEntered(MouseEvent e)
{
@Override
public void mouseEntered(MouseEvent e)
{
+
}
@Override
public void mouseExited(MouseEvent e)
{
}
@Override
public void mouseExited(MouseEvent e)
{
+
}
@Override
}
@Override
@@
-679,6
+683,7
@@
public class OptsAndParamsPage
@Override
public void mouseReleased(MouseEvent e)
{
@Override
public void mouseReleased(MouseEvent e)
{
+
}
@Override
}
@Override
@@
-765,6
+770,8
@@
public class OptsAndParamsPage
valueField.addActionListener(this);
valueField.addKeyListener(new KeyAdapter()
{
valueField.addActionListener(this);
valueField.addKeyListener(new KeyAdapter()
{
+
+
@Override
public void keyReleased(KeyEvent e)
{
@Override
public void keyReleased(KeyEvent e)
{
@@
-778,6
+785,16
@@
public class OptsAndParamsPage
}
}
}
}
}
}
+
+ });
+ valueField.addFocusListener(new FocusAdapter() {
+
+ @Override
+ public void focusLost(FocusEvent e)
+ {
+ actionPerformed(null);
+ }
+
});
valueField.setPreferredSize(new Dimension(65, 25));
if (parm instanceof FileParameter)
});
valueField.setPreferredSize(new Dimension(65, 25));
if (parm instanceof FileParameter)
@@
-933,7
+950,6
@@
public class OptsAndParamsPage
valueField.setBackground(Color.yellow);
return Float.NaN;
}
valueField.setBackground(Color.yellow);
return Float.NaN;
}
-
if (isIntegerParameter)
{
int iVal = 0;
if (isIntegerParameter)
{
int iVal = 0;
@@
-1023,6
+1039,7
@@
public class OptsAndParamsPage
*
* @param paramContainer
*/
*
* @param paramContainer
*/
+
public OptsAndParamsPage(OptsParametersContainerI paramContainer,
boolean compact)
{
public OptsAndParamsPage(OptsParametersContainerI paramContainer,
boolean compact)
{
@@
-1052,6
+1069,7
@@
public class OptsAndParamsPage
mnu.show(invoker, x, y);
}
mnu.show(invoker, x, y);
}
+
public Map<String, OptionBox> getOptSet()
{
return optSet;
public Map<String, OptionBox> getOptSet()
{
return optSet;
@@
-1072,6
+1090,7
@@
public class OptsAndParamsPage
this.paramSet = paramSet;
}
this.paramSet = paramSet;
}
+
OptionBox addOption(OptionI opt)
{
OptionBox cb = optSet.get(opt.getName());
OptionBox addOption(OptionI opt)
{
OptionBox cb = optSet.get(opt.getName());
@@
-1115,9
+1134,11
@@
public class OptsAndParamsPage
}
else
{
}
else
{
- throw new Error(String.format("Invalid value '%s' for option '%s'",
- string, option.getName()));
+ throw new Error(MessageManager.formatMessage(
+ "error.invalid_value_for_option", new String[]
+ { string, option.getName() }));
}
}
+
}
if (option.isRequired() && !cb.enabled.isSelected())
{
}
if (option.isRequired() && !cb.enabled.isSelected())
{