From 4701a418ce4fb0b9f9cdc8e29fa553746a82498c Mon Sep 17 00:00:00 2001 From: Oliver Spohngellert Date: Wed, 15 Jun 2016 12:55:03 -0400 Subject: [PATCH] Updated case properties window. --- .../autopsy/casemodule/Bundle.properties | 1 + .../casemodule/CaseInformationPanel.form | 2 +- .../casemodule/CaseInformationPanel.java | 2 +- .../casemodule/CasePropertiesAction.java | 35 +++++----- .../casemodule/IngestJobInfoPanel.form | 64 +++++++++++++------ .../casemodule/IngestJobInfoPanel.java | 49 +++++++++----- 6 files changed, 100 insertions(+), 53 deletions(-) diff --git a/Core/src/org/sleuthkit/autopsy/casemodule/Bundle.properties b/Core/src/org/sleuthkit/autopsy/casemodule/Bundle.properties index f3e1305a94..55d2ec5fdd 100644 --- a/Core/src/org/sleuthkit/autopsy/casemodule/Bundle.properties +++ b/Core/src/org/sleuthkit/autopsy/casemodule/Bundle.properties @@ -249,3 +249,4 @@ IngestJobInfoPanel.ingestJobTable.columnModel.title2=End Time IngestJobInfoPanel.ingestJobTable.columnModel.title1=Start Time IngestJobInfoPanel.ingestJobTable.columnModel.title0=Content IngestJobInfoPanel.jLabel1.text=Ingest Modules +IngestJobInfoPanel.jLabel2.text=Ingest Jobs diff --git a/Core/src/org/sleuthkit/autopsy/casemodule/CaseInformationPanel.form b/Core/src/org/sleuthkit/autopsy/casemodule/CaseInformationPanel.form index 1bb24b57c5..a4f392d3f4 100755 --- a/Core/src/org/sleuthkit/autopsy/casemodule/CaseInformationPanel.form +++ b/Core/src/org/sleuthkit/autopsy/casemodule/CaseInformationPanel.form @@ -35,7 +35,7 @@ - + diff --git a/Core/src/org/sleuthkit/autopsy/casemodule/CaseInformationPanel.java b/Core/src/org/sleuthkit/autopsy/casemodule/CaseInformationPanel.java index 74a491932e..ea5926fa9d 100755 --- a/Core/src/org/sleuthkit/autopsy/casemodule/CaseInformationPanel.java +++ b/Core/src/org/sleuthkit/autopsy/casemodule/CaseInformationPanel.java @@ -75,7 +75,7 @@ public class CaseInformationPanel extends javax.swing.JPanel { jPanel1.setLayout(jPanel1Layout); jPanel1Layout.setHorizontalGroup( jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) - .addComponent(tabbedPane, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) + .addComponent(tabbedPane, javax.swing.GroupLayout.DEFAULT_SIZE, 691, Short.MAX_VALUE) ); jPanel1Layout.setVerticalGroup( jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) diff --git a/Core/src/org/sleuthkit/autopsy/casemodule/CasePropertiesAction.java b/Core/src/org/sleuthkit/autopsy/casemodule/CasePropertiesAction.java index b54d342a44..72b21a565c 100644 --- a/Core/src/org/sleuthkit/autopsy/casemodule/CasePropertiesAction.java +++ b/Core/src/org/sleuthkit/autopsy/casemodule/CasePropertiesAction.java @@ -54,31 +54,34 @@ final class CasePropertiesAction extends CallableSystemAction { */ @Override public void performAction() { - try { + if (popUpWindow == null) { // create the popUp window for it String title = NbBundle.getMessage(this.getClass(), "CasePropertiesAction.window.title"); final JFrame frame = new JFrame(title); popUpWindow = new JDialog(frame, title, false); // to make the popUp Window to be modal + try { - // create the case properties form - CaseInformationPanel caseInformationPanel = new CaseInformationPanel(); + // create the case properties form + CaseInformationPanel caseInformationPanel = new CaseInformationPanel(); - // add the case properties form / panel to the popup window - popUpWindow.add(caseInformationPanel); - popUpWindow.setResizable(true); - popUpWindow.pack(); - + // add the case properties form / panel to the popup window + popUpWindow.add(caseInformationPanel); + popUpWindow.setResizable(true); + popUpWindow.pack(); - // set the location of the popUp Window on the center of the screen - Dimension screenDimension = Toolkit.getDefaultToolkit().getScreenSize(); - double w = popUpWindow.getSize().getWidth(); - double h = popUpWindow.getSize().getHeight(); - popUpWindow.setLocation((int) ((screenDimension.getWidth() - w) / 2), (int) ((screenDimension.getHeight() - h) / 2)); + // set the location of the popUp Window on the center of the screen + Dimension screenDimension = Toolkit.getDefaultToolkit().getScreenSize(); + double w = popUpWindow.getSize().getWidth(); + double h = popUpWindow.getSize().getHeight(); + popUpWindow.setLocation((int) ((screenDimension.getWidth() - w) / 2), (int) ((screenDimension.getHeight() - h) / 2)); - popUpWindow.setVisible(true); - } catch (Exception ex) { - Logger.getLogger(CasePropertiesAction.class.getName()).log(Level.WARNING, "Error displaying Case Properties window.", ex); //NON-NLS + popUpWindow.setVisible(true); + } catch (Exception ex) { + Logger.getLogger(CasePropertiesAction.class.getName()).log(Level.WARNING, "Error displaying Case Properties window.", ex); //NON-NLS + } } + popUpWindow.setVisible(true); + popUpWindow.toFront(); } /** diff --git a/Core/src/org/sleuthkit/autopsy/casemodule/IngestJobInfoPanel.form b/Core/src/org/sleuthkit/autopsy/casemodule/IngestJobInfoPanel.form index 6e64131b97..f7829d0be0 100755 --- a/Core/src/org/sleuthkit/autopsy/casemodule/IngestJobInfoPanel.form +++ b/Core/src/org/sleuthkit/autopsy/casemodule/IngestJobInfoPanel.form @@ -3,7 +3,7 @@
- + @@ -21,34 +21,45 @@ - - - - - - - + + - - + + + + + + + + + + + + + + + + + + + + + + - - - - - - - + + + @@ -59,6 +70,9 @@ + + + @@ -108,7 +122,9 @@ - + + + @@ -127,6 +143,11 @@ + + + + + @@ -152,5 +173,12 @@ + + + + + + + diff --git a/Core/src/org/sleuthkit/autopsy/casemodule/IngestJobInfoPanel.java b/Core/src/org/sleuthkit/autopsy/casemodule/IngestJobInfoPanel.java index 32596ef06e..b85d5b220e 100755 --- a/Core/src/org/sleuthkit/autopsy/casemodule/IngestJobInfoPanel.java +++ b/Core/src/org/sleuthkit/autopsy/casemodule/IngestJobInfoPanel.java @@ -123,10 +123,12 @@ public class IngestJobInfoPanel extends javax.swing.JPanel { jScrollPane2 = new javax.swing.JScrollPane(); ingestModuleList = new javax.swing.JList<>(); jLabel1 = new javax.swing.JLabel(); + jLabel2 = new javax.swing.JLabel(); - setMinimumSize(new java.awt.Dimension(691, 451)); + setMinimumSize(null); jScrollPane1.setBorder(null); + jScrollPane1.setPreferredSize(null); ingestJobTable.setModel(new javax.swing.table.DefaultTableModel( new Object [][] { @@ -151,7 +153,7 @@ public class IngestJobInfoPanel extends javax.swing.JPanel { return canEdit [columnIndex]; } }); - ingestJobTable.setColumnSelectionAllowed(true); + ingestJobTable.setPreferredSize(null); ingestJobTable.getTableHeader().setReorderingAllowed(false); jScrollPane1.setViewportView(ingestJobTable); ingestJobTable.getColumnModel().getSelectionModel().setSelectionMode(javax.swing.ListSelectionModel.SINGLE_SELECTION); @@ -169,36 +171,48 @@ public class IngestJobInfoPanel extends javax.swing.JPanel { } }); + jScrollPane2.setPreferredSize(null); + jScrollPane2.setViewportView(ingestModuleList); org.openide.awt.Mnemonics.setLocalizedText(jLabel1, org.openide.util.NbBundle.getMessage(IngestJobInfoPanel.class, "IngestJobInfoPanel.jLabel1.text")); // NOI18N + org.openide.awt.Mnemonics.setLocalizedText(jLabel2, org.openide.util.NbBundle.getMessage(IngestJobInfoPanel.class, "IngestJobInfoPanel.jLabel2.text")); // NOI18N + javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this); this.setLayout(layout); layout.setHorizontalGroup( layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) - .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup() - .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) - .addComponent(jButton1)) .addGroup(layout.createSequentialGroup() - .addComponent(jScrollPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 470, Short.MAX_VALUE) - .addGap(18, 18, 18) + .addGap(15, 15, 15) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) - .addComponent(jScrollPane2, javax.swing.GroupLayout.PREFERRED_SIZE, 203, javax.swing.GroupLayout.PREFERRED_SIZE) - .addComponent(jLabel1))) + .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup() + .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addComponent(jScrollPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 465, Short.MAX_VALUE) + .addGroup(layout.createSequentialGroup() + .addComponent(jLabel2) + .addGap(0, 0, Short.MAX_VALUE))) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) + .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addComponent(jScrollPane2, javax.swing.GroupLayout.PREFERRED_SIZE, 203, javax.swing.GroupLayout.PREFERRED_SIZE) + .addComponent(jLabel1))) + .addComponent(jButton1, javax.swing.GroupLayout.Alignment.TRAILING)) + .addContainerGap()) ); layout.setVerticalGroup( layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createSequentialGroup() - .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) - .addComponent(jScrollPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 422, Short.MAX_VALUE) - .addGroup(layout.createSequentialGroup() - .addGap(8, 8, 8) - .addComponent(jLabel1) - .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) - .addComponent(jScrollPane2))) + .addGap(8, 8, 8) + .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) + .addComponent(jLabel1) + .addComponent(jLabel2)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) - .addComponent(jButton1)) + .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 0, Short.MAX_VALUE) + .addComponent(jScrollPane2, javax.swing.GroupLayout.DEFAULT_SIZE, 224, Short.MAX_VALUE)) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) + .addComponent(jButton1) + .addContainerGap()) ); }// //GEN-END:initComponents @@ -212,6 +226,7 @@ public class IngestJobInfoPanel extends javax.swing.JPanel { private javax.swing.JList ingestModuleList; private javax.swing.JButton jButton1; private javax.swing.JLabel jLabel1; + private javax.swing.JLabel jLabel2; private javax.swing.JScrollPane jScrollPane1; private javax.swing.JScrollPane jScrollPane2; // End of variables declaration//GEN-END:variables