コード例 #1
0
  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"));
      }
    }
  }
コード例 #2
0
  protected void components2Dto() throws ExceptionLP {

    zeitmodelltagpauseDto.setZeitmodelltagIId(zeitmodelltagDto.getIId());

    zeitmodelltagpauseDto.setUBeginn(wtfBeginn.getTime());
    zeitmodelltagpauseDto.setUEnde(wtfEnde.getTime());
  }
コード例 #3
0
  protected void dto2Components() throws ExceptionLP, Throwable {

    wtfBeginn.setTime(zeitmodelltagpauseDto.getUBeginn());
    wtfEnde.setTime(zeitmodelltagpauseDto.getUEnde());

    this.setStatusbarPersonalIIdAendern(zeitmodelltagpauseDto.getPersonalIIdAendern());
    this.setStatusbarTAendern(zeitmodelltagpauseDto.getTAendern());
  }
コード例 #4
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);

    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);
  }