Settings settings = Application.getPluginLoader().getPlugin(HBCI.class).getResources().getSettings();
int size = settings.getInt("transfertype.usagelist.size",5);
if (orig != null && orig.length > size)
size = orig.length;
final ScrolledContainer container = new ScrolledContainer(parent);
for (int i=0;i<size;++i)
{
createLine(container,(orig != null && orig.length > i) ? orig[i] : null,i,readonly);
}
////////////////////////////////////////////////////////////////////////////
// Button zum Hinzufuegen von weiteren Zeilen
this.add = new Button(" + ",new Action() {
public void handleAction(Object context) throws ApplicationException
{
int size = fields.size();
createLine(container,null,size,readonly);
container.update();
add.setEnabled(!readonly && size+3 < maxusage);
}
});
this.add.setEnabled(!readonly && size+3 <= maxusage);
ButtonArea buttons = new ButtonArea();
buttons.addButton(this.add);
buttons.paint(parent);
//
////////////////////////////////////////////////////////////////////////////
// einmal initial die Groesse neu berechnen
container.update();
}