Package de.willuhn.jameica.gui

Examples of de.willuhn.jameica.gui.Action


   
    final HBCIVersionInput input = new HBCIVersionInput();
    group.addInput(input);
   
    ButtonArea buttons = new ButtonArea();
    buttons.addButton(i18n.tr("�bernehmen"), new Action() {
      public void handleAction(Object context) throws ApplicationException
      {
        version = (String) input.getValue();
        close();
      }
    },null,true,"ok.png");
    buttons.addButton(i18n.tr("Abbrechen"), new Action() {
      public void handleAction(Object context) throws ApplicationException
      {
        throw new OperationCanceledException("cancelled while choosing hbci version");
      }
   
View Full Code Here


    container.addText(i18n.tr("Inhalt der Wallet-Datei"),true);
   
    table.paint(parent);

    ButtonArea buttons = new ButtonArea();
    buttons.addButton(i18n.tr("Schlie�en"),new Action() {
      public void handleAction(Object context) throws ApplicationException
      {
        close();
      }
    },null,true,"window-close.png");
View Full Code Here

   * @see de.willuhn.jameica.gui.dialogs.AbstractDialog#paint(org.eclipse.swt.widgets.Composite)
   */
  protected void paint(Composite parent) throws Exception
  {
    // Erzeugen der Liste mit den existierenden Elementen
    turnusList = new TablePart(Settings.getDBService().createList(Turnus.class), new Action()
    {
      public void handleAction(Object context) throws ApplicationException
      {
        try
        {
          // Bei Doppelklick aktuellen Turnus zuweisen
          turnus = (Turnus) context;
        }
        catch (Exception e)
        {
          Logger.error("error while choosing turnus",e);
        }
        // und Dialog schliessen. getData() liefert dann den gerade ausgewaehlten zurueck.
        close();
      }
    });
    turnusList.addColumn(i18n.tr("Bezeichnung"),"bezeichnung");
    turnusList.setMulti(false);
    turnusList.setSummary(false);

    // Ein Formatter, der die initialen Turnusse rot markiert
    turnusList.setFormatter(new TableFormatter()
    {
      public void format(TableItem item)
      {
        try {
          Turnus t = (Turnus) item.getData();
          if (t.isInitial())
          {
            item.setForeground(Settings.getBuchungSollForeground());
          }
        }
        catch (Exception e)
        {
          Logger.error("error while formatting turnus",e);
        }
      }
    });

    ContextMenu c = new ContextMenu();

    // Einer fuer die Neuanlage
    c.addItem(new ContextMenuItem(i18n.tr("Neu..."), new Action()
    {
      public void handleAction(Object context) throws ApplicationException
      {
        handleEdit(null);
      }
    }));

    // Ein Contextmenu-Eintrag zum Bearbeiten   
    c.addItem(new ContextMenuItem(i18n.tr("Bearbeiten..."), new Action()
    {
      public void handleAction(Object context) throws ApplicationException
      {
        if (context == null || !(context instanceof Turnus))
          return;
        handleEdit((Turnus) context);
      }
    })
    {
      /**
       * @see de.willuhn.jameica.gui.parts.ContextMenuItem#isEnabledFor(java.lang.Object)
       */
      public boolean isEnabledFor(Object o)
      {
        try
        {
          if (o == null || !(o instanceof Turnus))
            return false;
          Turnus t = (Turnus) o;
          if (t.isInitial())
            return false;
        }
        catch (Exception e)
        {
          Logger.error("error while checking context menu item",e);
        }
        return super.isEnabledFor(o);
      }
    });


    // Ein Contextmenu-Eintrag zum Loeschen   
    c.addItem(new ContextMenuItem(i18n.tr("L�schen..."), new Action()
    {
      public void handleAction(Object context) throws ApplicationException
      {
        if (context == null || !(context instanceof Turnus))
          return;
        try
        {
          Turnus t = (Turnus) context;
          t.delete();
        }
        catch (Exception e)
        {
          Logger.error("error while deleting turnus",e);
        }
      }
    })
    {
      /**
       * @see de.willuhn.jameica.gui.parts.ContextMenuItem#isEnabledFor(java.lang.Object)
       */
      public boolean isEnabledFor(Object o)
      {
        try
        {
          if (o == null || !(o instanceof Turnus))
            return false;
          Turnus t = (Turnus) o;
          if (t.isInitial())
            return false;
        }
        catch (Exception e)
        {
          Logger.error("error while checking context menu item",e);
        }
        return super.isEnabledFor(o);
      }
    });
  
    turnusList.setContextMenu(c);
   
    Container container = new SimpleContainer(parent);
    container.addPart(turnusList);

    // und noch die Abschicken-Knoepfe
    ButtonArea buttonArea = new ButtonArea();
    buttonArea.addButton(i18n.tr("Neu"), new Action()
    {
      public void handleAction(Object context) throws ApplicationException
      {
        handleEdit(null);
      }
    },null,false,"document-new.png");
    buttonArea.addButton(i18n.tr("�bernehmen"), new Action()
    {
      public void handleAction(Object context) throws ApplicationException
      {
        try
        {
          // aktuell markierten Turnus nehmen
          turnus = (Turnus) turnusList.getSelection();
        }
        catch (Exception e)
        {
          Logger.error("error while choosing turnus",e);
        }
        // und Dialog schliessen
        close();
      }
    },null,true,"ok.png");
    buttonArea.addButton(i18n.tr("Abbrechen"), new Action()
    {
      public void handleAction(Object context) throws ApplicationException
      {
        // Turnus entfernen
        turnus = null;
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 SepaSammelUeberweisungBuchungNew().handleAction(context);
      }
    };
View Full Code Here

    ButtonArea buttonArea = new ButtonArea();
    buttonArea.addButton(control.getSynchronizeOptions());
   
    buttonArea.addButton(control.getProtoButton());
    buttonArea.addButton(control.getDelButton());
    buttonArea.addButton(i18n.tr("Speichern"),new Action()
    {
      public void handleAction(Object context) throws ApplicationException
      {
        control.handleStore();
      }
View Full Code Here

    group.addText("\n",true);
    group.addInput(printers);
    group.addInput(getError());
   
    ButtonArea buttons = new ButtonArea();
    Button print = new Button(i18n.tr("Drucken"),new Action()
    {
      public void handleAction(Object context) throws ApplicationException
      {
        print();
        close();
      }
    },null,true,"document-print.png");
    print.setEnabled((printers instanceof SelectInput)); // Drucken nur moeglich, wenn Drucker vorhanden.
    buttons.addButton(print);
   
    buttons.addButton(i18n.tr("Speichern unter..."),new Action()
    {
      public void handleAction(Object context) throws ApplicationException
      {
        save();
      }
    },null,false,"document-save.png");
    buttons.addButton(i18n.tr("Abbrechen"), new Action()
    {
      public void handleAction(Object context) throws ApplicationException
      {
        throw new OperationCanceledException("cancelled in ini letter dialog");
      }
View Full Code Here

  public Button getSynchronizeOptions() throws RemoteException
  {
    if (this.synchronizeOptions != null)
      return this.synchronizeOptions;

    this.synchronizeOptions = new Button(i18n.tr("Synchronisierungsoptionen"),new Action() {
      public void handleAction(Object context) throws ApplicationException
      {
        try
        {
          SynchronizeOptionsDialog d = new SynchronizeOptionsDialog(getKonto(),SynchronizeOptionsDialog.POSITION_CENTER);
View Full Code Here

      container.addInput(control.getTermin());
      container.addInput(control.getReminderInterval());
    }
   
    ButtonArea buttons = new ButtonArea();
    buttons.addButton(i18n.tr("Sammelauftrag l�schen"),new Action() {
      public void handleAction(Object context) throws ApplicationException
      {
        new DBObjectDelete().handleAction(context);
        try
        {
          // Buchungen aus der Liste entfernen, wenn der Auftrag geloescht wurde
          if (transfer.getID() == null)
            control.getBuchungen().removeAll();
        }
        catch (RemoteException re)
        {
          Logger.error("unable to remove bookings",re);
        }
      }
    },transfer,false,"user-trash-full.png");
    buttons.addButton(i18n.tr("Duplizieren..."), new Action() {
      public void handleAction(Object context) throws ApplicationException
      {
        if (control.handleStore())
          new Duplicate().handleAction(transfer);
      }
    },null,false,"edit-copy.png");

    Button add = new Button(i18n.tr("Neue Buchungen hinzuf�gen"), new Action() {
      public void handleAction(Object context) throws ApplicationException {
        if (control.handleStore())
          new de.willuhn.jameica.hbci.gui.action.SepaSammelUeberweisungBuchungNew().handleAction(transfer);
      }
    },null,false,"text-x-generic.png");
    add.setEnabled(!transfer.ausgefuehrt());
   
    Button execute = new Button(i18n.tr("Jetzt ausf�hren..."), new Action() {
      public void handleAction(Object context) throws ApplicationException {
        if (control.handleStore())
          new SepaSammelUeberweisungExecute().handleAction(transfer);
      }
    },null,false,"emblem-important.png");
    execute.setEnabled(!transfer.ausgefuehrt());
   
    Button store = new Button(i18n.tr("Speichern"),new Action() {
      public void handleAction(Object context) throws ApplicationException {
        control.handleStore();
      }
    },null,!transfer.ausgefuehrt(),"document-save.png");
    store.setEnabled(!transfer.ausgefuehrt());
View Full Code Here

      this.check.setName(i18n.tr("Einzelauftr�ge nach �bernahme in die Sammelauftr�ge l�schen"));
      container.addInput(this.check);
    }
    ButtonArea b = new ButtonArea();
    b.addButton(i18n.tr("Fortsetzen"), new Action()
    {
      public void handleAction(Object context) throws ApplicationException
      {
        if (check != null)
          delete = (Boolean) check.getValue();
        close();
      }
    },null,false,"ok.png");
    b.addButton(i18n.tr("Abbrechen"), new Action()
    {
      public void handleAction(Object context) throws ApplicationException
      {
        throw new OperationCanceledException();
      }
View Full Code Here

    container.addPart(table);
   
    // table.paint(parent);

    ButtonArea buttons = new ButtonArea();
    buttons.addButton(i18n.tr("Jetzt ausf�hren"),new Action()
    {
      public void handleAction(Object context) throws ApplicationException
      {
        close();
      }
    },null,false,"mail-send-receive.png");
    buttons.addButton(i18n.tr("Synchronisierung abbrechen"),new Action()
    {
      public void handleAction(Object context) throws ApplicationException
      {
        throw new OperationCanceledException();
      }
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.