}
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);
}
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());
- } else {
- if (option.getValue()!=null)
+ }
+ else
+ {
+ if (option.getValue() != null)
{
opt.setValue(option.getValue());
}
}
else
{
- initVal = (initEnabled) ? (String)val.getSelectedItem() : null;
+ initVal = (initEnabled) ? (String) val.getSelectedItem() : null;
}
}
choice = true;
}
}
-
+
if (!compact)
{
makeExpanderParam(parm);
private void makeCompactParam(ParameterI parm)
{
- setLayout(new MigLayout("","[][grow]"));
+ setLayout(new MigLayout("", "[][grow]"));
- String ttipText=null;
+ String ttipText = null;
controlPanel.setLayout(new BorderLayout());
{
// 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();
}
valueField.addActionListener(this);
valueField.addKeyListener(new KeyListener()
{
-
+
@Override
public void keyTyped(KeyEvent e)
{
}
-
+
@Override
public void keyReleased(KeyEvent e)
{
- if (valueField.getText().trim().length()>0)
- {
+ if (valueField.getText().trim().length() > 0)
+ {
actionPerformed(null);
- }
+ }
}
-
+
@Override
public void keyPressed(KeyEvent e)
{
}
;
// 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,
// 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)
// 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)
{
public OptsAndParamsPage(OptsParametersContainerI paramContainer)
{
- this(paramContainer,false);
+ this(paramContainer, false);
}
- public OptsAndParamsPage(OptsParametersContainerI paramContainer, boolean compact)
+
+ public OptsAndParamsPage(OptsParametersContainerI paramContainer,
+ boolean compact)
{
poparent = paramContainer;
- this.compact=compact;
+ this.compact = compact;
}
public static void showUrlPopUp(JComponent invoker, final String finfo,