*/
public void bind() throws Exception
{
GUI.getView().setTitle(i18n.tr("Einnahmen/Ausgaben"));
final EinnahmeAusgabeControl control = new EinnahmeAusgabeControl(this);
{
final TabFolder folder = new TabFolder(this.getParent(), SWT.NONE);
folder.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
TabGroup tab = new TabGroup(folder,i18n.tr("Anzeige einschr�nken"));
ColumnLayout cols = new ColumnLayout(tab.getComposite(),2);
Container left = new SimpleContainer(cols.getComposite());
left.addInput(control.getKontoAuswahl());
Container right = new SimpleContainer(cols.getComposite());
right.addInput(control.getRange());
MultiInput range = new MultiInput(control.getStart(),control.getEnd());
right.addInput(range);
}
ButtonArea buttons = new ButtonArea();
buttons.addButton(i18n.tr("Exportieren..."), new Action()
{
public void handleAction(Object context) throws ApplicationException
{
try
{
List data = control.getTable().getItems();
new EinnahmeAusgabeExport().handleAction(data.toArray(new EinnahmeAusgabe[data.size()]));
}
catch (RemoteException re)
{
Logger.error("unable to export data",re);
Application.getMessagingFactory().sendMessage(new StatusBarMessage(i18n.tr("Fehler beim Exportieren: {0}",re.getMessage()),StatusBarMessage.TYPE_ERROR));
}
}
},null,false,"document-save.png");
buttons.addButton(i18n.tr("Aktualisieren"), new Action()
{
/**
* @see de.willuhn.jameica.gui.Action#handleAction(java.lang.Object)
*/
public void handleAction(Object context) throws ApplicationException
{
control.handleReload();
}
},null,true,"view-refresh.png");
buttons.paint(getParent());
control.getTable().paint(this.getParent());
}