Package de.willuhn.util

Examples of de.willuhn.util.I18N


      return; // Ignore

    File f = new File(sqlScript.getParent(),getScriptPrefix() + sqlScript.getName());
    if (f.exists())
    {
      I18N i18n = Application.getPluginLoader().getPlugin(HBCI.class).getResources().getI18N();
     
      String text = i18n.tr("Bei der Verwendung von MySQL wird die Datenbank " +
          "nicht automatisch angelegt. Bitte f�hren Sie das folgende SQL-Script " +
          "manuell aus, falls Sie dies nicht bereits getan haben:\n{0}",f.getAbsolutePath());
     
      BootMessage msg = new BootMessage(text);
      msg.setTitle(i18n.tr("Hinweis zur Verwendung von MySQL"));
      Application.getMessagingFactory().getMessagingQueue("jameica.boot").queueMessage(msg);
    }
  }
View Full Code Here


   * Erwartet ein Objekt vom Typ <code>SammelTransfer</code>.
   * @see de.willuhn.jameica.gui.Action#handleAction(java.lang.Object)
   */
  public void handleAction(Object context) throws ApplicationException
  {
    I18N i18n = Application.getPluginLoader().getPlugin(HBCI.class).getResources().getI18N();

    if (context == null || (!(context instanceof SammelTransfer) && !(context instanceof SammelTransfer[])))
      throw new ApplicationException(i18n.tr("Bitte w�hlen Sie mindestens einen Sammel-Auftrag aus"));

    try
    {
      SammelTransfer[] list = null;
      if (context instanceof SammelTransfer)
        list = new SammelTransfer[]{(SammelTransfer) context};
      else
        list = (SammelTransfer[]) context;
     
      ExportDialog d = new ExportDialog(list, getExportClass());
      d.open();
    }
    catch (OperationCanceledException oce)
    {
      Logger.info(oce.getMessage());
      return;
    }
    catch (ApplicationException ae)
    {
      throw ae;
    }
    catch (Exception e)
    {
      Logger.error("error while exporting sammeltransfer",e);
      GUI.getStatusBar().setErrorText(i18n.tr("Fehler beim Exportieren der Sammel-Auftr�ge"));
    }
  }
View Full Code Here

  /**
   * @see de.willuhn.jameica.gui.Action#handleAction(java.lang.Object)
   */
  public void handleAction(Object context) throws ApplicationException
  {
    I18N i18n = Application.getPluginLoader().getPlugin(HBCI.class).getResources().getI18N();

    try
    {
      ImportDialog d = new ImportDialog(null, Konto.class);
      d.open();
    }
    catch (OperationCanceledException oce)
    {
      Logger.info(oce.getMessage());
      return;
    }
    catch (ApplicationException ae)
    {
      throw ae;
    }
    catch (Exception e)
    {
      Logger.error("error while importing accounts",e);
      GUI.getStatusBar().setErrorText(i18n.tr("Fehler beim Importieren der Konten"));
    }
  }
View Full Code Here

   * Erwartet ein Objekt vom Typ <code>SammelTransfer</code> als Context.
   * @see de.willuhn.jameica.gui.Action#handleAction(java.lang.Object)
   */
  public void handleAction(Object context) throws ApplicationException
  {
    final I18N i18n = Application.getPluginLoader().getPlugin(HBCI.class).getResources().getI18N();

    if (context == null || !(context instanceof SammelTransfer))
      throw new ApplicationException(i18n.tr("Kein Sammel-Auftrag angegeben"));

    try
    {
      final SammelTransfer u = (SammelTransfer) context;
     
      if (u.ausgefuehrt())
        throw new ApplicationException(i18n.tr("Sammel-Auftrag wurde bereits ausgef�hrt"));

      if (u.getBuchungen().size() == 0)
        throw new ApplicationException(i18n.tr("Sammel-Auftrag enth�lt keine Buchungen"));
      if (u.isNewObject())
        u.store(); // wir speichern bei Bedarf selbst.

      SammelTransferDialog d = new SammelTransferDialog(u,SammelTransferDialog.POSITION_CENTER);
      try
      {
        if (!((Boolean)d.open()).booleanValue())
          return;
      }
      catch (OperationCanceledException oce)
      {
        Logger.info(oce.getMessage());
        return;
      }
      catch (Exception e)
      {
        Logger.error("error while showing confirm dialog",e);
        GUI.getStatusBar().setErrorText(i18n.tr("Fehler beim Ausf�hren des Sammel-Auftrages"));
        return;
      }
      execute(u);
    }
    catch (RemoteException e)
    {
      Logger.error("error while executing sammelauftrag",e);
      GUI.getStatusBar().setErrorText(i18n.tr("Fehler beim Ausf�hren des Sammel-Auftrages"));
    }
  }
View Full Code Here

  /**
   * @see de.willuhn.jameica.gui.Action#handleAction(java.lang.Object)
   */
  public void handleAction(Object context) throws ApplicationException
  {
    I18N i18n = Application.getPluginLoader().getPlugin(HBCI.class).getResources().getI18N();

    de.willuhn.jameica.hbci.gui.dialogs.About a = new de.willuhn.jameica.hbci.gui.dialogs.About(de.willuhn.jameica.hbci.gui.dialogs.About.POSITION_CENTER);
    try
    {
      a.open();
    }
    catch (OperationCanceledException oce)
    {
      Logger.info(oce.getMessage());
      return;
    }
    catch (Exception e)
    {
      Logger.error("error while opening about dialog",e);
      throw new ApplicationException(i18n.tr("Fehler beim Anzeigen des About-Dialogs"),e);
    }
  }
View Full Code Here

   * Wenn nichts angegeben ist, wird ein leerer SEPA-Dauerauftrag erstellt und angezeigt.
   * @see de.willuhn.jameica.gui.Action#handleAction(java.lang.Object)
   */
  public void handleAction(Object context) throws ApplicationException
  {
    I18N i18n = Application.getPluginLoader().getPlugin(HBCI.class).getResources().getI18N();

    SepaDauerauftrag d = null;

    if (context instanceof SepaDauerauftrag)
    {
      d = (SepaDauerauftrag) context;
    }
    else if (context instanceof Konto)
    {
      try {
        Konto k = (Konto) context;
        d = (SepaDauerauftrag) Settings.getDBService().createObject(SepaDauerauftrag.class,null);
        if (!k.hasFlag(Konto.FLAG_DISABLED) && !k.hasFlag(Konto.FLAG_OFFLINE))
          d.setKonto(k);
      }
      catch (RemoteException e)
      {
        // Dann halt nicht
      }
    }
    else if (context instanceof Address)
    {
      try {
        Address e = (Address) context;
        d = (SepaDauerauftrag) Settings.getDBService().createObject(SepaDauerauftrag.class,null);
        d.setGegenkonto(e);
      }
      catch (RemoteException e)
      {
        throw new ApplicationException(i18n.tr("Fehler beim Anlegen des Dauerauftrages"));
      }
    }

    GUI.startView(de.willuhn.jameica.hbci.gui.views.SepaDauerauftragNew.class,d);
  }
View Full Code Here

   * Erwartet ein Objekt vom Typ <code>HibiscusAddress</code> oder <code>HibiscusAddress[]</code>.
   * @see de.willuhn.jameica.gui.Action#handleAction(java.lang.Object)
   */
  public void handleAction(Object context) throws ApplicationException
  {
    I18N i18n = Application.getPluginLoader().getPlugin(HBCI.class).getResources().getI18N();

    if (context == null)
      throw new ApplicationException(i18n.tr("Bitte w�hlen Sie mindestens eine Adresse aus"));

    Object[] u = null;
    try
    {
      if (context instanceof Address)
      {
        u = new Address[1];
        u[0] = (Address) context;
      }
      else if (context instanceof Object[])
      {
        // Checken, ob wirklich nur Adressen drin stehen
        u = (Object[]) context;
        for (Object o:u)
        {
          if (!(o instanceof Address))
          {
            u = null;
            break;
          }
        }

        u = (Object[])context;
      }

      if (u == null)
        throw new ApplicationException(i18n.tr("Bitte w�hlen Sie einen oder mehrere Adressen aus"));

      ExportDialog d = new ExportDialog(u, Address.class);
      d.open();
    }
    catch (OperationCanceledException oce)
    {
      Logger.info(oce.getMessage());
      return;
    }
    catch (ApplicationException ae)
    {
      throw ae;
    }
    catch (Exception e)
    {
      Logger.error("error while exporting addresses",e);
      GUI.getStatusBar().setErrorText(i18n.tr("Fehler beim Exportieren der Adressen"));
    }
  }
View Full Code Here

   * Erwartet ein Objekt vom Typ <code>Konto</code> im Context.
   * @see de.willuhn.jameica.gui.Action#handleAction(java.lang.Object)
   */
  public void handleAction(Object context) throws ApplicationException
  {
    I18N i18n = Application.getPluginLoader().getPlugin(HBCI.class).getResources().getI18N();

    if (context == null || !(context instanceof Konto))
      throw new ApplicationException(i18n.tr("Kein Konto ausgew�hlt"));

    try {

      Konto k = (Konto) context;
      if (k.isNewObject())
        return;

      YesNoDialog d = new YesNoDialog(YesNoDialog.POSITION_CENTER);
      d.setTitle(i18n.tr("Bankverbindung l�schen"));
      d.setText(i18n.tr("Wollen Sie diese Bankverbindung wirklich l�schen?\nHierbei werden auch alle Ums�tze, �berweisungen und Dauerauftr�ge des Kontos lokal gel�scht."));

      try {
        Boolean choice = (Boolean) d.open();
        if (!choice.booleanValue())
          return;
      }
      catch (OperationCanceledException oce)
      {
        Logger.info(oce.getMessage());
        return;
      }
      catch (Exception e)
      {
        Logger.error("error while deleting konto",e);
        return;
      }

      // ok, wir loeschen das Objekt
      k.delete();
      GUI.getStatusBar().setSuccessText(i18n.tr("Bankverbindung gel�scht."));
    }
    catch (RemoteException e)
    {
      GUI.getStatusBar().setErrorText(i18n.tr("Fehler beim L�schen der Bankverbindung."));
      Logger.error("unable to delete konto",e);
    }
  }
View Full Code Here

  /**
   * @see de.willuhn.jameica.gui.Action#handleAction(java.lang.Object)
   */
  public void handleAction(Object context) throws ApplicationException
  {
    I18N i18n = Application.getPluginLoader().getPlugin(HBCI.class).getResources().getI18N();

    try
    {
      ImportDialog d = new ImportDialog(null, SepaSammelLastschrift.class);
      d.open();
    }
    catch (OperationCanceledException oce)
    {
      return;
    }
    catch (ApplicationException ae)
    {
      throw ae;
    }
    catch (Exception e)
    {
      Logger.error("error while importing transfers",e);
      GUI.getStatusBar().setErrorText(i18n.tr("Fehler beim Importieren der SEPA-Sammellastschriften"));
    }
  }
View Full Code Here

   * Erwartet ein Objekt vom Typ <code>GenericIterator</code>
   * @see de.willuhn.jameica.gui.Action#handleAction(java.lang.Object)
   */
  public void handleAction(Object context) throws ApplicationException
  {
    I18N i18n = Application.getPluginLoader().getPlugin(HBCI.class).getResources().getI18N();

    if (context == null)
      throw new ApplicationException(i18n.tr("Bitte w�hlen Sie die zu exportierenden Ums�tze aus"));

    if (!(context instanceof UmsatzTree))
      throw new ApplicationException(i18n.tr("Bitte w�hlen Sie die zu exportierenden Ums�tze aus"));

    try
    {
      ExportDialog d = new ExportDialog(new UmsatzTree[]{(UmsatzTree)context}, UmsatzTree.class);
      d.open();
    }
    catch (OperationCanceledException oce)
    {
      Logger.info(oce.getMessage());
      return;
    }
    catch (ApplicationException ae)
    {
      throw ae;
    }
    catch (Exception e)
    {
      Logger.error("error while writing report", e);
      Application.getMessagingFactory().sendMessage(new StatusBarMessage(i18n.tr("Fehler bei der Erstellung der Liste"), StatusBarMessage.TYPE_ERROR));
    }
  }
View Full Code Here

TOP

Related Classes of de.willuhn.util.I18N

Copyright © 2018 www.massapicom. 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.