Package de.willuhn.jameica.gui

Examples of de.willuhn.jameica.gui.Action


    addItem(new UmsatzItem(i18n.tr("Als neue �berweisung anlegen..."),new AuslandsUeberweisungNew(),"stock_next.png"));
    addItem(ContextMenuItem.SEPARATOR);
    addItem(new UmsatzBookedItem(i18n.tr("als \"gepr�ft\" markieren..."),new UmsatzMarkChecked(Umsatz.FLAG_CHECKED,true),"emblem-default.png","ALT+G"));
    addItem(new UmsatzBookedItem(i18n.tr("als \"ungepr�ft\" markieren..."),new FlaggableChange(Umsatz.FLAG_CHECKED,false),"edit-undo.png","CTRL+ALT+G"));
    addItem(ContextMenuItem.SEPARATOR);
    addItem(new UmsatzItem(i18n.tr("Drucken..."),new Action() {
      public void handleAction(Object context) throws ApplicationException
      {
        new Print().handleAction(new PrintSupportUmsatzList(context));
      }
    },"document-print.png"));
    addItem(new UmsatzItem(i18n.tr("Exportieren..."),new UmsatzExport(),"document-save.png"));
    addItem(new ContextMenuItem(i18n.tr("Importieren..."),new UmsatzImport()
    {

      public void handleAction(Object context) throws ApplicationException
      {
        super.handleAction(konto != null ? konto : context);
      }
     
    }
    ,"document-open.png"));
   
    // BUGZILLA 512 / 1115
    addItem(ContextMenuItem.SEPARATOR);
    addItem(new UmsatzBookedItem(i18n.tr("Kategorie zuordnen..."),new UmsatzAssign(),"x-office-spreadsheet.png","ALT+K"));
    addItem(new CheckedSingleContextMenuItem(i18n.tr("Kategorie bearbeiten..."),new UmsatzTypNew(),"document-open.png")
    {
      public boolean isEnabledFor(Object o)
      {
        // Wen es ein Umsatz ist, dann nur aktivieren, wenn der Umsatz eine Kategorie hat
        if (o instanceof Umsatz)
        {
          try
          {
            return ((Umsatz)o).getUmsatzTyp() != null;
          }
          catch (RemoteException re)
          {
            Logger.error("unable to check umsatztyp",re);
          }
        }
       
        // Ansonsten wie gehabt
        return super.isEnabledFor(o);
      }
     
    });
    addItem(new ContextMenuItem(i18n.tr("Neue Kategorie anlegen..."),new Action()
    {
      public void handleAction(Object context) throws ApplicationException
      {
        // BUGZILLA 926
        UmsatzTyp ut = null;
View Full Code Here


    c.addInput(version);
    c.addInput(target);
    c.addInput(msg);
   
    ButtonArea buttons = new ButtonArea();
    this.ok = new Button(i18n.tr("Export starten"),new Action()
    {
      public void handleAction(Object context) throws ApplicationException
      {
        painVersion = (PainVersion) version.getValue();
        if (painVersion == null)
        {
          msg.setValue(i18n.tr("Bitte w�hlen Sie eine Schema-Version aus."));
          return;
        }
       
        String s = StringUtils.trimToNull((String) target.getValue());
        if (s == null)
        {
          msg.setValue(i18n.tr("Bitte w�hlen Sie eine Datei aus"));
          return;
        }
       
        file = new File(s);
        if (file.exists() && file.canRead())
        {
          try
          {
            if (!Application.getCallback().askUser(i18n.tr("Datei existiert bereits. �berschreiben?")))
              return;
          }
          catch (OperationCanceledException oce)
          {
            return;
          }
          catch (Exception e)
          {
            Logger.error("error while asking user to overwrite file",e);
            Application.getMessagingFactory().sendMessage(new StatusBarMessage(i18n.tr("Export fehlgeschlagen: {0}",e.getMessage()),StatusBarMessage.TYPE_ERROR));
          }
        }
        close();
      }
    },null,true,"ok.png");
    buttons.addButton(ok);
   
    buttons.addButton(i18n.tr("Abbrechen"), new Action()
    {
      public void handleAction(Object context) throws ApplicationException
      {
        throw new OperationCanceledException();
      }
View Full Code Here

  public SammelLastschriftList()
  {
    addItem(new SingleItem(i18n.tr("�ffnen"), new SammelLastschriftNew(),"document-open.png"));
    addItem(new CheckedContextMenuItem(i18n.tr("L�schen..."), new DBObjectDelete(),"user-trash-full.png"));
    addItem(ContextMenuItem.SEPARATOR);
    addItem(new CheckedSingleContextMenuItem(i18n.tr("Drucken..."),new Action() {
      public void handleAction(Object context) throws ApplicationException
      {
        new Print().handleAction(new PrintSupportSammelLastschrift((SammelLastschrift) context));
      }
    },"document-print.png"));
View Full Code Here

    addItem(new ContextMenuItem(i18n.tr("Neuer Dauerauftrag..."),    new DNeu(),"text-x-generic.png"));
    addItem(new CheckedContextMenuItem(i18n.tr("L�schen..."),        new SepaDauerauftragDelete(),"user-trash-full.png"));
    addItem(ContextMenuItem.SEPARATOR);
    addItem(new ContextMenuItem(i18n.tr("Dauerauftr�ge abrufen..."), new KontoFetchSepaDauerauftraege(),"mail-send-receive.png"));
    addItem(ContextMenuItem.SEPARATOR);
    addItem(new CheckedSingleContextMenuItem(i18n.tr("Drucken..."),new Action() {
      public void handleAction(Object context) throws ApplicationException
      {
        new Print().handleAction(new PrintSupportSepaDauerauftrag((SepaDauerauftrag) context));
      }
    },"document-print.png"));
View Full Code Here

   * ct.
   * @throws RemoteException
   */
  public PassportTree() throws RemoteException
  {
    super(init(),new Action() {
      public void handleAction(Object context) throws ApplicationException
      {
        if (context == null || (context instanceof Object[]))
          return;
        Action a = new PassportDetail();

        if (context instanceof PassportObject)
          a.handleAction(((PassportObject) context).passport);
        else if (context instanceof ConfigObject)
          a.handleAction(((ConfigObject) context).config);
      }
    });
    this.addColumn(i18n.tr("Bezeichnung"),"name");
   
    this.setFormatter(new TreeFormatter() {
      public void format(TreeItem item)
      {
        Object data = item.getData();
        if (data instanceof ConfigObject)
          item.setImage(SWTUtil.getImage("seahorse-preferences.png"));
      }
    });
    this.setMulti(false);
   
    ContextMenu menu = new ContextMenu();
    menu.addItem(new CheckedSingleContextMenuItem(i18n.tr("�ffnen"),new Action() {
      public void handleAction(Object context) throws ApplicationException
      {
        if (context == null || !(context instanceof ConfigObject))
          return;

        new PassportDetail().handleAction(((ConfigObject) context).config);
      }
    },"document-open.png")
    {
      public boolean isEnabledFor(Object o)
      {
        return (o instanceof ConfigObject) && super.isEnabledFor(o);
      }
    });
    menu.addItem(new ContextMenuItem(i18n.tr("Neuer Bank-Zugang..."),new Action() {
      public void handleAction(Object context) throws ApplicationException
      {
        new PassportDetail().handleAction(getPassport());
      }
    },"seahorse-preferences.png"));
   
    menu.addItem(ContextMenuItem.SEPARATOR);
    menu.addItem(new CheckedSingleContextMenuItem(i18n.tr("L�schen"),new Action() {
      public void handleAction(Object context) throws ApplicationException
      {
        if (context == null || !(context instanceof ConfigObject))
          return;
       
View Full Code Here

  public TablePart getBuchungen() throws RemoteException
  {
    if (this.buchungen != null)
      return this.buchungen;
   
    Action a = new Action() {
      public void handleAction(Object context) throws ApplicationException
      {
        new SammelUeberweisungBuchungNew().handleAction(context);
      }
    };
View Full Code Here

    addItem(new NotActiveMultiMenuItem(i18n.tr("Zu Sammelauftr�gen zusammenfassen..."), new SepaLastschriftMerge(),"stock_navigator-shift-left.png"));
    addItem(ContextMenuItem.SEPARATOR);
    addItem(new NotActiveSingleMenuItem(i18n.tr("Jetzt ausf�hren..."), new SepaLastschriftExecute(),"emblem-important.png"));
    addItem(new NotActiveMultiMenuItem(i18n.tr("Als \"ausgef�hrt\" markieren..."), new TerminableMarkExecuted(),"emblem-default.png"));
    addItem(ContextMenuItem.SEPARATOR);
    addItem(new CheckedContextMenuItem(i18n.tr("Drucken..."),new Action() {
      public void handleAction(Object context) throws ApplicationException
      {
        new Print().handleAction(new PrintSupportSepaLastschriftList(context));
      }
    },"document-print.png"));
View Full Code Here

         
          tab.addInput(this.getKontoAuswahl());
          tab.addInput(this.getRange());

          ButtonArea buttons = new ButtonArea();
          buttons.addButton(i18n.tr("Aktualisieren"), new Action()
          {
         
            /**
             * @see de.willuhn.jameica.gui.Action#handleAction(java.lang.Object)
             */
 
View Full Code Here

    // BUGZILLA 789
    ExtensionRegistry.extend(this);

    ButtonArea buttons = new ButtonArea();
    Button button = new Button(i18n.tr("Export starten"),new Action()
    {
      public void handleAction(Object context) throws ApplicationException
      {
        export();
      }
    },null,true,"ok.png");
    button.setEnabled(exportEnabled);
    buttons.addButton(button);
    buttons.addButton(i18n.tr("Abbrechen"), new Action()
    {
      public void handleAction(Object context) throws ApplicationException
      {
        close();
      }
View Full Code Here

  public UeberweisungList()
  {
    addItem(new SingleItem(i18n.tr("�ffnen"), new UeberweisungNew(),"document-open.png"));
    addItem(new CheckedContextMenuItem(i18n.tr("L�schen..."), new DBObjectDelete(),"user-trash-full.png"));
    addItem(ContextMenuItem.SEPARATOR);
    addItem(new CheckedContextMenuItem(i18n.tr("Drucken..."),new Action() {
      public void handleAction(Object context) throws ApplicationException
      {
        new Print().handleAction(new PrintSupportUeberweisungList(context));
      }
    },"document-print.png"));
View Full Code Here

TOP

Related Classes of de.willuhn.jameica.gui.Action

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.