return;
}
boolean isLandscape = _dlg.chkIsLandscape.isSelected();
FormatXmlBean selBean = (FormatXmlBean) _dlg.lstFormats.getSelectedValue();
if(null == selBean)
{
selBean = new FormatXmlBean(name, width, height, false,isLandscape);
Vector<FormatXmlBean> v = new Vector<FormatXmlBean>();
v.addAll(Arrays.asList(_formats));
v.add(selBean);
_formats = v.toArray(new FormatXmlBean[v.size()]);
_dlg.lstFormats.setListData(_formats);
_dlg.lstFormats.setSelectedValue(selBean, true);
}
else
{
selBean.setName(name);
selBean.setWidth(width);
selBean.setHeight(height);
selBean.setLandscape(isLandscape);
_dlg.lstFormats.repaint();
}
_listener.formatsChanged((FormatXmlBean)_dlg.lstFormats.getSelectedValue());
saveFormats();