X-Git-Url: https://harishankar.org/repos/?p=habeas.git;a=blobdiff_plain;f=src%2Fhabeas%2FGenerateRaisedBillsDialog.java;fp=src%2Fhabeas%2FGenerateRaisedBillsDialog.java;h=22733539038a04b1763c6c50f5a81d944714a01f;hp=0000000000000000000000000000000000000000;hb=ebe8c5c1a1ff2d63aca4d844887f39d763272eac;hpb=9ec7870cd70d09a7d67efb17dae44baa51f77957
diff --git a/src/habeas/GenerateRaisedBillsDialog.java b/src/habeas/GenerateRaisedBillsDialog.java
new file mode 100644
index 0000000..2273353
--- /dev/null
+++ b/src/habeas/GenerateRaisedBillsDialog.java
@@ -0,0 +1,205 @@
+/*
+ * To change this license header, choose License Headers in Project Properties.
+ * To change this template file, choose Tools | Templates
+ * and open the template in the editor.
+ */
+package habeas;
+
+import java.util.ArrayList;
+import javax.swing.JFileChooser;
+import javax.swing.JOptionPane;
+import javax.swing.filechooser.FileFilter;
+import javax.swing.filechooser.FileNameExtensionFilter;
+
+/**
+ *
+ * @author hari
+ */
+public class GenerateRaisedBillsDialog extends javax.swing.JDialog {
+
+ /**
+ * Creates new form GenerateRaisedBillsDialog
+ */
+ public GenerateRaisedBillsDialog(java.awt.Frame parent, boolean modal) {
+ super(parent, modal);
+ initComponents();
+ populateFields ();
+ }
+
+ /**
+ * This method is called from within the constructor to initialize the form.
+ * WARNING: Do NOT modify this code. The content of this method is always
+ * regenerated by the Form Editor.
+ */
+ @SuppressWarnings("unchecked")
+ // //GEN-BEGIN:initComponents
+ private void initComponents() {
+
+ jLabel1 = new javax.swing.JLabel();
+ comboClients = new javax.swing.JComboBox<>();
+ buttonGenerate = new javax.swing.JButton();
+ buttonClose = new javax.swing.JButton();
+
+ setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);
+ setTitle("Generate Raised Bills");
+ setLocationByPlatform(true);
+
+ jLabel1.setText("For client");
+
+ buttonGenerate.setMnemonic('g');
+ buttonGenerate.setText("Generate");
+ buttonGenerate.addActionListener(new java.awt.event.ActionListener() {
+ public void actionPerformed(java.awt.event.ActionEvent evt) {
+ buttonGenerateActionPerformed(evt);
+ }
+ });
+
+ buttonClose.setMnemonic('C');
+ buttonClose.setText("Close");
+ buttonClose.addActionListener(new java.awt.event.ActionListener() {
+ public void actionPerformed(java.awt.event.ActionEvent evt) {
+ buttonCloseActionPerformed(evt);
+ }
+ });
+
+ javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
+ getContentPane().setLayout(layout);
+ layout.setHorizontalGroup(
+ layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
+ .addGroup(layout.createSequentialGroup()
+ .addContainerGap()
+ .addComponent(jLabel1, javax.swing.GroupLayout.PREFERRED_SIZE, 113, javax.swing.GroupLayout.PREFERRED_SIZE)
+ .addGap(18, 18, 18)
+ .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
+ .addComponent(comboClients, 0, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
+ .addGroup(layout.createSequentialGroup()
+ .addComponent(buttonGenerate, javax.swing.GroupLayout.PREFERRED_SIZE, 121, javax.swing.GroupLayout.PREFERRED_SIZE)
+ .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 28, Short.MAX_VALUE)
+ .addComponent(buttonClose, javax.swing.GroupLayout.PREFERRED_SIZE, 120, javax.swing.GroupLayout.PREFERRED_SIZE)))
+ .addContainerGap())
+ );
+ layout.setVerticalGroup(
+ layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
+ .addGroup(layout.createSequentialGroup()
+ .addGap(13, 13, 13)
+ .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
+ .addComponent(jLabel1)
+ .addComponent(comboClients, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
+ .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 45, Short.MAX_VALUE)
+ .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
+ .addComponent(buttonGenerate)
+ .addComponent(buttonClose))
+ .addContainerGap())
+ );
+
+ pack();
+ }// //GEN-END:initComponents
+
+ private void buttonCloseActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_buttonCloseActionPerformed
+ // TODO add your handling code here:
+ dispose ();
+ }//GEN-LAST:event_buttonCloseActionPerformed
+
+ private void buttonGenerateActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_buttonGenerateActionPerformed
+ // TODO add your handling code here:
+ DBItem selitem = (DBItem)comboClients.getSelectedItem();
+ if (selitem == null) return;
+ ArrayList