### Eclipse Workspace Patch 1.0 #P jverein diff --git src/de/jost_net/JVerein/gui/control/BuchungsControl.java src/de/jost_net/JVerein/gui/control/BuchungsControl.java index fa433d9..6d1a0dc 100644 --- src/de/jost_net/JVerein/gui/control/BuchungsControl.java +++ src/de/jost_net/JVerein/gui/control/BuchungsControl.java @@ -40,6 +40,7 @@ import de.jost_net.JVerein.gui.dialogs.BuchungsjournalSortDialog; import de.jost_net.JVerein.gui.dialogs.SammelueberweisungAuswahlDialog; import de.jost_net.JVerein.gui.formatter.BuchungsartFormatter; +import de.jost_net.JVerein.gui.formatter.ProjektFormatter; import de.jost_net.JVerein.gui.formatter.MitgliedskontoFormatter; import de.jost_net.JVerein.gui.input.BuchungsartSearchInput; import de.jost_net.JVerein.gui.input.KontoauswahlInput; @@ -992,6 +993,8 @@ buchungsList.addColumn(new Column("mitgliedskonto", "Mitglied", new MitgliedskontoFormatter(), false, Column.ALIGN_AUTO, Column.SORT_BY_DISPLAY)); + buchungsList.addColumn("Projekt", "projekt", + new ProjektFormatter()); buchungsList.setMulti(true); buchungsList.setContextMenu(new BuchungMenu(this)); buchungsList.setRememberColWidths(true); @@ -1063,6 +1066,8 @@ Einstellungen.DECIMALFORMAT)); splitbuchungsList.addColumn("Mitglied", "mitgliedskonto", new MitgliedskontoFormatter()); + splitbuchungsList.addColumn("Projekt", "projekt", + new ProjektFormatter()); splitbuchungsList.setContextMenu(new BuchungMenu(this)); splitbuchungsList.setRememberColWidths(true); splitbuchungsList.setSummary(true); diff --git src/de/jost_net/JVerein/gui/formatter/ProjektFormatter.java src/de/jost_net/JVerein/gui/formatter/ProjektFormatter.java new file mode 100644 index 0000000..bcf7891 --- /dev/null +++ src/de/jost_net/JVerein/gui/formatter/ProjektFormatter.java @@ -0,0 +1,46 @@ +/********************************************************************** + * Copyright (c) by Heiner Jostkleigrewe + * This program is free software: you can redistribute it and/or modify it under the terms of the + * GNU General Public License as published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without + * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See + * the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along with this program. If not, + * see . + * + * heiner@jverein.de + * www.jverein.de + **********************************************************************/ +package de.jost_net.JVerein.gui.formatter; + +import java.rmi.RemoteException; + +import de.jost_net.JVerein.rmi.Projekt; +import de.willuhn.jameica.gui.formatter.Formatter; +import de.willuhn.logging.Logger; + +public class ProjektFormatter implements Formatter +{ + @Override + public String format(Object o) + { + Projekt p = (Projekt) o; + if (p == null) + { + return null; + } + String bez = null; + try + { + bez = p.getBezeichnung(); + } + catch (RemoteException e) + { + Logger.error("Fehler", e); + } + return bez; + } +} \ No newline at end of file