import java.awt.event.MouseAdapter;
import java.awt.event.MouseEvent;
import java.util.ArrayList;
+import java.util.Date;
import javax.swing.table.DefaultTableModel;
/**
private void initComponents() {
popMenu = new javax.swing.JPopupMenu();
+ menuDescription = new javax.swing.JMenuItem();
menuDraftStatus = new javax.swing.JMenuItem();
jScrollPane1 = new javax.swing.JScrollPane();
tableNotices = new javax.swing.JTable();
+ menuDescription.setText("Description...");
+ menuDescription.addActionListener(new java.awt.event.ActionListener() {
+ public void actionPerformed(java.awt.event.ActionEvent evt) {
+ menuDescriptionActionPerformed(evt);
+ }
+ });
+ popMenu.add(menuDescription);
+
menuDraftStatus.setMnemonic('D');
menuDraftStatus.setText("Draft Status...");
menuDraftStatus.setToolTipText("");
ArrayList<Object> notice = Utility.getNoticeDetails (selid);
if (notice == null) return;
- frm.setDraftStatus((boolean)notice.get(4), (boolean)notice.get(5));
- frm.setSelectedNotice (selid);
+ frm.setFields(selid, (boolean)notice.get(4), (boolean)notice.get(5));
frm.setVisible(true);
}//GEN-LAST:event_menuDraftStatusActionPerformed
+ private void menuDescriptionActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_menuDescriptionActionPerformed
+ // 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;
+ frm.setFields(selid, (String)notice.get(0), (String)notice.get(1), (Date)notice.get(2));
+ frm.setVisible(true);
+ populateNotices();
+ }//GEN-LAST:event_menuDescriptionActionPerformed
+
/**
* @param args the command line arguments
*/
// Variables declaration - do not modify//GEN-BEGIN:variables
private javax.swing.JScrollPane jScrollPane1;
+ private javax.swing.JMenuItem menuDescription;
private javax.swing.JMenuItem menuDraftStatus;
private javax.swing.JPopupMenu popMenu;
private javax.swing.JTable tableNotices;