}
if (pgroup == null)
{
pgroup = new JPanel();
pgroup.setLayout(new RiverLayout());
javax.swing.border.TitledBorder title = BorderFactory.createTitledBorder(BorderFactory.createEtchedBorder(javax.swing.border.EtchedBorder.LOWERED), "");
}
if (ed.needsFullSpace())
{
pgroup.add("left hfill vfill", ed);
String gc = "br hfill vfill";
m_mainpanel.add(gc, ed);
ed.setMaximumSize(new java.awt.Dimension(300,300));
m_mainpanel.add("tab", new JLabel("..."));
pgroup = null;
// m_scrollpane.setVerticalScrollBarPolicy(ScrollPaneConstants.VERTICAL_SCROLLBAR_NEVER);
//m_scrollpane.setHorizontalScrollBarPolicy(ScrollPaneConstants.HORIZONTAL_SCROLLBAR_NEVER);
}
else if (ed.needsBigSpace())
{
javax.swing.border.TitledBorder title = BorderFactory.createTitledBorder(BorderFactory.createEtchedBorder(javax.swing.border.EtchedBorder.LOWERED), getLocaleText(ed.getLabel()));
pgroup.setBorder(title);
pgroup.add("left vtop", new HelpButton(getLocaleText(ed.getDescription())));
pgroup.add("tab left hfill", ed);
String gc = "br hfill";
if (i+1>=els.length)
gc = "p hfill vfill";
m_mainpanel.add(gc, pgroup);
pgroup = null;
}
else
{
if (ed.useDescription())
{
pgroup.add("br left", new JLabel(getLocaleText(ed.getLabel())));
pgroup.add("tab", new HelpButton(getLocaleText(ed.getDescription())));
pgroup.add("tab hfill", ed);
}
else
{
pgroup.add("left hfill", ed);
}
}
m_displayedElements.add(ed);
}
else if (els[i] instanceof String)
{
// System.out.println("TITLE: " + els[i]);
if (pgroup != null)
{
m_mainpanel.add("br hfill", pgroup);
pgroup = null;
}
pgroup = new JPanel();
pgroup.setLayout(new RiverLayout());
javax.swing.border.TitledBorder title = BorderFactory.createTitledBorder(BorderFactory.createEtchedBorder(javax.swing.border.EtchedBorder.LOWERED), getLocaleText((String)els[i]));
pgroup.setBorder(title);
}