private void jbInit() throws Throwable {

    insertTab(
        LPMain.getInstance().getTextRespectUISPr("lp.auswahl"),
        null,
        null,
        LPMain.getInstance().getTextRespectUISPr("lp.auswahl"),
        IDX_PANEL_AUSWAHL);

    insertTab(
        LPMain.getInstance().getTextRespectUISPr("lp.detail"),
        null,
        null,
        LPMain.getInstance().getTextRespectUISPr("lp.detail"),
        IDX_PANEL_DETAIL);

    createAuswahl();

    panelQueryWiederholendelose.eventYouAreSelected(false);
    if ((Integer) panelQueryWiederholendelose.getSelectedId() != null) {
      getInternalFrameFertigung()
          .setWiederholendeloseDto(
              DelegateFactory.getInstance()
                  .getFertigungDelegate()
                  .wiederholendeloseFindByPrimaryKey(
                      (Integer) panelQueryWiederholendelose.getSelectedId()));
    }
    // damit D2 einen aktuellen hat.
    ItemChangedEvent it =
        new ItemChangedEvent(panelQueryWiederholendelose, ItemChangedEvent.ITEM_CHANGED);
    lPEventItemChanged(it);

    this.addChangeListener(this);
    this.getInternalFrame().addItemChangedListener(this);
  }
  public void eventActionSave(ActionEvent e, boolean bNeedNoSaveI) throws Throwable {
    if (allMandatoryFieldsSetDlg()) {
      if (wtfBeginn.getTime().before(wtfEnde.getTime())) {
        components2Dto();
        if (zeitmodelltagpauseDto.getIId() == null) {
          zeitmodelltagpauseDto.setIId(
              DelegateFactory.getInstance()
                  .getZeiterfassungDelegate()
                  .createZeitmodelltagpause(zeitmodelltagpauseDto));
          setKeyWhenDetailPanel(zeitmodelltagpauseDto.getIId());
        } else {
          DelegateFactory.getInstance()
              .getZeiterfassungDelegate()
              .updateZeitmodelltagpause(zeitmodelltagpauseDto);
        }

        super.eventActionSave(e, true);

        if (getInternalFrame().getKeyWasForLockMe() == null) {
          getInternalFrame()
              .setKeyWasForLockMe(internalFramePersonal.getZeitmodellDto().getIId() + "");
        }
        eventYouAreSelected(false);
      } else {
        DialogFactory.showModalDialog(
            LPMain.getInstance().getTextRespectUISPr("lp.error"),
            LPMain.getInstance().getTextRespectUISPr("lp.error.beginnvorende"));
      }
    }
  }
Пример #3
0
 private void jbInit() throws Throwable {
   // Tab 1: Rechte
   insertTab(
       LPMain.getInstance().getTextRespectUISPr("pers.benutzer.gesperrt"),
       null,
       null,
       LPMain.getInstance().getTextRespectUISPr("pers.benutzer.gesperrt"),
       IDX_LOCKME);
   insertTab(
       LPMain.getInstance().getTextRespectUISPr("lp.loggedin"),
       null,
       null,
       LPMain.getInstance().getTextRespectUISPr("lp.loggedin"),
       IDX_THECLIENT);
   setSelectedComponent(getPanelQueryTheJudge());
   // refresh
   getPanelQueryTheJudge().eventYouAreSelected(false);
   // damit gleich eine selektiert ist
   ItemChangedEvent it =
       new ItemChangedEvent(getPanelQueryTheJudge(), ItemChangedEvent.ITEM_CHANGED);
   lPEventItemChanged(it);
   // Listener
   addChangeListener(this);
   getInternalFrame().addItemChangedListener(this);
 }
 public void focusLost(FocusEvent e) {
   try {
     adaptee.rabattsatz_focusLost(e);
   } catch (Throwable ex) {
     DialogFactory.showModalDialog(
         LPMain.getInstance().getTextRespectUISPr("lp.error"),
         LPMain.getInstance().getTextRespectUISPr("lp.error.preisberechnungfehlgeschlagen"));
   }
 }
Пример #5
0
  protected void eventActionSpecial(ActionEvent e) throws Throwable {

    if (e.getActionCommand().equals(ACTION_SPECIAL_FLR_ANSPRECHPARTNER)) {

      String[] aWhichButtonIUse = null;

      QueryType[] querytypes = null;
      LPMain.getInstance();
      panelQueryFLRAnsprechpartnerAuswahl =
          new PanelQueryFLR(
              querytypes,
              null,
              QueryParameters.UC_ID_PARTNER,
              aWhichButtonIUse,
              getInternalFrame(),
              LPMain.getTextRespectUISPr("button.ansprechpartner.long"));

      panelQueryFLRAnsprechpartnerAuswahl.befuellePanelFilterkriterienDirekt(
          PartnerFilterFactory.getInstance().createFKDPartnerName(),
          PartnerFilterFactory.getInstance().createFKDPartnerLandPLZOrt());

      new DialogQuery(panelQueryFLRAnsprechpartnerAuswahl);
    } else if (e.getActionCommand().equals(ACTION_SPECIAL_FLR_ANSPRECHPARTNER_FUNKTION)) {
      String[] aWhichButtonIUse = null;
      QueryType[] querytypes = null;
      FilterKriterium[] filters = null;
      LPMain.getInstance();
      panelQueryFLRAnsprechpartnerfunktion =
          new PanelQueryFLR(
              querytypes,
              filters,
              QueryParameters.UC_ID_ANSPRECHPARTNERFUNKTION,
              aWhichButtonIUse,
              getInternalFrame(),
              LPMain.getTextRespectUISPr("part.ansprechpartner_funktion"));
      new DialogQuery(panelQueryFLRAnsprechpartnerfunktion);
    } else if (e.getActionCommand().equals(ACTION_SPECIAL_VCARD_EXPORT)) {
      HelperClient.vCardAlsDateiExportieren(
          DelegateFactory.getInstance()
              .getPartnerDelegate()
              .partnerFindByPrimaryKey(getAnsprechpartnerDto().getPartnerIId()),
          getAnsprechpartnerDto());
    } else if (e.getActionCommand().equals(ACTION_SPECIAL_PASSWORD)) {
      // Passwort Dialog erstellen
      DialogAnsprechpartnerPasswort d = new DialogAnsprechpartnerPasswort(getAnsprechpartnerDto());
      LPMain.getInstance().getDesktop().platziereDialogInDerMitteDesFensters(d);
      d.setVisible(true);

      if (getAnsprechpartnerDto().getCKennwort() != null) {
        wbuPasswort.setBackground(new Color(0, 200, 0));

      } else {
        wbuPasswort.setBackground(UIManager.getColor("Button.background"));
      }
    }
  }
 public void eventActionNew(EventObject eventObject, boolean bLockMeI, boolean bNeedNoNewI)
     throws Throwable {
   if (zeitmodelltagDto != null) {
     super.eventActionNew(eventObject, true, false);
     zeitmodelltagpauseDto = new ZeitmodelltagpauseDto();
     leereAlleFelder(this);
   } else {
     DialogFactory.showModalDialog(
         LPMain.getInstance().getTextRespectUISPr("lp.error"),
         LPMain.getInstance().getTextRespectUISPr("pers.error.keinzeitmodelltagdefiniert"));
   }
 }
 public DialogAuftragspositionenSchnellerfassung(
     PanelSplit panelInventurliste, AuftragDto auftragDto) throws Throwable {
   super(
       LPMain.getInstance().getDesktop(),
       LPMain.getInstance().getTextRespectUISPr("auftrag.positionen.schnelleingabe"),
       true);
   setDefaultCloseOperation(DISPOSE_ON_CLOSE);
   this.panelPositionen = panelInventurliste;
   this.auftragDto = auftragDto;
   jbInit();
   pack();
   wtfArtikelnummer.requestFocus();
 }
  /**
   * Fixpreis uebersteuert einen ev. vorhandenen Rabattsatz.
   *
   * @param e FocusEvent
   * @throws Throwable
   */
  public void rabattsatz_focusLost(FocusEvent e) throws Throwable {
    if (e.getSource().equals(wnfRabattsatz)) {
      // Hinweis, falls es einen Fixpreis gibt, Rabattsatz auf 0 setzen
      if (wnfFixpreis.getDouble() != null && wnfRabattsatz.getDouble().doubleValue() != 0) {
        DialogFactory.showModalDialog(
            LPMain.getInstance().getTextRespectUISPr("lp.hint"),
            LPMain.getInstance().getTextRespectUISPr("vkpf.hint.fixpreisueberschreibtrabattsatz"));

        wnfRabattsatz.setDouble(new Double(0));
      }
    }

    berechneArtikelpreis(e);
  }
Пример #9
0
  protected void speicherePartner() throws Throwable {

    // Wenn Partner manuell eingegeben wurde, dann vorher anlegen
    if (getAnsprechpartnerDto().getPartnerIIdAnsprechpartner() == null) {
      PartnerDto partnerDto = new PartnerDto();
      partnerDto.setCName1nachnamefirmazeile1(wtfAnsprechpartner.getText());
      partnerDto.setCName2vornamefirmazeile2(wtfVorname.getText());
      partnerDto.setCTitel(wtfTitel.getText());
      partnerDto.setCNtitel(wtfNtitel.getText());
      partnerDto.setAnredeCNr((String) wcoAnrede.getKeyOfSelectedItem());
      partnerDto.setDGeburtsdatumansprechpartner(wdfGebDatum.getDate());
      partnerDto.setPartnerartCNr(PartnerFac.PARTNERART_ANSPRECHPARTNER);
      partnerDto.setBVersteckt(com.lp.util.Helper.boolean2Short(false));
      LPMain.getInstance();
      partnerDto.setLocaleCNrKommunikation(LPMain.getTheClient().getLocUiAsString());
      String kbez = wtfAnsprechpartner.getText();
      if (kbez.length() > 14) {
        kbez = kbez.substring(0, 13);
      }
      partnerDto.setCKbez(kbez);
      getAnsprechpartnerDto()
          .setPartnerIIdAnsprechpartner(
              DelegateFactory.getInstance().getPartnerDelegate().createPartner(partnerDto));
    }
  }
  protected void eventActionSpecial(ActionEvent e) throws Throwable {
    if (e.getActionCommand().equals(ACTION_SPECIAL_FLR_BRANCHE)) {
      String[] aWhichButtonIUse = SystemFilterFactory.getInstance().createButtonArray(false, true);

      final QueryType[] querytypes = null;
      final FilterKriterium[] filters = null;
      panelQueryFLRBranche =
          new PanelQueryFLR(
              querytypes,
              filters,
              QueryParameters.UC_ID_BRANCHE,
              aWhichButtonIUse,
              getInternalFrame(),
              LPMain.getInstance().getTextRespectUISPr("lp.branche"));

      if (brancheIId != null) {
        panelQueryFLRBranche.setSelectedId(brancheIId);
      }
      new DialogQuery(panelQueryFLRBranche);
    } else if (e.getActionCommand().equals(ACTION_SPECIAL_ARTIKELVON_FROM_LISTE)) {
      dialogQueryArtikelFromListe_Von(e);
    } else if (e.getActionCommand().equals(ACTION_SPECIAL_ARTIKELBIS_FROM_LISTE)) {
      dialogQueryArtikelFromListe_Bis(e);
    }
  }
Пример #11
0
  private void refreshTheClientSP2() throws Throwable {
    if (panelTheClientSP2 == null) {

      String[] aWhichButtonIUse = {PanelBasis.ACTION_PRINT};
      panelTheClientQP2 =
          new PanelQuery(
              null,
              isNurAngemeldete()
                  ? SystemFilterFactory.getInstance().createFKPanelOnlyLoggedIn()
                  : SystemFilterFactory.getInstance().createFKPanelGesperrt(),
              QueryParameters.UC_ID_THECLIENT,
              aWhichButtonIUse,
              getInternalFrame(),
              LPMain.getInstance().getTextRespectUISPr("lp.loggedin"),
              true); // liste
      // refresh
      // wenn
      // lasche
      // geklickt
      // wurde

      createLoggedInButton(panelTheClientQP2);

      panelTheClientBottomD2 = new PanelTheClient(getInternalFrame(), "", null);

      panelTheClientSP2 =
          new PanelSplit(getInternalFrame(), panelTheClientBottomD2, panelTheClientQP2, 200);
      setComponentAt(IDX_THECLIENT, panelTheClientSP2);

      // liste soll sofort angezeigt werden
      panelTheClientQP2.eventYouAreSelected(true);
    }
  }
 private void createDetail(Integer key) throws Throwable {
   if (panelDetailWiederholendelose == null) {
     panelDetailWiederholendelose =
         new PanelWiederholendelose(
             getInternalFrame(), LPMain.getInstance().getTextRespectUISPr("lp.detail"), key);
     setComponentAt(IDX_PANEL_DETAIL, panelDetailWiederholendelose);
   }
 }
Пример #13
0
  protected void setDefaults() throws Throwable {

    getPartnerDto().setPartnerartCNr(PartnerFac.PARTNERART_ANSPRECHPARTNER);
    wdfGueltigAb.setDate(new java.sql.Date(System.currentTimeMillis()));

    LPMain.getInstance();
    Map<?, ?> tmAnreden =
        (SortedMap<?, ?>)
            DelegateFactory.getInstance()
                .getPartnerDelegate()
                .getAllAnreden(LPMain.getTheClient().getLocUi());
    wcoAnrede.setMap(tmAnreden);
    wcoAnrede.setKeyOfSelectedItem(PartnerFac.PARTNER_ANREDE_HERR);
  }
  private void refreshTitle() {
    getInternalFrame()
        .setLpTitle(
            InternalFrame.TITLE_IDX_OHRWASCHLUNTEN,
            LPMain.getInstance().getTextRespectUISPr("fert.wiederholendelose"));
    getInternalFrame()
        .setLpTitle(
            InternalFrame.TITLE_IDX_OHRWASCHLOBEN,
            ((PanelBasis) this.getSelectedComponent()).getAdd2Title());

    if (getInternalFrameFertigung().getWiederholendeloseDto() != null) {
      String sBezeichnung = getInternalFrameFertigung().getWiederholendeloseDto().getCProjekt();
      if (sBezeichnung == null) {
        sBezeichnung = "";
      }

      getInternalFrame().setLpTitle(InternalFrame.TITLE_IDX_AS_I_LIKE, sBezeichnung);
    }
  }
Пример #15
0
  private PanelQuery getPanelQueryTheJudge() throws Throwable {
    if (panelQueryTheJudge == null) {
      String[] aWhichButtonIUseQPTheJudge = {PanelBasis.ACTION_REFRESH};

      QueryType[] qtTheJudge = null;
      FilterKriterium[] filtersTheJudge = null;

      panelQueryTheJudge =
          new PanelQuery(
              qtTheJudge,
              filtersTheJudge,
              QueryParameters.UC_ID_THEJUDGE,
              aWhichButtonIUseQPTheJudge,
              getInternalFrame(),
              LPMain.getInstance().getTextRespectUISPr("pers.benutzer.gesperrt"),
              true);
      this.setComponentAt(IDX_LOCKME, panelQueryTheJudge);
    }
    return panelQueryTheJudge;
  }
Пример #16
0
  private void refreshLockMeSP1() throws Throwable {
    if (panelLockMeSP1 == null) {
      panelLockMeQP1 =
          new PanelQuery(
              null,
              null,
              QueryParameters.UC_ID_THEJUDGE,
              null,
              getInternalFrame(),
              LPMain.getInstance().getTextRespectUISPr("pers.benutzer.gesperrt"),
              true); // liste refresh
      // wenn lasche
      // geklickt
      // wurde

      panelLockMeBottomD1 = new PanelLockMe(getInternalFrame(), "", null);

      panelLockMeSP1 = new PanelSplit(getInternalFrame(), panelLockMeBottomD1, panelLockMeQP1, 200);
      setComponentAt(IDX_LOCKME, panelLockMeSP1);

      // liste soll sofort angezeigt werden
      panelLockMeQP1.eventYouAreSelected(true);
    }
  }
  private void createAuswahl() throws Throwable {
    if (panelQueryWiederholendelose == null) {
      // Artikelauswahlliste
      String[] aWhichButtonIUse = {
        PanelBasis.ACTION_NEW,
        PanelBasis.ACTION_POSITION_VONNNACHNMINUS1,
        PanelBasis.ACTION_POSITION_VONNNACHNPLUS1
      };
      panelQueryWiederholendelose =
          new PanelQuery(
              null,
              com.lp.client.system.SystemFilterFactory.getInstance().createFKMandantCNr(),
              QueryParameters.UC_ID_WIEDERHOLENDELOSE,
              aWhichButtonIUse,
              getInternalFrame(),
              LPMain.getInstance().getTextRespectUISPr("lp.auswahl"),
              true);

      panelQueryWiederholendelose.befuellePanelFilterkriterienDirektUndVersteckte(
          null, null, FertigungFilterFactory.getInstance().createFKVWiederholende());

      setComponentAt(IDX_PANEL_AUSWAHL, panelQueryWiederholendelose);
    }
  }
  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);
  }
  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);
  }
  public void propertyChange(PropertyChangeEvent evt) {
    super.propertyChange(evt);

    try {
      if (wdfPreisgueltigkeitsanzeigeab != null
          && wifArtikel.getArtikelDto() != null
          && wifArtikel.getArtikelDto().getIId() != null) {
        if (evt.getSource() == wdfPreisgueltigkeitsanzeigeab.getDisplay()
            && evt.getPropertyName().equals("date")
            && wdfPreisgueltigkeitsanzeigeab.getDate() != null) {
          datGueltigkeitsanzeigeab = wdfPreisgueltigkeitsanzeigeab.getDate();

          // die passende Verkaufspreisbasis anzeigen
          if (iPreisbasis == 0 || iPreisbasis == 2) {
            verkaufspreisbasisDto2comp(
                DelegateFactory.getInstance()
                    .getVkPreisfindungDelegate()
                    .getArtikeleinzelverkaufspreis(
                        wifArtikel.getArtikelDto().getIId(),
                        datGueltigkeitsanzeigeab,
                        waehrungCNr));
          } else {
            vkPreisfindungPreislisteDto2com(
                DelegateFactory.getInstance()
                    .getVkPreisfindungDelegate()
                    .getAktuellePreislisteByArtikelIIdPreislisteIId(
                        wifArtikel.getArtikelDto().getIId(),
                        getKundenpreislisteIId(),
                        datGueltigkeitsanzeigeab,
                        waehrungCNr));
          }

          // den berechneten Preis aktualisieren
          BigDecimal nBerechneterPreis = new BigDecimal(0);

          if (wnfFixpreis.getBigDecimal() == null && wnfRabattsatz.getDouble() != null) {
            // WH 21.06.06 Es gilt die VK-Basis zur
            // Preisgueltigkeit. Damit kann der
            // berechnete Preis von dem dargstellten in der FLR
            // Liste abweichen, der wird
            // fuer das Beginndatum der Mengenstaffel angezeigt
            BigDecimal nPreisbasis =
                DelegateFactory.getInstance()
                    .getVkPreisfindungDelegate()
                    .ermittlePreisbasis(
                        wifArtikel.getArtikelDto().getIId(),
                        wdfPreisgueltigkeitsanzeigeab.getDate(),
                        null,
                        waehrungCNr);

            VerkaufspreisDto vkpfDto =
                DelegateFactory.getInstance()
                    .getVkPreisfindungDelegate()
                    .berechneVerkaufspreis(nPreisbasis, wnfRabattsatz.getDouble());

            nBerechneterPreis = vkpfDto.nettopreis;
          }

          wnfBerechneterpreis.setBigDecimal(nBerechneterPreis);
        }
      }
    } catch (Throwable t) {
      DialogFactory.showModalDialog(
          LPMain.getInstance().getTextRespectUISPr("lp.error"),
          LPMain.getInstance().getTextRespectUISPr("vkpf.error.preisgueltigkeitsanzeigeab"));
    }
  }
 public TabbedPaneWiederholendelose(InternalFrame internalFrameI) throws Throwable {
   super(internalFrameI, LPMain.getInstance().getTextRespectUISPr("fert.wiederholendelose"));
   jbInit();
   initComponents();
 }
Пример #22
0
  private void jbInit() throws Throwable {
    // TabbedPane Personal

    int tabIndex = 0;
    IDX_TABBED_PANE_PERSONAL = tabIndex;

    tabbedPaneRoot.insertTab(
        LPMain.getTextRespectUISPr("menueentry.personal"),
        null,
        null,
        LPMain.getTextRespectUISPr("menueentry.personal"),
        IDX_TABBED_PANE_PERSONAL);

    if (LPMain.getInstance()
        .getDesktop()
        .darfAnwenderAufModulZugreifen(LocaleFac.BELEGART_PERSONAL)) {
      tabIndex++;
      IDX_TABBED_PANE_ZEITMODELL = tabIndex;

      tabbedPaneRoot.insertTab(
          LPMain.getTextRespectUISPr("pers.title.tab.zeitmodell"),
          null,
          null,
          LPMain.getTextRespectUISPr("pers.title.tab.zeitmodell"),
          IDX_TABBED_PANE_ZEITMODELL);

      if (LPMain.getInstance()
          .getDesktop()
          .darfAnwenderAufZusatzfunktionZugreifen(MandantFac.ZUSATZFUNKTION_BEREITSCHAFT)) {
        tabIndex++;
        IDX_TABBED_PANE_BEREITSCHAFT = tabIndex;

        tabbedPaneRoot.insertTab(
            LPMain.getTextRespectUISPr("pers.bereitschaft"),
            null,
            null,
            LPMain.getTextRespectUISPr("pers.bereitschaft"),
            IDX_TABBED_PANE_BEREITSCHAFT);
      }

      tabIndex++;
      IDX_TABBED_PANE_BETRIEBSKALENDER = tabIndex;
      tabbedPaneRoot.insertTab(
          LPMain.getTextRespectUISPr("pers.title.tab.betriebskalender"),
          null,
          null,
          LPMain.getTextRespectUISPr("pers.title.tab.betriebskalender"),
          IDX_TABBED_PANE_BETRIEBSKALENDER);

      tabIndex++;
      IDX_TABBED_PANE_ARTIKELZULAGE = tabIndex;
      tabbedPaneRoot.insertTab(
          LPMain.getTextRespectUISPr("pers.artikelzulage"),
          null,
          null,
          LPMain.getTextRespectUISPr("pers.artikelzulage"),
          IDX_TABBED_PANE_ARTIKELZULAGE);

      tabIndex++;
      IDX_TABBED_PANE_KOLLEKTIV = tabIndex;
      tabbedPaneRoot.insertTab(
          LPMain.getTextRespectUISPr("pers.personaldaten.kollektiv"),
          null,
          null,
          LPMain.getTextRespectUISPr("pers.personaldaten.kollektiv"),
          IDX_TABBED_PANE_KOLLEKTIV);
      tabIndex++;
      IDX_TABBED_PANE_PERSONALGRUPPEN = tabIndex;
      tabbedPaneRoot.insertTab(
          LPMain.getTextRespectUISPr("pers.personalgruppe"),
          null,
          null,
          LPMain.getTextRespectUISPr("pers.personalgruppe"),
          IDX_TABBED_PANE_PERSONALGRUPPEN);
      tabIndex++;
      IDX_TABBED_PANE_FAHRZEUG = tabIndex;
      tabbedPaneRoot.insertTab(
          LPMain.getTextRespectUISPr("pers.fahrzeug"),
          null,
          null,
          LPMain.getTextRespectUISPr("pers.fahrzeug"),
          IDX_TABBED_PANE_FAHRZEUG);

      // nur anzeigen wenn Benutzer Recht dazu hat
      if (DelegateFactory.getInstance()
          .getTheJudgeDelegate()
          .hatRecht(RechteFac.RECHT_LP_DARF_GRUNDDATEN_SEHEN)) {
        tabIndex++;
        IDX_TABBED_PANE_GRUNDDATEN = tabIndex;
        tabbedPaneRoot.insertTab(
            LPMain.getTextRespectUISPr("pers.title.tab.grunddaten"),
            null,
            null,
            LPMain.getTextRespectUISPr("pers.title.tab.grunddaten"),
            IDX_TABBED_PANE_GRUNDDATEN);
      }
    }

    registerChangeListeners();
    createTabbedPanePersonal(null);
    tabbedPanePersonal.lPEventObjectChanged(null);
    tabbedPaneRoot.setSelectedComponent(tabbedPanePersonal);
    // iicon: hier das li/on icon gemacht
    ImageIcon iicon =
        new javax.swing.ImageIcon(getClass().getResource("/com/lp/client/res/worker16x16.png"));
    setFrameIcon(iicon);
  }
 public ReportKuechenauswertung1(InternalFrame internalFrame, String add2Title) throws Throwable {
   super(internalFrame, add2Title);
   LPMain.getInstance().getTextRespectUISPr("kue.kuechenauswertung1");
   jbInit();
   initComponents();
 }
  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));
  }
  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));
  }
Пример #26
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());
    }
  }
  public void keyPressed(KeyEvent e) {

    if (e.getKeyCode() == KeyEvent.VK_ENTER) {
      if (e.getSource() == wtfArtikelnummer) {

        try {
          artikelDto =
              DelegateFactory.getInstance()
                  .getArtikelDelegate()
                  .artikelFindByCNr(wtfArtikelnummer.getText());

        } catch (Throwable ex) {
          if (ex instanceof ExceptionLP) {
            ExceptionLP exLP = (ExceptionLP) ex;
            if (exLP.getICode() == EJBExceptionLP.FEHLER_BEI_FIND) {
              DialogFactory.showModalDialog(
                  LPMain.getInstance().getTextRespectUISPr("lp.error"),
                  "Artikel konnte nicht gefunden werden.");
              artikelDto = null;
              wtfArtikelnummer.setText(null);
              wtfBezeichnung.setText(null);
              wtfArtikelnummer.requestFocus();
            } else {
              panelPositionen.handleException(ex, true);
            }
          } else {
            panelPositionen.handleException(ex, true);
          }
        }

        if (artikelDto != null) {
          wtfBezeichnung.setText(artikelDto.formatArtikelbezeichnung());

          if (Helper.short2boolean(artikelDto.getBChargennrtragend())
              || Helper.short2boolean(artikelDto.getBSeriennrtragend())) {
            wtfSerienChargennummer.setEnabled(true);
            wtfSerienChargennummer.setText(null);
            wtfSerienChargennummer.requestFocus();
            if (Helper.short2boolean(artikelDto.getBSeriennrtragend())) {
              try {
                wnfMenge.setDouble(new Double(1));
              } catch (ExceptionLP ex2) {
                // wird hoffentlich gehen
              }
            }

          } else {
            wtfSerienChargennummer.setText(null);
            wtfSerienChargennummer.setEnabled(false);
            try {
              wnfMenge.setDouble(null);
            } catch (ExceptionLP ex2) {
              // wird hoffentlich gehen
            }

            wnfMenge.requestFocus();
          }
        }
      } else if (e.getSource() == wtfSerienChargennummer) {
        if (Helper.short2boolean(artikelDto.getBSeriennrtragend())) {
          wtfArtikelnummer.requestFocus();

        } else if (Helper.short2boolean(artikelDto.getBChargennrtragend())) {
          wnfMenge.requestFocus();
        }
      } else if (e.getSource() == wnfMenge) {

        // Auftragsposition speichern

        try {
          if (artikelDto != null && wnfMenge.getBigDecimal() != null) {

            AuftragpositionDto aDto = new AuftragpositionDto();
            aDto.setBelegIId(auftragDto.getIId());
            aDto.setArtikelIId(artikelDto.getIId());
            aDto.setPositionsartCNr(AuftragServiceFac.AUFTRAGPOSITIONART_IDENT);
            aDto.setNMenge(wnfMenge.getBigDecimal());
            aDto.setBNettopreisuebersteuert(Helper.boolean2Short(false));
            aDto.setBMwstsatzuebersteuert(Helper.boolean2Short(false));
            aDto.setBArtikelbezeichnunguebersteuert(Helper.boolean2Short(false));
            aDto.setEinheitCNr(artikelDto.getEinheitCNr());
            aDto.setNOffeneMenge(wnfMenge.getBigDecimal());
            aDto.setTUebersteuerbarerLiefertermin(auftragDto.getDLiefertermin());
            if (wtfSerienChargennummer.getText() != null) {
              aDto.setSeriennrChargennrMitMenge(
                  SeriennrChargennrMitMengeDto.erstelleDtoAusEinerChargennummer(
                      wtfSerienChargennummer.getText(), wnfMenge.getBigDecimal()));
            }
            DelegateFactory.getInstance().getAuftragpositionDelegate().createAuftragposition(aDto);
            wtfArtikelnummer.setText(null);
            wtfBezeichnung.setText(null);
            wtfSerienChargennummer.setText(null);

            wnfMenge.setDouble(null);
          }
        } catch (Throwable ex) {
          panelPositionen.handleException(ex, true);
        }
        wtfArtikelnummer.requestFocus();
      }
    }
  }
Пример #28
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);
  }
Пример #29
0
  private void jbInit() throws Throwable {
    String[] aWhichButtonIUse = null;

    if (DelegateFactory.getInstance()
        .getTheJudgeDelegate()
        .hatRecht(com.lp.server.benutzer.service.RechteFac.RECHT_FERT_TECHNIKER_BEARBEITEN)) {
      createAndSaveAndShowButton(
          "/com/lp/client/res/worker16x16.png",
          LPMain.getTextRespectUISPr("fert.techniker.aendern"),
          ACTION_SPECIAL_TECHNIKER,
          RechteFac.RECHT_FERT_TECHNIKER_BEARBEITEN);

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

    } else {

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

    this.enableToolsPanelButtons(aWhichButtonIUse);

    border1 = BorderFactory.createEmptyBorder(10, 10, 10, 10);
    this.setLayout(gridBagLayout1);

    jpaWorkingOn.setBorder(border1);
    jpaWorkingOn.setLayout(gridBagLayout3);
    JPanel panelButtonAction = getToolsPanel();
    getInternalFrame().addItemChangedListener(this);

    // controls
    wbuLostechniker = new WrapperButton();
    wtfLostechniker = new WrapperTextField();

    wbuLostechniker.setText(LPMain.getInstance().getTextRespectUISPr("button.personal"));

    wtfLostechniker.setActivatable(false);
    wtfLostechniker.setMandatoryFieldDB(true);

    wbuLostechniker.setMinimumSize(new Dimension(100, Defaults.getInstance().getControlHeight()));
    wbuLostechniker.setPreferredSize(new Dimension(100, Defaults.getInstance().getControlHeight()));

    wbuLostechniker.addActionListener(this);
    wbuLostechniker.setActionCommand(ACTION_SPECIAL_PERSONAL);

    this.add(
        panelButtonAction,
        new GridBagConstraints(
            0,
            0,
            1,
            1,
            0.0,
            0.0,
            GridBagConstraints.NORTHWEST,
            GridBagConstraints.NONE,
            new Insets(0, 0, 0, 0),
            0,
            0));
    this.add(
        jpaWorkingOn,
        new GridBagConstraints(
            0,
            1,
            1,
            1,
            1.0,
            1.0,
            GridBagConstraints.CENTER,
            GridBagConstraints.BOTH,
            new Insets(0, 0, 0, 0),
            0,
            0));
    // statusbarneu: 1 an den unteren rand des panels haengen
    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(
        wbuLostechniker,
        new GridBagConstraints(
            0,
            iZeile,
            1,
            1,
            0.0,
            0.0,
            GridBagConstraints.CENTER,
            GridBagConstraints.BOTH,
            new Insets(2, 2, 2, 2),
            0,
            0));
    jpaWorkingOn.add(
        wtfLostechniker,
        new GridBagConstraints(
            1,
            iZeile,
            1,
            1,
            1.0,
            0.0,
            GridBagConstraints.CENTER,
            GridBagConstraints.BOTH,
            new Insets(2, 2, 2, 2),
            0,
            0));
  }
Пример #30
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);
  }