X-Git-Url: https://harishankar.org/repos/?p=habeas.git;a=blobdiff_plain;f=src%2Fhabeas%2FMainFrame.java;h=f20df552cfbf187bc5abc950938fbed4ababcc4a;hp=c40672c45f7388cbbf64c7915c0bb8d375318d77;hb=ebe8c5c1a1ff2d63aca4d844887f39d763272eac;hpb=9a41ac52640b4316b9b69817cb4bc1298d0bd749 diff --git a/src/habeas/MainFrame.java b/src/habeas/MainFrame.java index c40672c..f20df55 100644 --- a/src/habeas/MainFrame.java +++ b/src/habeas/MainFrame.java @@ -5,6 +5,12 @@ */ 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 @@ -32,8 +38,12 @@ public class MainFrame extends javax.swing.JFrame { menuClientMaster = new javax.swing.JMenuItem(); menuLawyerNotices = new javax.swing.JMenu(); menuCreateNotice = new javax.swing.JMenuItem(); + menuManageNotices = new javax.swing.JMenuItem(); + jSeparator1 = new javax.swing.JPopupMenu.Separator(); + menuGenerateRaisedBills = new javax.swing.JMenuItem(); menuSettings = new javax.swing.JMenu(); menuDatabaseSettings = new javax.swing.JMenuItem(); + menuStationery = new javax.swing.JMenuItem(); setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE); setTitle("Habeas - Law Office Manager"); @@ -42,6 +52,7 @@ public class MainFrame extends javax.swing.JFrame { menuMaster.setMnemonic('M'); menuMaster.setText("Master"); + menuClientMaster.setMnemonic('c'); menuClientMaster.setText("Client Master..."); menuClientMaster.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { @@ -64,6 +75,25 @@ public class MainFrame extends javax.swing.JFrame { }); menuLawyerNotices.add(menuCreateNotice); + menuManageNotices.setMnemonic('M'); + menuManageNotices.setText("Manage Notices..."); + menuManageNotices.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + menuManageNoticesActionPerformed(evt); + } + }); + menuLawyerNotices.add(menuManageNotices); + menuLawyerNotices.add(jSeparator1); + + menuGenerateRaisedBills.setMnemonic('G'); + menuGenerateRaisedBills.setText("Generate Raised Bills..."); + menuGenerateRaisedBills.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + menuGenerateRaisedBillsActionPerformed(evt); + } + }); + menuLawyerNotices.add(menuGenerateRaisedBills); + jMenuBar1.add(menuLawyerNotices); menuSettings.setMnemonic('S'); @@ -78,6 +108,15 @@ public class MainFrame extends javax.swing.JFrame { }); menuSettings.add(menuDatabaseSettings); + menuStationery.setMnemonic('S'); + menuStationery.setText("Stationery Settings..."); + menuStationery.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + menuStationeryActionPerformed(evt); + } + }); + menuSettings.add(menuStationery); + jMenuBar1.add(menuSettings); setJMenuBar(jMenuBar1); @@ -114,6 +153,30 @@ public class MainFrame extends javax.swing.JFrame { frm.setVisible(true); }//GEN-LAST:event_menuCreateNoticeActionPerformed + private void menuManageNoticesActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_menuManageNoticesActionPerformed + // TODO add your handling code here: + ManageNoticesDialog frm = new ManageNoticesDialog(this, true); + frm.setVisible(true); + }//GEN-LAST:event_menuManageNoticesActionPerformed + + private void menuStationeryActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_menuStationeryActionPerformed + // TODO add your handling code here: + StationerySettingsDialog frm = new StationerySettingsDialog(this, true); + frm.setVisible(true); + }//GEN-LAST:event_menuStationeryActionPerformed + + private void menuGenerateRaisedBillsActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_menuGenerateRaisedBillsActionPerformed + // TODO add your handling code here: + GenerateRaisedBillsDialog frm = new GenerateRaisedBillsDialog(this, true); + frm.setVisible(true); + + }//GEN-LAST:event_menuGenerateRaisedBillsActionPerformed + private static final String ERROR_RETRIEVING_RAISED_BILLS = "Error retrieving bills" + + " or no bills are raised at this time."; + private static final String FODT_EXT = "fodt"; + private static final String FLAT_OPENDOCUMENT_TEXT = "Flat OpenDocument text"; + private static final String ERROR_GENERATING = "Error generating"; + /** * @param args the command line arguments */ @@ -151,11 +214,15 @@ public class MainFrame extends javax.swing.JFrame { // Variables declaration - do not modify//GEN-BEGIN:variables private javax.swing.JMenuBar jMenuBar1; + private javax.swing.JPopupMenu.Separator jSeparator1; private javax.swing.JMenuItem menuClientMaster; private javax.swing.JMenuItem menuCreateNotice; private javax.swing.JMenuItem menuDatabaseSettings; + private javax.swing.JMenuItem menuGenerateRaisedBills; private javax.swing.JMenu menuLawyerNotices; + private javax.swing.JMenuItem menuManageNotices; private javax.swing.JMenu menuMaster; private javax.swing.JMenu menuSettings; + private javax.swing.JMenuItem menuStationery; // End of variables declaration//GEN-END:variables }