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
formatting
[jalview.git]
/
src
/
jalview
/
gui
/
OptsAndParamsPage.java
diff --git
a/src/jalview/gui/OptsAndParamsPage.java
b/src/jalview/gui/OptsAndParamsPage.java
index
0f6126c
..
a45fe1b
100644
(file)
--- a/
src/jalview/gui/OptsAndParamsPage.java
+++ b/
src/jalview/gui/OptsAndParamsPage.java
@@
-169,7
+169,8
@@
public class OptsAndParamsPage
}
else
{
}
else
{
- notmod &= (initVal!=null) ? initVal.equals(val.getSelectedItem()) : val.getSelectedItem()!=initVal;
+ notmod &= (initVal != null) ? initVal.equals(val.getSelectedItem())
+ : val.getSelectedItem() != initVal;
}
poparent.argSetModified(this, !notmod);
}
}
poparent.argSetModified(this, !notmod);
}
@@
-181,16
+182,20
@@
public class OptsAndParamsPage
return null;
}
OptionI opt = option.copy();
return null;
}
OptionI opt = option.copy();
- if (opt.getPossibleValues()!=null && opt.getPossibleValues().size()==1)
+ if (opt.getPossibleValues() != null
+ && opt.getPossibleValues().size() == 1)
{
{
- // Hack to make sure the default value for an enabled option with only one value is actually returned
+ // Hack to make sure the default value for an enabled option with only
+ // one value is actually returned
opt.setValue(opt.getPossibleValues().get(0));
}
if (val.getSelectedItem() != null)
{
opt.setValue((String) val.getSelectedItem());
opt.setValue(opt.getPossibleValues().get(0));
}
if (val.getSelectedItem() != null)
{
opt.setValue((String) val.getSelectedItem());
- } else {
- if (option.getValue()!=null)
+ }
+ else
+ {
+ if (option.getValue() != null)
{
opt.setValue(option.getValue());
}
{
opt.setValue(option.getValue());
}
@@
-250,7
+255,7
@@
public class OptsAndParamsPage
}
else
{
}
else
{
- initVal = (initEnabled) ? (String)val.getSelectedItem() : null;
+ initVal = (initEnabled) ? (String) val.getSelectedItem() : null;
}
}
}
}
@@
-310,7
+315,7
@@
public class OptsAndParamsPage
choice = true;
}
}
choice = true;
}
}
-
+
if (!compact)
{
makeExpanderParam(parm);
if (!compact)
{
makeExpanderParam(parm);
@@
-324,9
+329,9
@@
public class OptsAndParamsPage
private void makeCompactParam(ParameterI parm)
{
private void makeCompactParam(ParameterI parm)
{
- setLayout(new MigLayout("","[][grow]"));
+ setLayout(new MigLayout("", "[][grow]"));
- String ttipText=null;
+ String ttipText = null;
controlPanel.setLayout(new BorderLayout());
controlPanel.setLayout(new BorderLayout());
@@
-335,14
+340,16
@@
public class OptsAndParamsPage
{
// Only create description boxes if there actually is a description.
ttipText = ("<html>"
{
// Only create description boxes if there actually is a description.
ttipText = ("<html>"
- + JvSwingUtils
- .wrapTooltip(parm.getDescription()+(finfo!=null ?"<br><img src=\""
- + linkImageURL
- + "\"/> Right click for further information.":""))
- + "</html>");
+ + JvSwingUtils
+ .wrapTooltip(parm.getDescription()
+ + (finfo != null ? "<br><img src=\""
+ + linkImageURL
+ + "\"/> Right click for further information."
+ : "")) + "</html>");
}
}
-
- JvSwingUtils.mgAddtoLayout(this, ttipText, new JLabel(parm.getName()),controlPanel, "");
+
+ JvSwingUtils.mgAddtoLayout(this, ttipText,
+ new JLabel(parm.getName()), controlPanel, "");
updateControls(parm);
validate();
}
updateControls(parm);
validate();
}
@@
-575,21
+582,21
@@
public class OptsAndParamsPage
valueField.addActionListener(this);
valueField.addKeyListener(new KeyListener()
{
valueField.addActionListener(this);
valueField.addKeyListener(new KeyListener()
{
-
+
@Override
public void keyTyped(KeyEvent e)
{
}
@Override
public void keyTyped(KeyEvent e)
{
}
-
+
@Override
public void keyReleased(KeyEvent e)
{
@Override
public void keyReleased(KeyEvent e)
{
- if (valueField.getText().trim().length()>0)
- {
+ if (valueField.getText().trim().length() > 0)
+ {
actionPerformed(null);
actionPerformed(null);
- }
+ }
}
}
-
+
@Override
public void keyPressed(KeyEvent e)
{
@Override
public void keyPressed(KeyEvent e)
{
@@
-661,7
+668,7
@@
public class OptsAndParamsPage
}
;
// update value field to reflect any bound checking we performed.
}
;
// update value field to reflect any bound checking we performed.
- valueField.setText(""+iVal);
+ valueField.setText("" + iVal);
if (validator.getMin() != null && validator.getMax() != null)
{
slider.getModel().setRangeProperties(iVal, 1,
if (validator.getMin() != null && validator.getMax() != null)
{
slider.getModel().setRangeProperties(iVal, 1,
@@
-689,7
+696,7
@@
public class OptsAndParamsPage
// TODO: provide visual indication that hard limit was reached for
// this parameter
// update value field to reflect any bound checking we performed.
// TODO: provide visual indication that hard limit was reached for
// this parameter
// update value field to reflect any bound checking we performed.
- valueField.setText(""+fVal);
+ valueField.setText("" + fVal);
}
if (validator.getMax() != null
&& validator.getMax().floatValue() < fVal)
}
if (validator.getMax() != null
&& validator.getMax().floatValue() < fVal)
@@
-698,7
+705,7
@@
public class OptsAndParamsPage
// TODO: provide visual indication that hard limit was reached for
// this parameter
// update value field to reflect any bound checking we performed.
// TODO: provide visual indication that hard limit was reached for
// this parameter
// update value field to reflect any bound checking we performed.
- valueField.setText(""+fVal);
+ valueField.setText("" + fVal);
}
} catch (Exception e)
{
}
} catch (Exception e)
{
@@
-744,12
+751,14
@@
public class OptsAndParamsPage
public OptsAndParamsPage(OptsParametersContainerI paramContainer)
{
public OptsAndParamsPage(OptsParametersContainerI paramContainer)
{
- this(paramContainer,false);
+ this(paramContainer, false);
}
}
- public OptsAndParamsPage(OptsParametersContainerI paramContainer, boolean compact)
+
+ public OptsAndParamsPage(OptsParametersContainerI paramContainer,
+ boolean compact)
{
poparent = paramContainer;
{
poparent = paramContainer;
- this.compact=compact;
+ this.compact = compact;
}
public static void showUrlPopUp(JComponent invoker, final String finfo,
}
public static void showUrlPopUp(JComponent invoker, final String finfo,