Ejemplo n.º 1
0
  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);
    }
  }
  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));
  }
Ejemplo n.º 3
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));
  }