*/
public void bind() throws Exception
{
super.bind();
ButtonArea buttons = new ButtonArea();
Umsatz u = getControl().getUmsatz();
GUI.getView().addPanelButton(new PanelButtonPrint(new PrintSupportUmsatzList(u)));
this.checked = new Button(i18n.tr("Gepr�ft"),new Action()
{
public void handleAction(Object context) throws ApplicationException
{
new UmsatzMarkChecked(Umsatz.FLAG_CHECKED,true).handleAction(context);
checked.setEnabled(false); // nur einmal moeglich
}
},u,false,"emblem-default.png");
checked.setEnabled(!u.hasFlag(Umsatz.FLAG_NOTBOOKED) && !u.hasFlag(Umsatz.FLAG_CHECKED));
buttons.addButton(checked);
Button ab = null;
final Address found = getControl().getAddressbookEntry();
if (found != null)
{
ab = new Button(i18n.tr("In Adressbuch �ffnen"),new de.willuhn.jameica.hbci.gui.action.EmpfaengerNew(),found,false,"contact-new.png");
}
else
{
ab = new Button(i18n.tr("In Adressbuch �bernehmen"),new Action()
{
public void handleAction(Object context) throws ApplicationException
{
new EmpfaengerAdd().handleAction(getControl().getUmsatz());
}
},null,false,"contact-new.png");
}
buttons.addButton(ab);
Button edit = new Button(i18n.tr("Bearbeiten"),new de.willuhn.jameica.hbci.gui.action.UmsatzDetailEdit(),u,false,"text-x-generic.png");
edit.setEnabled((u.getFlags() & Umsatz.FLAG_NOTBOOKED) == 0);
buttons.addButton(edit);
Button store = new Button(i18n.tr("Speichern"),new Action()
{
public void handleAction(Object context) throws ApplicationException
{
getControl().handleStore();
}
},null,false,"document-save.png");
store.setEnabled((u.getFlags() & Umsatz.FLAG_NOTBOOKED) == 0);
buttons.addButton(store);
buttons.paint(getParent());
}