Ejemplo n.º 1
0
  /**
   * Erzeugt ein Tabellen-Modell
   *
   * @param associationDataTransfer AssociationDataTransfer
   * @param moneybook Kassenbuch
   */
  public BeitraegeTableModel(
      AssociationDataTransfer associationDataTransfer, KassenBuch moneybook) {

    BookingDay bd =
        new BookingDay(
            associationDataTransfer, associationDataTransfer.getAssociation(), moneybook);
    BookingDayDonator bdd = new BookingDayDonator(associationDataTransfer, moneybook);

    this.memberMap = bd.getMemberMap();
    this.special_donation_form_member_Map = bdd.getMemberMap();

    // SimpleDateFormat df = new SimpleDateFormat("dd.MM.yyyy");

    //		Date day = associationDataTransfer.getAssociation();
    //
    //		if(day != null)
    this.bookDatePremiums = associationDataTransfer.getAssociation().getPamentTime();

    this.data =
        new Object[memberMap.size() + special_donation_form_member_Map.size()][getColumnCount()];

    fillData();
  }
Ejemplo n.º 2
0
  /**
   * constructor creates a new basic data panel
   *
   * @param mFrame
   * @param aObject
   * @param moneyBook
   * @param adatatrans
   */
  public UpdateAssociationData(
      ConfigFrame mFrame,
      Association aObject,
      KassenBuch moneyBook,
      AssociationDataTransfer adatatrans) {

    this.association_object = aObject;
    this.mainframe = mFrame;
    this.association_data_transfer = adatatrans;
    this.money_book = moneyBook;

    mainframe.setTitle(
        title
            + " - "
            + association_data_transfer.getAssociation().getName()
            + " - "
            + config_title);

    setBorder(
        new TitledBorder(
            BorderFactory.createMatteBorder(1, 1, 1, 1, Color.LIGHT_GRAY), "Vereinsdaten"));

    buildPanel();

    // Buttons
    save_button = new ButtonDesign("images/save_icon.png");
    back_button = new ButtonDesign("images/mainmenu_icon.png");
    save_button.addActionListener(
        new AssociationDataActionListener(
            this, mainframe, association_object, money_book, association_data_transfer));
    back_button.addActionListener(new BackConfigActionListener(mainframe, this));

    butpanel = new JPanel();
    butpanel.setLayout(new FlowLayout());
    butpanel.setOpaque(false);
    butpanel.add(back_button);
    butpanel.add(save_button);

    GridBagConstraints b = new GridBagConstraints();
    b.fill = GridBagConstraints.HORIZONTAL;
    b.insets = new Insets(100, 2, 2, 2);
    b.gridx = 0;
    b.gridy = 0;
    buttonpanel.add(butpanel, b);
  }