void find() { String criterion; /*String operator=" and "; if(m_orRadioBt.isSelected()) operator =" or ";*/ // criterion = loader.getCriterion(m_searchTable,operator); criterion = "1=1"; if ((!firstTime && m_voucherList.length == 0) || (m_voucherList == null)) m_voucherList = loader.find(criterion); if (m_sign) { // prepareChildren(getIndexes()); prepareChildren(criterion); prepareJournalStandardAccounts(); m_voucherListTable.setReceiptList(m_voucherList, this.m_type); } else m_voucherListTable.setReceiptList(m_voucherList); }
void constructComponent() { m_statusComboBox = new JComboBox(new Object[] {"Not Submitted", "Submitted", "Posted", "All"}); // 0,1,3,* m_paymentSourceComboBox = new JComboBox(new Object[] {"Bank", "Cash", "Bank/Cash"}); m_voucherListTable = new VoucherListTable(); if (m_sign) m_voucherListTable = new VoucherListTable(m_sign, this.m_conn); m_voucherListTable.addMouseListener( new MouseAdapter() { public void mouseClicked(MouseEvent e) { if (e.getClickCount() >= 2) { onSelect(); } } }); JPanel centerPanel = new JPanel(new BorderLayout()); JPanel buttonPanel = new JPanel(new FlowLayout(FlowLayout.RIGHT)); m_selectBt = new JButton("Select"); m_selectBt.addActionListener(this); buttonPanel.add(m_selectBt); centerPanel.setBorder( BorderFactory.createTitledBorder( BorderFactory.createEtchedBorder(), "Voucher List", javax.swing.border.TitledBorder.LEFT, javax.swing.border.TitledBorder.DEFAULT_POSITION, new Font("Tahoma", Font.PLAIN, 11), Color.blue.darker().darker())); Box vertBox = Box.createVerticalBox(); vertBox.add(filterField); vertBox.add(new JScrollPane(m_voucherListTable)); centerPanel.add(vertBox, BorderLayout.CENTER); centerPanel.add(buttonPanel, BorderLayout.NORTH); addWindowListener( new WindowAdapter() { public void windowClosing(WindowEvent e) { dispose(); } }); getContentPane().setLayout(new BorderLayout()); getContentPane().add(criteriaPanel(), BorderLayout.NORTH); getContentPane().add(centerPanel, BorderLayout.CENTER); }
void onSelect() { m_iResponse = JOptionPane.OK_OPTION; int selectedRow = m_voucherListTable.getSelectedRow(); if (selectedRow > -1) selectedObj = m_voucherListTable.getRow(selectedRow); dispose(); }