Package de.willuhn.jameica.hbci.gui.parts.columns

Source Code of de.willuhn.jameica.hbci.gui.parts.columns.KontoColumn

/**********************************************************************
* $Source: /cvsroot/hibiscus/hibiscus/src/de/willuhn/jameica/hbci/gui/parts/columns/KontoColumn.java,v $
* $Revision: 1.2 $
* $Date: 2011/04/29 15:33:28 $
* $Author: willuhn $
* $Locker:  $
* $State: Exp $
*
* Copyright (c) by willuhn software & services
* All rights reserved
*
**********************************************************************/

package de.willuhn.jameica.hbci.gui.parts.columns;

import java.rmi.RemoteException;

import de.willuhn.jameica.gui.formatter.Formatter;
import de.willuhn.jameica.gui.parts.Column;
import de.willuhn.jameica.hbci.HBCI;
import de.willuhn.jameica.hbci.rmi.Konto;
import de.willuhn.jameica.system.Application;
import de.willuhn.logging.Logger;
import de.willuhn.util.I18N;

/**
* Vorformatierte Konto-Spalte.
*/
public class KontoColumn extends Column
{
  private static I18N i18n = Application.getPluginLoader().getPlugin(HBCI.class).getResources().getI18N();

  /**
   * ct.
   */
  public KontoColumn()
  {
    super("konto_id", i18n.tr("Konto"),new Formatter() {
      /**
       * @see de.willuhn.jameica.gui.formatter.Formatter#format(java.lang.Object)
       */
      public String format(Object o)
      {
        if (o == null || !(o instanceof Konto))
          return null;
        Konto k = (Konto) o;
        try
        {
          String s = k.getKontonummer();
          String name = k.getBezeichnung();
          if (name != null && name.length() > 0)
            s += " [" + name + "]";
          return s;
        }
        catch (RemoteException r)
        {
          Logger.error("unable to display konto",r);
          return null;
        }
      }
    });
  }
}


/**********************************************************************
* $Log: KontoColumn.java,v $
* Revision 1.2  2011/04/29 15:33:28  willuhn
* @N Neue Spalte "ausgefuehrt_am", in der das tatsaechliche Ausfuehrungsdatum von Auftraegen vermerkt wird
*
* Revision 1.1  2009/02/17 00:00:02  willuhn
* @N BUGZILLA 159 - Erster Code fuer Auslands-Ueberweisungen
*
**********************************************************************/ 
TOP

Related Classes of de.willuhn.jameica.hbci.gui.parts.columns.KontoColumn

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.