예제 #1
0
 private void jbInit() throws Exception {
   dm = hr.restart.baza.dM.getDataModule();
   initDataSet();
   jpGetVrnal.setDataSet(dataSet);
   jtDATUMKNJ.setColumnName("DATUMKNJ");
   jtDATUMKNJ.setDataSet(dataSet);
   jtDATUMKNJ.setHorizontalAlignment(SwingConstants.CENTER);
   jlDATUMKNJ.setText("Datum knjiženja");
   jtDATUMDO.setColumnName("DATUMDO");
   jtDATUMDO.setDataSet(dataSet);
   jtDATUMDO.setHorizontalAlignment(SwingConstants.CENTER);
   jtDATUMDO.setHelpText("Unesite zadnji datum dokumenata koje knjižite");
   jlDATUMDO.setText("Knjižiti do dana");
   rcbNK.setRaColumn("NK");
   rcbNK.setDataSet(dataSet);
   rcbNK.setRaItems(
       new String[][] {
         {"Zbrojiti stavke prema kontnom planu", "K"},
         {"Zbrojiti stavke po kontima i org. jedinicama", "Z"},
         {"Svaka stavka pojedina\u010Dno", "P"}
       });
   xYLCommon.setHeight(100);
   jp.setLayout(new BorderLayout());
   jpCommon.setLayout(xYLCommon);
   jpCommon.add(jpGetVrnal, new XYConstraints(0, 0, -1, 41));
   jpCommon.add(jlDATUMKNJ, new XYConstraints(15, 45, -1, -1));
   jpCommon.add(jtDATUMKNJ, new XYConstraints(150, 45, 100, -1));
   jpCommon.add(jlDATUMDO, new XYConstraints(15, 70, -1, -1));
   jpCommon.add(jtDATUMDO, new XYConstraints(150, 70, 100, -1));
   jpCommon.add(rcbNK, new XYConstraints(255, 70, 265, -1));
   jp.add(jpCommon, BorderLayout.NORTH);
   jp.add(okpanel, BorderLayout.SOUTH);
   getContentPane().add(jp, BorderLayout.CENTER);
   addComponentListener(
       new ComponentAdapter() {
         public void componentShown(ComponentEvent e) {
           initInputValues();
           SetFokus();
         }
       });
   jbIspis.addActionListener(
       new ActionListener() {
         public void actionPerformed(ActionEvent e) {
           fake = true;
           okPressed();
         }
       });
   okpanel.addResetButton(this);
   okpanel.add(jbIspis, BorderLayout.WEST);
   okpanel.registerOKPanelKeys(this);
 }
예제 #2
0
 public void setFake(boolean _fake) {
   fake = _fake;
   rcbNK.setVisible(fake);
   jbIspis.setVisible(!fake);
   if (fake) okpanel.change_jBOK("Ispis", raImages.IMGPRINT);
 }
예제 #3
0
 public void resetDefaults() {
   rcbNK.setSelectedIndex(0);
   dataSet.empty();
   dataSet.setTimestamp("DATUMKNJ", vl.getToday());
   dataSet.setTimestamp("DATUMDO", vl.getToday());
 }
예제 #4
0
 public void initInputValues() {
   rcbNK.setSelectedIndex(rcbNK.getSelectedIndex());
   if (first) resetDefaults();
   first = false;
 }