public void setLabels(String waehrungCNr) {
    boolean bEnable = true;

    wnfRabattsatz.setEditable(bEnable);
    wnfRabattsatz.setMandatoryField(bEnable);

    wlaWaehrungGestehungspreis.setText(waehrungCNr);
    wlaWaehrungMinverkaufspreis.setText(waehrungCNr);
    wlaBerechneterpreiswaehrung.setText(waehrungCNr);
    wlaVkbasiswaehrung.setText(waehrungCNr);
    wlaFixpreiswaehrung.setText(waehrungCNr);
  }
  public void propertyChange(PropertyChangeEvent e) {
    // System.out.println(e.getPropertyName());
    if (e.getSource() == wdfKW.getDisplay()
        && e.getNewValue() instanceof Date
        && e.getPropertyName().equals("date")) {
      wbuZeitenAbschliessen.setEnabled(false);
      Date d = (Date) e.getNewValue();

      Timestamp[] tVonBis = Helper.getTimestampVonBisEinerKW(new Timestamp(d.getTime()));

      wdfKW.setDate(d);
      //

      Calendar c = Calendar.getInstance();
      c.setTimeInMillis(wdfKW.getDate().getTime());
      try {
        wlaKW.setText(
            "KW: "
                + c.get(Calendar.WEEK_OF_YEAR)
                + "/"
                + Helper.berechneJahrDerKW(c)
                + " ("
                + Helper.formatDatum(tVonBis[0], LPMain.getTheClient().getLocUi())
                + "-"
                + Helper.formatDatum(tVonBis[1], LPMain.getTheClient().getLocUi())
                + ")");
      } catch (Throwable e1) {

        e1.printStackTrace();
      }
    }
  }
  protected void eventActionSpecial(ActionEvent e) throws Throwable {

    if (e.getSource().equals(wbuKWZurueck)) {
      Calendar c = Calendar.getInstance();
      c.setTime(wdfKW.getDate());
      c.set(Calendar.DATE, c.get(Calendar.DATE) - 7);
      wdfKW.setTimestamp(new java.sql.Timestamp(c.getTimeInMillis()));
    } else if (e.getSource().equals(wbuNaechsteKW)) {
      Calendar c = Calendar.getInstance();
      c.setTime(wdfKW.getDate());
      c.set(Calendar.DATE, c.get(Calendar.DATE) + 7);
      wdfKW.setTimestamp(new java.sql.Timestamp(c.getTimeInMillis()));
    } else if (e.getSource().equals(wbuZeitenAbschliessen)) {
      DelegateFactory.getInstance()
          .getZeiterfassungDelegate()
          .zeitenAbschliessen(
              internalFrameZeiterfassung.getPersonalDto().getIId(), wdfKW.getTimestamp());

      DialogFactory.showModalDialog(
          LPMain.getTextRespectUISPr("lp.info"),
          LPMain.getTextRespectUISPr("pers.report.wochenabschluss.zeitenabgeschlossen")
              + wlaKW.getText());
      wbuZeitenAbschliessen.setEnabled(false);
    }
  }
  public void kundesokoDto2components(KundesokoDto kundesokoDtoI) throws Throwable {
    boolean bEnable = LPMain.getTheClient().getSMandantenwaehrung().equals(waehrungCNr);
    wnfRabattsatz.setEditable(bEnable);
    wnfRabattsatz.setMandatoryField(bEnable);
    wlaWaehrungGestehungspreis.setText(waehrungCNr);
    wlaWaehrungMinverkaufspreis.setText(waehrungCNr);
    wlaVkbasiswaehrung.setText(waehrungCNr);
    wlaFixpreiswaehrung.setText(waehrungCNr);

    wdfGueltigab.setDate(kundesokoDtoI.getTPreisgueltigab());
    wdfGueltigbis.setDate(kundesokoDtoI.getTPreisgueltigbis());
    wtfBemerkung.setText(kundesokoDtoI.getCBemerkung());

    if (wtfKndArtBez != null) {
      wtfKndArtBez.setText(kundesokoDtoI.getCKundeartikelbez());
    }
    if (wtfKndArtZBez != null) {
      wtfKndArtZBez.setText(kundesokoDtoI.getCKundeartikelzbez());
    }

    if (kundesokoDtoI.getBDrucken() == null) {
      wcbDrucken.setSelected(false);
    } else {
      wcbDrucken.setSelected(Helper.short2boolean(kundesokoDtoI.getBDrucken()));
    }

    if (kundesokoDtoI.getBBemerkungdrucken() == null) {
      wcbBemerkungDrucken.setSelected(false);
    } else {
      wcbBemerkungDrucken.setSelected(Helper.short2boolean(kundesokoDtoI.getBBemerkungdrucken()));
    }

    if (kundesokoDtoI.getBRabattsichtbar() == null) {
      wcbRabattsichtbar.setSelected(false);
    } else {
      wcbRabattsichtbar.setSelected(Helper.short2boolean(kundesokoDtoI.getBRabattsichtbar()));
    }

    if (kundesokoDtoI.getBWirktNichtFuerPreisfindung() == null) {
      wcbWirktNichtInVerkaufspreisfindung.setSelected(false);
    } else {
      wcbWirktNichtInVerkaufspreisfindung.setSelected(
          Helper.short2boolean(kundesokoDtoI.getBWirktNichtFuerPreisfindung()));
    }
  }
  private void jbInit() throws Throwable {
    // von hier ...
    border = BorderFactory.createEmptyBorder(10, 10, 10, 10);
    setBorder(border);
    // das Aussenpanel hat immer das Gridbaglayout.
    gridBagLayoutAll = new GridBagLayout();
    this.setLayout(gridBagLayoutAll);

    // Actionpanel von Oberklasse holen und anhaengen.
    jpaButtonAction = getToolsPanel();
    this.setActionMap(null);

    getInternalFrame().addItemChangedListener(this);
    wlaTagesart.setText(LPMain.getInstance().getTextRespectUISPr("lp.tagesart"));
    wtfTagesart.setMandatoryField(true);
    wtfTagesart.setActivatable(false);
    wlaBeginn.setText(LPMain.getInstance().getTextRespectUISPr("lp.beginn"));
    wlaKommt.setText(LPMain.getInstance().getTextRespectUISPr("lp.ende"));
    wtfEnde.setMandatoryField(true);
    wtfBeginn.setMandatoryField(true);
    this.add(
        jpaButtonAction,
        new GridBagConstraints(
            0,
            0,
            1,
            1,
            0.0,
            0.0,
            GridBagConstraints.WEST,
            GridBagConstraints.NONE,
            new Insets(0, 0, 0, 0),
            0,
            0));

    // jetzt meine felder
    jpaWorkingOn = new JPanel();
    gridBagLayoutWorkingPanel = new GridBagLayout();
    jpaWorkingOn.setLayout(gridBagLayoutWorkingPanel);
    this.add(
        jpaWorkingOn,
        new GridBagConstraints(
            0,
            1,
            1,
            1,
            1.0,
            1.0,
            GridBagConstraints.SOUTHEAST,
            GridBagConstraints.BOTH,
            new Insets(0, 0, 0, 0),
            0,
            0));
    this.add(
        getPanelStatusbar(),
        new GridBagConstraints(
            0,
            2,
            1,
            1,
            1.0,
            0.0,
            GridBagConstraints.CENTER,
            GridBagConstraints.BOTH,
            new Insets(0, 0, 0, 0),
            0,
            0));
    this.add(
        getPanelStatusbar(),
        new GridBagConstraints(
            0,
            2,
            1,
            1,
            1.0,
            0.0,
            GridBagConstraints.CENTER,
            GridBagConstraints.BOTH,
            new Insets(0, 0, 0, 0),
            0,
            0));
    jpaWorkingOn.add(
        wlaTagesart,
        new GridBagConstraints(
            0,
            0,
            1,
            1,
            0.0,
            0.0,
            GridBagConstraints.CENTER,
            GridBagConstraints.HORIZONTAL,
            new Insets(0, 0, 0, 0),
            0,
            0));
    jpaWorkingOn.add(
        wtfTagesart,
        new GridBagConstraints(
            1,
            0,
            5,
            1,
            0.0,
            0.0,
            GridBagConstraints.WEST,
            GridBagConstraints.NONE,
            new Insets(2, 2, 2, 2),
            150,
            0));
    jpaWorkingOn.add(
        wlaBeginn,
        new GridBagConstraints(
            0,
            1,
            1,
            1,
            0.05,
            0.0,
            GridBagConstraints.CENTER,
            GridBagConstraints.HORIZONTAL,
            new Insets(0, 0, 0, 0),
            0,
            0));
    jpaWorkingOn.add(
        wtfBeginn,
        new GridBagConstraints(
            1,
            1,
            1,
            1,
            0.0,
            0.0,
            GridBagConstraints.CENTER,
            GridBagConstraints.HORIZONTAL,
            new Insets(0, 0, 0, 0),
            50,
            0));
    jpaWorkingOn.add(
        wlaKommt,
        new GridBagConstraints(
            2,
            1,
            1,
            1,
            0.05,
            0.0,
            GridBagConstraints.CENTER,
            GridBagConstraints.HORIZONTAL,
            new Insets(0, 0, 0, 0),
            0,
            0));
    jpaWorkingOn.add(
        wtfEnde,
        new GridBagConstraints(
            3,
            1,
            1,
            1,
            0.0,
            0.0,
            GridBagConstraints.CENTER,
            GridBagConstraints.HORIZONTAL,
            new Insets(0, 0, 0, 0),
            50,
            0));
    String[] aWhichButtonIUse = {
      ACTION_UPDATE, ACTION_SAVE, ACTION_DELETE, ACTION_DISCARD,
    };

    enableToolsPanelButtons(aWhichButtonIUse);
  }
예제 #6
0
  public final void eventYouAreSelected(boolean bNeedNoYouAreSelectedI) throws Throwable {

    super.eventYouAreSelected(true);

    wbuPasswort.setBackground(UIManager.getColor("Button.background"));

    // Die normale Telefon/Faxnummer vor der Durchwajl anzeigen
    PartnerDto dto = null;
    if (getInternalFrame() instanceof InternalFrameLieferant) {
      dto = ((InternalFrameLieferant) getInternalFrame()).getLieferantDto().getPartnerDto();
    } else if (getInternalFrame() instanceof InternalFrameKunde) {
      dto = ((InternalFrameKunde) getInternalFrame()).getKundeDto().getPartnerDto();
    } else if (getInternalFrame() instanceof InternalFramePartner) {
      dto = ((InternalFramePartner) getInternalFrame()).getTpPartner().getPartnerDto();
    }

    String cTelefon =
        DelegateFactory.getInstance()
            .getPartnerDelegate()
            .enrichNumber(dto.getIId(), PartnerFac.KOMMUNIKATIONSART_TELEFON, null, true);

    if (cTelefon != null) {

      LPMain.getInstance();
      wlaDurchwahl.setText(LPMain.getTextRespectUISPr("lp.durchwahl") + " (" + cTelefon + ")");
    } else {
      LPMain.getInstance();
      wlaDurchwahl.setText(LPMain.getTextRespectUISPr("lp.durchwahl"));
    }

    cTelefon =
        DelegateFactory.getInstance()
            .getPartnerDelegate()
            .enrichNumber(dto.getIId(), PartnerFac.KOMMUNIKATIONSART_FAX, null, true);

    if (cTelefon != null) {

      LPMain.getInstance();
      wlaFaxdurchwahl.setText(
          LPMain.getTextRespectUISPr("lp.faxdurchwahl") + " (" + cTelefon + ")");
    } else {
      LPMain.getInstance();
      wlaFaxdurchwahl.setText(LPMain.getTextRespectUISPr("lp.faxdurchwahl"));
    }

    if (!bNeedNoYouAreSelectedI) {
      Object key = getKeyWhenDetailPanel();

      setAnsprechpartnerDto(new AnsprechpartnerDto());

      if (key == null || (key != null && key.equals(LPMain.getLockMeForNew()))) {

        leereAlleFelder(this);
        setDefaults();
        clearStatusbar();
        if (key != null && key.equals(LPMain.getLockMeForNew())) {
          wtfAnsprechpartner.setActivatable(true);
          wtfAnsprechpartner.setEditable(true);
          wtfVorname.setActivatable(true);
          wtfVorname.setEditable(true);
          wtfTitel.setActivatable(true);
          wtfTitel.setEditable(true);
          wtfNtitel.setActivatable(true);
          wtfNtitel.setEditable(true);
          wdfGebDatum.setActivatable(true);
          wdfGebDatum.setEnabled(true);
          wcoAnrede.setActivatable(true);
          wcoAnrede.setEnabled(true);
        }
      } else {
        wtfAnsprechpartner.setActivatable(false);
        wtfAnsprechpartner.setEditable(false);
        wtfVorname.setActivatable(false);
        wtfVorname.setEditable(false);
        wtfTitel.setActivatable(false);
        wtfTitel.setEditable(false);
        wtfNtitel.setActivatable(false);
        wtfNtitel.setEditable(false);
        wdfGebDatum.setActivatable(false);
        wdfGebDatum.setEditable(false);
        wcoAnrede.setActivatable(false);
        wcoAnrede.setEditable(false);

        setAnsprechpartnerDto(
            DelegateFactory.getInstance()
                .getAnsprechpartnerDelegate()
                .ansprechpartnerFindByPrimaryKey((Integer) key));

        setStatusbar();

        dto2Components(dto);
      }

      getInternalFrame()
          .setLpTitle(InternalFrame.TITLE_IDX_AS_I_LIKE, getSelectedPartnerTitelAnrede());
    }
  }
예제 #7
0
  private void jbInit() throws Throwable {
    getInternalFrame().addItemChangedListener(this);

    // Buttons.
    String[] aButton = {
      PanelBasis.ACTION_UPDATE,
      PanelBasis.ACTION_SAVE,
      PanelBasis.ACTION_DELETE,
      PanelBasis.ACTION_DISCARD
    };
    enableToolsPanelButtons(aButton);

    // border = BorderFactory.createEmptyBorder(10, 10, 10, 10);
    // setBorder(border);

    // Das Aussenpanel hat immer das Gridbaglayout.
    gridBagLayoutAll = new GridBagLayout();
    setLayout(gridBagLayoutAll);

    // Ab hier Ansprechpartnerfelder.
    wlaGueltigAb = new WrapperLabel();
    LPMain.getInstance();
    wlaGueltigAb.setText(LPMain.getTextRespectUISPr("lp.gueltigab"));
    wdfGueltigAb = new WrapperDateField();
    wdfGueltigAb.setMandatoryFieldDB(true);

    wlaTitel = new WrapperLabel();
    wlaNtitel = new WrapperLabel();
    wlaVorname = new WrapperLabel();
    wlaGebDatum = new WrapperLabel();
    LPMain.getInstance();
    wlaTitel.setText(LPMain.getTextRespectUISPr("lp.titel"));
    LPMain.getInstance();
    wlaNtitel.setText(LPMain.getTextRespectUISPr("lp.ntitel"));
    LPMain.getInstance();
    wlaVorname = new WrapperLabel(LPMain.getTextRespectUISPr("lp.vorname"));
    wlaGebDatum.setText(LPMain.getTextRespectUISPr("pers.personalangehoerige.geburtsdatum"));

    wcbVersteckt.setText(LPMain.getTextRespectUISPr("lp.versteckt"));
    wcbNewsletterEmpfaenger.setText(
        LPMain.getTextRespectUISPr("part.ansprechpartner.newsletterempfaenger"));

    wlaAbteilung = new WrapperLabel(LPMain.getTextRespectUISPr("lp.abteilung"));
    wtfAbteilung = new WrapperTextField();

    wtfVorname = new WrapperTextField();
    wdfGebDatum = new WrapperDateField();
    wcoAnrede = new WrapperComboBox();
    wtfTitel = new WrapperTextField();
    wtfNtitel = new WrapperTextField();

    wtfAnsprechpartnerfunktion = new WrapperTextField();
    wtfAnsprechpartnerfunktion.setActivatable(false);
    wtfAnsprechpartnerfunktion.setMandatoryFieldDB(true);

    wbuAnsprechpartnerfunktion = new WrapperButton();
    wbuAnsprechpartnerfunktion.setText(LPMain.getTextRespectUISPr("part.ansprechpartner_funktion"));
    wbuAnsprechpartnerfunktion.setActionCommand(ACTION_SPECIAL_FLR_ANSPRECHPARTNER_FUNKTION);
    wbuAnsprechpartnerfunktion.addActionListener(this);

    // gotobutton: 3 Anstatt des WrapperButtons den WrapperGotoButton
    // verwenden
    wbuAnsprechpartner = new WrapperGotoButton(WrapperGotoButton.GOTO_PARTNER_AUSWAHL);
    wbuAnsprechpartner.setText(LPMain.getTextRespectUISPr("button.ansprechpartner.long"));
    wbuAnsprechpartner.setActionCommand(ACTION_SPECIAL_FLR_ANSPRECHPARTNER);
    wbuAnsprechpartner.addActionListener(this);

    wtfAnsprechpartner = new WrapperTextField();
    wtfAnsprechpartner.setMandatoryFieldDB(true);

    wlaBemerkung = new WrapperLabel(LPMain.getTextRespectUISPr("lp.bemerkung"));
    wlaBemerkung.setVerticalAlignment(SwingConstants.NORTH);
    wefBemerkung =
        new WrapperEditorFieldTexteingabe(
            getInternalFrame(), LPMain.getTextRespectUISPr("lp.bemerkung"));

    wlaDurchwahl = new WrapperLabel();
    wlaDurchwahl.setText(LPMain.getTextRespectUISPr("lp.durchwahl"));
    wlaDurchwahl.setMinimumSize(new Dimension(170, Defaults.getInstance().getControlHeight()));
    wlaDurchwahl.setPreferredSize(new Dimension(170, Defaults.getInstance().getControlHeight()));

    wtfDurchwahl = new WrapperTelefonField(PartnerFac.MAX_KOMMART_INHALT);
    wtfDurchwahl.setIstAnsprechpartner(true);
    wtfDurchwahl.setMinimumSize(new Dimension(170, Defaults.getInstance().getControlHeight()));
    wtfDurchwahl.setPreferredSize(new Dimension(170, Defaults.getInstance().getControlHeight()));

    wlaEmail = new WrapperLabel();
    LPMain.getInstance();
    wlaEmail.setText(LPMain.getTextRespectUISPr("lp.email"));
    wlaEmail.setMinimumSize(new Dimension(60, Defaults.getInstance().getControlHeight()));
    wlaEmail.setPreferredSize(new Dimension(60, Defaults.getInstance().getControlHeight()));
    wtfEmail = new WrapperEmailField();

    LPMain.getInstance();
    wlaFremdsystem =
        new WrapperLabel(LPMain.getTextRespectUISPr("part.ansprechpartner.fremdsystem"));
    wtfFremdsystem = new WrapperTextField(30);

    wlaFaxdurchwahl = new WrapperLabel();
    LPMain.getInstance();
    wlaFaxdurchwahl = new WrapperLabel(LPMain.getTextRespectUISPr("lp.faxdurchwahl"));
    wtfFaxdurchwahl = new WrapperTextField(PartnerFac.MAX_KOMMART_INHALT);

    wlaHandy = new WrapperLabel();
    LPMain.getInstance();
    wlaHandy = new WrapperLabel(LPMain.getTextRespectUISPr("lp.handy"));
    wtfHandy = new WrapperTelefonField(PartnerFac.MAX_KOMMART_INHALT);

    wlaDirektfax = new WrapperLabel();
    LPMain.getInstance();
    wlaDirektfax = new WrapperLabel(LPMain.getTextRespectUISPr("lp.direktfax"));
    wtfDirektfax = new WrapperTextField(PartnerFac.MAX_KOMMART_INHALT);

    wlaSort = new WrapperLabel();
    LPMain.getInstance();
    wlaSort = new WrapperLabel(LPMain.getTextRespectUISPr("label.sortierung"));
    wtfSort = new WrapperTextNumberField();
    wtfSort.setMandatoryFieldDB(true);
    wtfSort.setMinimumValue(new Integer(0));
    wtfSort.setMaximumDigits(4);
    wtfSort.setMaximumValue(new Integer(9999));

    wbuPasswort = new WrapperButton(LPMain.getTextRespectUISPr("part.ansprechpartner.passwort"));
    wbuPasswort.addActionListener(this);
    wbuPasswort.setActionCommand(ACTION_SPECIAL_PASSWORD);

    jpaWorkingOn = new JPanel(new MigLayout("wrap 8", "[25%][10%][20%][10%][10%][10%][20%]"));

    // Actionpanel von Oberklasse holen und einhaengen.
    panelButtonAction = getToolsPanel();
    add(
        panelButtonAction,
        new GridBagConstraints(
            0,
            0,
            1,
            1,
            0.0,
            0.0,
            GridBagConstraints.NORTHWEST,
            GridBagConstraints.HORIZONTAL,
            new Insets(0, 0, 0, 0),
            0,
            0));
    add(
        jpaWorkingOn,
        new GridBagConstraints(
            0,
            1,
            1,
            1,
            1.0,
            1.0,
            GridBagConstraints.SOUTH,
            GridBagConstraints.BOTH,
            new Insets(0, 0, 0, 0),
            0,
            0));

    // Statusbar an den unteren Rand des Panels haengen.
    add(
        getPanelStatusbar(),
        new GridBagConstraints(
            0,
            2,
            1,
            1,
            1.0,
            0.0,
            GridBagConstraints.CENTER,
            GridBagConstraints.BOTH,
            new Insets(0, 0, 0, 0),
            0,
            0));

    // Ab hier einhaengen.
    // Zeile

    jpaWorkingOn.add(wbuAnsprechpartner, "growx");
    jpaWorkingOn.add(wcoAnrede, "growx, width 70:70:70");
    jpaWorkingOn.add(wtfAnsprechpartner, "growx");
    jpaWorkingOn.add(wlaGebDatum, "growx, width 70:70:70");
    jpaWorkingOn.add(wdfGebDatum, "growx");
    jpaWorkingOn.add(wlaGueltigAb, "growx");
    jpaWorkingOn.add(wdfGueltigAb, "growx, span2");

    jpaWorkingOn.add(wcbNewsletterEmpfaenger, "growx");
    jpaWorkingOn.add(wlaVorname, "growx");
    jpaWorkingOn.add(wtfVorname, "growx");
    jpaWorkingOn.add(wlaTitel, "growx");
    jpaWorkingOn.add(wtfTitel, "growx");
    jpaWorkingOn.add(wlaNtitel, "growx, width 50:50:50");
    jpaWorkingOn.add(wtfNtitel, "growx, span2");

    jpaWorkingOn.add(wbuAnsprechpartnerfunktion, "growx");
    jpaWorkingOn.add(wtfAnsprechpartnerfunktion, "growx, span 2");
    jpaWorkingOn.add(wlaAbteilung, "growx");
    jpaWorkingOn.add(wtfAbteilung, "growx, span 3, wrap");

    jpaWorkingOn.add(wlaBemerkung, "top, growx");
    jpaWorkingOn.add(wefBemerkung, "grow, span");
    iZeile++;
    jpaWorkingOn.add(wlaDurchwahl, "growx");
    jpaWorkingOn.add(wtfDurchwahl, "growx, span 2");
    jpaWorkingOn.add(wlaEmail, "growx, span 2");
    jpaWorkingOn.add(wtfEmail, "growx, span");
    iZeile++;
    jpaWorkingOn.add(wlaFaxdurchwahl, "growx");
    jpaWorkingOn.add(wtfFaxdurchwahl, "growx, span 2");
    jpaWorkingOn.add(wlaHandy, "growx, span 2");
    jpaWorkingOn.add(wtfHandy, "growx, span");
    iZeile++;
    jpaWorkingOn.add(wlaDirektfax, "growx");
    jpaWorkingOn.add(wtfDirektfax, "growx, span 2");
    jpaWorkingOn.add(wlaFremdsystem, "growx, span 2");
    jpaWorkingOn.add(wtfFremdsystem, "growx, span");
    iZeile++;
    jpaWorkingOn.add(wlaSort, "top, growx");
    jpaWorkingOn.add(wtfSort, "top, growx, span 2");

    if (DelegateFactory.getInstance()
        .getTheJudgeDelegate()
        .hatRecht(com.lp.server.benutzer.service.RechteFac.RECHT_LP_DARF_VERSTECKTE_SEHEN)) {
      jpaWorkingOn.add(wcbVersteckt, "skip 2, growx, width 80:80:80");
    } else {
      jpaWorkingOn.add(new WrapperLabel(""), "skip 2, growx");
    }

    jpaWorkingOn.add(wbuPasswort, "growx");

    // Zeile

    createAndSaveAndShowButton(
        "/com/lp/client/res/book_open2.png",
        LPMain.getTextRespectUISPr("part.partner.export.vcard"),
        ACTION_SPECIAL_VCARD_EXPORT,
        null);
  }
  private void jbInit() throws Throwable {
    wlaDatumKW.setText(LPMain.getTextRespectUISPr("lp.datum") + ":");

    wbuZeitenAbschliessen.setText(
        LPMain.getTextRespectUISPr("pers.report.wochenabschluss.zeitenabschliessen"));
    wbuZeitenAbschliessen.setEnabled(false);
    wbuZeitenAbschliessen.addActionListener(this);

    wbuKWZurueck.setText("<");
    wbuKWZurueck.addActionListener(this);

    wbuNaechsteKW.setText(">");
    wbuNaechsteKW.addActionListener(this);

    wcoInVorschauBleiben.setText(
        LPMain.getTextRespectUISPr("pers.wochenabschluss.report.invorschaubleiben"));

    wdfKW.setMandatoryField(true);
    wdfKW.getDisplay().addPropertyChangeListener(this);

    Calendar c = Calendar.getInstance();
    c.add(Calendar.DAY_OF_MONTH, -7);
    wdfKW.setDate(c.getTime());

    jpaWorkingOn.setLayout(gridBagLayout1);
    this.add(
        jpaWorkingOn,
        new GridBagConstraints(
            0,
            0,
            1,
            1,
            1.0,
            1.0,
            GridBagConstraints.WEST,
            GridBagConstraints.BOTH,
            new Insets(0, 0, 0, 0),
            0,
            0));

    iZeile++;
    jpaWorkingOn.add(
        wlaDatumKW,
        new GridBagConstraints(
            0,
            iZeile,
            1,
            1,
            0.0,
            0.0,
            GridBagConstraints.CENTER,
            GridBagConstraints.HORIZONTAL,
            new Insets(2, 2, 2, 2),
            100,
            0));
    jpaWorkingOn.add(
        wdfKW,
        new GridBagConstraints(
            1,
            iZeile,
            1,
            1,
            0.1,
            0.0,
            GridBagConstraints.CENTER,
            GridBagConstraints.HORIZONTAL,
            new Insets(2, 2, 2, 2),
            0,
            0));
    jpaWorkingOn.add(
        wbuKWZurueck,
        new GridBagConstraints(
            2,
            iZeile,
            1,
            1,
            0.1,
            0.0,
            GridBagConstraints.CENTER,
            GridBagConstraints.HORIZONTAL,
            new Insets(2, 2, 2, 2),
            10,
            0));
    jpaWorkingOn.add(
        wlaKW,
        new GridBagConstraints(
            3,
            iZeile,
            1,
            1,
            0.1,
            0.0,
            GridBagConstraints.CENTER,
            GridBagConstraints.HORIZONTAL,
            new Insets(2, 2, 2, 2),
            200,
            0));
    jpaWorkingOn.add(
        wbuNaechsteKW,
        new GridBagConstraints(
            4,
            iZeile,
            1,
            1,
            0.1,
            0.0,
            GridBagConstraints.WEST,
            GridBagConstraints.NONE,
            new Insets(2, 20, 2, 2),
            10,
            0));
    iZeile++;
    jpaWorkingOn.add(
        wbuZeitenAbschliessen,
        new GridBagConstraints(
            4,
            iZeile,
            1,
            1,
            1,
            1,
            GridBagConstraints.CENTER,
            GridBagConstraints.HORIZONTAL,
            new Insets(2, 20, 2, 2),
            0,
            0));
    jpaWorkingOn.add(
        wcoInVorschauBleiben,
        new GridBagConstraints(
            3,
            iZeile,
            1,
            1,
            0.1,
            0.0,
            GridBagConstraints.CENTER,
            GridBagConstraints.HORIZONTAL,
            new Insets(2, 2, 2, 2),
            0,
            0));
  }
예제 #9
0
  private void jbInit() throws Throwable {
    // von hier ...
    border = BorderFactory.createEmptyBorder(10, 10, 10, 10);
    setBorder(border);
    // das Aussenpanel hat immer das Gridbaglayout.
    gridBagLayoutAll = new GridBagLayout();
    this.setLayout(gridBagLayoutAll);

    // Actionpanel von Oberklasse holen und anhaengen.
    jpaButtonAction = getToolsPanel();
    this.setActionMap(null);

    wtfKennung.setColumnsMax(BenutzerFac.MAX_BENUTZER_KENNUNG);
    wtfKennung.setText("");
    wtfKennung.setMandatoryField(true);
    wtfKennung.setActivatable(false);

    getInternalFrame().addItemChangedListener(this);

    wlaKennung.setText(LPMain.getInstance().getTextRespectUISPr("label.kennung"));
    wlaBezeichnung.setText(LPMain.getInstance().getTextRespectUISPr("lp.bezeichnung"));
    wbuThema.setText(LPMain.getInstance().getTextRespectUISPr("ben.thema") + "...");
    wbuThema.setActionCommand(ACTION_SPECIAL_THEMA_FROM_LISTE);
    wbuThema.addActionListener(this);

    wtfThema.setActivatable(false);
    wtfThema.setMandatoryField(true);

    wtfThema.setText("");
    wcbPopup.setText(LPMain.getInstance().getTextRespectUISPr("ben.popup"));
    wcbArchivieren.setText(LPMain.getInstance().getTextRespectUISPr("ben.archivieren"));

    this.add(
        jpaButtonAction,
        new GridBagConstraints(
            0,
            0,
            1,
            1,
            0.0,
            0.0,
            GridBagConstraints.WEST,
            GridBagConstraints.NONE,
            new Insets(0, 0, 0, 0),
            0,
            0));

    // jetzt meine felder
    jpaWorkingOn = new JPanel();
    gridBagLayoutWorkingPanel = new GridBagLayout();
    jpaWorkingOn.setLayout(gridBagLayoutWorkingPanel);
    this.add(
        jpaWorkingOn,
        new GridBagConstraints(
            0,
            1,
            1,
            1,
            1.0,
            1.0,
            GridBagConstraints.SOUTHEAST,
            GridBagConstraints.BOTH,
            new Insets(0, 0, 0, 0),
            0,
            0));
    this.add(
        getPanelStatusbar(),
        new GridBagConstraints(
            0,
            2,
            1,
            1,
            1.0,
            0.0,
            GridBagConstraints.CENTER,
            GridBagConstraints.BOTH,
            new Insets(0, 0, 0, 0),
            0,
            0));

    iZeile++;

    jpaWorkingOn.add(
        wtfKennung,
        new GridBagConstraints(
            1,
            iZeile,
            1,
            1,
            0.5,
            0.0,
            GridBagConstraints.CENTER,
            GridBagConstraints.HORIZONTAL,
            new Insets(2, 2, 2, 2),
            0,
            0));
    jpaWorkingOn.add(
        wlaKennung,
        new GridBagConstraints(
            0,
            iZeile,
            1,
            1,
            0.3,
            0.0,
            GridBagConstraints.CENTER,
            GridBagConstraints.HORIZONTAL,
            new Insets(0, 0, 0, 0),
            0,
            0));
    iZeile++;
    jpaWorkingOn.add(
        wtfBezeichnung,
        new GridBagConstraints(
            1,
            iZeile,
            1,
            1,
            0.5,
            0.0,
            GridBagConstraints.CENTER,
            GridBagConstraints.HORIZONTAL,
            new Insets(2, 2, 2, 2),
            0,
            0));
    jpaWorkingOn.add(
        wlaBezeichnung,
        new GridBagConstraints(
            0,
            iZeile,
            1,
            1,
            0.3,
            0.0,
            GridBagConstraints.CENTER,
            GridBagConstraints.HORIZONTAL,
            new Insets(0, 1, 0, 0),
            0,
            0));
    iZeile++;
    jpaWorkingOn.add(
        wbuThema,
        new GridBagConstraints(
            0,
            iZeile,
            1,
            1,
            0.0,
            0.0,
            GridBagConstraints.CENTER,
            GridBagConstraints.HORIZONTAL,
            new Insets(2, 2, 2, 2),
            0,
            0));
    jpaWorkingOn.add(
        wtfThema,
        new GridBagConstraints(
            1,
            iZeile,
            1,
            1,
            0.0,
            0.0,
            GridBagConstraints.CENTER,
            GridBagConstraints.HORIZONTAL,
            new Insets(2, 2, 2, 2),
            0,
            0));
    iZeile++;

    jpaWorkingOn.add(
        wcbPopup,
        new GridBagConstraints(
            1,
            iZeile,
            1,
            1,
            0.0,
            0.0,
            GridBagConstraints.CENTER,
            GridBagConstraints.HORIZONTAL,
            new Insets(0, 0, 0, 0),
            0,
            0));
    iZeile++;
    jpaWorkingOn.add(
        wcbArchivieren,
        new GridBagConstraints(
            1,
            iZeile,
            1,
            1,
            0.0,
            0.0,
            GridBagConstraints.CENTER,
            GridBagConstraints.HORIZONTAL,
            new Insets(0, 0, 0, 0),
            0,
            0));

    String[] aWhichButtonIUse = {
      ACTION_UPDATE, ACTION_SAVE, ACTION_DISCARD,
    };

    enableToolsPanelButtons(aWhichButtonIUse);
  }
  private void jbInit() throws Throwable {
    panelUrlaubsanspruch.setLayout(gridBagLayout1);

    wlaArtikelnummer.setText(LPMain.getInstance().getTextRespectUISPr("artikel.artikelnummer"));
    wlaSerienChargennummer.setText(
        LPMain.getInstance()
            .getTextRespectUISPr("artikel.handlagerbewegung.seriennrchargennreinzeln"));
    wlaMenge.setText(LPMain.getInstance().getTextRespectUISPr("lp.menge"));

    wlaBezeichnung.setText(LPMain.getInstance().getTextRespectUISPr("lp.bezeichnung"));
    wtfBezeichnung.setEnabled(false);
    wtfSerienChargennummer.setEnabled(false);

    wtfArtikelnummer.addKeyListener(this);

    wtfSerienChargennummer.addKeyListener(this);
    wnfMenge.setFractionDigits(Defaults.getInstance().getIUINachkommastellenMenge());
    wnfMenge.addKeyListener(this);

    wbuFertig.setText(LPMain.getInstance().getTextRespectUISPr("lp.beenden"));
    wbuFertig.addActionListener(
        new DialogAuftragspositionenSchnellerfassung_wbuFertig_actionAdapter(this));
    this.getContentPane().setLayout(gridBagLayout2);

    this.getContentPane()
        .add(
            panelUrlaubsanspruch,
            new GridBagConstraints(
                0,
                0,
                1,
                1,
                1.0,
                1.0,
                GridBagConstraints.CENTER,
                GridBagConstraints.BOTH,
                new Insets(0, 0, 0, 0),
                250,
                50));

    panelUrlaubsanspruch.add(
        wtfArtikelnummer,
        new GridBagConstraints(
            2,
            1,
            1,
            1,
            0.2,
            0.0,
            GridBagConstraints.CENTER,
            GridBagConstraints.HORIZONTAL,
            new Insets(2, 2, 2, 2),
            0,
            0));
    panelUrlaubsanspruch.add(
        wlaArtikelnummer,
        new GridBagConstraints(
            0,
            1,
            1,
            1,
            0.15,
            0.0,
            GridBagConstraints.CENTER,
            GridBagConstraints.HORIZONTAL,
            new Insets(2, 2, 2, 2),
            0,
            0));

    panelUrlaubsanspruch.add(
        wtfBezeichnung,
        new GridBagConstraints(
            2,
            2,
            1,
            1,
            0.0,
            0.0,
            GridBagConstraints.CENTER,
            GridBagConstraints.HORIZONTAL,
            new Insets(2, 2, 2, 2),
            0,
            0));
    panelUrlaubsanspruch.add(
        wlaBezeichnung,
        new GridBagConstraints(
            0,
            2,
            1,
            1,
            0.0,
            0.0,
            GridBagConstraints.CENTER,
            GridBagConstraints.HORIZONTAL,
            new Insets(2, 2, 2, 2),
            0,
            0));

    panelUrlaubsanspruch.add(
        wlaSerienChargennummer,
        new GridBagConstraints(
            0,
            3,
            1,
            1,
            0.0,
            0.0,
            GridBagConstraints.CENTER,
            GridBagConstraints.HORIZONTAL,
            new Insets(0, 0, 0, 0),
            0,
            0));
    panelUrlaubsanspruch.add(
        wtfSerienChargennummer,
        new GridBagConstraints(
            2,
            3,
            1,
            1,
            0.0,
            0.0,
            GridBagConstraints.CENTER,
            GridBagConstraints.HORIZONTAL,
            new Insets(2, 2, 2, 2),
            0,
            0));
    panelUrlaubsanspruch.add(
        wlaMenge,
        new GridBagConstraints(
            0,
            4,
            1,
            1,
            0.0,
            0.0,
            GridBagConstraints.CENTER,
            GridBagConstraints.HORIZONTAL,
            new Insets(0, 0, 0, 0),
            0,
            0));
    panelUrlaubsanspruch.add(
        wnfMenge,
        new GridBagConstraints(
            2,
            4,
            1,
            1,
            0.0,
            0.0,
            GridBagConstraints.CENTER,
            GridBagConstraints.HORIZONTAL,
            new Insets(2, 2, 2, 2),
            0,
            0));
    panelUrlaubsanspruch.add(
        wbuFertig,
        new GridBagConstraints(
            2,
            5,
            1,
            1,
            0.0,
            0.0,
            GridBagConstraints.CENTER,
            GridBagConstraints.HORIZONTAL,
            new Insets(2, 2, 2, 2),
            0,
            0));
  }
  private void jbInit() throws Throwable {
    this.setLayout(gridBagLayout1);
    jpaWorkingOn.setLayout(gridBagLayout2);

    wlaDatumVon.setText(LPMain.getInstance().getTextRespectUISPr("lp.von"));
    wlaDatumBis.setText(LPMain.getInstance().getTextRespectUISPr("lp.bis"));
    wdfDatumVon.setTimestamp(new java.sql.Timestamp(System.currentTimeMillis() - 24 * 3600000));
    wdfDatumBis.setTimestamp(new java.sql.Timestamp(System.currentTimeMillis() - 24 * 3600000));

    wdrBereich = new WrapperDateRangeController(wdfDatumVon, wdfDatumBis);

    wdfDatumVon.setMandatoryField(true);
    wdfDatumBis.setMandatoryField(true);

    wsfArtikelklasse =
        new WrapperSelectField(WrapperSelectField.ARTIKELKLASSE, getInternalFrame(), true);

    wbuArtikelnrVon.setText(
        LPMain.getTextRespectUISPr("artikel.artikelnummer")
            + " "
            + LPMain.getTextRespectUISPr("lp.von"));
    wbuArtikelnrBis.setText(
        LPMain.getTextRespectUISPr("artikel.artikelnummer")
            + " "
            + LPMain.getTextRespectUISPr("lp.bis"));
    wtfArtikelnrVon.setActivatable(false);
    wtfArtikelnrBis.setActivatable(false);

    wtfArtikelnrVon.setActivatable(false);

    wbuArtikelnrVon.setActionCommand(ACTION_SPECIAL_ARTIKELVON_FROM_LISTE);
    wbuArtikelnrVon.addActionListener(this);

    wbuArtikelnrBis.setActionCommand(ACTION_SPECIAL_ARTIKELBIS_FROM_LISTE);
    wbuArtikelnrBis.addActionListener(this);

    wbuBranche = new WrapperButton();
    wbuBranche.setActionCommand(ACTION_SPECIAL_FLR_BRANCHE);
    wbuBranche.setActivatable(false);
    wbuBranche.addActionListener(this);

    wbuBranche.setText(LPMain.getInstance().getTextRespectUISPr("button.branche"));
    wtfBranche = new WrapperTextField(PartnerFac.MAX_BRANCHE);
    wtfBranche.setActivatable(false);

    getInternalFrame().addItemChangedListener(this);
    this.add(
        jpaWorkingOn,
        new GridBagConstraints(
            0,
            0,
            1,
            1,
            1.0,
            1.0,
            GridBagConstraints.WEST,
            GridBagConstraints.BOTH,
            new Insets(0, 0, 0, 0),
            0,
            0));
    int iZeile = 0;

    iZeile++;
    jpaWorkingOn.add(
        wlaDatumVon,
        new GridBagConstraints(
            0,
            iZeile,
            1,
            1,
            50,
            0.0,
            GridBagConstraints.CENTER,
            GridBagConstraints.HORIZONTAL,
            new Insets(2, 2, 2, 2),
            0,
            0));
    jpaWorkingOn.add(
        wdfDatumVon,
        new GridBagConstraints(
            1,
            iZeile,
            1,
            1,
            0,
            0.0,
            GridBagConstraints.CENTER,
            GridBagConstraints.HORIZONTAL,
            new Insets(2, 2, 2, 2),
            100,
            0));
    jpaWorkingOn.add(
        wlaDatumBis,
        new GridBagConstraints(
            2,
            iZeile,
            1,
            1,
            50,
            0.0,
            GridBagConstraints.CENTER,
            GridBagConstraints.HORIZONTAL,
            new Insets(2, 2, 2, 2),
            0,
            0));
    jpaWorkingOn.add(
        wdfDatumBis,
        new GridBagConstraints(
            3,
            iZeile,
            1,
            1,
            0,
            0.0,
            GridBagConstraints.CENTER,
            GridBagConstraints.HORIZONTAL,
            new Insets(2, 2, 2, 2),
            100,
            0));
    jpaWorkingOn.add(
        wdrBereich,
        new GridBagConstraints(
            4,
            iZeile,
            1,
            1,
            0,
            0.0,
            GridBagConstraints.WEST,
            GridBagConstraints.BOTH,
            new Insets(2, 2, 2, 0),
            0,
            0));

    iZeile++;

    jpaWorkingOn.add(
        wbuArtikelnrVon,
        new GridBagConstraints(
            0,
            iZeile,
            1,
            1,
            50,
            0.0,
            GridBagConstraints.CENTER,
            GridBagConstraints.HORIZONTAL,
            new Insets(2, 2, 2, 2),
            0,
            0));
    jpaWorkingOn.add(
        wtfArtikelnrVon,
        new GridBagConstraints(
            1,
            iZeile,
            1,
            1,
            0,
            0.0,
            GridBagConstraints.CENTER,
            GridBagConstraints.HORIZONTAL,
            new Insets(2, 2, 2, 2),
            0,
            0));
    jpaWorkingOn.add(
        wbuArtikelnrBis,
        new GridBagConstraints(
            2,
            iZeile,
            1,
            1,
            50,
            0.0,
            GridBagConstraints.CENTER,
            GridBagConstraints.HORIZONTAL,
            new Insets(2, 2, 2, 2),
            0,
            0));
    jpaWorkingOn.add(
        wtfArtikelnrBis,
        new GridBagConstraints(
            3,
            iZeile,
            1,
            1,
            0,
            0.0,
            GridBagConstraints.CENTER,
            GridBagConstraints.HORIZONTAL,
            new Insets(2, 2, 2, 2),
            0,
            0));

    iZeile++;

    jpaWorkingOn.add(
        wsfArtikelklasse.getWrapperButton(),
        new GridBagConstraints(
            0,
            iZeile,
            1,
            1,
            50,
            0.0,
            GridBagConstraints.CENTER,
            GridBagConstraints.HORIZONTAL,
            new Insets(2, 2, 2, 2),
            0,
            0));
    jpaWorkingOn.add(
        wsfArtikelklasse.getWrapperTextField(),
        new GridBagConstraints(
            1,
            iZeile,
            1,
            1,
            0,
            0.0,
            GridBagConstraints.CENTER,
            GridBagConstraints.HORIZONTAL,
            new Insets(2, 2, 2, 2),
            0,
            0));
    iZeile++;

    jpaWorkingOn.add(
        wbuBranche,
        new GridBagConstraints(
            0,
            iZeile,
            1,
            1,
            50,
            0.0,
            GridBagConstraints.CENTER,
            GridBagConstraints.HORIZONTAL,
            new Insets(2, 2, 2, 2),
            0,
            0));
    jpaWorkingOn.add(
        wtfBranche,
        new GridBagConstraints(
            1,
            iZeile,
            1,
            1,
            0,
            0.0,
            GridBagConstraints.CENTER,
            GridBagConstraints.HORIZONTAL,
            new Insets(2, 2, 2, 2),
            0,
            0));
  }
  /**
   * Dialog initialisieren
   *
   * @throws Throwable
   */
  private void jbInit() throws Throwable {
    // die Gruppe mit nach Datum
    wlaNachdatum = new WrapperLabel(LPMain.getTextRespectUISPr("label.auswertung"));
    wlaNachdatum.setMaximumSize(new Dimension(120, 23));
    wlaNachdatum.setMinimumSize(new Dimension(120, 23));
    wlaNachdatum.setPreferredSize(new Dimension(120, 23));
    wlaNachdatum.setHorizontalAlignment(SwingConstants.LEADING);

    wlaEmptyLabel1 = new WrapperLabel();
    wlaEmptyLabel1.setMaximumSize(new Dimension(10, 23));
    wlaEmptyLabel1.setMinimumSize(new Dimension(10, 23));
    wlaEmptyLabel1.setPreferredSize(new Dimension(10, 23));

    jbgNachdatum = new ButtonGroup();
    jbgJahr = new ButtonGroup();

    wrbBelegdatum = new WrapperRadioButton();
    wrbBelegdatum.setText(LPMain.getTextRespectUISPr("label.belegdatum"));

    wrbFreigabedatum = new WrapperRadioButton();
    wrbFreigabedatum.setText(LPMain.getTextRespectUISPr("label.freigabedatum"));

    wrbKalenderjahr = new WrapperRadioButton();
    wrbKalenderjahr.setText(LPMain.getTextRespectUISPr("label.kalenderjahr"));

    wrbGeschaeftsjahr = new WrapperRadioButton();
    wrbGeschaeftsjahr.setText(LPMain.getTextRespectUISPr("label.geschaeftsjahr"));

    jbgNachdatum.add(wrbBelegdatum);
    jbgNachdatum.add(wrbFreigabedatum);

    jbgJahr.add(wrbGeschaeftsjahr);
    jbgJahr.add(wrbKalenderjahr);

    wlaEmptyLabel2 = new WrapperLabel();

    wlaPeriode = new WrapperLabel(LPMain.getTextRespectUISPr("label.periode"));
    wlaPeriode.setHorizontalAlignment(SwingConstants.LEADING);
    wlaEmptyLabel3 = new WrapperLabel();
    wcoGeschaeftsjahr = new WrapperComboBox();
    wcoGeschaeftsjahr.setMandatoryField(true);

    jpaWorkingOn.add(
        wlaNachdatum,
        new GridBagConstraints(
            0,
            iZeile,
            2,
            1,
            0.0,
            0.0,
            GridBagConstraints.CENTER,
            GridBagConstraints.BOTH,
            new Insets(2, 2, 2, 2),
            0,
            0));
    iZeile++;
    jpaWorkingOn.add(
        wlaEmptyLabel1,
        new GridBagConstraints(
            0,
            iZeile,
            1,
            1,
            0.0,
            0.0,
            GridBagConstraints.CENTER,
            GridBagConstraints.BOTH,
            new Insets(2, 2, 2, 2),
            0,
            0));
    jpaWorkingOn.add(
        wrbBelegdatum,
        new GridBagConstraints(
            1,
            iZeile,
            1,
            1,
            0.0,
            0.0,
            GridBagConstraints.CENTER,
            GridBagConstraints.BOTH,
            new Insets(0, 0, 0, 0),
            0,
            0));
    iZeile++;
    jpaWorkingOn.add(
        wrbFreigabedatum,
        new GridBagConstraints(
            1,
            iZeile,
            1,
            1,
            0.0,
            0.0,
            GridBagConstraints.CENTER,
            GridBagConstraints.BOTH,
            new Insets(0, 0, 0, 0),
            0,
            0));
    iZeile++;
    jpaWorkingOn.add(
        wlaPeriode,
        new GridBagConstraints(
            0,
            iZeile,
            2,
            1,
            0.0,
            0.0,
            GridBagConstraints.CENTER,
            GridBagConstraints.BOTH,
            new Insets(2, 2, 2, 2),
            0,
            0));
    iZeile++;
    jpaWorkingOn.add(
        wrbKalenderjahr,
        new GridBagConstraints(
            1,
            iZeile,
            1,
            1,
            0.0,
            0.0,
            GridBagConstraints.CENTER,
            GridBagConstraints.BOTH,
            new Insets(0, 0, 0, 0),
            0,
            0));
    iZeile++;
    jpaWorkingOn.add(
        wrbGeschaeftsjahr,
        new GridBagConstraints(
            1,
            iZeile,
            1,
            1,
            0.0,
            0.0,
            GridBagConstraints.CENTER,
            GridBagConstraints.BOTH,
            new Insets(0, 0, 0, 0),
            0,
            0));
    iZeile++;
    jpaWorkingOn.add(
        wlaEmptyLabel2,
        new GridBagConstraints(
            0,
            iZeile,
            1,
            1,
            0.0,
            0.0,
            GridBagConstraints.CENTER,
            GridBagConstraints.BOTH,
            new Insets(2, 2, 2, 2),
            0,
            0));

    iZeile++;
    jpaWorkingOn.add(
        wlaEmptyLabel3,
        new GridBagConstraints(
            0,
            iZeile,
            1,
            1,
            0.0,
            0.0,
            GridBagConstraints.CENTER,
            GridBagConstraints.BOTH,
            new Insets(2, 2, 2, 2),
            0,
            0));
    jpaWorkingOn.add(
        wcoGeschaeftsjahr,
        new GridBagConstraints(
            1,
            iZeile,
            1,
            1,
            0.0,
            0.0,
            GridBagConstraints.CENTER,
            GridBagConstraints.BOTH,
            new Insets(2, 2, 2, 2),
            0,
            0));
  }
  private void jbInit() throws Throwable {
    getInternalFrame().addItemChangedListener(this);

    wlaGestehungspreis =
        new WrapperLabel(LPMain.getInstance().getTextRespectUISPr("lp.gestehungspreis"));
    wnfGestehungspreis = new WrapperNumberField();
    wnfGestehungspreis.setActivatable(false);
    wnfGestehungspreis.setFractionDigits(iPreiseUINachkommastellen);
    wlaWaehrungGestehungspreis = new WrapperLabel(waehrungCNr);
    wlaWaehrungGestehungspreis.setHorizontalAlignment(SwingConstants.LEADING);

    wlaMinverkaufspreis =
        new WrapperLabel(LPMain.getInstance().getTextRespectUISPr("lp.minverkaufspreisshort"));
    wnfMinverkaufspreis = new WrapperNumberField();
    wnfMinverkaufspreis.setActivatable(false);
    wnfMinverkaufspreis.setFractionDigits(iPreiseUINachkommastellen);
    wlaWaehrungMinverkaufspreis = new WrapperLabel(waehrungCNr);
    wlaWaehrungMinverkaufspreis.setHorizontalAlignment(SwingConstants.LEADING);

    wcbWirktNichtInVerkaufspreisfindung =
        new WrapperCheckBox(
            LPMain.getInstance()
                .getTextRespectUISPr("part.kundesoko.artikel.wirktnichtinpreisfindung"));

    // PJ 17390
    ParametermandantDto parameter =
        (ParametermandantDto)
            DelegateFactory.getInstance()
                .getParameterDelegate()
                .getParametermandant(
                    ParameterFac.PARAMETER_PREISBASIS_VERKAUF,
                    ParameterFac.KATEGORIE_KUNDEN,
                    LPMain.getTheClient().getMandant());

    if (parameter.getCWert() != null) {

      iPreisbasis = (Integer) parameter.getCWertAsObject();
    }

    if (iPreisbasis == 0 || iPreisbasis == 2) {
      wlaVkbasis =
          new WrapperLabel(
              LPMain.getInstance().getTextRespectUISPr("artikel.label.einzelverkaufspreis"));
    } else {
      wlaVkbasis =
          new WrapperLabel(
              LPMain.getInstance().getTextRespectUISPr("part.kundensoko.preisbasis.preisliste"));
    }

    wnfVkbasis = new WrapperNumberField();
    wnfVkbasis.setFractionDigits(iPreiseUINachkommastellen);
    wnfVkbasis.setActivatable(false);
    wlaVkbasiswaehrung = new WrapperLabel(waehrungCNr);
    wlaVkbasiswaehrung.setHorizontalAlignment(SwingConstants.LEADING);
    wlaVkbasisGueltigab =
        new WrapperLabel(LPMain.getInstance().getTextRespectUISPr("vkpf.vkbasisgueltigab"));
    wdfVkbasisGueltigab = new WrapperDateField();
    wdfVkbasisGueltigab.setActivatable(false);

    wlaFixpreis = new WrapperLabel(LPMain.getInstance().getTextRespectUISPr("lp.fixpreis"));
    wlaFixpreis.setHorizontalAlignment(SwingConstants.LEADING);
    wlaFixpreis.setVerticalAlignment(SwingConstants.BOTTOM);
    wlaBerechneterpreis =
        new WrapperLabel(LPMain.getInstance().getTextRespectUISPr("lp.berechneterpreis"));
    wlaBerechneterpreis.setHorizontalAlignment(SwingConstants.LEADING);
    wlaBerechneterpreis.setVerticalAlignment(SwingConstants.BOTTOM);

    wnfFixpreis = new WrapperNumberField();
    wnfFixpreis.setFractionDigits(iPreiseUINachkommastellen);
    wnfFixpreis.setDependenceField(true);
    wnfFixpreis.addFocusListener(new PanelMengenstaffelArtikel_fixpreis_focusAdapter(this));

    wlaFixpreiswaehrung = new WrapperLabel(waehrungCNr);
    wlaFixpreiswaehrung.setHorizontalAlignment(SwingConstants.LEADING);

    wnfBerechneterpreis = new WrapperNumberField();
    wnfBerechneterpreis.setFractionDigits(iPreiseUINachkommastellen);
    wnfBerechneterpreis.setActivatable(false);
    wnfBerechneterpreis.setDependenceField(true);

    wlaBerechneterpreiswaehrung = new WrapperLabel(waehrungCNr);
    wlaBerechneterpreiswaehrung.setHorizontalAlignment(SwingConstants.LEADING);

    initMengeRabattsatz();

    wnfRabattsatz.addFocusListener(new PanelMengenstaffelArtikel_rabattsatz_focusAdapter(this));

    wifArtikel = new WrapperIdentField(getInternalFrame(), this);
    wifArtikel.addEinheitLabel(wlaMengeeinheit);

    addFormatierungszeile();

    iZeile++;
    add(
        wifArtikel.getWbuArtikel(),
        new GridBagConstraints(
            0,
            iZeile,
            2,
            1,
            0.0,
            0.0,
            GridBagConstraints.NORTH,
            GridBagConstraints.HORIZONTAL,
            new Insets(2, 2, 2, 2),
            0,
            0));
    add(
        wifArtikel.getWtfIdent(),
        new GridBagConstraints(
            2,
            iZeile,
            1,
            1,
            0.0,
            0.0,
            GridBagConstraints.NORTH,
            GridBagConstraints.HORIZONTAL,
            new Insets(2, 2, 2, 2),
            0,
            0));
    add(
        wifArtikel.getWtfBezeichnung(),
        new GridBagConstraints(
            4,
            iZeile,
            4,
            1,
            1.0,
            0.0,
            GridBagConstraints.NORTH,
            GridBagConstraints.HORIZONTAL,
            new Insets(2, 2, 2, 2),
            0,
            0));

    if (bMitUebersteuerbarenArtikelbezeichnungen) {
      iZeile++;
      wlaKndArtBez =
          new WrapperLabel(LPMain.getInstance().getTextRespectUISPr("artikel.kundesoko.kndartbez"));

      add(
          wlaKndArtBez,
          new GridBagConstraints(
              2,
              iZeile,
              2,
              1,
              0.0,
              0.0,
              GridBagConstraints.NORTH,
              GridBagConstraints.HORIZONTAL,
              new Insets(2, 2, 2, 2),
              0,
              0));

      wtfKndArtBez = new WrapperTextField(40);
      wtfKndArtZBez = new WrapperTextField(25);
      add(
          wtfKndArtBez,
          new GridBagConstraints(
              4,
              iZeile,
              4,
              1,
              1.0,
              0.0,
              GridBagConstraints.NORTH,
              GridBagConstraints.HORIZONTAL,
              new Insets(2, 2, 2, 2),
              0,
              0));
    }

    iZeile++;

    add(
        wlaGestehungspreis,
        new GridBagConstraints(
            0,
            iZeile,
            2,
            1,
            0.0,
            0.0,
            GridBagConstraints.NORTH,
            GridBagConstraints.HORIZONTAL,
            new Insets(2, 2, 2, 2),
            0,
            0));
    add(
        wnfGestehungspreis,
        new GridBagConstraints(
            2,
            iZeile,
            1,
            1,
            0.0,
            0.0,
            GridBagConstraints.NORTH,
            GridBagConstraints.HORIZONTAL,
            new Insets(2, 2, 2, 2),
            0,
            0));
    add(
        wlaWaehrungGestehungspreis,
        new GridBagConstraints(
            3,
            iZeile,
            1,
            1,
            0.0,
            0.0,
            GridBagConstraints.NORTH,
            GridBagConstraints.HORIZONTAL,
            new Insets(2, 2, 2, 2),
            0,
            0));
    if (bMitUebersteuerbarenArtikelbezeichnungen) {
      add(
          wtfKndArtZBez,
          new GridBagConstraints(
              4,
              iZeile,
              4,
              1,
              1.0,
              0.0,
              GridBagConstraints.NORTH,
              GridBagConstraints.HORIZONTAL,
              new Insets(2, 2, 2, 2),
              0,
              0));
    }

    iZeile++;
    add(
        wlaMinverkaufspreis,
        new GridBagConstraints(
            0,
            iZeile,
            2,
            1,
            0.0,
            0.0,
            GridBagConstraints.NORTH,
            GridBagConstraints.HORIZONTAL,
            new Insets(2, 2, 2, 2),
            0,
            0));
    add(
        wnfMinverkaufspreis,
        new GridBagConstraints(
            2,
            iZeile,
            1,
            1,
            0.0,
            0.0,
            GridBagConstraints.NORTH,
            GridBagConstraints.HORIZONTAL,
            new Insets(2, 2, 2, 2),
            0,
            0));
    add(
        wlaWaehrungMinverkaufspreis,
        new GridBagConstraints(
            3,
            iZeile,
            1,
            1,
            0.0,
            0.0,
            GridBagConstraints.NORTH,
            GridBagConstraints.HORIZONTAL,
            new Insets(2, 2, 2, 2),
            0,
            0));
    wlaPreisgueltigkeitsanzeigeab =
        new WrapperLabel(
            LPMain.getInstance().getTextRespectUISPr("vkpf.preisgueltigkeitsanzeigeab"));
    wdfPreisgueltigkeitsanzeigeab = new WrapperDateField();
    wdfPreisgueltigkeitsanzeigeab.getDisplay().addPropertyChangeListener(this);
    // SP2243 -> Preisgueltigkeisanzeige immm ab heute
    add(
        wcbWirktNichtInVerkaufspreisfindung,
        new GridBagConstraints(
            4,
            iZeile,
            2,
            1,
            0.0,
            0.0,
            GridBagConstraints.NORTH,
            GridBagConstraints.HORIZONTAL,
            new Insets(2, 2, 2, 2),
            0,
            0));

    /*
     * add(wlaPreisgueltigkeitsanzeigeab, new GridBagConstraints(0, iZeile,
     * 6, 1, 0.0, 0.0, GridBagConstraints.NORTH,
     * GridBagConstraints.HORIZONTAL, new Insets(2, 2, 2, 2), 0, 0));
     * add(wdfPreisgueltigkeitsanzeigeab, new GridBagConstraints(6, iZeile,
     * 1, 1, 0.0, 0.0, GridBagConstraints.NORTH,
     * GridBagConstraints.HORIZONTAL, new Insets(2, 2, 2, 2), 0, 0));
     */
    iZeile++;
    add(
        wlaVkbasis,
        new GridBagConstraints(
            0,
            iZeile,
            2,
            1,
            0.0,
            0.0,
            GridBagConstraints.NORTH,
            GridBagConstraints.HORIZONTAL,
            new Insets(2, 2, 2, 2),
            0,
            0));
    add(
        wnfVkbasis,
        new GridBagConstraints(
            2,
            iZeile,
            1,
            1,
            0.0,
            0.0,
            GridBagConstraints.NORTH,
            GridBagConstraints.HORIZONTAL,
            new Insets(2, 2, 2, 2),
            0,
            0));
    add(
        wlaVkbasiswaehrung,
        new GridBagConstraints(
            3,
            iZeile,
            1,
            1,
            0.0,
            0.0,
            GridBagConstraints.NORTH,
            GridBagConstraints.HORIZONTAL,
            new Insets(2, 2, 2, 2),
            0,
            0));
    add(
        wlaVkbasisGueltigab,
        new GridBagConstraints(
            4,
            iZeile,
            2,
            1,
            0.0,
            0.0,
            GridBagConstraints.NORTH,
            GridBagConstraints.HORIZONTAL,
            new Insets(2, 2, 2, 2),
            0,
            0));
    add(
        wdfVkbasisGueltigab,
        new GridBagConstraints(
            6,
            iZeile,
            1,
            1,
            0.0,
            0.0,
            GridBagConstraints.NORTH,
            GridBagConstraints.HORIZONTAL,
            new Insets(2, 2, 2, 2),
            0,
            0));

    iZeile++;
    add(
        wlaMenge,
        new GridBagConstraints(
            0,
            iZeile,
            1,
            1,
            0.0,
            0.0,
            GridBagConstraints.NORTH,
            GridBagConstraints.HORIZONTAL,
            new Insets(2, 2, 2, 2),
            0,
            0));
    add(
        wlaFixpreis,
        new GridBagConstraints(
            2,
            iZeile,
            1,
            1,
            0.0,
            0.0,
            GridBagConstraints.NORTH,
            GridBagConstraints.HORIZONTAL,
            new Insets(2, 2, 2, 2),
            0,
            0));
    add(
        wlaRabattsatz,
        new GridBagConstraints(
            4,
            iZeile,
            1,
            1,
            0.0,
            0.0,
            GridBagConstraints.NORTH,
            GridBagConstraints.HORIZONTAL,
            new Insets(2, 2, 2, 2),
            0,
            0));
    add(
        wlaBerechneterpreis,
        new GridBagConstraints(
            6,
            iZeile,
            1,
            1,
            0.0,
            0.0,
            GridBagConstraints.NORTH,
            GridBagConstraints.HORIZONTAL,
            new Insets(2, 2, 2, 2),
            0,
            0));

    iZeile++;
    add(
        wnfMenge,
        new GridBagConstraints(
            0,
            iZeile,
            1,
            1,
            0.0,
            0.0,
            GridBagConstraints.NORTH,
            GridBagConstraints.HORIZONTAL,
            new Insets(2, 2, 2, 2),
            0,
            0));
    add(
        wlaMengeeinheit,
        new GridBagConstraints(
            1,
            iZeile,
            1,
            1,
            0.0,
            0.0,
            GridBagConstraints.NORTH,
            GridBagConstraints.HORIZONTAL,
            new Insets(2, 2, 2, 2),
            0,
            0));
    add(
        wnfFixpreis,
        new GridBagConstraints(
            2,
            iZeile,
            1,
            1,
            0.0,
            0.0,
            GridBagConstraints.NORTH,
            GridBagConstraints.HORIZONTAL,
            new Insets(2, 2, 2, 2),
            0,
            0));
    add(
        wlaFixpreiswaehrung,
        new GridBagConstraints(
            3,
            iZeile,
            1,
            1,
            0.0,
            0.0,
            GridBagConstraints.NORTH,
            GridBagConstraints.HORIZONTAL,
            new Insets(2, 2, 2, 2),
            0,
            0));
    add(
        wnfRabattsatz,
        new GridBagConstraints(
            4,
            iZeile,
            1,
            1,
            0.0,
            0.0,
            GridBagConstraints.NORTH,
            GridBagConstraints.HORIZONTAL,
            new Insets(2, 2, 2, 2),
            0,
            0));
    add(
        wlaRabattsatzprozent,
        new GridBagConstraints(
            5,
            iZeile,
            1,
            1,
            0.0,
            0.0,
            GridBagConstraints.NORTH,
            GridBagConstraints.HORIZONTAL,
            new Insets(2, 2, 2, 2),
            0,
            0));
    add(
        wnfBerechneterpreis,
        new GridBagConstraints(
            6,
            iZeile,
            1,
            1,
            0.0,
            0.0,
            GridBagConstraints.NORTH,
            GridBagConstraints.HORIZONTAL,
            new Insets(2, 2, 2, 2),
            0,
            0));
    add(
        wlaBerechneterpreiswaehrung,
        new GridBagConstraints(
            7,
            iZeile,
            1,
            1,
            0.0,
            0.0,
            GridBagConstraints.NORTH,
            GridBagConstraints.HORIZONTAL,
            new Insets(2, 2, 2, 2),
            0,
            0));

    iZeile++;
    addZeileGueltigVonBis(iZeile);
  }
예제 #14
0
  private void jbInit() throws Throwable {
    this.setLayout(new GridBagLayout());
    getInternalFrame().addItemChangedListener(this);
    jpaWorkingOn.setLayout(new GridBagLayout());
    wrbErledigt.setText(LPMain.getInstance().getTextRespectUISPr("fert.losstatistik.erledigtvon"));
    wlaBis.setText(LPMain.getInstance().getTextRespectUISPr("lp.bis"));
    wdfVon.setMandatoryField(true);
    wdfBis.setMandatoryField(true);
    wdfStichtag.setMandatoryField(true);
    wdfStichtag.setTimestamp(new java.sql.Timestamp(System.currentTimeMillis()));
    wdrBereich = new WrapperDateRangeController(wdfVon, wdfBis);

    wrbStichtag.setText(LPMain.getInstance().getTextRespectUISPr("lp.stichtag"));

    buttonGroup.add(wrbErledigt);
    buttonGroup.add(wrbStichtag);
    wrbErledigt.setSelected(true);

    wbuStueckliste.setText(LPMain.getInstance().getTextRespectUISPr("button.stueckliste"));
    wbuAuftrag.setText(LPMain.getInstance().getTextRespectUISPr("button.auftrag"));
    wbuLos.setText(LPMain.getInstance().getTextRespectUISPr("fert.tab.unten.los.title") + "...");

    wcbArbeitsplanSortiertNachAG.setText(
        LPMain.getInstance()
            .getTextRespectUISPr("fertigung.report.losstatistik.arbeitsplansortiertnachag"));
    wcbVerdichtetNachArtikel.setText(
        LPMain.getInstance().getTextRespectUISPr("lp.verdichtetartikelnummer"));

    wcbVerdichtetNachArtikel.setSelected(true);

    wbuStueckliste.setActionCommand(ACTION_SPECIAL_STUECKLISTE_FROM_LISTE);
    wbuStueckliste.addActionListener(this);

    wbuAuftrag.setActionCommand(ACTION_SPECIAL_AUFTRAG_FROM_LISTE);
    wbuAuftrag.addActionListener(this);

    wbuLos.setActionCommand(ACTION_SPECIAL_LOS_FROM_LISTE);
    wbuLos.addActionListener(this);

    wtfStueckliste.setActivatable(false);
    wtfLos.setActivatable(false);
    wtfAuftrag.setActivatable(false);

    this.add(
        jpaWorkingOn,
        new GridBagConstraints(
            0,
            0,
            1,
            1,
            1.0,
            1.0,
            GridBagConstraints.WEST,
            GridBagConstraints.BOTH,
            new Insets(0, 0, 0, 0),
            0,
            0));
    int iZeile = 0;

    jpaWorkingOn.add(
        wrbErledigt,
        new GridBagConstraints(
            0,
            iZeile,
            1,
            1,
            0.1,
            0.0,
            GridBagConstraints.CENTER,
            GridBagConstraints.HORIZONTAL,
            new Insets(2, 2, 2, 2),
            0,
            0));
    jpaWorkingOn.add(
        wdfVon,
        new GridBagConstraints(
            1,
            iZeile,
            1,
            1,
            0.1,
            0.0,
            GridBagConstraints.CENTER,
            GridBagConstraints.HORIZONTAL,
            new Insets(2, 2, 2, 2),
            0,
            0));
    jpaWorkingOn.add(
        wlaBis,
        new GridBagConstraints(
            2,
            iZeile,
            1,
            1,
            0.1,
            0.0,
            GridBagConstraints.CENTER,
            GridBagConstraints.HORIZONTAL,
            new Insets(2, 2, 2, 2),
            0,
            0));
    jpaWorkingOn.add(
        wdfBis,
        new GridBagConstraints(
            3,
            iZeile,
            1,
            1,
            0.1,
            0.0,
            GridBagConstraints.CENTER,
            GridBagConstraints.HORIZONTAL,
            new Insets(2, 2, 2, 2),
            0,
            0));
    jpaWorkingOn.add(
        wdrBereich,
        new GridBagConstraints(
            4,
            iZeile,
            1,
            1,
            0.0,
            0.0,
            GridBagConstraints.WEST,
            GridBagConstraints.BOTH,
            new Insets(2, 2, 2, 2),
            0,
            0));

    iZeile++;
    jpaWorkingOn.add(
        wrbStichtag,
        new GridBagConstraints(
            0,
            iZeile,
            1,
            1,
            0.1,
            0.0,
            GridBagConstraints.CENTER,
            GridBagConstraints.HORIZONTAL,
            new Insets(2, 2, 2, 2),
            0,
            0));
    jpaWorkingOn.add(
        wdfStichtag,
        new GridBagConstraints(
            1,
            iZeile,
            1,
            1,
            0.1,
            0.0,
            GridBagConstraints.CENTER,
            GridBagConstraints.HORIZONTAL,
            new Insets(2, 2, 2, 2),
            0,
            0));
    iZeile++;

    jpaWorkingOn.add(
        wbuLos,
        new GridBagConstraints(
            0,
            iZeile,
            1,
            1,
            0,
            0.0,
            GridBagConstraints.CENTER,
            GridBagConstraints.HORIZONTAL,
            new Insets(2, 2, 2, 2),
            0,
            0));
    jpaWorkingOn.add(
        wtfLos,
        new GridBagConstraints(
            1,
            iZeile,
            1,
            1,
            0,
            0.0,
            GridBagConstraints.CENTER,
            GridBagConstraints.HORIZONTAL,
            new Insets(2, 2, 2, 2),
            0,
            0));
    jpaWorkingOn.add(
        wcbArbeitsplanSortiertNachAG,
        new GridBagConstraints(
            2,
            iZeile,
            2,
            1,
            0.1,
            0.0,
            GridBagConstraints.CENTER,
            GridBagConstraints.HORIZONTAL,
            new Insets(2, 2, 2, 2),
            0,
            0));

    iZeile++;
    jpaWorkingOn.add(
        wbuAuftrag,
        new GridBagConstraints(
            0,
            iZeile,
            1,
            1,
            0,
            0.0,
            GridBagConstraints.CENTER,
            GridBagConstraints.HORIZONTAL,
            new Insets(2, 2, 2, 2),
            0,
            0));
    jpaWorkingOn.add(
        wtfAuftrag,
        new GridBagConstraints(
            1,
            iZeile,
            1,
            1,
            0,
            0.0,
            GridBagConstraints.CENTER,
            GridBagConstraints.HORIZONTAL,
            new Insets(2, 2, 2, 2),
            0,
            0));
    jpaWorkingOn.add(
        wcbVerdichtetNachArtikel,
        new GridBagConstraints(
            2,
            iZeile,
            2,
            1,
            0.1,
            0.0,
            GridBagConstraints.CENTER,
            GridBagConstraints.HORIZONTAL,
            new Insets(2, 2, 2, 2),
            0,
            0));
    iZeile++;
    jpaWorkingOn.add(
        wbuStueckliste,
        new GridBagConstraints(
            0,
            iZeile,
            1,
            1,
            0,
            0.0,
            GridBagConstraints.CENTER,
            GridBagConstraints.HORIZONTAL,
            new Insets(2, 2, 2, 2),
            0,
            0));
    jpaWorkingOn.add(
        wtfStueckliste,
        new GridBagConstraints(
            1,
            iZeile,
            1,
            1,
            0,
            0.0,
            GridBagConstraints.CENTER,
            GridBagConstraints.HORIZONTAL,
            new Insets(2, 2, 2, 2),
            0,
            0));
  }
예제 #15
0
  private void jbInit() throws Throwable {
    // von hier ...
    border = BorderFactory.createEmptyBorder(10, 10, 10, 10);
    setBorder(border);
    // das Aussenpanel hat immer das Gridbaglayout.
    gridBagLayoutAll = new GridBagLayout();
    this.setLayout(gridBagLayoutAll);

    // Actionpanel von Oberklasse holen und anhaengen.
    jpaButtonAction = getToolsPanel();
    this.setActionMap(null);

    wlaFormularNr.setText(LPMain.getTextRespectUISPr("fb.formularnummer"));
    wtfFormularNr.setFractionDigits(0);

    wlaBezeichnung.setText(LPMain.getInstance().getTextRespectUISPr("lp.bezeichnung"));
    wlaSort.setText(LPMain.getInstance().getTextRespectUISPr("label.sortierung"));

    wtfBezeichnung.setColumnsMax(PersonalFac.MAX_BERUF_BEZEICHNUNG);
    wtfBezeichnung.setText("");
    wtfBezeichnung.setMandatoryField(true);
    wnfSortierung.setMandatoryField(true);
    wnfSortierung.setFractionDigits(0);
    getInternalFrame().addItemChangedListener(this);
    this.add(
        jpaButtonAction,
        new GridBagConstraints(
            0,
            0,
            1,
            1,
            0.0,
            0.0,
            GridBagConstraints.WEST,
            GridBagConstraints.NONE,
            new Insets(0, 0, 0, 0),
            0,
            0));

    // jetzt meine felder
    jpaWorkingOn = new JPanel();
    gridBagLayoutWorkingPanel = new GridBagLayout();
    jpaWorkingOn.setLayout(gridBagLayoutWorkingPanel);
    this.add(
        jpaWorkingOn,
        new GridBagConstraints(
            0,
            1,
            1,
            1,
            1.0,
            1.0,
            GridBagConstraints.SOUTHEAST,
            GridBagConstraints.BOTH,
            new Insets(0, 0, 0, 0),
            0,
            0));
    this.add(
        getPanelStatusbar(),
        new GridBagConstraints(
            0,
            2,
            1,
            1,
            1.0,
            0.0,
            GridBagConstraints.CENTER,
            GridBagConstraints.BOTH,
            new Insets(0, 0, 0, 0),
            0,
            0));
    jpaWorkingOn.add(
        wlaBezeichnung,
        new GridBagConstraints(
            0,
            0,
            1,
            1,
            0.1,
            0.0,
            GridBagConstraints.CENTER,
            GridBagConstraints.HORIZONTAL,
            new Insets(2, 2, 2, 2),
            0,
            0));
    jpaWorkingOn.add(
        wtfBezeichnung,
        new GridBagConstraints(
            1,
            0,
            1,
            1,
            0.3,
            0.0,
            GridBagConstraints.CENTER,
            GridBagConstraints.HORIZONTAL,
            new Insets(2, 2, 2, 2),
            0,
            0));

    jpaWorkingOn.add(
        wlaFormularNr,
        new GridBagConstraints(
            0,
            1,
            1,
            1,
            0,
            0.0,
            GridBagConstraints.CENTER,
            GridBagConstraints.HORIZONTAL,
            new Insets(2, 2, 2, 2),
            0,
            0));
    jpaWorkingOn.add(
        wtfFormularNr,
        new GridBagConstraints(
            1,
            1,
            1,
            1,
            0,
            0.0,
            GridBagConstraints.WEST,
            GridBagConstraints.NONE,
            new Insets(2, 2, 2, 2),
            0,
            0));

    jpaWorkingOn.add(
        wlaSort,
        new GridBagConstraints(
            0,
            2,
            1,
            1,
            0,
            0.0,
            GridBagConstraints.CENTER,
            GridBagConstraints.HORIZONTAL,
            new Insets(2, 2, 2, 2),
            0,
            0));
    jpaWorkingOn.add(
        wnfSortierung,
        new GridBagConstraints(
            1,
            2,
            1,
            1,
            0,
            0.0,
            GridBagConstraints.WEST,
            GridBagConstraints.NONE,
            new Insets(2, 2, 2, 2),
            0,
            0));

    String[] aWhichButtonIUse = {
      ACTION_UPDATE, ACTION_SAVE, ACTION_DELETE, ACTION_DISCARD,
    };

    enableToolsPanelButtons(aWhichButtonIUse);
  }
예제 #16
0
  /**
   * jbInit
   *
   * @throws Throwable
   */
  private void jbInit() throws Throwable {
    getInternalFrame().addItemChangedListener(this);

    // buttons.
    resetToolsPanel();

    String[] aButton = {
      PanelBasis.ACTION_UPDATE,
      PanelBasis.ACTION_SAVE,
      PanelBasis.ACTION_DELETE,
      PanelBasis.ACTION_DISCARD
    };
    enableToolsPanelButtons(aButton);

    // von hier ...
    border = BorderFactory.createEmptyBorder(10, 10, 10, 10);
    setBorder(border);

    wbuSelektion = new WrapperButton();
    wbuSelektion.setText(LPMain.getInstance().getTextRespectUISPr("lp.button.selektion"));
    wbuSelektion.setActionCommand(ACTION_SPECIAL_FLR_SELEKTION);
    wbuSelektion.addActionListener(this);

    wtfSelektion = new WrapperTextField();
    wtfSelektion.setActivatable(false);
    wtfSelektion.setMandatoryFieldDB(true);

    wlaBemerkung = new WrapperLabel();
    wlaBemerkung.setText(LPMain.getInstance().getTextRespectUISPr("lp.bemerkung"));
    wtfBemerkung = new WrapperTextField();

    // das aussenpanel hat immer das gridbaglayout.
    gblAussen = new GridBagLayout();
    setLayout(gblAussen);

    // actionpanel von Oberklasse holen und anhaengen.
    add(
        getToolsPanel(),
        new GridBagConstraints(
            0,
            0,
            1,
            1,
            0.0,
            0.0,
            GridBagConstraints.NORTHWEST,
            GridBagConstraints.HORIZONTAL,
            new Insets(0, 0, 0, 0),
            0,
            0));

    // Statusbar an den unteren Rand des Panels haengen.
    add(
        getPanelStatusbar(),
        new GridBagConstraints(
            0,
            2,
            1,
            1,
            1.0,
            0.0,
            GridBagConstraints.CENTER,
            GridBagConstraints.BOTH,
            new Insets(0, 0, 0, 0),
            0,
            0));

    // Workingpanel
    jpaWorking = new JPanel();
    gblWorkingPanel = new GridBagLayout();
    jpaWorking.setLayout(gblWorkingPanel);
    add(
        jpaWorking,
        new GridBagConstraints(
            0,
            1,
            1,
            1,
            1.0,
            1.0,
            GridBagConstraints.NORTH,
            GridBagConstraints.BOTH,
            new Insets(0, 0, 0, 0),
            0,
            0));

    // Ab hier einhaengen.
    // Zeile
    jpaWorking.add(
        wbuSelektion,
        new GridBagConstraints(
            0,
            iZeile,
            1,
            1,
            0.2,
            0.0,
            GridBagConstraints.CENTER,
            GridBagConstraints.BOTH,
            new Insets(2, 2, 2, 2),
            0,
            0));
    jpaWorking.add(
        wtfSelektion,
        new GridBagConstraints(
            1,
            iZeile,
            1,
            1,
            0.2,
            0.0,
            GridBagConstraints.CENTER,
            GridBagConstraints.BOTH,
            new Insets(2, 2, 2, 2),
            0,
            0));
    // Zeile
    iZeile++;
    jpaWorking.add(
        wlaBemerkung,
        new GridBagConstraints(
            0,
            iZeile,
            1,
            1,
            0.2,
            0.0,
            GridBagConstraints.CENTER,
            GridBagConstraints.BOTH,
            new Insets(2, 2, 2, 2),
            0,
            0));
    jpaWorking.add(
        wtfBemerkung,
        new GridBagConstraints(
            1,
            iZeile,
            1,
            1,
            0.2,
            0.0,
            GridBagConstraints.CENTER,
            GridBagConstraints.BOTH,
            new Insets(2, 2, 2, 2),
            0,
            0));
  }