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); }
public void BindComponents(DataSet ds) { jraAdr.setDataSet(ds); jraEmadr.setDataSet(ds); jraFax.setDataSet(ds); jraKol.setDataSet(ds); jraMj.setDataSet(ds); jraNaziv.setDataSet(ds); jraPbr.setDataSet(ds); jraTelfax.setDataSet(ds); jlrCpar.setDataSet(ds); }
private void jbInit() throws Exception { tots.setColumns( new Column[] { dM.createBigDecimalColumn("TOT", 2), dM.createBigDecimalColumn("POK", 2), dM.createBigDecimalColumn("SAL", 2), dM.createBigDecimalColumn("TOTPV", 2), dM.createBigDecimalColumn("POKPV", 2), dM.createBigDecimalColumn("SALPV", 2) }); tots.open(); tots.insertRow(false); jraTot.setDataSet(tots); jraTot.setColumnName("TOT"); jraPok.setDataSet(tots); jraPok.setColumnName("POK"); jraOst.setDataSet(tots); jraOst.setColumnName("SAL"); jlTot.setHorizontalAlignment(JLabel.CENTER); jlPok.setHorizontalAlignment(JLabel.CENTER); jlOst.setHorizontalAlignment(JLabel.CENTER); jraTotPv.setDataSet(tots); jraTotPv.setColumnName("TOTPV"); jraPokPv.setDataSet(tots); jraPokPv.setColumnName("POKPV"); jraOstPv.setDataSet(tots); jraOstPv.setColumnName("SALPV"); setLayout(lay); lay.setWidth(475); lay.setHeight(80); add(jlUk, new XYConstraints(15, 20, -1, -1)); add(jraTot, new XYConstraints(150, 20, 100, -1)); add(jraPok, new XYConstraints(255, 20, 100, -1)); add(jraOst, new XYConstraints(360, 20, 100, -1)); add(jlTot, new XYConstraints(150, 4, 100, -1)); add(jlPok, new XYConstraints(255, 4, 100, -1)); add(jlOst, new XYConstraints(360, 4, 100, -1)); add(jlUkPv, new XYConstraints(15, 50, -1, -1)); add(jraTotPv, new XYConstraints(150, 50, 100, -1)); add(jraPokPv, new XYConstraints(255, 50, 100, -1)); add(jraOstPv, new XYConstraints(360, 50, 100, -1)); setBorder(BorderFactory.createRaisedBevelBorder()); }