Examples of UmsatzTyp


Examples of de.willuhn.jameica.hbci.rmi.UmsatzTyp

      return typ.matches(u);

    // wir suchen von unten nach oben, indem wir die Umsatzkategorien
    // des Umsatzes nach oben iterieren. Wenn wir dabei auf die gesuchte
    // Kategorie stossen, passts.
    UmsatzTyp t = u.getUmsatzTyp();
   
    if (t == null)
      return false; // nichts zum Suchen da
   
    for (int i=0;i<100;++i) // maximal 100 Iterationen - fuer den (eigentlich unmoeglichen Fall), dass eine Rekursion existiert
    {
      if (t == null)
        return false; // oben angekommen und nichts gefunden
     
      if (t.equals(typ))
        return true; // passt!
     
      t = (UmsatzTyp) t.getParent(); // weiter nach oben gehen
    }
   
    // nichts gefunden
    return false;
  }
View Full Code Here

Examples of de.willuhn.jameica.hbci.rmi.UmsatzTyp

      {
        cache = new HashMap<String,UmsatzTyp>();
        DBIterator kategorien = Settings.getDBService().createList(UmsatzTyp.class);
        while (kategorien.hasNext())
        {
          UmsatzTyp t = (UmsatzTyp) kategorien.next();
          cache.put(t.getName().toLowerCase(),t);
        }
      }
     
      UmsatzTyp t = (UmsatzTyp) cache.get(value.toLowerCase());
      if (t != null)
        return t;
     
      // Nicht gefunden. Also neu anlegen
      Logger.info("auto-creating category " + value);
      t = (UmsatzTyp) Settings.getDBService().createObject(UmsatzTyp.class,null);
      t.setName(value);
      t.setTyp(UmsatzTyp.TYP_EGAL);
      t.store();
      cache.put(value.toLowerCase(),t);
      return t;
    }
    catch (Exception e)
    {
View Full Code Here

Examples of de.willuhn.jameica.hbci.rmi.UmsatzTyp

        if (item == null)
          return;

        try
        {
          UmsatzTyp ut = (UmsatzTyp) item.getData();
          if (ut == null || !ut.isCustomColor())
            return;

          int[] color = ut.getColor();
          if (color == null || color.length != 3)
            return;
         
          RGB rgb = new RGB(color[0],color[1],color[2]);
          Color c = colorCache.get(rgb.toString());
View Full Code Here

Examples of de.willuhn.jameica.hbci.rmi.UmsatzTyp

  protected String format(Object bean)
  {
    String name = super.format(bean);
    try
    {
      UmsatzTyp t = (UmsatzTyp) bean;
      int depth = t.getPath().size();
      for (int i=0;i<depth;++i)
      {
        name = "    " + name;
      }
    }
View Full Code Here

Examples of de.willuhn.jameica.hbci.rmi.UmsatzTyp

   */
  private void refreshComment()
  {
    try
    {
      UmsatzTyp ut = (UmsatzTyp) getValue();
      if (ut == null)
      {
        setComment("");
        return;
      }
     
      Calendar cal = Calendar.getInstance();
      setComment(i18n.tr("Umsatz im laufenden Monat: {0} {1}", new String[]{HBCI.DECIMALFORMAT.format(ut.getUmsatz(cal.get(Calendar.DAY_OF_MONTH))), HBCIProperties.CURRENCY_DEFAULT_DE}));
    }
    catch (Exception e)
    {
      Logger.error("unable to refresh umsatz",e);
      Application.getMessagingFactory().sendMessage(new StatusBarMessage(i18n.tr("Fehler beim Aktualisieren des Umsatzes"), StatusBarMessage.TYPE_ERROR));
View Full Code Here

Examples of de.willuhn.jameica.hbci.rmi.UmsatzTyp

   
    if (!(o instanceof Umsatz))
      return;

    Umsatz u = (Umsatz) o;
    UmsatzTyp ut = u.getUmsatzTyp();
   
    // Wir haben gar keine Kategorie - dann eruebrigt sich die Frage.
    if (ut == null)
      return;
View Full Code Here

Examples of de.willuhn.jameica.hbci.rmi.UmsatzTyp

    /**
     * @see de.willuhn.jameica.hbci.gui.chart.LineChartData#getColor()
     */
    public int[] getColor() throws RemoteException
    {
      UmsatzTyp ut = this.group.getUmsatzTyp();
     
      if (ut == null)
        return null; // "nicht zugeordnet"

      if (!ut.isCustomColor())
        return null; // keine benutzerdefinierte Farbe angegeben
     
      return ut.getColor();
    }
View Full Code Here

Examples of de.willuhn.jameica.hbci.rmi.UmsatzTyp

        if (item == null)
          return;

        try
        {
          UmsatzTyp ut = (UmsatzTyp) item.getData();
          if (ut == null || !ut.isCustomColor())
            return;

          int[] color = ut.getColor();
          if (color == null || color.length != 3)
            return;
         
          RGB rgb = new RGB(color[0],color[1],color[2]);
          Color c = colorCache.get(rgb.toString());
View Full Code Here

Examples of de.willuhn.jameica.hbci.rmi.UmsatzTyp

            return;
         
          Double betrag = (Double) value;
         
          // Mal checken, ob wir eine benutzerdefinierte Farbe haben
          UmsatzTyp ut = null;
          if (i instanceof UmsatzTreeNode)
            ut = ((UmsatzTreeNode)i).getUmsatzTyp();
          else if (i instanceof Umsatz)
            ut = ((Umsatz)i).getUmsatzTyp();
         
          if (ut != null)
          {
            if (ut.isCustomColor())
            {
              int[] color = ut.getColor();
              if (color != null && color.length == 3)
              {
                RGB rgb = new RGB(color[0],color[1],color[2]);
                Color c = colorCache.get(rgb.toString());
                if (c == null)
View Full Code Here

Examples of de.willuhn.jameica.hbci.rmi.UmsatzTyp

    // Neu anlegen
    node = new UmsatzTreeNode(ut);
    lookup.put(ut.getID(),node);
   
    // Parents checken
    UmsatzTyp parent = (UmsatzTyp) ut.getParent();
    if (parent != null)
    {
      UmsatzTreeNode np = getNode(lookup,parent);
      node.setParent(np);
      np.getSubGroups().add(node);
View Full Code Here
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.