Manage Legal Notices - Dispatch Details
[habeas.git] / src / habeas / ManageNoticesDialog.java
index 73d73fe..60a9125 100644 (file)
@@ -25,7 +25,6 @@ public class ManageNoticesDialog extends javax.swing.JDialog {
         super(parent, modal);
         initComponents();
         populateNotices ();
         super(parent, modal);
         initComponents();
         populateNotices ();
-        tableNotices.add(popMenu);
         tableNotices.addMouseListener(new MouseAdapter() {
             @Override
             public void mousePressed(MouseEvent arg0) {
         tableNotices.addMouseListener(new MouseAdapter() {
             @Override
             public void mousePressed(MouseEvent arg0) {
@@ -49,6 +48,7 @@ public class ManageNoticesDialog extends javax.swing.JDialog {
         popMenu = new javax.swing.JPopupMenu();
         menuDescription = new javax.swing.JMenuItem();
         menuDraftStatus = new javax.swing.JMenuItem();
         popMenu = new javax.swing.JPopupMenu();
         menuDescription = new javax.swing.JMenuItem();
         menuDraftStatus = new javax.swing.JMenuItem();
+        menuDispatchDetails = new javax.swing.JMenuItem();
         jScrollPane1 = new javax.swing.JScrollPane();
         tableNotices = new javax.swing.JTable();
 
         jScrollPane1 = new javax.swing.JScrollPane();
         tableNotices = new javax.swing.JTable();
 
@@ -70,6 +70,15 @@ public class ManageNoticesDialog extends javax.swing.JDialog {
         });
         popMenu.add(menuDraftStatus);
 
         });
         popMenu.add(menuDraftStatus);
 
+        menuDispatchDetails.setMnemonic('h');
+        menuDispatchDetails.setText("Dispatch Details...");
+        menuDispatchDetails.addActionListener(new java.awt.event.ActionListener() {
+            public void actionPerformed(java.awt.event.ActionEvent evt) {
+                menuDispatchDetailsActionPerformed(evt);
+            }
+        });
+        popMenu.add(menuDispatchDetails);
+
         setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);
         setTitle("Manage Notices");
         setLocationByPlatform(true);
         setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);
         setTitle("Manage Notices");
         setLocationByPlatform(true);
@@ -133,14 +142,28 @@ public class ManageNoticesDialog extends javax.swing.JDialog {
         // TODO add your handling code here:
         int selid = getSelectedNotice();
         if (selid == -1) return;
         // TODO add your handling code here:
         int selid = getSelectedNotice();
         if (selid == -1) return;
-        DescriptionDialog frm = new DescriptionDialog((Frame)this.getParent(), true);
         ArrayList<Object> notice = Utility.getNoticeDetails(selid);
         if (notice == null) return;
         ArrayList<Object> notice = Utility.getNoticeDetails(selid);
         if (notice == null) return;
+        
+        DescriptionDialog frm = new DescriptionDialog((Frame)this.getParent(), true);
         frm.setFields(selid, (String)notice.get(0), (String)notice.get(1), (Date)notice.get(2));
         frm.setVisible(true);
         populateNotices();
     }//GEN-LAST:event_menuDescriptionActionPerformed
 
         frm.setFields(selid, (String)notice.get(0), (String)notice.get(1), (Date)notice.get(2));
         frm.setVisible(true);
         populateNotices();
     }//GEN-LAST:event_menuDescriptionActionPerformed
 
+    private void menuDispatchDetailsActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_menuDispatchDetailsActionPerformed
+        // TODO add your handling code here:
+        int selid = getSelectedNotice();
+        if (selid == -1) return;
+        ArrayList<Object> notice = Utility.getNoticeDetails(selid);
+        if (notice == null) return;
+        
+        DispatchDetailsDialog frm = new DispatchDetailsDialog((Frame) this.getParent(), true);
+        frm.setFields (selid, (boolean)notice.get(6), (Date)notice.get(7),
+                (String)notice.get(8), (boolean) notice.get(9),(Date) notice.get(10));
+        frm.setVisible(true);
+    }//GEN-LAST:event_menuDispatchDetailsActionPerformed
+
     /**
      * @param args the command line arguments
      */
     /**
      * @param args the command line arguments
      */
@@ -186,6 +209,7 @@ public class ManageNoticesDialog extends javax.swing.JDialog {
     // Variables declaration - do not modify//GEN-BEGIN:variables
     private javax.swing.JScrollPane jScrollPane1;
     private javax.swing.JMenuItem menuDescription;
     // Variables declaration - do not modify//GEN-BEGIN:variables
     private javax.swing.JScrollPane jScrollPane1;
     private javax.swing.JMenuItem menuDescription;
+    private javax.swing.JMenuItem menuDispatchDetails;
     private javax.swing.JMenuItem menuDraftStatus;
     private javax.swing.JPopupMenu popMenu;
     private javax.swing.JTable tableNotices;
     private javax.swing.JMenuItem menuDraftStatus;
     private javax.swing.JPopupMenu popMenu;
     private javax.swing.JTable tableNotices;