X-Git-Url: https://harishankar.org/repos/?p=habeas.git;a=blobdiff_plain;f=src%2Fhabeas%2FManageNoticesDialog.java;h=50928a469723680a2b36018c5cf203421753e650;hp=60a91253ecfc764427bfc4e58d83473379220a5a;hb=0109c82b782e02046aa520811ea5bfe3f6c675a5;hpb=466a2393accd0d6d2df5f68d53488c667d5369de diff --git a/src/habeas/ManageNoticesDialog.java b/src/habeas/ManageNoticesDialog.java index 60a9125..50928a4 100644 --- a/src/habeas/ManageNoticesDialog.java +++ b/src/habeas/ManageNoticesDialog.java @@ -49,9 +49,12 @@ public class ManageNoticesDialog extends javax.swing.JDialog { menuDescription = new javax.swing.JMenuItem(); menuDraftStatus = new javax.swing.JMenuItem(); menuDispatchDetails = new javax.swing.JMenuItem(); + menuBillDetails = new javax.swing.JMenuItem(); + menuClarificationDetails = new javax.swing.JMenuItem(); jScrollPane1 = new javax.swing.JScrollPane(); tableNotices = new javax.swing.JTable(); + menuDescription.setMnemonic('e'); menuDescription.setText("Description..."); menuDescription.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { @@ -79,6 +82,24 @@ public class ManageNoticesDialog extends javax.swing.JDialog { }); popMenu.add(menuDispatchDetails); + menuBillDetails.setMnemonic('B'); + menuBillDetails.setText("Bill Details..."); + menuBillDetails.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + menuBillDetailsActionPerformed(evt); + } + }); + popMenu.add(menuBillDetails); + + menuClarificationDetails.setMnemonic('r'); + menuClarificationDetails.setText("Clarification Details..."); + menuClarificationDetails.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + menuClarificationDetailsActionPerformed(evt); + } + }); + popMenu.add(menuClarificationDetails); + setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE); setTitle("Manage Notices"); setLocationByPlatform(true); @@ -164,6 +185,31 @@ public class ManageNoticesDialog extends javax.swing.JDialog { frm.setVisible(true); }//GEN-LAST:event_menuDispatchDetailsActionPerformed + private void menuBillDetailsActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_menuBillDetailsActionPerformed + // TODO add your handling code here: + int selid = getSelectedNotice(); + if (selid == -1) return; + ArrayList notice = Utility.getNoticeDetails(selid); + if (notice == null) return; + + BillDetailsDialog frm = new BillDetailsDialog((Frame) this.getParent(),true); + frm.setFields (selid, (String)notice.get(11), (int)notice.get(12), (Date)notice.get(13)); + frm.setVisible(true); + }//GEN-LAST:event_menuBillDetailsActionPerformed + + private void menuClarificationDetailsActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_menuClarificationDetailsActionPerformed + // TODO add your handling code here: + int selid = getSelectedNotice(); + if (selid == -1) return; + ArrayList notice = Utility.getNoticeDetails(selid); + if (notice == null) return; + ClarificationDetailsDialog frm = new ClarificationDetailsDialog( + (Frame)this.getParent(), true); + + frm.setFields (selid, (boolean)notice.get(14), (String)notice.get(15)); + frm.setVisible(true); + }//GEN-LAST:event_menuClarificationDetailsActionPerformed + /** * @param args the command line arguments */ @@ -208,6 +254,8 @@ public class ManageNoticesDialog extends javax.swing.JDialog { // Variables declaration - do not modify//GEN-BEGIN:variables private javax.swing.JScrollPane jScrollPane1; + private javax.swing.JMenuItem menuBillDetails; + private javax.swing.JMenuItem menuClarificationDetails; private javax.swing.JMenuItem menuDescription; private javax.swing.JMenuItem menuDispatchDetails; private javax.swing.JMenuItem menuDraftStatus;