// elements if it exists.
// ----------------------------------------------------
element = spec.getFirstChildNamed(DESCRIPTION);
addDescription(element, forPacks, forOs);
TwoColumnConstraints westconstraint1 = new TwoColumnConstraints();
westconstraint1.position = TwoColumnConstraints.WEST;
uiElements.add(new Object[]{null, FIELD_LABEL, null, westconstraint1, label, forPacks,
forOs});
TwoColumnConstraints eastconstraint1 = new TwoColumnConstraints();
eastconstraint1.position = TwoColumnConstraints.EAST;
StringBuffer tooltiptext = new StringBuffer();
if ((filename != null) && (filename.length() > 0))
{
tooltiptext.append(MessageFormat.format(parentFrame.langpack
.getString("UserInputPanel.search.location"), new Object[]{new String[]{filename}}));
}
boolean showAutodetect = (check_filename != null) && (check_filename.length() > 0);
if (showAutodetect)
{
tooltiptext.append(MessageFormat.format(parentFrame.langpack
.getString("UserInputPanel.search.location.checkedfile"), new Object[]{new String[]{check_filename}}));
}
if (tooltiptext.length() > 0)
{
combobox.setToolTipText(tooltiptext.toString());
}
uiElements.add(new Object[]{null, SEARCH_FIELD, variable, eastconstraint1, combobox,
forPacks, forOs});
JPanel buttonPanel = new JPanel();
buttonPanel.setLayout(new com.izforge.izpack.gui.FlowLayout(
com.izforge.izpack.gui.FlowLayout.LEADING));
JButton autodetectButton = ButtonFactory.createButton(parentFrame.langpack
.getString("UserInputPanel.search.autodetect"), idata.buttonsHColor);
autodetectButton.setVisible(showAutodetect);
autodetectButton.setToolTipText(parentFrame.langpack
.getString("UserInputPanel.search.autodetect.tooltip"));
buttonPanel.add(autodetectButton);
JButton browseButton = ButtonFactory.createButton(parentFrame.langpack
.getString("UserInputPanel.search.browse"), idata.buttonsHColor);
buttonPanel.add(browseButton);
TwoColumnConstraints eastonlyconstraint = new TwoColumnConstraints();
eastonlyconstraint.position = TwoColumnConstraints.EASTONLY;
uiElements.add(new Object[]{null, SEARCH_BUTTON_FIELD, null, eastonlyconstraint,
buttonPanel, forPacks, forOs});