From df9f87dfe52e4563c31695c57db0da7998180da4 Mon Sep 17 00:00:00 2001 From: "U-BASIS\\dgrove" Date: Fri, 21 Dec 2018 13:28:26 -0500 Subject: [PATCH 01/13] Removes drive from which application runs. --- .../autopsy/livetriage/SelectDriveDialog.java | 24 +++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/Core/src/org/sleuthkit/autopsy/livetriage/SelectDriveDialog.java b/Core/src/org/sleuthkit/autopsy/livetriage/SelectDriveDialog.java index 2b973aa92f..46032df9dd 100644 --- a/Core/src/org/sleuthkit/autopsy/livetriage/SelectDriveDialog.java +++ b/Core/src/org/sleuthkit/autopsy/livetriage/SelectDriveDialog.java @@ -24,6 +24,8 @@ import java.util.concurrent.CancellationException; import java.util.logging.Level; import java.awt.Dimension; import java.awt.Point; +import java.util.Collections; +import java.util.Comparator; import javax.swing.SwingWorker; import javax.swing.event.ListSelectionEvent; import javax.swing.event.ListSelectionListener; @@ -346,6 +348,19 @@ class SelectDriveDialog extends javax.swing.JDialog { // Populate the lists partitions = new ArrayList<>(); partitions = PlatformUtil.getPartitions(); + + // Remove the partition the application is running on. + String userConfigPath = PlatformUtil.getUserConfigDirectory(); + for (LocalDisk disk : partitions) { + String diskPath = disk.getPath(); + if (diskPath.startsWith("\\\\.\\")) { + // Strip out UNC prefix to get the drive letter. + diskPath = diskPath.substring(4); + } + if (userConfigPath.startsWith(diskPath)) { + partitions.remove(disk); + } + } return null; } @@ -388,10 +403,19 @@ class SelectDriveDialog extends javax.swing.JDialog { loadingDisks = false; disks = new ArrayList<>(); disks.addAll(partitions); + if (disks.size() > 0) { diskTable.setEnabled(true); diskTable.clearSelection(); + + Collections.sort(disks, new Comparator(){ + @Override + public int compare(LocalDisk disk1, LocalDisk disk2){ + return disk1.getName().compareToIgnoreCase(disk2.getName()); + } + }); } + ready = true; } } From 25e25a64bb2773c429f828ad4a1364cc5d77ff70 Mon Sep 17 00:00:00 2001 From: William Schaefer Date: Fri, 21 Dec 2018 17:58:55 -0500 Subject: [PATCH 02/13] 4556 remove unnecessary calls to EamDb.getInstance().newCase() now that CRs cant be changed with a case open --- .../autopsy/casemodule/CasePropertiesPanel.java | 3 --- .../autopsy/casemodule/NewCaseWizardAction.java | 3 --- .../centralrepository/datamodel/AbstractSqlEamDb.java | 3 --- .../centralrepository/datamodel/EamArtifactUtil.java | 6 ------ .../eventlisteners/CaseEventListener.java | 3 --- .../ingestmodule/CentralRepoIngestModule.java | 11 +---------- 6 files changed, 1 insertion(+), 28 deletions(-) diff --git a/Core/src/org/sleuthkit/autopsy/casemodule/CasePropertiesPanel.java b/Core/src/org/sleuthkit/autopsy/casemodule/CasePropertiesPanel.java index a2dc028b70..893f16ba59 100644 --- a/Core/src/org/sleuthkit/autopsy/casemodule/CasePropertiesPanel.java +++ b/Core/src/org/sleuthkit/autopsy/casemodule/CasePropertiesPanel.java @@ -85,9 +85,6 @@ final class CasePropertiesPanel extends javax.swing.JPanel { EamDb dbManager = EamDb.getInstance(); if (dbManager != null) { CorrelationCase correlationCase = dbManager.getCase(theCase); - if (null == correlationCase) { - correlationCase = dbManager.newCase(theCase); - } currentOrg = correlationCase.getOrg(); } } catch (EamDbException ex) { diff --git a/Core/src/org/sleuthkit/autopsy/casemodule/NewCaseWizardAction.java b/Core/src/org/sleuthkit/autopsy/casemodule/NewCaseWizardAction.java index 2b85a74333..c6fae89f54 100644 --- a/Core/src/org/sleuthkit/autopsy/casemodule/NewCaseWizardAction.java +++ b/Core/src/org/sleuthkit/autopsy/casemodule/NewCaseWizardAction.java @@ -92,9 +92,6 @@ final class NewCaseWizardAction extends CallableSystemAction { EamDb dbManager = EamDb.getInstance(); if (dbManager != null) { CorrelationCase cRCase = dbManager.getCase(Case.getCurrentCaseThrows()); - if (cRCase == null) { - cRCase = dbManager.newCase(Case.getCurrentCaseThrows()); - } if (!organizationName.isEmpty()) { for (EamOrganization org : dbManager.getOrganizations()) { if (org.getName().equals(organizationName)) { diff --git a/Core/src/org/sleuthkit/autopsy/centralrepository/datamodel/AbstractSqlEamDb.java b/Core/src/org/sleuthkit/autopsy/centralrepository/datamodel/AbstractSqlEamDb.java index b1d4ba3cd6..1716668d26 100644 --- a/Core/src/org/sleuthkit/autopsy/centralrepository/datamodel/AbstractSqlEamDb.java +++ b/Core/src/org/sleuthkit/autopsy/centralrepository/datamodel/AbstractSqlEamDb.java @@ -1671,9 +1671,6 @@ abstract class AbstractSqlEamDb implements EamDb { // in the database, but we don't expect the user to be tagging large numbers // of items (that didn't have the CE ingest module run on them) at once. CorrelationCase correlationCaseWithId = getCaseByUUID(eamArtifact.getCorrelationCase().getCaseUUID()); - if (null == correlationCaseWithId) { - correlationCaseWithId = newCase(eamArtifact.getCorrelationCase()); - } if (null == getDataSource(correlationCaseWithId, eamArtifact.getCorrelationDataSource().getDataSourceObjectID())) { newDataSource(eamArtifact.getCorrelationDataSource()); } diff --git a/Core/src/org/sleuthkit/autopsy/centralrepository/datamodel/EamArtifactUtil.java b/Core/src/org/sleuthkit/autopsy/centralrepository/datamodel/EamArtifactUtil.java index 8c137472e2..581bc5de5b 100644 --- a/Core/src/org/sleuthkit/autopsy/centralrepository/datamodel/EamArtifactUtil.java +++ b/Core/src/org/sleuthkit/autopsy/centralrepository/datamodel/EamArtifactUtil.java @@ -200,9 +200,6 @@ public class EamArtifactUtil { // make an instance for the BB source file CorrelationCase correlationCase = EamDb.getInstance().getCase(Case.getCurrentCaseThrows()); - if (null == correlationCase) { - correlationCase = EamDb.getInstance().newCase(Case.getCurrentCaseThrows()); - } return new CorrelationAttributeInstance( correlationType, value, @@ -322,9 +319,6 @@ public class EamArtifactUtil { CorrelationAttributeInstance.Type filesType = EamDb.getInstance().getCorrelationTypeById(CorrelationAttributeInstance.FILES_TYPE_ID); CorrelationCase correlationCase = EamDb.getInstance().getCase(Case.getCurrentCaseThrows()); - if (null == correlationCase) { - correlationCase = EamDb.getInstance().newCase(Case.getCurrentCaseThrows()); - } return new CorrelationAttributeInstance( filesType, af.getMd5Hash(), diff --git a/Core/src/org/sleuthkit/autopsy/centralrepository/eventlisteners/CaseEventListener.java b/Core/src/org/sleuthkit/autopsy/centralrepository/eventlisteners/CaseEventListener.java index ffff8c7b8b..5a65e73f57 100644 --- a/Core/src/org/sleuthkit/autopsy/centralrepository/eventlisteners/CaseEventListener.java +++ b/Core/src/org/sleuthkit/autopsy/centralrepository/eventlisteners/CaseEventListener.java @@ -444,9 +444,6 @@ final class CaseEventListener implements PropertyChangeListener { try { CorrelationCase correlationCase = dbManager.getCase(openCase); - if (null == correlationCase) { - correlationCase = dbManager.newCase(openCase); - } if (null == dbManager.getDataSource(correlationCase, newDataSource.getId())) { CorrelationDataSource.fromTSKDataSource(correlationCase, newDataSource); } diff --git a/Core/src/org/sleuthkit/autopsy/centralrepository/ingestmodule/CentralRepoIngestModule.java b/Core/src/org/sleuthkit/autopsy/centralrepository/ingestmodule/CentralRepoIngestModule.java index ac74964b27..f244421880 100644 --- a/Core/src/org/sleuthkit/autopsy/centralrepository/ingestmodule/CentralRepoIngestModule.java +++ b/Core/src/org/sleuthkit/autopsy/centralrepository/ingestmodule/CentralRepoIngestModule.java @@ -297,16 +297,7 @@ final class CentralRepoIngestModule implements FileIngestModule { } catch (EamDbException ex) { throw new IngestModuleException("Unable to get case from central repository database ", ex); } - if (eamCase == null) { - // ensure we have this case defined in the EAM DB - try { - eamCase = centralRepoDb.newCase(autopsyCase); - } catch (EamDbException ex) { - logger.log(Level.SEVERE, "Error creating new case in ingest module start up.", ex); // NON-NLS - throw new IngestModuleException("Error creating new case in ingest module start up.", ex); // NON-NLS - } - } - + try { eamDataSource = CorrelationDataSource.fromTSKDataSource(eamCase, context.getDataSource()); } catch (EamDbException ex) { From f66fc216d834bfe4819becb2e51edd112a719afa Mon Sep 17 00:00:00 2001 From: "U-BASIS\\dgrove" Date: Wed, 26 Dec 2018 15:39:48 -0500 Subject: [PATCH 03/13] Applied changes to LocalDiskSelectionDialog. --- .../casemodule/LocalDiskSelectionDialog.java | 16 ++++++++++++++ .../autopsy/livetriage/SelectDriveDialog.java | 21 +------------------ 2 files changed, 17 insertions(+), 20 deletions(-) diff --git a/Core/src/org/sleuthkit/autopsy/casemodule/LocalDiskSelectionDialog.java b/Core/src/org/sleuthkit/autopsy/casemodule/LocalDiskSelectionDialog.java index bd2343ced6..c663c288a9 100755 --- a/Core/src/org/sleuthkit/autopsy/casemodule/LocalDiskSelectionDialog.java +++ b/Core/src/org/sleuthkit/autopsy/casemodule/LocalDiskSelectionDialog.java @@ -20,6 +20,7 @@ package org.sleuthkit.autopsy.casemodule; import java.awt.Window; import java.util.ArrayList; +import java.util.Collections; import java.util.List; import java.util.concurrent.CancellationException; import java.util.concurrent.ExecutionException; @@ -423,6 +424,21 @@ final class LocalDiskSelectionDialog extends JDialog { if (disks.size() > 0) { localDiskTable.setEnabled(true); localDiskTable.clearSelection(); + + // Remove the partition the application is running on. + String userConfigPath = PlatformUtil.getUserConfigDirectory(); + for (LocalDisk disk : disks) { + String diskPath = disk.getPath(); + if (diskPath.startsWith("\\\\.\\")) { + // Strip out UNC prefix to get the drive letter. + diskPath = diskPath.substring(4); + } + if (userConfigPath.startsWith(diskPath)) { + disks.remove(disk); + } + } + + Collections.sort(disks, (LocalDisk disk1, LocalDisk disk2) -> disk1.getName().compareToIgnoreCase(disk2.getName())); } fireUpdateEvent(); ready = true; diff --git a/Core/src/org/sleuthkit/autopsy/livetriage/SelectDriveDialog.java b/Core/src/org/sleuthkit/autopsy/livetriage/SelectDriveDialog.java index 46032df9dd..71412dad1e 100644 --- a/Core/src/org/sleuthkit/autopsy/livetriage/SelectDriveDialog.java +++ b/Core/src/org/sleuthkit/autopsy/livetriage/SelectDriveDialog.java @@ -25,7 +25,6 @@ import java.util.logging.Level; import java.awt.Dimension; import java.awt.Point; import java.util.Collections; -import java.util.Comparator; import javax.swing.SwingWorker; import javax.swing.event.ListSelectionEvent; import javax.swing.event.ListSelectionListener; @@ -348,19 +347,6 @@ class SelectDriveDialog extends javax.swing.JDialog { // Populate the lists partitions = new ArrayList<>(); partitions = PlatformUtil.getPartitions(); - - // Remove the partition the application is running on. - String userConfigPath = PlatformUtil.getUserConfigDirectory(); - for (LocalDisk disk : partitions) { - String diskPath = disk.getPath(); - if (diskPath.startsWith("\\\\.\\")) { - // Strip out UNC prefix to get the drive letter. - diskPath = diskPath.substring(4); - } - if (userConfigPath.startsWith(diskPath)) { - partitions.remove(disk); - } - } return null; } @@ -408,12 +394,7 @@ class SelectDriveDialog extends javax.swing.JDialog { diskTable.setEnabled(true); diskTable.clearSelection(); - Collections.sort(disks, new Comparator(){ - @Override - public int compare(LocalDisk disk1, LocalDisk disk2){ - return disk1.getName().compareToIgnoreCase(disk2.getName()); - } - }); + Collections.sort(disks, (LocalDisk disk1, LocalDisk disk2) -> disk1.getName().compareToIgnoreCase(disk2.getName())); } ready = true; From c43928a51521f24a964993f8a0ecc254b51cc8e2 Mon Sep 17 00:00:00 2001 From: "U-BASIS\\dgrove" Date: Thu, 27 Dec 2018 00:17:39 -0500 Subject: [PATCH 04/13] Display case notes in HTML report. --- .../autopsy/casemodule/Bundle.properties | 27 +++ .../casemodule/CasePropertiesPanel.form | 218 +++++++++--------- .../casemodule/CasePropertiesPanel.java | 100 ++++---- .../OptionalCasePropertiesPanel.form | 164 +++++++------ .../OptionalCasePropertiesPanel.java | 109 ++++----- .../sleuthkit/autopsy/report/ReportHTML.java | 22 ++ 6 files changed, 326 insertions(+), 314 deletions(-) diff --git a/Core/src/org/sleuthkit/autopsy/casemodule/Bundle.properties b/Core/src/org/sleuthkit/autopsy/casemodule/Bundle.properties index bd8257175e..bba62aa883 100644 --- a/Core/src/org/sleuthkit/autopsy/casemodule/Bundle.properties +++ b/Core/src/org/sleuthkit/autopsy/casemodule/Bundle.properties @@ -241,3 +241,30 @@ ImageFilePanel.md5HashTextField.text= ImageFilePanel.errorLabel.text=Error Label ImageFilePanel.hashValuesNoteLabel.text=NOTE: These values will not be validated when the data source is added. ImageFilePanel.hashValuesLabel.text=Hash Values (optional): +CasePropertiesPanel.lbCaseUUIDLabel.text=Case UUID: +CasePropertiesPanel.lbNotesLabel.text=Notes: +CasePropertiesPanel.examinerPanel.AccessibleContext.accessibleName=Examiner +CasePropertiesPanel.examinerPanel.border.title=Examiner +CasePropertiesPanel.pnOrganization.border.title=Organization +CasePropertiesPanel.casePanel.border.title=Case +CasePropertiesPanel.examinerLabel.text=Name: +CasePropertiesPanel.lbExaminerPhoneLabel.text=Phone: +CasePropertiesPanel.lbExaminerEmailLabel.text=Email: +CasePropertiesPanel.lbOrganizationNameLabel.text=Name: +CasePropertiesPanel.lbPointOfContactNameLabel.text=Point of Contact: +CasePropertiesPanel.lbPointOfContactPhoneLabel.text=Phone: +CasePropertiesPanel.lbPointOfContactEmailLabel.text=Email: +OptionalCasePropertiesPanel.casePanel.border.title=Case +OptionalCasePropertiesPanel.caseDisplayNameLabel.text=Name: +OptionalCasePropertiesPanel.caseNumberLabel.text=Number: +OptionalCasePropertiesPanel.examinerPanel.border.title=Examiner +OptionalCasePropertiesPanel.examinerLabel.text=Name: +OptionalCasePropertiesPanel.lbExaminerPhoneLabel.text=Phone: +OptionalCasePropertiesPanel.lbExaminerEmailLabel.text=Email: +OptionalCasePropertiesPanel.lbNotesLabel.text=Notes: +OptionalCasePropertiesPanel.orgainizationPanel.border.title=Organization +OptionalCasePropertiesPanel.lbOrganizationNameLabel.text=Organization analysis is being done for: +OptionalCasePropertiesPanel.lbPointOfContactNameLabel.text=Point of Contact: +OptionalCasePropertiesPanel.lbPointOfContactPhoneLabel.text=Phone: +OptionalCasePropertiesPanel.lbPointOfContactEmailLabel.text=Email: +OptionalCasePropertiesPanel.bnNewOrganization.text=Manage Organizations diff --git a/Core/src/org/sleuthkit/autopsy/casemodule/CasePropertiesPanel.form b/Core/src/org/sleuthkit/autopsy/casemodule/CasePropertiesPanel.form index 43f322badc..6fb7c3e0b4 100644 --- a/Core/src/org/sleuthkit/autopsy/casemodule/CasePropertiesPanel.form +++ b/Core/src/org/sleuthkit/autopsy/casemodule/CasePropertiesPanel.form @@ -45,7 +45,6 @@ - @@ -71,11 +70,11 @@ - - - - + + + + @@ -85,7 +84,7 @@ - + @@ -129,6 +128,11 @@ + + + + + @@ -137,7 +141,7 @@ - + @@ -172,7 +176,11 @@ - + + + + + @@ -350,84 +358,6 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -445,27 +375,6 @@ - - - - - - - - - - - - - - - - - - - - - @@ -500,6 +409,99 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -542,7 +544,7 @@ - + diff --git a/Core/src/org/sleuthkit/autopsy/casemodule/CasePropertiesPanel.java b/Core/src/org/sleuthkit/autopsy/casemodule/CasePropertiesPanel.java index a2dc028b70..f9c5c53a7d 100644 --- a/Core/src/org/sleuthkit/autopsy/casemodule/CasePropertiesPanel.java +++ b/Core/src/org/sleuthkit/autopsy/casemodule/CasePropertiesPanel.java @@ -20,7 +20,6 @@ package org.sleuthkit.autopsy.casemodule; import java.nio.file.Paths; import java.util.logging.Level; -import org.openide.util.NbBundle.Messages; import org.sleuthkit.autopsy.centralrepository.datamodel.CorrelationCase; import org.sleuthkit.autopsy.centralrepository.datamodel.EamDb; import org.sleuthkit.autopsy.centralrepository.datamodel.EamDbException; @@ -112,19 +111,6 @@ final class CasePropertiesPanel extends javax.swing.JPanel { repaint(); } - @Messages({"CasePropertiesPanel.casePanel.border.title=Case", - "CasePropertiesPanel.lbCaseUUIDLabel.text=Case UUID:", - "CasePropertiesPanel.examinerPanel.border.title=Examiner", - "CasePropertiesPanel.examinerLabel.text=Name:", - "CasePropertiesPanel.lbExaminerPhoneLabel.text=Phone:", - "CasePropertiesPanel.lbExaminerEmailLabel.text=Email:", - "CasePropertiesPanel.lbNotesLabel.text=Notes:", - "CasePropertiesPanel.pnOrganization.border.title=Organization", - "CasePropertiesPanel.lbOrganizationNameLabel.text=Name:", - "CasePropertiesPanel.lbPointOfContactNameLabel.text=Point of Contact:", - "CasePropertiesPanel.lbPointOfContactPhoneLabel.text=Phone:", - "CasePropertiesPanel.lbPointOfContactEmailLabel.text=Email:"}) - /** * In this generated code below, there are 2 strings "Path" and "Remove" * that are table column headers in the DefaultTableModel. When this model @@ -161,12 +147,12 @@ final class CasePropertiesPanel extends javax.swing.JPanel { lbCaseUIDText = new javax.swing.JLabel(); lbCaseNameText = new javax.swing.JLabel(); lbCaseNumberText = new javax.swing.JLabel(); - examinerPanel = new javax.swing.JPanel(); - lbExaminerNameText = new javax.swing.JLabel(); lbNotesLabel = new javax.swing.JLabel(); - examinerLabel = new javax.swing.JLabel(); caseNotesScrollPane = new javax.swing.JScrollPane(); taNotesText = new javax.swing.JTextArea(); + examinerPanel = new javax.swing.JPanel(); + lbExaminerNameText = new javax.swing.JLabel(); + examinerLabel = new javax.swing.JLabel(); lbExaminerEmailLabel = new javax.swing.JLabel(); lbExaminerPhoneLabel = new javax.swing.JLabel(); lbExaminerPhoneText = new javax.swing.JLabel(); @@ -235,6 +221,26 @@ final class CasePropertiesPanel extends javax.swing.JPanel { lbCaseNumberText.setMinimumSize(new java.awt.Dimension(25, 14)); + lbNotesLabel.setText(org.openide.util.NbBundle.getMessage(CasePropertiesPanel.class, "CasePropertiesPanel.lbNotesLabel.text")); // NOI18N + lbNotesLabel.setMaximumSize(new java.awt.Dimension(82, 14)); + lbNotesLabel.setMinimumSize(new java.awt.Dimension(82, 14)); + lbNotesLabel.setPreferredSize(new java.awt.Dimension(82, 14)); + lbNotesLabel.setRequestFocusEnabled(false); + + caseNotesScrollPane.setBorder(null); + + taNotesText.setEditable(false); + taNotesText.setBackground(new java.awt.Color(240, 240, 240)); + taNotesText.setColumns(20); + taNotesText.setFont(new java.awt.Font("Tahoma", 0, 11)); // NOI18N + taNotesText.setLineWrap(true); + taNotesText.setRows(2); + taNotesText.setWrapStyleWord(true); + taNotesText.setBorder(null); + taNotesText.setFocusable(false); + taNotesText.setOpaque(false); + caseNotesScrollPane.setViewportView(taNotesText); + javax.swing.GroupLayout casePanelLayout = new javax.swing.GroupLayout(casePanel); casePanel.setLayout(casePanelLayout); casePanelLayout.setHorizontalGroup( @@ -264,7 +270,11 @@ final class CasePropertiesPanel extends javax.swing.JPanel { .addComponent(caseDirField, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent(caseTypeField, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent(dbNameField, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) - .addComponent(lbCaseUIDText, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)))) + .addComponent(lbCaseUIDText, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))) + .addGroup(casePanelLayout.createSequentialGroup() + .addComponent(lbNotesLabel, javax.swing.GroupLayout.PREFERRED_SIZE, 117, javax.swing.GroupLayout.PREFERRED_SIZE) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) + .addComponent(caseNotesScrollPane, javax.swing.GroupLayout.DEFAULT_SIZE, 704, Short.MAX_VALUE))) .addContainerGap()) ); @@ -273,7 +283,7 @@ final class CasePropertiesPanel extends javax.swing.JPanel { casePanelLayout.setVerticalGroup( casePanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(casePanelLayout.createSequentialGroup() - .addContainerGap() + .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addGroup(casePanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(caseNameLabel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(lbCaseNameText, javax.swing.GroupLayout.PREFERRED_SIZE, 14, javax.swing.GroupLayout.PREFERRED_SIZE)) @@ -301,37 +311,20 @@ final class CasePropertiesPanel extends javax.swing.JPanel { .addGroup(casePanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false) .addComponent(lbCaseUUIDLabel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent(lbCaseUIDText, javax.swing.GroupLayout.PREFERRED_SIZE, 14, javax.swing.GroupLayout.PREFERRED_SIZE)) - .addGap(6, 6, 6)) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) + .addGroup(casePanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addComponent(lbNotesLabel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) + .addComponent(caseNotesScrollPane, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))) ); examinerPanel.setBorder(javax.swing.BorderFactory.createTitledBorder(null, org.openide.util.NbBundle.getMessage(CasePropertiesPanel.class, "CasePropertiesPanel.examinerPanel.border.title"), javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font("Tahoma", 0, 12))); // NOI18N - lbNotesLabel.setText(org.openide.util.NbBundle.getMessage(CasePropertiesPanel.class, "CasePropertiesPanel.lbNotesLabel.text")); // NOI18N - lbNotesLabel.setMaximumSize(new java.awt.Dimension(82, 14)); - lbNotesLabel.setMinimumSize(new java.awt.Dimension(82, 14)); - lbNotesLabel.setPreferredSize(new java.awt.Dimension(82, 14)); - lbNotesLabel.setRequestFocusEnabled(false); - examinerLabel.setFont(examinerLabel.getFont().deriveFont(examinerLabel.getFont().getStyle() & ~java.awt.Font.BOLD, 11)); examinerLabel.setText(org.openide.util.NbBundle.getMessage(CasePropertiesPanel.class, "CasePropertiesPanel.examinerLabel.text")); // NOI18N examinerLabel.setMaximumSize(new java.awt.Dimension(82, 14)); examinerLabel.setMinimumSize(new java.awt.Dimension(82, 14)); examinerLabel.setPreferredSize(new java.awt.Dimension(82, 14)); - caseNotesScrollPane.setBorder(null); - - taNotesText.setEditable(false); - taNotesText.setBackground(new java.awt.Color(240, 240, 240)); - taNotesText.setColumns(20); - taNotesText.setFont(new java.awt.Font("Tahoma", 0, 11)); // NOI18N - taNotesText.setLineWrap(true); - taNotesText.setRows(2); - taNotesText.setWrapStyleWord(true); - taNotesText.setBorder(null); - taNotesText.setFocusable(false); - taNotesText.setOpaque(false); - caseNotesScrollPane.setViewportView(taNotesText); - lbExaminerEmailLabel.setText(org.openide.util.NbBundle.getMessage(CasePropertiesPanel.class, "CasePropertiesPanel.lbExaminerEmailLabel.text")); // NOI18N lbExaminerEmailLabel.setMaximumSize(new java.awt.Dimension(82, 14)); lbExaminerEmailLabel.setMinimumSize(new java.awt.Dimension(82, 14)); @@ -350,13 +343,9 @@ final class CasePropertiesPanel extends javax.swing.JPanel { .addContainerGap() .addGroup(examinerPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(examinerPanelLayout.createSequentialGroup() - .addGroup(examinerPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) - .addComponent(lbNotesLabel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) - .addComponent(lbExaminerPhoneLabel, javax.swing.GroupLayout.PREFERRED_SIZE, 115, javax.swing.GroupLayout.PREFERRED_SIZE)) + .addComponent(lbExaminerPhoneLabel, javax.swing.GroupLayout.PREFERRED_SIZE, 115, javax.swing.GroupLayout.PREFERRED_SIZE) .addGap(6, 6, 6) - .addGroup(examinerPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) - .addComponent(lbExaminerPhoneText, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) - .addComponent(caseNotesScrollPane, javax.swing.GroupLayout.DEFAULT_SIZE, 704, Short.MAX_VALUE))) + .addComponent(lbExaminerPhoneText, javax.swing.GroupLayout.DEFAULT_SIZE, 704, Short.MAX_VALUE)) .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, examinerPanelLayout.createSequentialGroup() .addGroup(examinerPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false) .addComponent(lbExaminerEmailLabel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) @@ -368,7 +357,7 @@ final class CasePropertiesPanel extends javax.swing.JPanel { .addContainerGap()) ); - examinerPanelLayout.linkSize(javax.swing.SwingConstants.HORIZONTAL, new java.awt.Component[] {examinerLabel, lbExaminerEmailLabel, lbExaminerPhoneLabel, lbNotesLabel}); + examinerPanelLayout.linkSize(javax.swing.SwingConstants.HORIZONTAL, new java.awt.Component[] {examinerLabel, lbExaminerEmailLabel, lbExaminerPhoneLabel}); examinerPanelLayout.setVerticalGroup( examinerPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) @@ -385,11 +374,7 @@ final class CasePropertiesPanel extends javax.swing.JPanel { .addGroup(examinerPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false) .addComponent(lbExaminerEmailLabel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent(lbExaminerEmailText, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) - .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) - .addGroup(examinerPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) - .addComponent(lbNotesLabel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) - .addComponent(caseNotesScrollPane, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) - .addGap(6, 6, 6)) + .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) ); pnOrganization.setBorder(javax.swing.BorderFactory.createTitledBorder(null, org.openide.util.NbBundle.getMessage(CasePropertiesPanel.class, "CasePropertiesPanel.pnOrganization.border.title"), javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font("Tahoma", 0, 12))); // NOI18N @@ -475,13 +460,15 @@ final class CasePropertiesPanel extends javax.swing.JPanel { detailsPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, detailsPanelLayout.createSequentialGroup() .addComponent(casePanel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) - .addGap(0, 0, 0) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(examinerPanel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) - .addGap(0, 0, 0) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(pnOrganization, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) - .addContainerGap()) + .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) ); + examinerPanel.getAccessibleContext().setAccessibleName(org.openide.util.NbBundle.getMessage(CasePropertiesPanel.class, "CasePropertiesPanel.examinerPanel.AccessibleContext.accessibleName")); // NOI18N + javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this); this.setLayout(layout); layout.setHorizontalGroup( @@ -495,8 +482,7 @@ final class CasePropertiesPanel extends javax.swing.JPanel { layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup() .addGap(0, 0, 0) - .addComponent(detailsPanel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) - .addGap(0, 0, 0)) + .addComponent(detailsPanel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) ); }// //GEN-END:initComponents diff --git a/Core/src/org/sleuthkit/autopsy/casemodule/OptionalCasePropertiesPanel.form b/Core/src/org/sleuthkit/autopsy/casemodule/OptionalCasePropertiesPanel.form index bf66012584..6a342165fc 100644 --- a/Core/src/org/sleuthkit/autopsy/casemodule/OptionalCasePropertiesPanel.form +++ b/Core/src/org/sleuthkit/autopsy/casemodule/OptionalCasePropertiesPanel.form @@ -32,11 +32,10 @@ - + - - - + + @@ -46,7 +45,7 @@ - + @@ -57,14 +56,16 @@ - + + - + + @@ -84,7 +85,12 @@ - + + + + + + @@ -151,13 +157,59 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + @@ -171,15 +223,9 @@ - - - - + - - - - + @@ -215,12 +261,7 @@ - - - - - - + @@ -244,36 +285,6 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -322,29 +333,13 @@ - - - - - - - - - - - - - - - - - + @@ -354,10 +349,17 @@ - + + - - + + + + + + + + @@ -370,16 +372,8 @@ - - - - - - - - - + @@ -392,10 +386,10 @@ - + - + @@ -407,7 +401,7 @@ - + diff --git a/Core/src/org/sleuthkit/autopsy/casemodule/OptionalCasePropertiesPanel.java b/Core/src/org/sleuthkit/autopsy/casemodule/OptionalCasePropertiesPanel.java index 55c64d1f12..f6856c5531 100644 --- a/Core/src/org/sleuthkit/autopsy/casemodule/OptionalCasePropertiesPanel.java +++ b/Core/src/org/sleuthkit/autopsy/casemodule/OptionalCasePropertiesPanel.java @@ -205,21 +205,6 @@ final class OptionalCasePropertiesPanel extends javax.swing.JPanel { taNotesText.setText(caseNotes == null ? "" : caseNotes); } - @Messages({"OptionalCasePropertiesPanel.caseDisplayNameLabel.text=Name:", - "OptionalCasePropertiesPanel.lbPointOfContactEmailLabel.text=Email:", - "OptionalCasePropertiesPanel.lbOrganizationNameLabel.text=Organization analysis is being done for:", - "OptionalCasePropertiesPanel.bnNewOrganization.text=Manage Organizations", - "OptionalCasePropertiesPanel.lbPointOfContactNameLabel.text=Point of Contact:", - "OptionalCasePropertiesPanel.lbPointOfContactPhoneLabel.text=Phone:", - "OptionalCasePropertiesPanel.orgainizationPanel.border.title=Organization", - "OptionalCasePropertiesPanel.lbNotesLabel.text=Notes:", - "OptionalCasePropertiesPanel.examinerLabel.text=Name:", - "OptionalCasePropertiesPanel.lbExaminerEmailLabel.text=Email:", - "OptionalCasePropertiesPanel.lbExaminerPhoneLabel.text=Phone:", - "OptionalCasePropertiesPanel.examinerPanel.border.title=Examiner", - "OptionalCasePropertiesPanel.caseNumberLabel.text=Number:", - "OptionalCasePropertiesPanel.casePanel.border.title=Case" - }) /** * This method is called from within the constructor to initialize the form. * WARNING: Do NOT modify this code. The content of this method is always @@ -234,16 +219,16 @@ final class OptionalCasePropertiesPanel extends javax.swing.JPanel { caseNumberTextField = new javax.swing.JTextField(); caseDisplayNameLabel = new javax.swing.JLabel(); caseDisplayNameTextField = new javax.swing.JTextField(); + caseNotesScrollPane = new javax.swing.JScrollPane(); + taNotesText = new javax.swing.JTextArea(); + lbNotesLabel = new javax.swing.JLabel(); examinerPanel = new javax.swing.JPanel(); tfExaminerPhoneText = new javax.swing.JTextField(); lbExaminerPhoneLabel = new javax.swing.JLabel(); - caseNotesScrollPane = new javax.swing.JScrollPane(); - taNotesText = new javax.swing.JTextArea(); tfExaminerEmailText = new javax.swing.JTextField(); examinerTextField = new javax.swing.JTextField(); lbExaminerEmailLabel = new javax.swing.JLabel(); examinerLabel = new javax.swing.JLabel(); - lbNotesLabel = new javax.swing.JLabel(); orgainizationPanel = new javax.swing.JPanel(); lbPointOfContactPhoneLabel = new javax.swing.JLabel(); comboBoxOrgName = new javax.swing.JComboBox<>(); @@ -274,6 +259,21 @@ final class OptionalCasePropertiesPanel extends javax.swing.JPanel { caseDisplayNameTextField.setFont(caseDisplayNameTextField.getFont().deriveFont(caseDisplayNameTextField.getFont().getStyle() & ~java.awt.Font.BOLD, 11)); + caseNotesScrollPane.setBorder(javax.swing.BorderFactory.createEtchedBorder()); + + taNotesText.setColumns(20); + taNotesText.setFont(new java.awt.Font("Tahoma", 0, 11)); // NOI18N + taNotesText.setLineWrap(true); + taNotesText.setRows(2); + taNotesText.setWrapStyleWord(true); + taNotesText.setBorder(null); + caseNotesScrollPane.setViewportView(taNotesText); + + org.openide.awt.Mnemonics.setLocalizedText(lbNotesLabel, org.openide.util.NbBundle.getMessage(OptionalCasePropertiesPanel.class, "OptionalCasePropertiesPanel.lbNotesLabel.text")); // NOI18N + lbNotesLabel.setMaximumSize(new java.awt.Dimension(41, 14)); + lbNotesLabel.setMinimumSize(new java.awt.Dimension(41, 14)); + lbNotesLabel.setPreferredSize(new java.awt.Dimension(41, 14)); + javax.swing.GroupLayout casePanelLayout = new javax.swing.GroupLayout(casePanel); casePanel.setLayout(casePanelLayout); casePanelLayout.setHorizontalGroup( @@ -282,10 +282,12 @@ final class OptionalCasePropertiesPanel extends javax.swing.JPanel { .addContainerGap() .addGroup(casePanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false) .addComponent(caseNumberLabel, javax.swing.GroupLayout.DEFAULT_SIZE, 60, Short.MAX_VALUE) - .addComponent(caseDisplayNameLabel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) + .addComponent(caseDisplayNameLabel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) + .addComponent(lbNotesLabel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addGroup(casePanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) - .addComponent(caseNumberTextField) + .addComponent(caseNotesScrollPane) + .addComponent(caseNumberTextField, javax.swing.GroupLayout.DEFAULT_SIZE, 425, Short.MAX_VALUE) .addComponent(caseDisplayNameTextField)) .addContainerGap()) ); @@ -300,7 +302,11 @@ final class OptionalCasePropertiesPanel extends javax.swing.JPanel { .addGroup(casePanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(caseNumberLabel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(caseNumberTextField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) - .addGap(6, 6, 6)) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) + .addGroup(casePanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addComponent(lbNotesLabel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) + .addComponent(caseNotesScrollPane, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) + .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) ); examinerPanel.setBorder(javax.swing.BorderFactory.createTitledBorder(org.openide.util.NbBundle.getMessage(OptionalCasePropertiesPanel.class, "OptionalCasePropertiesPanel.examinerPanel.border.title"))); // NOI18N @@ -310,16 +316,6 @@ final class OptionalCasePropertiesPanel extends javax.swing.JPanel { lbExaminerPhoneLabel.setMinimumSize(new java.awt.Dimension(41, 14)); lbExaminerPhoneLabel.setPreferredSize(new java.awt.Dimension(41, 14)); - caseNotesScrollPane.setBorder(javax.swing.BorderFactory.createEtchedBorder()); - - taNotesText.setColumns(20); - taNotesText.setFont(new java.awt.Font("Tahoma", 0, 11)); // NOI18N - taNotesText.setLineWrap(true); - taNotesText.setRows(2); - taNotesText.setWrapStyleWord(true); - taNotesText.setBorder(null); - caseNotesScrollPane.setViewportView(taNotesText); - examinerTextField.setFont(examinerTextField.getFont().deriveFont(examinerTextField.getFont().getStyle() & ~java.awt.Font.BOLD, 11)); org.openide.awt.Mnemonics.setLocalizedText(lbExaminerEmailLabel, org.openide.util.NbBundle.getMessage(OptionalCasePropertiesPanel.class, "OptionalCasePropertiesPanel.lbExaminerEmailLabel.text")); // NOI18N @@ -333,11 +329,6 @@ final class OptionalCasePropertiesPanel extends javax.swing.JPanel { examinerLabel.setMinimumSize(new java.awt.Dimension(41, 14)); examinerLabel.setPreferredSize(new java.awt.Dimension(41, 14)); - org.openide.awt.Mnemonics.setLocalizedText(lbNotesLabel, org.openide.util.NbBundle.getMessage(OptionalCasePropertiesPanel.class, "OptionalCasePropertiesPanel.lbNotesLabel.text")); // NOI18N - lbNotesLabel.setMaximumSize(new java.awt.Dimension(41, 14)); - lbNotesLabel.setMinimumSize(new java.awt.Dimension(41, 14)); - lbNotesLabel.setPreferredSize(new java.awt.Dimension(41, 14)); - javax.swing.GroupLayout examinerPanelLayout = new javax.swing.GroupLayout(examinerPanel); examinerPanel.setLayout(examinerPanelLayout); examinerPanelLayout.setHorizontalGroup( @@ -346,13 +337,9 @@ final class OptionalCasePropertiesPanel extends javax.swing.JPanel { .addContainerGap() .addGroup(examinerPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(examinerPanelLayout.createSequentialGroup() - .addGroup(examinerPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) - .addComponent(lbNotesLabel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) - .addComponent(lbExaminerPhoneLabel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) + .addComponent(lbExaminerPhoneLabel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) - .addGroup(examinerPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) - .addComponent(caseNotesScrollPane) - .addComponent(tfExaminerPhoneText))) + .addComponent(tfExaminerPhoneText, javax.swing.GroupLayout.DEFAULT_SIZE, 424, Short.MAX_VALUE)) .addGroup(examinerPanelLayout.createSequentialGroup() .addGroup(examinerPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(lbExaminerEmailLabel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) @@ -364,7 +351,7 @@ final class OptionalCasePropertiesPanel extends javax.swing.JPanel { .addGap(11, 11, 11)) ); - examinerPanelLayout.linkSize(javax.swing.SwingConstants.HORIZONTAL, new java.awt.Component[] {examinerLabel, lbExaminerEmailLabel, lbExaminerPhoneLabel, lbNotesLabel}); + examinerPanelLayout.linkSize(javax.swing.SwingConstants.HORIZONTAL, new java.awt.Component[] {examinerLabel, lbExaminerEmailLabel, lbExaminerPhoneLabel}); examinerPanelLayout.setVerticalGroup( examinerPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) @@ -381,11 +368,7 @@ final class OptionalCasePropertiesPanel extends javax.swing.JPanel { .addGroup(examinerPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(tfExaminerEmailText, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(lbExaminerEmailLabel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) - .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) - .addGroup(examinerPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) - .addComponent(lbNotesLabel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) - .addComponent(caseNotesScrollPane, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) - .addGap(6, 6, 6)) + .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) ); orgainizationPanel.setBorder(javax.swing.BorderFactory.createTitledBorder(org.openide.util.NbBundle.getMessage(OptionalCasePropertiesPanel.class, "OptionalCasePropertiesPanel.orgainizationPanel.border.title"))); // NOI18N @@ -432,9 +415,15 @@ final class OptionalCasePropertiesPanel extends javax.swing.JPanel { orgainizationPanelLayout.setHorizontalGroup( orgainizationPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(orgainizationPanelLayout.createSequentialGroup() + .addContainerGap() .addGroup(orgainizationPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(orgainizationPanelLayout.createSequentialGroup() - .addGap(106, 106, 106) + .addComponent(lbOrganizationNameLabel, javax.swing.GroupLayout.DEFAULT_SIZE, 206, Short.MAX_VALUE) + .addGap(18, 18, 18) + .addComponent(comboBoxOrgName, javax.swing.GroupLayout.PREFERRED_SIZE, 108, javax.swing.GroupLayout.PREFERRED_SIZE) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) + .addComponent(bnNewOrganization, javax.swing.GroupLayout.PREFERRED_SIZE, 147, javax.swing.GroupLayout.PREFERRED_SIZE)) + .addGroup(orgainizationPanelLayout.createSequentialGroup() .addGroup(orgainizationPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(lbPointOfContactPhoneLabel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent(lbPointOfContactEmailLabel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) @@ -443,14 +432,7 @@ final class OptionalCasePropertiesPanel extends javax.swing.JPanel { .addGroup(orgainizationPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(lbPointOfContactPhoneText, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent(lbPointOfContactNameText, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) - .addComponent(lbPointOfContactEmailText, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))) - .addGroup(orgainizationPanelLayout.createSequentialGroup() - .addContainerGap() - .addComponent(lbOrganizationNameLabel, javax.swing.GroupLayout.DEFAULT_SIZE, 206, Short.MAX_VALUE) - .addGap(18, 18, 18) - .addComponent(comboBoxOrgName, javax.swing.GroupLayout.PREFERRED_SIZE, 108, javax.swing.GroupLayout.PREFERRED_SIZE) - .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) - .addComponent(bnNewOrganization, javax.swing.GroupLayout.PREFERRED_SIZE, 147, javax.swing.GroupLayout.PREFERRED_SIZE))) + .addComponent(lbPointOfContactEmailText, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)))) .addContainerGap()) ); @@ -464,10 +446,10 @@ final class OptionalCasePropertiesPanel extends javax.swing.JPanel { .addComponent(lbOrganizationNameLabel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(comboBoxOrgName, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(bnNewOrganization, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) - .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) + .addGap(18, 18, 18) .addGroup(orgainizationPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false) .addComponent(lbPointOfContactNameText, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) - .addComponent(lbPointOfContactNameLabel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) + .addComponent(lbPointOfContactNameLabel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addGroup(orgainizationPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false) .addComponent(lbPointOfContactPhoneLabel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) @@ -476,7 +458,7 @@ final class OptionalCasePropertiesPanel extends javax.swing.JPanel { .addGroup(orgainizationPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false) .addComponent(lbPointOfContactEmailLabel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent(lbPointOfContactEmailText, javax.swing.GroupLayout.PREFERRED_SIZE, 14, javax.swing.GroupLayout.PREFERRED_SIZE)) - .addGap(6, 6, 6)) + .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) ); javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this); @@ -496,11 +478,10 @@ final class OptionalCasePropertiesPanel extends javax.swing.JPanel { .addGroup(layout.createSequentialGroup() .addContainerGap() .addComponent(casePanel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) - .addGap(0, 0, 0) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(examinerPanel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) - .addGap(0, 0, 0) - .addComponent(orgainizationPanel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) - .addGap(0, 0, 0)) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) + .addComponent(orgainizationPanel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) ); }// //GEN-END:initComponents diff --git a/Core/src/org/sleuthkit/autopsy/report/ReportHTML.java b/Core/src/org/sleuthkit/autopsy/report/ReportHTML.java index f7e2fbb31f..f483804fd2 100644 --- a/Core/src/org/sleuthkit/autopsy/report/ReportHTML.java +++ b/Core/src/org/sleuthkit/autopsy/report/ReportHTML.java @@ -51,6 +51,7 @@ import javax.swing.JPanel; import org.apache.commons.lang3.StringEscapeUtils; import org.openide.filesystems.FileUtil; import org.openide.util.NbBundle; +import org.openide.util.NbBundle.Messages; import org.sleuthkit.autopsy.casemodule.Case; import org.sleuthkit.autopsy.casemodule.NoCurrentCaseException; import org.sleuthkit.autopsy.casemodule.services.Services; @@ -1226,6 +1227,10 @@ class ReportHTML implements TableReportModule { } } + @Messages({ + "ReportHTML.writeSum.caseNotes=Case Notes:", + "ReportHTML.writeSum.noCaseNotes=No case notes" + }) /** * Write the case details section of the summary for this report. * @@ -1236,6 +1241,7 @@ class ReportHTML implements TableReportModule { String caseName = currentCase.getDisplayName(); String caseNumber = currentCase.getNumber(); String examiner = currentCase.getExaminer(); + String caseNotes = currentCase.getCaseNotes(); final boolean agencyLogoSet = reportBranding.getAgencyLogoPath() != null && !reportBranding.getAgencyLogoPath().isEmpty(); int imagecount; try { @@ -1265,6 +1271,9 @@ class ReportHTML implements TableReportModule { .append("\n"); //NON-NLS summary.append("").append(NbBundle.getMessage(this.getClass(), "ReportHTML.writeSum.numImages")) //NON-NLS .append("").append(imagecount).append("\n"); //NON-NLS + summary.append("").append(Bundle.ReportHTML_writeSum_caseNotes()).append("") //NON-NLS + .append(!caseNotes.isEmpty() ? formatHtmlString(caseNotes) : Bundle.ReportHTML_writeSum_noCaseNotes()) + .append("\n"); //NON-NLS summary.append("\n"); //NON-NLS summary.append("\n"); //NON-NLS summary.append("
\n"); //NON-NLS @@ -1414,4 +1423,17 @@ class ReportHTML implements TableReportModule { + thumbFile.getName(); } + /** + * Apply escape sequence to special characters. Line feed and carriage + * return character combinations will be converted to HTML line breaks. + * + * @param text The text to format. + * + * @return The formatted text. + */ + private String formatHtmlString(String text) { + String formattedString = StringEscapeUtils.escapeHtml4(text); + return formattedString.replaceAll("(\r\n|\r|\n|\n\r)", "
"); + } + } From fe87fb1db6dd66306731f1aa777daa09b895c915 Mon Sep 17 00:00:00 2001 From: "U-BASIS\\dgrove" Date: Thu, 27 Dec 2018 03:47:44 -0500 Subject: [PATCH 05/13] Added other organization and examiner details. --- .../autopsy/report/Bundle.properties | 6 - .../sleuthkit/autopsy/report/ReportHTML.java | 119 +++++++++++++++--- 2 files changed, 104 insertions(+), 21 deletions(-) diff --git a/Core/src/org/sleuthkit/autopsy/report/Bundle.properties b/Core/src/org/sleuthkit/autopsy/report/Bundle.properties index 92ac26cba2..599aa1d215 100644 --- a/Core/src/org/sleuthkit/autopsy/report/Bundle.properties +++ b/Core/src/org/sleuthkit/autopsy/report/Bundle.properties @@ -193,11 +193,6 @@ ReportHTML.writeSum.warningMsg=Warning, this report was run before ingest # examiner as a regex signature to skip report.html and summary.html # ReportHTML.writeSum.reportGenOn.text=HTML Report Generated on {0} -ReportHTML.writeSum.caseName=Case\: -ReportHTML.writeSum.caseNum=Case Number\: -ReportHTML.writeSum.examiner=Examiner\: -ReportHTML.writeSum.noExaminer=No examiner -ReportHTML.writeSum.numImages=Number of Images\: ReportHTML.writeSum.imageInfoHeading=

Image Information\:

ReportHTML.writeSum.softwareInfoHeading=

Software Information\:

ReportHTML.writeSum.ingestHistoryHeading=

Ingest History\:

@@ -225,7 +220,6 @@ ReportWizardPanel1.nextButton.text=Next > ReportWizardPanel1.finishButton.text=Finish ReportWizardPanel2.finishButton.text=Finish ReportWizardPanel2.nextButton.text=Next > -ReportHTML.writeSum.noCaseNum=No case number ReportBodyFile.generateReport.srcModuleName.text=TSK Body File ReportExcel.endReport.srcModuleName.text=Excel Report ReportHTML.writeIndex.srcModuleName.text=HTML Report diff --git a/Core/src/org/sleuthkit/autopsy/report/ReportHTML.java b/Core/src/org/sleuthkit/autopsy/report/ReportHTML.java index f483804fd2..00d8ec6982 100644 --- a/Core/src/org/sleuthkit/autopsy/report/ReportHTML.java +++ b/Core/src/org/sleuthkit/autopsy/report/ReportHTML.java @@ -56,6 +56,10 @@ import org.sleuthkit.autopsy.casemodule.Case; import org.sleuthkit.autopsy.casemodule.NoCurrentCaseException; import org.sleuthkit.autopsy.casemodule.services.Services; import org.sleuthkit.autopsy.casemodule.services.TagsManager; +import org.sleuthkit.autopsy.centralrepository.datamodel.CorrelationCase; +import org.sleuthkit.autopsy.centralrepository.datamodel.EamDb; +import org.sleuthkit.autopsy.centralrepository.datamodel.EamDbException; +import org.sleuthkit.autopsy.centralrepository.datamodel.EamOrganization; import org.sleuthkit.autopsy.coreutils.EscapeUtil; import org.sleuthkit.autopsy.coreutils.ImageUtils; import org.sleuthkit.autopsy.coreutils.Logger; @@ -1228,8 +1232,29 @@ class ReportHTML implements TableReportModule { } @Messages({ - "ReportHTML.writeSum.caseNotes=Case Notes:", - "ReportHTML.writeSum.noCaseNotes=No case notes" + "ReportHTML.writeSum.case=Case:", + "ReportHTML.writeSum.caseNumber=Case Number:", + "ReportHTML.writeSum.caseNumImages=Number of Images:", + "ReportHTML.writeSum.caseNotes=Notes:", + + "ReportHTML.writeSum.examiner=Examiner:", + "ReportHTML.writeSum.examinerPhone=Phone:", + "ReportHTML.writeSum.examinerEmail=Email:", + + "ReportHTML.writeSum.org=Organization:", + "ReportHTML.writeSum.orgPoc=Point of Contact:", + "ReportHTML.writeSum.orgPhone=Phone:", + "ReportHTML.writeSum.orgEmail=Email:", + + "ReportHTML.writeSum.noCaseNumber=No case number", + "ReportHTML.writeSum.noCaseNotes=No notes", + "ReportHTML.writeSum.noExaminer=No examiner", + "ReportHTML.writeSum.noExaminerPhone=No phone", + "ReportHTML.writeSum.noExaminerEmail=No email", + "ReportHTML.writeSum.noOrg=No organization", + "ReportHTML.writeSum.noOrgPoc=No point of contact", + "ReportHTML.writeSum.noOrgPhone=No phone", + "ReportHTML.writeSum.noOrgEmail=No email", }) /** * Write the case details section of the summary for this report. @@ -1238,17 +1263,52 @@ class ReportHTML implements TableReportModule { */ private StringBuilder writeSummaryCaseDetails() { StringBuilder summary = new StringBuilder(); + + final boolean agencyLogoSet = reportBranding.getAgencyLogoPath() != null && !reportBranding.getAgencyLogoPath().isEmpty(); + + // Case String caseName = currentCase.getDisplayName(); String caseNumber = currentCase.getNumber(); - String examiner = currentCase.getExaminer(); - String caseNotes = currentCase.getCaseNotes(); - final boolean agencyLogoSet = reportBranding.getAgencyLogoPath() != null && !reportBranding.getAgencyLogoPath().isEmpty(); int imagecount; try { imagecount = currentCase.getDataSources().size(); } catch (TskCoreException ex) { imagecount = 0; } + String caseNotes = currentCase.getCaseNotes(); + + // Examiner + String examinerName = currentCase.getExaminer(); + String examinerPhone = currentCase.getExaminerPhone(); + String examinerEmail = currentCase.getExaminerEmail(); + + // Organization + String orgName = ""; + String orgPoc = ""; + String orgPhone = ""; + String orgEmail = ""; + if (EamDb.isEnabled()) { + try { + EamDb dbManager = EamDb.getInstance(); + if (dbManager != null) { + CorrelationCase correlationCase = dbManager.getCase(currentCase); + if (null == correlationCase) { + correlationCase = dbManager.newCase(currentCase); + } + EamOrganization organization = correlationCase.getOrg(); + if (organization != null) { + orgName = organization.getName(); + orgPoc = organization.getPocName(); + orgPhone = organization.getPocPhone(); + orgEmail = organization.getPocEmail(); + } + } + } catch (EamDbException ex) { + logger.log(Level.SEVERE, "Unable to access Correlation Case when Central Repo is enabled", ex); + } + } + + // Start the layout. summary.append("
\n"); //NON-NLS if (agencyLogoSet) { summary.append("
\n"); //NON-NLS @@ -1260,20 +1320,49 @@ class ReportHTML implements TableReportModule { final String align = agencyLogoSet ? "right" : "left"; //NON-NLS NON-NLS summary.append("
\n"); //NON-NLS summary.append("\n"); //NON-NLS - summary.append("\n"); //NON-NLS NON-NLS - summary.append("\n"); //NON-NLS - summary.append("\n"); //NON-NLS + summary.append("\n"); //NON-NLS + summary.append("\n"); //NON-NLS - summary.append("\n"); //NON-NLS summary.append("\n"); //NON-NLS + summary.append("\n"); //NON-NLS + + // Examiner details + summary.append("\n"); //NON-NLS + summary.append("\n"); //NON-NLS + summary.append("\n"); //NON-NLS + summary.append("\n"); //NON-NLS + + // Organization details + summary.append("\n"); //NON-NLS + summary.append("\n"); //NON-NLS + summary.append("\n"); //NON-NLS + summary.append("\n"); //NON-NLS + + // End the layout. summary.append("
").append(NbBundle.getMessage(this.getClass(), "ReportHTML.writeSum.caseName")) //NON-NLS - .append("").append(caseName).append("
").append(NbBundle.getMessage(this.getClass(), "ReportHTML.writeSum.caseNum")) //NON-NLS - .append("").append(!caseNumber.isEmpty() ? caseNumber : NbBundle //NON-NLS - .getMessage(this.getClass(), "ReportHTML.writeSum.noCaseNum")).append("
").append(NbBundle.getMessage(this.getClass(), "ReportHTML.writeSum.examiner")).append("") //NON-NLS - .append(!examiner.isEmpty() ? examiner : NbBundle - .getMessage(this.getClass(), "ReportHTML.writeSum.noExaminer")) + + // Case details + summary.append("
").append(Bundle.ReportHTML_writeSum_case()).append("") //NON-NLS + .append(formatHtmlString(caseName)) + .append("
").append(Bundle.ReportHTML_writeSum_caseNumber()).append("") //NON-NLS + .append(!caseNumber.isEmpty() ? formatHtmlString(caseNumber) : Bundle.ReportHTML_writeSum_noCaseNumber()) + .append("
").append(Bundle.ReportHTML_writeSum_caseNumImages()).append("") //NON-NLS + .append(imagecount) .append("
").append(NbBundle.getMessage(this.getClass(), "ReportHTML.writeSum.numImages")) //NON-NLS - .append("").append(imagecount).append("
").append(Bundle.ReportHTML_writeSum_caseNotes()).append("") //NON-NLS .append(!caseNotes.isEmpty() ? formatHtmlString(caseNotes) : Bundle.ReportHTML_writeSum_noCaseNotes()) .append("
").append(Bundle.ReportHTML_writeSum_examiner()).append("") //NON-NLS + .append(!examinerName.isEmpty() ? formatHtmlString(examinerName) : Bundle.ReportHTML_writeSum_noExaminer()) + .append("
").append(Bundle.ReportHTML_writeSum_examinerPhone()).append("") //NON-NLS + .append(!examinerPhone.isEmpty() ? formatHtmlString(examinerPhone) : Bundle.ReportHTML_writeSum_noExaminerPhone()) + .append("
").append(Bundle.ReportHTML_writeSum_examinerEmail()).append("") //NON-NLS + .append(!examinerEmail.isEmpty() ? formatHtmlString(examinerEmail) : Bundle.ReportHTML_writeSum_noExaminerEmail()) + .append("
").append(Bundle.ReportHTML_writeSum_org()).append("") //NON-NLS + .append(!orgName.isEmpty() ? formatHtmlString(orgName) : Bundle.ReportHTML_writeSum_noOrg()) + .append("
").append(Bundle.ReportHTML_writeSum_orgPoc()).append("") //NON-NLS + .append(!orgPoc.isEmpty() ? formatHtmlString(orgPoc) : Bundle.ReportHTML_writeSum_noOrgPoc()) + .append("
").append(Bundle.ReportHTML_writeSum_orgPhone()).append("") //NON-NLS + .append(!orgPhone.isEmpty() ? formatHtmlString(orgPhone) : Bundle.ReportHTML_writeSum_noOrgPhone()) + .append("
").append(Bundle.ReportHTML_writeSum_orgEmail()).append("") //NON-NLS + .append(!orgEmail.isEmpty() ? formatHtmlString(orgEmail) : Bundle.ReportHTML_writeSum_noOrgEmail()) + .append("
\n"); //NON-NLS summary.append("
\n"); //NON-NLS summary.append("
\n"); //NON-NLS From 6d4f3373cd76781858d9e0b0a0bd033cace77a5d Mon Sep 17 00:00:00 2001 From: "U-BASIS\\dgrove" Date: Thu, 27 Dec 2018 17:05:51 -0500 Subject: [PATCH 06/13] Redesign OptionalCasePropertiesPanel layout. --- .../autopsy/casemodule/Bundle.properties | 23 +- .../autopsy/casemodule/Bundle_ja.properties | 2 +- .../OptionalCasePropertiesPanel.form | 787 ++++++++---------- .../OptionalCasePropertiesPanel.java | 352 +++----- 4 files changed, 466 insertions(+), 698 deletions(-) diff --git a/Core/src/org/sleuthkit/autopsy/casemodule/Bundle.properties b/Core/src/org/sleuthkit/autopsy/casemodule/Bundle.properties index bba62aa883..5cd68b79e0 100644 --- a/Core/src/org/sleuthkit/autopsy/casemodule/Bundle.properties +++ b/Core/src/org/sleuthkit/autopsy/casemodule/Bundle.properties @@ -254,17 +254,14 @@ CasePropertiesPanel.lbOrganizationNameLabel.text=Name: CasePropertiesPanel.lbPointOfContactNameLabel.text=Point of Contact: CasePropertiesPanel.lbPointOfContactPhoneLabel.text=Phone: CasePropertiesPanel.lbPointOfContactEmailLabel.text=Email: -OptionalCasePropertiesPanel.casePanel.border.title=Case -OptionalCasePropertiesPanel.caseDisplayNameLabel.text=Name: -OptionalCasePropertiesPanel.caseNumberLabel.text=Number: -OptionalCasePropertiesPanel.examinerPanel.border.title=Examiner -OptionalCasePropertiesPanel.examinerLabel.text=Name: -OptionalCasePropertiesPanel.lbExaminerPhoneLabel.text=Phone: -OptionalCasePropertiesPanel.lbExaminerEmailLabel.text=Email: -OptionalCasePropertiesPanel.lbNotesLabel.text=Notes: -OptionalCasePropertiesPanel.orgainizationPanel.border.title=Organization -OptionalCasePropertiesPanel.lbOrganizationNameLabel.text=Organization analysis is being done for: -OptionalCasePropertiesPanel.lbPointOfContactNameLabel.text=Point of Contact: -OptionalCasePropertiesPanel.lbPointOfContactPhoneLabel.text=Phone: -OptionalCasePropertiesPanel.lbPointOfContactEmailLabel.text=Email: +OptionalCasePropertiesPanel.examinerLabel.text=Examiner Name: +OptionalCasePropertiesPanel.lbExaminerPhoneLabel.text=Examiner Phone: +OptionalCasePropertiesPanel.lbExaminerEmailLabel.text=Examiner Email: +OptionalCasePropertiesPanel.lbOrganizationNameLabel.text=Organization Name: +OptionalCasePropertiesPanel.lbPointOfContactNameLabel.text=Organization Point of Contact: +OptionalCasePropertiesPanel.lbPointOfContactPhoneLabel.text=Organization Phone: +OptionalCasePropertiesPanel.lbPointOfContactEmailLabel.text=Organization Email: OptionalCasePropertiesPanel.bnNewOrganization.text=Manage Organizations +OptionalCasePropertiesPanel.lbNotesLabel.text=Case Notes: +OptionalCasePropertiesPanel.caseDisplayNameLabel.text=Case Name: +OptionalCasePropertiesPanel.caseNumberLabel.text_1=Case Number: diff --git a/Core/src/org/sleuthkit/autopsy/casemodule/Bundle_ja.properties b/Core/src/org/sleuthkit/autopsy/casemodule/Bundle_ja.properties index 1b41c27c95..4c6e4772c0 100644 --- a/Core/src/org/sleuthkit/autopsy/casemodule/Bundle_ja.properties +++ b/Core/src/org/sleuthkit/autopsy/casemodule/Bundle_ja.properties @@ -176,7 +176,6 @@ CasePropertiesPanel.lbDbType.text=\u30b1\u30fc\u30b9\u30bf\u30a4\u30d7\uff1a CasePropertiesPanel.caseNumberLabel.text=\u30b1\u30fc\u30b9\u756a\u53f7\uff1a CasePropertiesPanel.examinerLabel.text=\u8abf\u67fb\u62c5\u5f53\u8005\uff1a OptionalCasePropertiesPanel.examinerLabel.text=\u8abf\u67fb\u62c5\u5f53\u8005\uff1a -OptionalCasePropertiesPanel.caseDisplayNameLabel.text=\u30b1\u30fc\u30b9\u756a\u53f7\uff1a CueBannerPanel.openRecentCaseLabel.text=\u6700\u8fd1\u958b\u3044\u305f\u30b1\u30fc\u30b9\u3092\u958b\u304f CueBannerPanel.openAutoIngestCaseLabel.text=\u65e2\u5b58\u30b1\u30fc\u30b9\u3092\u958b\u304f OpenMultiUserCasePanel.openButton.text=\u958b\u304f @@ -201,3 +200,4 @@ LogicalEvidenceFilePanel.logicalEvidenceFileChooser.dialogTitle=\u30ed\u30fc\u30 LogicalEvidenceFilePanel.logicalEvidenceFileChooser.approveButtonText=\u9078\u629e LocalDiskSelectionDialog.errorLabel.text=\u30a8\u30e9\u30fc\u30e9\u30d9\u30eb LocalDiskSelectionDialog.selectLocalDiskLabel.text=\u30ed\u30fc\u30ab\u30eb\u30c7\u30a3\u30b9\u30af\u3092\u9078\u629e\uff1a +OptionalCasePropertiesPanel.caseDisplayNameLabel.text=\u30b1\u30fc\u30b9\u756a\u53f7\uff1a diff --git a/Core/src/org/sleuthkit/autopsy/casemodule/OptionalCasePropertiesPanel.form b/Core/src/org/sleuthkit/autopsy/casemodule/OptionalCasePropertiesPanel.form index 6a342165fc..add9506d3c 100644 --- a/Core/src/org/sleuthkit/autopsy/casemodule/OptionalCasePropertiesPanel.form +++ b/Core/src/org/sleuthkit/autopsy/casemodule/OptionalCasePropertiesPanel.form @@ -16,14 +16,61 @@ - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - @@ -31,488 +78,304 @@ - + + + + - + + + + + + + + + + + + + + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + + + + + + + + + + + + + + + + + + + - - - - + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + - + - - - - + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + - + - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + - - - - - - + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Core/src/org/sleuthkit/autopsy/casemodule/OptionalCasePropertiesPanel.java b/Core/src/org/sleuthkit/autopsy/casemodule/OptionalCasePropertiesPanel.java index f6856c5531..23122f07d9 100644 --- a/Core/src/org/sleuthkit/autopsy/casemodule/OptionalCasePropertiesPanel.java +++ b/Core/src/org/sleuthkit/autopsy/casemodule/OptionalCasePropertiesPanel.java @@ -51,13 +51,8 @@ final class OptionalCasePropertiesPanel extends javax.swing.JPanel { initComponents(); caseDisplayNameLabel.setVisible(false); caseDisplayNameTextField.setVisible(false); - lbPointOfContactNameLabel.setVisible(false); - lbPointOfContactNameText.setVisible(false); - lbPointOfContactPhoneLabel.setVisible(false); - lbPointOfContactPhoneText.setVisible(false); - lbPointOfContactEmailLabel.setVisible(false); - lbPointOfContactEmailText.setVisible(false); setUpCaseDetailsFields(); + setUpOrganizationData(); } OptionalCasePropertiesPanel(boolean editCurrentCase) { @@ -76,19 +71,13 @@ final class OptionalCasePropertiesPanel extends javax.swing.JPanel { tfExaminerEmailText.setText(openCase.getExaminerEmail()); tfExaminerPhoneText.setText(openCase.getExaminerPhone()); taNotesText.setText(openCase.getCaseNotes()); - setUpCaseDetailsFields(); - setUpOrganizationData(); } else { caseDisplayNameLabel.setVisible(false); caseDisplayNameTextField.setVisible(false); - lbPointOfContactNameLabel.setVisible(false); - lbPointOfContactNameText.setVisible(false); - lbPointOfContactPhoneLabel.setVisible(false); - lbPointOfContactPhoneText.setVisible(false); - lbPointOfContactEmailLabel.setVisible(false); - lbPointOfContactEmailText.setVisible(false); - setUpCaseDetailsFields(); } + + setUpCaseDetailsFields(); + setUpOrganizationData(); } @@ -126,7 +115,6 @@ final class OptionalCasePropertiesPanel extends javax.swing.JPanel { lbPointOfContactNameLabel.setEnabled(cREnabled); lbPointOfContactEmailLabel.setEnabled(cREnabled); lbPointOfContactPhoneLabel.setEnabled(cREnabled); - orgainizationPanel.setEnabled(cREnabled); if (!cREnabled) { clearOrganization(); } else { @@ -214,51 +202,33 @@ final class OptionalCasePropertiesPanel extends javax.swing.JPanel { // //GEN-BEGIN:initComponents private void initComponents() { - casePanel = new javax.swing.JPanel(); - caseNumberLabel = new javax.swing.JLabel(); - caseNumberTextField = new javax.swing.JTextField(); - caseDisplayNameLabel = new javax.swing.JLabel(); caseDisplayNameTextField = new javax.swing.JTextField(); + caseNumberTextField = new javax.swing.JTextField(); caseNotesScrollPane = new javax.swing.JScrollPane(); taNotesText = new javax.swing.JTextArea(); + caseDisplayNameLabel = new javax.swing.JLabel(); + caseNumberLabel = new javax.swing.JLabel(); lbNotesLabel = new javax.swing.JLabel(); - examinerPanel = new javax.swing.JPanel(); - tfExaminerPhoneText = new javax.swing.JTextField(); - lbExaminerPhoneLabel = new javax.swing.JLabel(); - tfExaminerEmailText = new javax.swing.JTextField(); examinerTextField = new javax.swing.JTextField(); - lbExaminerEmailLabel = new javax.swing.JLabel(); + tfExaminerPhoneText = new javax.swing.JTextField(); + tfExaminerEmailText = new javax.swing.JTextField(); examinerLabel = new javax.swing.JLabel(); - orgainizationPanel = new javax.swing.JPanel(); - lbPointOfContactPhoneLabel = new javax.swing.JLabel(); + lbExaminerPhoneLabel = new javax.swing.JLabel(); + lbExaminerEmailLabel = new javax.swing.JLabel(); + lbOrganizationNameLabel = new javax.swing.JLabel(); comboBoxOrgName = new javax.swing.JComboBox<>(); lbPointOfContactNameLabel = new javax.swing.JLabel(); - bnNewOrganization = new javax.swing.JButton(); - lbPointOfContactEmailText = new javax.swing.JLabel(); - lbPointOfContactNameText = new javax.swing.JLabel(); - lbOrganizationNameLabel = new javax.swing.JLabel(); + lbPointOfContactPhoneLabel = new javax.swing.JLabel(); lbPointOfContactEmailLabel = new javax.swing.JLabel(); + bnNewOrganization = new javax.swing.JButton(); + lbPointOfContactNameText = new javax.swing.JLabel(); lbPointOfContactPhoneText = new javax.swing.JLabel(); - - casePanel.setBorder(javax.swing.BorderFactory.createTitledBorder(org.openide.util.NbBundle.getMessage(OptionalCasePropertiesPanel.class, "OptionalCasePropertiesPanel.casePanel.border.title"))); // NOI18N - - caseNumberLabel.setFont(caseNumberLabel.getFont().deriveFont(caseNumberLabel.getFont().getStyle() & ~java.awt.Font.BOLD, 11)); - org.openide.awt.Mnemonics.setLocalizedText(caseNumberLabel, org.openide.util.NbBundle.getMessage(OptionalCasePropertiesPanel.class, "OptionalCasePropertiesPanel.caseNumberLabel.text")); // NOI18N - caseNumberLabel.setMaximumSize(new java.awt.Dimension(41, 14)); - caseNumberLabel.setMinimumSize(new java.awt.Dimension(41, 14)); - caseNumberLabel.setPreferredSize(new java.awt.Dimension(41, 14)); - - caseNumberTextField.setFont(caseNumberTextField.getFont().deriveFont(caseNumberTextField.getFont().getStyle() & ~java.awt.Font.BOLD, 11)); - - caseDisplayNameLabel.setFont(caseDisplayNameLabel.getFont().deriveFont(caseDisplayNameLabel.getFont().getStyle() & ~java.awt.Font.BOLD, 11)); - org.openide.awt.Mnemonics.setLocalizedText(caseDisplayNameLabel, org.openide.util.NbBundle.getMessage(OptionalCasePropertiesPanel.class, "OptionalCasePropertiesPanel.caseDisplayNameLabel.text")); // NOI18N - caseDisplayNameLabel.setMaximumSize(new java.awt.Dimension(41, 14)); - caseDisplayNameLabel.setMinimumSize(new java.awt.Dimension(41, 14)); - caseDisplayNameLabel.setPreferredSize(new java.awt.Dimension(41, 14)); - caseDisplayNameLabel.setVerifyInputWhenFocusTarget(false); + lbPointOfContactEmailText = new javax.swing.JLabel(); caseDisplayNameTextField.setFont(caseDisplayNameTextField.getFont().deriveFont(caseDisplayNameTextField.getFont().getStyle() & ~java.awt.Font.BOLD, 11)); + caseNumberTextField.setFont(caseNumberTextField.getFont().deriveFont(caseNumberTextField.getFont().getStyle() & ~java.awt.Font.BOLD, 11)); + caseNotesScrollPane.setBorder(javax.swing.BorderFactory.createEtchedBorder()); taNotesText.setColumns(20); @@ -269,114 +239,40 @@ final class OptionalCasePropertiesPanel extends javax.swing.JPanel { taNotesText.setBorder(null); caseNotesScrollPane.setViewportView(taNotesText); + caseDisplayNameLabel.setFont(caseDisplayNameLabel.getFont().deriveFont(caseDisplayNameLabel.getFont().getStyle() & ~java.awt.Font.BOLD, 11)); + org.openide.awt.Mnemonics.setLocalizedText(caseDisplayNameLabel, org.openide.util.NbBundle.getMessage(OptionalCasePropertiesPanel.class, "OptionalCasePropertiesPanel.caseDisplayNameLabel.text")); // NOI18N + caseDisplayNameLabel.setMaximumSize(new java.awt.Dimension(41, 14)); + caseDisplayNameLabel.setMinimumSize(new java.awt.Dimension(41, 14)); + caseDisplayNameLabel.setPreferredSize(new java.awt.Dimension(41, 14)); + caseDisplayNameLabel.setVerifyInputWhenFocusTarget(false); + + caseNumberLabel.setFont(caseNumberLabel.getFont().deriveFont(caseNumberLabel.getFont().getStyle() & ~java.awt.Font.BOLD, 11)); + org.openide.awt.Mnemonics.setLocalizedText(caseNumberLabel, org.openide.util.NbBundle.getMessage(OptionalCasePropertiesPanel.class, "OptionalCasePropertiesPanel.caseNumberLabel.text_1")); // NOI18N + org.openide.awt.Mnemonics.setLocalizedText(lbNotesLabel, org.openide.util.NbBundle.getMessage(OptionalCasePropertiesPanel.class, "OptionalCasePropertiesPanel.lbNotesLabel.text")); // NOI18N lbNotesLabel.setMaximumSize(new java.awt.Dimension(41, 14)); lbNotesLabel.setMinimumSize(new java.awt.Dimension(41, 14)); lbNotesLabel.setPreferredSize(new java.awt.Dimension(41, 14)); - javax.swing.GroupLayout casePanelLayout = new javax.swing.GroupLayout(casePanel); - casePanel.setLayout(casePanelLayout); - casePanelLayout.setHorizontalGroup( - casePanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) - .addGroup(casePanelLayout.createSequentialGroup() - .addContainerGap() - .addGroup(casePanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false) - .addComponent(caseNumberLabel, javax.swing.GroupLayout.DEFAULT_SIZE, 60, Short.MAX_VALUE) - .addComponent(caseDisplayNameLabel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) - .addComponent(lbNotesLabel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) - .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) - .addGroup(casePanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) - .addComponent(caseNotesScrollPane) - .addComponent(caseNumberTextField, javax.swing.GroupLayout.DEFAULT_SIZE, 425, Short.MAX_VALUE) - .addComponent(caseDisplayNameTextField)) - .addContainerGap()) - ); - casePanelLayout.setVerticalGroup( - casePanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) - .addGroup(casePanelLayout.createSequentialGroup() - .addContainerGap() - .addGroup(casePanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) - .addComponent(caseDisplayNameLabel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) - .addComponent(caseDisplayNameTextField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) - .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) - .addGroup(casePanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) - .addComponent(caseNumberLabel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) - .addComponent(caseNumberTextField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) - .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) - .addGroup(casePanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) - .addComponent(lbNotesLabel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) - .addComponent(caseNotesScrollPane, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) - .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) - ); - - examinerPanel.setBorder(javax.swing.BorderFactory.createTitledBorder(org.openide.util.NbBundle.getMessage(OptionalCasePropertiesPanel.class, "OptionalCasePropertiesPanel.examinerPanel.border.title"))); // NOI18N - - org.openide.awt.Mnemonics.setLocalizedText(lbExaminerPhoneLabel, org.openide.util.NbBundle.getMessage(OptionalCasePropertiesPanel.class, "OptionalCasePropertiesPanel.lbExaminerPhoneLabel.text")); // NOI18N - lbExaminerPhoneLabel.setMaximumSize(new java.awt.Dimension(41, 14)); - lbExaminerPhoneLabel.setMinimumSize(new java.awt.Dimension(41, 14)); - lbExaminerPhoneLabel.setPreferredSize(new java.awt.Dimension(41, 14)); - examinerTextField.setFont(examinerTextField.getFont().deriveFont(examinerTextField.getFont().getStyle() & ~java.awt.Font.BOLD, 11)); - org.openide.awt.Mnemonics.setLocalizedText(lbExaminerEmailLabel, org.openide.util.NbBundle.getMessage(OptionalCasePropertiesPanel.class, "OptionalCasePropertiesPanel.lbExaminerEmailLabel.text")); // NOI18N - lbExaminerEmailLabel.setMaximumSize(new java.awt.Dimension(41, 14)); - lbExaminerEmailLabel.setMinimumSize(new java.awt.Dimension(41, 14)); - lbExaminerEmailLabel.setPreferredSize(new java.awt.Dimension(41, 14)); - examinerLabel.setFont(examinerLabel.getFont().deriveFont(examinerLabel.getFont().getStyle() & ~java.awt.Font.BOLD, 11)); org.openide.awt.Mnemonics.setLocalizedText(examinerLabel, org.openide.util.NbBundle.getMessage(OptionalCasePropertiesPanel.class, "OptionalCasePropertiesPanel.examinerLabel.text")); // NOI18N examinerLabel.setMaximumSize(new java.awt.Dimension(41, 14)); examinerLabel.setMinimumSize(new java.awt.Dimension(41, 14)); examinerLabel.setPreferredSize(new java.awt.Dimension(41, 14)); - javax.swing.GroupLayout examinerPanelLayout = new javax.swing.GroupLayout(examinerPanel); - examinerPanel.setLayout(examinerPanelLayout); - examinerPanelLayout.setHorizontalGroup( - examinerPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) - .addGroup(examinerPanelLayout.createSequentialGroup() - .addContainerGap() - .addGroup(examinerPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) - .addGroup(examinerPanelLayout.createSequentialGroup() - .addComponent(lbExaminerPhoneLabel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) - .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) - .addComponent(tfExaminerPhoneText, javax.swing.GroupLayout.DEFAULT_SIZE, 424, Short.MAX_VALUE)) - .addGroup(examinerPanelLayout.createSequentialGroup() - .addGroup(examinerPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) - .addComponent(lbExaminerEmailLabel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) - .addComponent(examinerLabel, javax.swing.GroupLayout.PREFERRED_SIZE, 60, javax.swing.GroupLayout.PREFERRED_SIZE)) - .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) - .addGroup(examinerPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) - .addComponent(examinerTextField) - .addComponent(tfExaminerEmailText)))) - .addGap(11, 11, 11)) - ); + org.openide.awt.Mnemonics.setLocalizedText(lbExaminerPhoneLabel, org.openide.util.NbBundle.getMessage(OptionalCasePropertiesPanel.class, "OptionalCasePropertiesPanel.lbExaminerPhoneLabel.text")); // NOI18N + lbExaminerPhoneLabel.setMaximumSize(new java.awt.Dimension(41, 14)); + lbExaminerPhoneLabel.setMinimumSize(new java.awt.Dimension(41, 14)); + lbExaminerPhoneLabel.setPreferredSize(new java.awt.Dimension(41, 14)); - examinerPanelLayout.linkSize(javax.swing.SwingConstants.HORIZONTAL, new java.awt.Component[] {examinerLabel, lbExaminerEmailLabel, lbExaminerPhoneLabel}); + org.openide.awt.Mnemonics.setLocalizedText(lbExaminerEmailLabel, org.openide.util.NbBundle.getMessage(OptionalCasePropertiesPanel.class, "OptionalCasePropertiesPanel.lbExaminerEmailLabel.text")); // NOI18N + lbExaminerEmailLabel.setMaximumSize(new java.awt.Dimension(41, 14)); + lbExaminerEmailLabel.setMinimumSize(new java.awt.Dimension(41, 14)); + lbExaminerEmailLabel.setPreferredSize(new java.awt.Dimension(41, 14)); - examinerPanelLayout.setVerticalGroup( - examinerPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) - .addGroup(examinerPanelLayout.createSequentialGroup() - .addContainerGap() - .addGroup(examinerPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) - .addComponent(examinerLabel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) - .addComponent(examinerTextField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) - .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) - .addGroup(examinerPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) - .addComponent(tfExaminerPhoneText, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) - .addComponent(lbExaminerPhoneLabel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) - .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) - .addGroup(examinerPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) - .addComponent(tfExaminerEmailText, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) - .addComponent(lbExaminerEmailLabel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) - .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) - ); - - orgainizationPanel.setBorder(javax.swing.BorderFactory.createTitledBorder(org.openide.util.NbBundle.getMessage(OptionalCasePropertiesPanel.class, "OptionalCasePropertiesPanel.orgainizationPanel.border.title"))); // NOI18N - - org.openide.awt.Mnemonics.setLocalizedText(lbPointOfContactPhoneLabel, org.openide.util.NbBundle.getMessage(OptionalCasePropertiesPanel.class, "OptionalCasePropertiesPanel.lbPointOfContactPhoneLabel.text")); // NOI18N - lbPointOfContactPhoneLabel.setMaximumSize(new java.awt.Dimension(82, 14)); - lbPointOfContactPhoneLabel.setMinimumSize(new java.awt.Dimension(82, 14)); - lbPointOfContactPhoneLabel.setPreferredSize(new java.awt.Dimension(82, 14)); + org.openide.awt.Mnemonics.setLocalizedText(lbOrganizationNameLabel, org.openide.util.NbBundle.getMessage(OptionalCasePropertiesPanel.class, "OptionalCasePropertiesPanel.lbOrganizationNameLabel.text")); // NOI18N comboBoxOrgName.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { @@ -385,103 +281,118 @@ final class OptionalCasePropertiesPanel extends javax.swing.JPanel { }); org.openide.awt.Mnemonics.setLocalizedText(lbPointOfContactNameLabel, org.openide.util.NbBundle.getMessage(OptionalCasePropertiesPanel.class, "OptionalCasePropertiesPanel.lbPointOfContactNameLabel.text")); // NOI18N - lbPointOfContactNameLabel.setMaximumSize(new java.awt.Dimension(82, 14)); - lbPointOfContactNameLabel.setMinimumSize(new java.awt.Dimension(82, 14)); - lbPointOfContactNameLabel.setPreferredSize(new java.awt.Dimension(82, 14)); - org.openide.awt.Mnemonics.setLocalizedText(bnNewOrganization, org.openide.util.NbBundle.getMessage(OptionalCasePropertiesPanel.class, "OptionalCasePropertiesPanel.bnNewOrganization.text")); // NOI18N - bnNewOrganization.setMargin(new java.awt.Insets(2, 6, 2, 6)); - bnNewOrganization.setMaximumSize(new java.awt.Dimension(123, 23)); - bnNewOrganization.setMinimumSize(new java.awt.Dimension(123, 23)); - bnNewOrganization.setPreferredSize(new java.awt.Dimension(123, 23)); - bnNewOrganization.addActionListener(new java.awt.event.ActionListener() { - public void actionPerformed(java.awt.event.ActionEvent evt) { - bnNewOrganizationActionPerformed(evt); - } - }); - - org.openide.awt.Mnemonics.setLocalizedText(lbOrganizationNameLabel, org.openide.util.NbBundle.getMessage(OptionalCasePropertiesPanel.class, "OptionalCasePropertiesPanel.lbOrganizationNameLabel.text")); // NOI18N - lbOrganizationNameLabel.setMaximumSize(new java.awt.Dimension(189, 14)); - lbOrganizationNameLabel.setMinimumSize(new java.awt.Dimension(189, 14)); - lbOrganizationNameLabel.setPreferredSize(new java.awt.Dimension(189, 14)); + org.openide.awt.Mnemonics.setLocalizedText(lbPointOfContactPhoneLabel, org.openide.util.NbBundle.getMessage(OptionalCasePropertiesPanel.class, "OptionalCasePropertiesPanel.lbPointOfContactPhoneLabel.text")); // NOI18N + lbPointOfContactPhoneLabel.setMaximumSize(new java.awt.Dimension(82, 14)); + lbPointOfContactPhoneLabel.setMinimumSize(new java.awt.Dimension(82, 14)); + lbPointOfContactPhoneLabel.setPreferredSize(new java.awt.Dimension(82, 14)); org.openide.awt.Mnemonics.setLocalizedText(lbPointOfContactEmailLabel, org.openide.util.NbBundle.getMessage(OptionalCasePropertiesPanel.class, "OptionalCasePropertiesPanel.lbPointOfContactEmailLabel.text")); // NOI18N lbPointOfContactEmailLabel.setMaximumSize(new java.awt.Dimension(82, 14)); lbPointOfContactEmailLabel.setMinimumSize(new java.awt.Dimension(82, 14)); lbPointOfContactEmailLabel.setPreferredSize(new java.awt.Dimension(82, 14)); - javax.swing.GroupLayout orgainizationPanelLayout = new javax.swing.GroupLayout(orgainizationPanel); - orgainizationPanel.setLayout(orgainizationPanelLayout); - orgainizationPanelLayout.setHorizontalGroup( - orgainizationPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) - .addGroup(orgainizationPanelLayout.createSequentialGroup() - .addContainerGap() - .addGroup(orgainizationPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) - .addGroup(orgainizationPanelLayout.createSequentialGroup() - .addComponent(lbOrganizationNameLabel, javax.swing.GroupLayout.DEFAULT_SIZE, 206, Short.MAX_VALUE) - .addGap(18, 18, 18) - .addComponent(comboBoxOrgName, javax.swing.GroupLayout.PREFERRED_SIZE, 108, javax.swing.GroupLayout.PREFERRED_SIZE) - .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) - .addComponent(bnNewOrganization, javax.swing.GroupLayout.PREFERRED_SIZE, 147, javax.swing.GroupLayout.PREFERRED_SIZE)) - .addGroup(orgainizationPanelLayout.createSequentialGroup() - .addGroup(orgainizationPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) - .addComponent(lbPointOfContactPhoneLabel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) - .addComponent(lbPointOfContactEmailLabel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) - .addComponent(lbPointOfContactNameLabel, javax.swing.GroupLayout.PREFERRED_SIZE, 109, javax.swing.GroupLayout.PREFERRED_SIZE)) - .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) - .addGroup(orgainizationPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) - .addComponent(lbPointOfContactPhoneText, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) - .addComponent(lbPointOfContactNameText, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) - .addComponent(lbPointOfContactEmailText, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)))) - .addContainerGap()) - ); - - orgainizationPanelLayout.linkSize(javax.swing.SwingConstants.HORIZONTAL, new java.awt.Component[] {lbPointOfContactEmailLabel, lbPointOfContactNameLabel, lbPointOfContactPhoneLabel}); - - orgainizationPanelLayout.setVerticalGroup( - orgainizationPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) - .addGroup(orgainizationPanelLayout.createSequentialGroup() - .addContainerGap() - .addGroup(orgainizationPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) - .addComponent(lbOrganizationNameLabel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) - .addComponent(comboBoxOrgName, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) - .addComponent(bnNewOrganization, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) - .addGap(18, 18, 18) - .addGroup(orgainizationPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false) - .addComponent(lbPointOfContactNameText, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) - .addComponent(lbPointOfContactNameLabel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) - .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) - .addGroup(orgainizationPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false) - .addComponent(lbPointOfContactPhoneLabel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) - .addComponent(lbPointOfContactPhoneText, javax.swing.GroupLayout.PREFERRED_SIZE, 14, javax.swing.GroupLayout.PREFERRED_SIZE)) - .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) - .addGroup(orgainizationPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false) - .addComponent(lbPointOfContactEmailLabel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) - .addComponent(lbPointOfContactEmailText, javax.swing.GroupLayout.PREFERRED_SIZE, 14, javax.swing.GroupLayout.PREFERRED_SIZE)) - .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) - ); + org.openide.awt.Mnemonics.setLocalizedText(bnNewOrganization, org.openide.util.NbBundle.getMessage(OptionalCasePropertiesPanel.class, "OptionalCasePropertiesPanel.bnNewOrganization.text")); // NOI18N + bnNewOrganization.setMargin(new java.awt.Insets(2, 6, 2, 6)); + bnNewOrganization.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + bnNewOrganizationActionPerformed(evt); + } + }); 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() - .addGap(6, 6, 6) - .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING) - .addComponent(casePanel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) - .addComponent(examinerPanel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) - .addComponent(orgainizationPanel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) - .addGap(6, 6, 6)) + .addGroup(layout.createSequentialGroup() + .addContainerGap() + .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGroup(layout.createSequentialGroup() + .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGroup(layout.createSequentialGroup() + .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false) + .addComponent(caseNumberLabel, javax.swing.GroupLayout.DEFAULT_SIZE, 109, Short.MAX_VALUE) + .addComponent(lbNotesLabel, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) + .addComponent(examinerLabel, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) + .addComponent(lbExaminerPhoneLabel, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) + .addComponent(lbExaminerEmailLabel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) + .addComponent(caseDisplayNameLabel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) + .addGap(6, 6, 6) + .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addComponent(caseNotesScrollPane, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, 398, Short.MAX_VALUE) + .addComponent(examinerTextField, javax.swing.GroupLayout.Alignment.TRAILING) + .addComponent(tfExaminerPhoneText, javax.swing.GroupLayout.Alignment.TRAILING) + .addComponent(tfExaminerEmailText) + .addComponent(caseDisplayNameTextField) + .addComponent(caseNumberTextField))) + .addGroup(layout.createSequentialGroup() + .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false) + .addComponent(lbPointOfContactNameLabel, javax.swing.GroupLayout.DEFAULT_SIZE, 185, Short.MAX_VALUE) + .addComponent(lbOrganizationNameLabel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) + .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addComponent(comboBoxOrgName, 0, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) + .addComponent(lbPointOfContactNameText, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)))) + .addContainerGap()) + .addGroup(layout.createSequentialGroup() + .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false) + .addComponent(lbPointOfContactEmailLabel, javax.swing.GroupLayout.DEFAULT_SIZE, 185, Short.MAX_VALUE) + .addComponent(lbPointOfContactPhoneLabel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) + .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addComponent(lbPointOfContactPhoneText, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) + .addComponent(lbPointOfContactEmailText, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) + .addGap(10, 10, 10)) + .addGroup(layout.createSequentialGroup() + .addComponent(bnNewOrganization, javax.swing.GroupLayout.PREFERRED_SIZE, 147, javax.swing.GroupLayout.PREFERRED_SIZE) + .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)))) ); layout.setVerticalGroup( layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createSequentialGroup() .addContainerGap() - .addComponent(casePanel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) + .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false) + .addComponent(caseDisplayNameTextField) + .addComponent(caseDisplayNameLabel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) - .addComponent(examinerPanel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) + .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) + .addComponent(caseNumberLabel, javax.swing.GroupLayout.PREFERRED_SIZE, 20, javax.swing.GroupLayout.PREFERRED_SIZE) + .addComponent(caseNumberTextField)) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) + .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addComponent(caseNotesScrollPane, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) + .addComponent(lbNotesLabel, javax.swing.GroupLayout.PREFERRED_SIZE, 20, javax.swing.GroupLayout.PREFERRED_SIZE)) + .addGap(18, 18, 18) + .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false) + .addComponent(examinerLabel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) + .addComponent(examinerTextField)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) - .addComponent(orgainizationPanel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) + .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false) + .addComponent(lbExaminerPhoneLabel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) + .addComponent(tfExaminerPhoneText)) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) + .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false) + .addComponent(tfExaminerEmailText) + .addComponent(lbExaminerEmailLabel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) + .addGap(18, 18, 18) + .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) + .addComponent(lbOrganizationNameLabel, javax.swing.GroupLayout.PREFERRED_SIZE, 20, javax.swing.GroupLayout.PREFERRED_SIZE) + .addComponent(comboBoxOrgName, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) + .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addComponent(lbPointOfContactNameText, javax.swing.GroupLayout.PREFERRED_SIZE, 20, javax.swing.GroupLayout.PREFERRED_SIZE) + .addComponent(lbPointOfContactNameLabel, javax.swing.GroupLayout.PREFERRED_SIZE, 20, javax.swing.GroupLayout.PREFERRED_SIZE)) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) + .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false) + .addComponent(lbPointOfContactPhoneText, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) + .addComponent(lbPointOfContactPhoneLabel, javax.swing.GroupLayout.DEFAULT_SIZE, 20, Short.MAX_VALUE)) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) + .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addComponent(lbPointOfContactEmailLabel, javax.swing.GroupLayout.PREFERRED_SIZE, 20, javax.swing.GroupLayout.PREFERRED_SIZE) + .addComponent(lbPointOfContactEmailText, javax.swing.GroupLayout.PREFERRED_SIZE, 20, javax.swing.GroupLayout.PREFERRED_SIZE)) + .addGap(18, 18, 18) + .addComponent(bnNewOrganization) + .addContainerGap()) ); }// //GEN-END:initComponents @@ -595,10 +506,8 @@ final class OptionalCasePropertiesPanel extends javax.swing.JPanel { private javax.swing.JScrollPane caseNotesScrollPane; private javax.swing.JLabel caseNumberLabel; private javax.swing.JTextField caseNumberTextField; - private javax.swing.JPanel casePanel; private javax.swing.JComboBox comboBoxOrgName; private javax.swing.JLabel examinerLabel; - private javax.swing.JPanel examinerPanel; private javax.swing.JTextField examinerTextField; private javax.swing.JLabel lbExaminerEmailLabel; private javax.swing.JLabel lbExaminerPhoneLabel; @@ -610,7 +519,6 @@ final class OptionalCasePropertiesPanel extends javax.swing.JPanel { private javax.swing.JLabel lbPointOfContactNameText; private javax.swing.JLabel lbPointOfContactPhoneLabel; private javax.swing.JLabel lbPointOfContactPhoneText; - private javax.swing.JPanel orgainizationPanel; private javax.swing.JTextArea taNotesText; private javax.swing.JTextField tfExaminerEmailText; private javax.swing.JTextField tfExaminerPhoneText; From 26c02f00effff21feb253cae3a7d81d9c24e2d45 Mon Sep 17 00:00:00 2001 From: "U-BASIS\\dgrove" Date: Fri, 28 Dec 2018 13:58:46 -0500 Subject: [PATCH 07/13] Revised for loop for safety. --- .../autopsy/casemodule/LocalDiskSelectionDialog.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Core/src/org/sleuthkit/autopsy/casemodule/LocalDiskSelectionDialog.java b/Core/src/org/sleuthkit/autopsy/casemodule/LocalDiskSelectionDialog.java index c663c288a9..e6f222ec0c 100755 --- a/Core/src/org/sleuthkit/autopsy/casemodule/LocalDiskSelectionDialog.java +++ b/Core/src/org/sleuthkit/autopsy/casemodule/LocalDiskSelectionDialog.java @@ -21,6 +21,7 @@ package org.sleuthkit.autopsy.casemodule; import java.awt.Window; import java.util.ArrayList; import java.util.Collections; +import java.util.Iterator; import java.util.List; import java.util.concurrent.CancellationException; import java.util.concurrent.ExecutionException; @@ -427,14 +428,15 @@ final class LocalDiskSelectionDialog extends JDialog { // Remove the partition the application is running on. String userConfigPath = PlatformUtil.getUserConfigDirectory(); - for (LocalDisk disk : disks) { + for (Iterator iterator = disks.iterator(); iterator.hasNext();) { + LocalDisk disk = iterator.next(); String diskPath = disk.getPath(); if (diskPath.startsWith("\\\\.\\")) { // Strip out UNC prefix to get the drive letter. diskPath = diskPath.substring(4); } if (userConfigPath.startsWith(diskPath)) { - disks.remove(disk); + iterator.remove(); } } From 44ff800526fd1c711dc539b2c701937ea270ea45 Mon Sep 17 00:00:00 2001 From: "U-BASIS\\dgrove" Date: Fri, 28 Dec 2018 16:33:39 -0500 Subject: [PATCH 08/13] Only adding notes to report. --- .../autopsy/casemodule/Bundle.properties | 25 +- .../autopsy/casemodule/Bundle_ja.properties | 4 +- .../OptionalCasePropertiesPanel.form | 755 ++++++++++-------- .../OptionalCasePropertiesPanel.java | 339 +++++--- .../sleuthkit/autopsy/report/ReportHTML.java | 100 +-- 5 files changed, 675 insertions(+), 548 deletions(-) diff --git a/Core/src/org/sleuthkit/autopsy/casemodule/Bundle.properties b/Core/src/org/sleuthkit/autopsy/casemodule/Bundle.properties index 5cd68b79e0..bec1300db8 100644 --- a/Core/src/org/sleuthkit/autopsy/casemodule/Bundle.properties +++ b/Core/src/org/sleuthkit/autopsy/casemodule/Bundle.properties @@ -254,14 +254,17 @@ CasePropertiesPanel.lbOrganizationNameLabel.text=Name: CasePropertiesPanel.lbPointOfContactNameLabel.text=Point of Contact: CasePropertiesPanel.lbPointOfContactPhoneLabel.text=Phone: CasePropertiesPanel.lbPointOfContactEmailLabel.text=Email: -OptionalCasePropertiesPanel.examinerLabel.text=Examiner Name: -OptionalCasePropertiesPanel.lbExaminerPhoneLabel.text=Examiner Phone: -OptionalCasePropertiesPanel.lbExaminerEmailLabel.text=Examiner Email: -OptionalCasePropertiesPanel.lbOrganizationNameLabel.text=Organization Name: -OptionalCasePropertiesPanel.lbPointOfContactNameLabel.text=Organization Point of Contact: -OptionalCasePropertiesPanel.lbPointOfContactPhoneLabel.text=Organization Phone: -OptionalCasePropertiesPanel.lbPointOfContactEmailLabel.text=Organization Email: -OptionalCasePropertiesPanel.bnNewOrganization.text=Manage Organizations -OptionalCasePropertiesPanel.lbNotesLabel.text=Case Notes: -OptionalCasePropertiesPanel.caseDisplayNameLabel.text=Case Name: -OptionalCasePropertiesPanel.caseNumberLabel.text_1=Case Number: +OptionalCasePropertiesPanel.casePanel.border.title=Case +OptionalCasePropertiesPanel.caseDisplayNameLabel.text=Name: +OptionalCasePropertiesPanel.caseNumberLabel.text=Number: +OptionalCasePropertiesPanel.examinerPanel.border.title=Examiner +OptionalCasePropertiesPanel.examinerLabel.text=Name: +OptionalCasePropertiesPanel.lbExaminerPhoneLabel.text=Phone: +OptionalCasePropertiesPanel.lbExaminerEmailLabel.text=Email: +OptionalCasePropertiesPanel.lbNotesLabel.text=Notes: +OptionalCasePropertiesPanel.orgainizationPanel.border.title=Organization +OptionalCasePropertiesPanel.lbOrganizationNameLabel.text=Organization analysis is being done for: +OptionalCasePropertiesPanel.lbPointOfContactNameLabel.text=Point of Contact: +OptionalCasePropertiesPanel.lbPointOfContactPhoneLabel.text=Phone: +OptionalCasePropertiesPanel.lbPointOfContactEmailLabel.text=Email: +OptionalCasePropertiesPanel.bnNewOrganization.text=Manage Organizations \ No newline at end of file diff --git a/Core/src/org/sleuthkit/autopsy/casemodule/Bundle_ja.properties b/Core/src/org/sleuthkit/autopsy/casemodule/Bundle_ja.properties index 4c6e4772c0..208c5ed868 100644 --- a/Core/src/org/sleuthkit/autopsy/casemodule/Bundle_ja.properties +++ b/Core/src/org/sleuthkit/autopsy/casemodule/Bundle_ja.properties @@ -176,6 +176,7 @@ CasePropertiesPanel.lbDbType.text=\u30b1\u30fc\u30b9\u30bf\u30a4\u30d7\uff1a CasePropertiesPanel.caseNumberLabel.text=\u30b1\u30fc\u30b9\u756a\u53f7\uff1a CasePropertiesPanel.examinerLabel.text=\u8abf\u67fb\u62c5\u5f53\u8005\uff1a OptionalCasePropertiesPanel.examinerLabel.text=\u8abf\u67fb\u62c5\u5f53\u8005\uff1a +OptionalCasePropertiesPanel.caseDisplayNameLabel.text=\u30b1\u30fc\u30b9\u756a\u53f7\uff1a CueBannerPanel.openRecentCaseLabel.text=\u6700\u8fd1\u958b\u3044\u305f\u30b1\u30fc\u30b9\u3092\u958b\u304f CueBannerPanel.openAutoIngestCaseLabel.text=\u65e2\u5b58\u30b1\u30fc\u30b9\u3092\u958b\u304f OpenMultiUserCasePanel.openButton.text=\u958b\u304f @@ -199,5 +200,4 @@ LogicalEvidenceFilePanel.errorLabel.text=\u30a8\u30e9\u30fc\u30e9\u30d9\u30eb LogicalEvidenceFilePanel.logicalEvidenceFileChooser.dialogTitle=\u30ed\u30fc\u30ab\u30eb\u30d5\u30a1\u30a4\u30eb\u307e\u305f\u306f\u30d5\u30a9\u30eb\u30c0\u3092\u9078\u629e LogicalEvidenceFilePanel.logicalEvidenceFileChooser.approveButtonText=\u9078\u629e LocalDiskSelectionDialog.errorLabel.text=\u30a8\u30e9\u30fc\u30e9\u30d9\u30eb -LocalDiskSelectionDialog.selectLocalDiskLabel.text=\u30ed\u30fc\u30ab\u30eb\u30c7\u30a3\u30b9\u30af\u3092\u9078\u629e\uff1a -OptionalCasePropertiesPanel.caseDisplayNameLabel.text=\u30b1\u30fc\u30b9\u756a\u53f7\uff1a +LocalDiskSelectionDialog.selectLocalDiskLabel.text=\u30ed\u30fc\u30ab\u30eb\u30c7\u30a3\u30b9\u30af\u3092\u9078\u629e\uff1a \ No newline at end of file diff --git a/Core/src/org/sleuthkit/autopsy/casemodule/OptionalCasePropertiesPanel.form b/Core/src/org/sleuthkit/autopsy/casemodule/OptionalCasePropertiesPanel.form index add9506d3c..2590534461 100644 --- a/Core/src/org/sleuthkit/autopsy/casemodule/OptionalCasePropertiesPanel.form +++ b/Core/src/org/sleuthkit/autopsy/casemodule/OptionalCasePropertiesPanel.form @@ -16,61 +16,14 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + @@ -78,304 +31,456 @@ - - - - + - - - - - - - - - - - - - - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + - - - - - - - - - - - - - - - - - - - + - - + + + + - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + - - - + + + + - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Core/src/org/sleuthkit/autopsy/casemodule/OptionalCasePropertiesPanel.java b/Core/src/org/sleuthkit/autopsy/casemodule/OptionalCasePropertiesPanel.java index 23122f07d9..fe9c06a1d5 100644 --- a/Core/src/org/sleuthkit/autopsy/casemodule/OptionalCasePropertiesPanel.java +++ b/Core/src/org/sleuthkit/autopsy/casemodule/OptionalCasePropertiesPanel.java @@ -51,8 +51,13 @@ final class OptionalCasePropertiesPanel extends javax.swing.JPanel { initComponents(); caseDisplayNameLabel.setVisible(false); caseDisplayNameTextField.setVisible(false); + lbPointOfContactNameLabel.setVisible(false); + lbPointOfContactNameText.setVisible(false); + lbPointOfContactPhoneLabel.setVisible(false); + lbPointOfContactPhoneText.setVisible(false); + lbPointOfContactEmailLabel.setVisible(false); + lbPointOfContactEmailText.setVisible(false); setUpCaseDetailsFields(); - setUpOrganizationData(); } OptionalCasePropertiesPanel(boolean editCurrentCase) { @@ -71,13 +76,19 @@ final class OptionalCasePropertiesPanel extends javax.swing.JPanel { tfExaminerEmailText.setText(openCase.getExaminerEmail()); tfExaminerPhoneText.setText(openCase.getExaminerPhone()); taNotesText.setText(openCase.getCaseNotes()); + setUpCaseDetailsFields(); + setUpOrganizationData(); } else { caseDisplayNameLabel.setVisible(false); caseDisplayNameTextField.setVisible(false); + lbPointOfContactNameLabel.setVisible(false); + lbPointOfContactNameText.setVisible(false); + lbPointOfContactPhoneLabel.setVisible(false); + lbPointOfContactPhoneText.setVisible(false); + lbPointOfContactEmailLabel.setVisible(false); + lbPointOfContactEmailText.setVisible(false); + setUpCaseDetailsFields(); } - - setUpCaseDetailsFields(); - setUpOrganizationData(); } @@ -115,6 +126,7 @@ final class OptionalCasePropertiesPanel extends javax.swing.JPanel { lbPointOfContactNameLabel.setEnabled(cREnabled); lbPointOfContactEmailLabel.setEnabled(cREnabled); lbPointOfContactPhoneLabel.setEnabled(cREnabled); + orgainizationPanel.setEnabled(cREnabled); if (!cREnabled) { clearOrganization(); } else { @@ -202,33 +214,48 @@ final class OptionalCasePropertiesPanel extends javax.swing.JPanel { // //GEN-BEGIN:initComponents private void initComponents() { - caseDisplayNameTextField = new javax.swing.JTextField(); + casePanel = new javax.swing.JPanel(); + caseNumberLabel = new javax.swing.JLabel(); caseNumberTextField = new javax.swing.JTextField(); + caseDisplayNameLabel = new javax.swing.JLabel(); + caseDisplayNameTextField = new javax.swing.JTextField(); caseNotesScrollPane = new javax.swing.JScrollPane(); taNotesText = new javax.swing.JTextArea(); - caseDisplayNameLabel = new javax.swing.JLabel(); - caseNumberLabel = new javax.swing.JLabel(); lbNotesLabel = new javax.swing.JLabel(); - examinerTextField = new javax.swing.JTextField(); + examinerPanel = new javax.swing.JPanel(); tfExaminerPhoneText = new javax.swing.JTextField(); - tfExaminerEmailText = new javax.swing.JTextField(); - examinerLabel = new javax.swing.JLabel(); lbExaminerPhoneLabel = new javax.swing.JLabel(); + tfExaminerEmailText = new javax.swing.JTextField(); + examinerTextField = new javax.swing.JTextField(); lbExaminerEmailLabel = new javax.swing.JLabel(); - lbOrganizationNameLabel = new javax.swing.JLabel(); + examinerLabel = new javax.swing.JLabel(); + orgainizationPanel = new javax.swing.JPanel(); + lbPointOfContactPhoneLabel = new javax.swing.JLabel(); comboBoxOrgName = new javax.swing.JComboBox<>(); lbPointOfContactNameLabel = new javax.swing.JLabel(); - lbPointOfContactPhoneLabel = new javax.swing.JLabel(); - lbPointOfContactEmailLabel = new javax.swing.JLabel(); bnNewOrganization = new javax.swing.JButton(); - lbPointOfContactNameText = new javax.swing.JLabel(); - lbPointOfContactPhoneText = new javax.swing.JLabel(); lbPointOfContactEmailText = new javax.swing.JLabel(); + lbPointOfContactNameText = new javax.swing.JLabel(); + lbOrganizationNameLabel = new javax.swing.JLabel(); + lbPointOfContactEmailLabel = new javax.swing.JLabel(); + lbPointOfContactPhoneText = new javax.swing.JLabel(); - caseDisplayNameTextField.setFont(caseDisplayNameTextField.getFont().deriveFont(caseDisplayNameTextField.getFont().getStyle() & ~java.awt.Font.BOLD, 11)); + casePanel.setBorder(javax.swing.BorderFactory.createTitledBorder(org.openide.util.NbBundle.getMessage(OptionalCasePropertiesPanel.class, "OptionalCasePropertiesPanel.casePanel.border.title"))); // NOI18N + + caseNumberLabel.setFont(caseNumberLabel.getFont().deriveFont(caseNumberLabel.getFont().getStyle() & ~java.awt.Font.BOLD, 11)); + org.openide.awt.Mnemonics.setLocalizedText(caseNumberLabel, org.openide.util.NbBundle.getMessage(OptionalCasePropertiesPanel.class, "OptionalCasePropertiesPanel.caseNumberLabel.text")); // NOI18N caseNumberTextField.setFont(caseNumberTextField.getFont().deriveFont(caseNumberTextField.getFont().getStyle() & ~java.awt.Font.BOLD, 11)); + caseDisplayNameLabel.setFont(caseDisplayNameLabel.getFont().deriveFont(caseDisplayNameLabel.getFont().getStyle() & ~java.awt.Font.BOLD, 11)); + org.openide.awt.Mnemonics.setLocalizedText(caseDisplayNameLabel, org.openide.util.NbBundle.getMessage(OptionalCasePropertiesPanel.class, "OptionalCasePropertiesPanel.caseDisplayNameLabel.text")); // NOI18N + caseDisplayNameLabel.setMaximumSize(new java.awt.Dimension(41, 14)); + caseDisplayNameLabel.setMinimumSize(new java.awt.Dimension(41, 14)); + caseDisplayNameLabel.setPreferredSize(new java.awt.Dimension(41, 14)); + caseDisplayNameLabel.setVerifyInputWhenFocusTarget(false); + + caseDisplayNameTextField.setFont(caseDisplayNameTextField.getFont().deriveFont(caseDisplayNameTextField.getFont().getStyle() & ~java.awt.Font.BOLD, 11)); + caseNotesScrollPane.setBorder(javax.swing.BorderFactory.createEtchedBorder()); taNotesText.setColumns(20); @@ -239,40 +266,114 @@ final class OptionalCasePropertiesPanel extends javax.swing.JPanel { taNotesText.setBorder(null); caseNotesScrollPane.setViewportView(taNotesText); - caseDisplayNameLabel.setFont(caseDisplayNameLabel.getFont().deriveFont(caseDisplayNameLabel.getFont().getStyle() & ~java.awt.Font.BOLD, 11)); - org.openide.awt.Mnemonics.setLocalizedText(caseDisplayNameLabel, org.openide.util.NbBundle.getMessage(OptionalCasePropertiesPanel.class, "OptionalCasePropertiesPanel.caseDisplayNameLabel.text")); // NOI18N - caseDisplayNameLabel.setMaximumSize(new java.awt.Dimension(41, 14)); - caseDisplayNameLabel.setMinimumSize(new java.awt.Dimension(41, 14)); - caseDisplayNameLabel.setPreferredSize(new java.awt.Dimension(41, 14)); - caseDisplayNameLabel.setVerifyInputWhenFocusTarget(false); - - caseNumberLabel.setFont(caseNumberLabel.getFont().deriveFont(caseNumberLabel.getFont().getStyle() & ~java.awt.Font.BOLD, 11)); - org.openide.awt.Mnemonics.setLocalizedText(caseNumberLabel, org.openide.util.NbBundle.getMessage(OptionalCasePropertiesPanel.class, "OptionalCasePropertiesPanel.caseNumberLabel.text_1")); // NOI18N - org.openide.awt.Mnemonics.setLocalizedText(lbNotesLabel, org.openide.util.NbBundle.getMessage(OptionalCasePropertiesPanel.class, "OptionalCasePropertiesPanel.lbNotesLabel.text")); // NOI18N lbNotesLabel.setMaximumSize(new java.awt.Dimension(41, 14)); lbNotesLabel.setMinimumSize(new java.awt.Dimension(41, 14)); lbNotesLabel.setPreferredSize(new java.awt.Dimension(41, 14)); + javax.swing.GroupLayout casePanelLayout = new javax.swing.GroupLayout(casePanel); + casePanel.setLayout(casePanelLayout); + casePanelLayout.setHorizontalGroup( + casePanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGroup(casePanelLayout.createSequentialGroup() + .addContainerGap() + .addGroup(casePanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false) + .addComponent(caseNumberLabel, javax.swing.GroupLayout.DEFAULT_SIZE, 60, Short.MAX_VALUE) + .addComponent(caseDisplayNameLabel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) + .addComponent(lbNotesLabel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) + .addGroup(casePanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addComponent(caseNotesScrollPane) + .addComponent(caseNumberTextField, javax.swing.GroupLayout.DEFAULT_SIZE, 425, Short.MAX_VALUE) + .addComponent(caseDisplayNameTextField)) + .addContainerGap()) + ); + casePanelLayout.setVerticalGroup( + casePanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGroup(casePanelLayout.createSequentialGroup() + .addContainerGap() + .addGroup(casePanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) + .addComponent(caseDisplayNameLabel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) + .addComponent(caseDisplayNameTextField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) + .addGroup(casePanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) + .addComponent(caseNumberLabel) + .addComponent(caseNumberTextField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) + .addGroup(casePanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addComponent(lbNotesLabel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) + .addComponent(caseNotesScrollPane, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) + .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) + ); + + examinerPanel.setBorder(javax.swing.BorderFactory.createTitledBorder(org.openide.util.NbBundle.getMessage(OptionalCasePropertiesPanel.class, "OptionalCasePropertiesPanel.examinerPanel.border.title"))); // NOI18N + + org.openide.awt.Mnemonics.setLocalizedText(lbExaminerPhoneLabel, org.openide.util.NbBundle.getMessage(OptionalCasePropertiesPanel.class, "OptionalCasePropertiesPanel.lbExaminerPhoneLabel.text")); // NOI18N + lbExaminerPhoneLabel.setMaximumSize(new java.awt.Dimension(41, 14)); + lbExaminerPhoneLabel.setMinimumSize(new java.awt.Dimension(41, 14)); + lbExaminerPhoneLabel.setPreferredSize(new java.awt.Dimension(41, 14)); + examinerTextField.setFont(examinerTextField.getFont().deriveFont(examinerTextField.getFont().getStyle() & ~java.awt.Font.BOLD, 11)); + org.openide.awt.Mnemonics.setLocalizedText(lbExaminerEmailLabel, org.openide.util.NbBundle.getMessage(OptionalCasePropertiesPanel.class, "OptionalCasePropertiesPanel.lbExaminerEmailLabel.text")); // NOI18N + lbExaminerEmailLabel.setMaximumSize(new java.awt.Dimension(41, 14)); + lbExaminerEmailLabel.setMinimumSize(new java.awt.Dimension(41, 14)); + lbExaminerEmailLabel.setPreferredSize(new java.awt.Dimension(41, 14)); + examinerLabel.setFont(examinerLabel.getFont().deriveFont(examinerLabel.getFont().getStyle() & ~java.awt.Font.BOLD, 11)); org.openide.awt.Mnemonics.setLocalizedText(examinerLabel, org.openide.util.NbBundle.getMessage(OptionalCasePropertiesPanel.class, "OptionalCasePropertiesPanel.examinerLabel.text")); // NOI18N examinerLabel.setMaximumSize(new java.awt.Dimension(41, 14)); examinerLabel.setMinimumSize(new java.awt.Dimension(41, 14)); examinerLabel.setPreferredSize(new java.awt.Dimension(41, 14)); - org.openide.awt.Mnemonics.setLocalizedText(lbExaminerPhoneLabel, org.openide.util.NbBundle.getMessage(OptionalCasePropertiesPanel.class, "OptionalCasePropertiesPanel.lbExaminerPhoneLabel.text")); // NOI18N - lbExaminerPhoneLabel.setMaximumSize(new java.awt.Dimension(41, 14)); - lbExaminerPhoneLabel.setMinimumSize(new java.awt.Dimension(41, 14)); - lbExaminerPhoneLabel.setPreferredSize(new java.awt.Dimension(41, 14)); + javax.swing.GroupLayout examinerPanelLayout = new javax.swing.GroupLayout(examinerPanel); + examinerPanel.setLayout(examinerPanelLayout); + examinerPanelLayout.setHorizontalGroup( + examinerPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGroup(examinerPanelLayout.createSequentialGroup() + .addContainerGap() + .addGroup(examinerPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGroup(examinerPanelLayout.createSequentialGroup() + .addComponent(lbExaminerPhoneLabel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) + .addComponent(tfExaminerPhoneText, javax.swing.GroupLayout.DEFAULT_SIZE, 424, Short.MAX_VALUE)) + .addGroup(examinerPanelLayout.createSequentialGroup() + .addGroup(examinerPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addComponent(lbExaminerEmailLabel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) + .addComponent(examinerLabel, javax.swing.GroupLayout.PREFERRED_SIZE, 60, javax.swing.GroupLayout.PREFERRED_SIZE)) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) + .addGroup(examinerPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addComponent(examinerTextField) + .addComponent(tfExaminerEmailText)))) + .addGap(11, 11, 11)) + ); - org.openide.awt.Mnemonics.setLocalizedText(lbExaminerEmailLabel, org.openide.util.NbBundle.getMessage(OptionalCasePropertiesPanel.class, "OptionalCasePropertiesPanel.lbExaminerEmailLabel.text")); // NOI18N - lbExaminerEmailLabel.setMaximumSize(new java.awt.Dimension(41, 14)); - lbExaminerEmailLabel.setMinimumSize(new java.awt.Dimension(41, 14)); - lbExaminerEmailLabel.setPreferredSize(new java.awt.Dimension(41, 14)); + examinerPanelLayout.linkSize(javax.swing.SwingConstants.HORIZONTAL, new java.awt.Component[] {examinerLabel, lbExaminerEmailLabel, lbExaminerPhoneLabel}); - org.openide.awt.Mnemonics.setLocalizedText(lbOrganizationNameLabel, org.openide.util.NbBundle.getMessage(OptionalCasePropertiesPanel.class, "OptionalCasePropertiesPanel.lbOrganizationNameLabel.text")); // NOI18N + examinerPanelLayout.setVerticalGroup( + examinerPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGroup(examinerPanelLayout.createSequentialGroup() + .addContainerGap() + .addGroup(examinerPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) + .addComponent(examinerLabel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) + .addComponent(examinerTextField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) + .addGroup(examinerPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) + .addComponent(tfExaminerPhoneText, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) + .addComponent(lbExaminerPhoneLabel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) + .addGroup(examinerPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) + .addComponent(tfExaminerEmailText, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) + .addComponent(lbExaminerEmailLabel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) + .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) + ); + + orgainizationPanel.setBorder(javax.swing.BorderFactory.createTitledBorder(org.openide.util.NbBundle.getMessage(OptionalCasePropertiesPanel.class, "OptionalCasePropertiesPanel.orgainizationPanel.border.title"))); // NOI18N + + org.openide.awt.Mnemonics.setLocalizedText(lbPointOfContactPhoneLabel, org.openide.util.NbBundle.getMessage(OptionalCasePropertiesPanel.class, "OptionalCasePropertiesPanel.lbPointOfContactPhoneLabel.text")); // NOI18N + lbPointOfContactPhoneLabel.setMaximumSize(new java.awt.Dimension(82, 14)); + lbPointOfContactPhoneLabel.setMinimumSize(new java.awt.Dimension(82, 14)); + lbPointOfContactPhoneLabel.setPreferredSize(new java.awt.Dimension(82, 14)); comboBoxOrgName.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { @@ -282,16 +383,6 @@ final class OptionalCasePropertiesPanel extends javax.swing.JPanel { org.openide.awt.Mnemonics.setLocalizedText(lbPointOfContactNameLabel, org.openide.util.NbBundle.getMessage(OptionalCasePropertiesPanel.class, "OptionalCasePropertiesPanel.lbPointOfContactNameLabel.text")); // NOI18N - org.openide.awt.Mnemonics.setLocalizedText(lbPointOfContactPhoneLabel, org.openide.util.NbBundle.getMessage(OptionalCasePropertiesPanel.class, "OptionalCasePropertiesPanel.lbPointOfContactPhoneLabel.text")); // NOI18N - lbPointOfContactPhoneLabel.setMaximumSize(new java.awt.Dimension(82, 14)); - lbPointOfContactPhoneLabel.setMinimumSize(new java.awt.Dimension(82, 14)); - lbPointOfContactPhoneLabel.setPreferredSize(new java.awt.Dimension(82, 14)); - - org.openide.awt.Mnemonics.setLocalizedText(lbPointOfContactEmailLabel, org.openide.util.NbBundle.getMessage(OptionalCasePropertiesPanel.class, "OptionalCasePropertiesPanel.lbPointOfContactEmailLabel.text")); // NOI18N - lbPointOfContactEmailLabel.setMaximumSize(new java.awt.Dimension(82, 14)); - lbPointOfContactEmailLabel.setMinimumSize(new java.awt.Dimension(82, 14)); - lbPointOfContactEmailLabel.setPreferredSize(new java.awt.Dimension(82, 14)); - org.openide.awt.Mnemonics.setLocalizedText(bnNewOrganization, org.openide.util.NbBundle.getMessage(OptionalCasePropertiesPanel.class, "OptionalCasePropertiesPanel.bnNewOrganization.text")); // NOI18N bnNewOrganization.setMargin(new java.awt.Insets(2, 6, 2, 6)); bnNewOrganization.addActionListener(new java.awt.event.ActionListener() { @@ -300,99 +391,88 @@ final class OptionalCasePropertiesPanel extends javax.swing.JPanel { } }); + org.openide.awt.Mnemonics.setLocalizedText(lbOrganizationNameLabel, org.openide.util.NbBundle.getMessage(OptionalCasePropertiesPanel.class, "OptionalCasePropertiesPanel.lbOrganizationNameLabel.text")); // NOI18N + + org.openide.awt.Mnemonics.setLocalizedText(lbPointOfContactEmailLabel, org.openide.util.NbBundle.getMessage(OptionalCasePropertiesPanel.class, "OptionalCasePropertiesPanel.lbPointOfContactEmailLabel.text")); // NOI18N + lbPointOfContactEmailLabel.setMaximumSize(new java.awt.Dimension(82, 14)); + lbPointOfContactEmailLabel.setMinimumSize(new java.awt.Dimension(82, 14)); + lbPointOfContactEmailLabel.setPreferredSize(new java.awt.Dimension(82, 14)); + + javax.swing.GroupLayout orgainizationPanelLayout = new javax.swing.GroupLayout(orgainizationPanel); + orgainizationPanel.setLayout(orgainizationPanelLayout); + orgainizationPanelLayout.setHorizontalGroup( + orgainizationPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGroup(orgainizationPanelLayout.createSequentialGroup() + .addContainerGap() + .addGroup(orgainizationPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGroup(orgainizationPanelLayout.createSequentialGroup() + .addComponent(lbOrganizationNameLabel, javax.swing.GroupLayout.DEFAULT_SIZE, 206, Short.MAX_VALUE) + .addGap(18, 18, 18) + .addComponent(comboBoxOrgName, javax.swing.GroupLayout.PREFERRED_SIZE, 108, javax.swing.GroupLayout.PREFERRED_SIZE) + .addGap(157, 157, 157)) + .addGroup(orgainizationPanelLayout.createSequentialGroup() + .addGroup(orgainizationPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addComponent(lbPointOfContactPhoneLabel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) + .addComponent(lbPointOfContactEmailLabel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) + .addComponent(lbPointOfContactNameLabel, javax.swing.GroupLayout.PREFERRED_SIZE, 109, javax.swing.GroupLayout.PREFERRED_SIZE)) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) + .addGroup(orgainizationPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addComponent(lbPointOfContactPhoneText, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) + .addComponent(lbPointOfContactNameText, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) + .addComponent(lbPointOfContactEmailText, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))) + .addGroup(orgainizationPanelLayout.createSequentialGroup() + .addComponent(bnNewOrganization, javax.swing.GroupLayout.PREFERRED_SIZE, 147, javax.swing.GroupLayout.PREFERRED_SIZE) + .addGap(0, 0, Short.MAX_VALUE))) + .addContainerGap()) + ); + + orgainizationPanelLayout.linkSize(javax.swing.SwingConstants.HORIZONTAL, new java.awt.Component[] {lbPointOfContactEmailLabel, lbPointOfContactNameLabel, lbPointOfContactPhoneLabel}); + + orgainizationPanelLayout.setVerticalGroup( + orgainizationPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGroup(orgainizationPanelLayout.createSequentialGroup() + .addContainerGap() + .addGroup(orgainizationPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) + .addComponent(lbOrganizationNameLabel) + .addComponent(comboBoxOrgName, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) + .addGap(18, 18, 18) + .addGroup(orgainizationPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false) + .addComponent(lbPointOfContactNameText, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) + .addComponent(lbPointOfContactNameLabel)) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) + .addGroup(orgainizationPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false) + .addComponent(lbPointOfContactPhoneLabel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) + .addComponent(lbPointOfContactPhoneText, javax.swing.GroupLayout.PREFERRED_SIZE, 14, javax.swing.GroupLayout.PREFERRED_SIZE)) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) + .addGroup(orgainizationPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false) + .addComponent(lbPointOfContactEmailLabel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) + .addComponent(lbPointOfContactEmailText, javax.swing.GroupLayout.PREFERRED_SIZE, 14, javax.swing.GroupLayout.PREFERRED_SIZE)) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) + .addComponent(bnNewOrganization) + .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) + ); + javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this); this.setLayout(layout); layout.setHorizontalGroup( layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) - .addGroup(layout.createSequentialGroup() - .addContainerGap() - .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) - .addGroup(layout.createSequentialGroup() - .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) - .addGroup(layout.createSequentialGroup() - .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false) - .addComponent(caseNumberLabel, javax.swing.GroupLayout.DEFAULT_SIZE, 109, Short.MAX_VALUE) - .addComponent(lbNotesLabel, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) - .addComponent(examinerLabel, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) - .addComponent(lbExaminerPhoneLabel, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) - .addComponent(lbExaminerEmailLabel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) - .addComponent(caseDisplayNameLabel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) - .addGap(6, 6, 6) - .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) - .addComponent(caseNotesScrollPane, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, 398, Short.MAX_VALUE) - .addComponent(examinerTextField, javax.swing.GroupLayout.Alignment.TRAILING) - .addComponent(tfExaminerPhoneText, javax.swing.GroupLayout.Alignment.TRAILING) - .addComponent(tfExaminerEmailText) - .addComponent(caseDisplayNameTextField) - .addComponent(caseNumberTextField))) - .addGroup(layout.createSequentialGroup() - .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false) - .addComponent(lbPointOfContactNameLabel, javax.swing.GroupLayout.DEFAULT_SIZE, 185, Short.MAX_VALUE) - .addComponent(lbOrganizationNameLabel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) - .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) - .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) - .addComponent(comboBoxOrgName, 0, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) - .addComponent(lbPointOfContactNameText, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)))) - .addContainerGap()) - .addGroup(layout.createSequentialGroup() - .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false) - .addComponent(lbPointOfContactEmailLabel, javax.swing.GroupLayout.DEFAULT_SIZE, 185, Short.MAX_VALUE) - .addComponent(lbPointOfContactPhoneLabel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) - .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) - .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) - .addComponent(lbPointOfContactPhoneText, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) - .addComponent(lbPointOfContactEmailText, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) - .addGap(10, 10, 10)) - .addGroup(layout.createSequentialGroup() - .addComponent(bnNewOrganization, javax.swing.GroupLayout.PREFERRED_SIZE, 147, javax.swing.GroupLayout.PREFERRED_SIZE) - .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)))) + .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup() + .addGap(6, 6, 6) + .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING) + .addComponent(casePanel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) + .addComponent(examinerPanel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) + .addComponent(orgainizationPanel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) + .addGap(6, 6, 6)) ); layout.setVerticalGroup( layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createSequentialGroup() .addContainerGap() - .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false) - .addComponent(caseDisplayNameTextField) - .addComponent(caseDisplayNameLabel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) + .addComponent(casePanel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) - .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) - .addComponent(caseNumberLabel, javax.swing.GroupLayout.PREFERRED_SIZE, 20, javax.swing.GroupLayout.PREFERRED_SIZE) - .addComponent(caseNumberTextField)) - .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) - .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) - .addComponent(caseNotesScrollPane, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) - .addComponent(lbNotesLabel, javax.swing.GroupLayout.PREFERRED_SIZE, 20, javax.swing.GroupLayout.PREFERRED_SIZE)) - .addGap(18, 18, 18) - .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false) - .addComponent(examinerLabel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) - .addComponent(examinerTextField)) + .addComponent(examinerPanel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) - .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false) - .addComponent(lbExaminerPhoneLabel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) - .addComponent(tfExaminerPhoneText)) - .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) - .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false) - .addComponent(tfExaminerEmailText) - .addComponent(lbExaminerEmailLabel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) - .addGap(18, 18, 18) - .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) - .addComponent(lbOrganizationNameLabel, javax.swing.GroupLayout.PREFERRED_SIZE, 20, javax.swing.GroupLayout.PREFERRED_SIZE) - .addComponent(comboBoxOrgName, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) - .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) - .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) - .addComponent(lbPointOfContactNameText, javax.swing.GroupLayout.PREFERRED_SIZE, 20, javax.swing.GroupLayout.PREFERRED_SIZE) - .addComponent(lbPointOfContactNameLabel, javax.swing.GroupLayout.PREFERRED_SIZE, 20, javax.swing.GroupLayout.PREFERRED_SIZE)) - .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) - .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false) - .addComponent(lbPointOfContactPhoneText, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) - .addComponent(lbPointOfContactPhoneLabel, javax.swing.GroupLayout.DEFAULT_SIZE, 20, Short.MAX_VALUE)) - .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) - .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) - .addComponent(lbPointOfContactEmailLabel, javax.swing.GroupLayout.PREFERRED_SIZE, 20, javax.swing.GroupLayout.PREFERRED_SIZE) - .addComponent(lbPointOfContactEmailText, javax.swing.GroupLayout.PREFERRED_SIZE, 20, javax.swing.GroupLayout.PREFERRED_SIZE)) - .addGap(18, 18, 18) - .addComponent(bnNewOrganization) - .addContainerGap()) + .addComponent(orgainizationPanel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) ); }// //GEN-END:initComponents @@ -506,8 +586,10 @@ final class OptionalCasePropertiesPanel extends javax.swing.JPanel { private javax.swing.JScrollPane caseNotesScrollPane; private javax.swing.JLabel caseNumberLabel; private javax.swing.JTextField caseNumberTextField; + private javax.swing.JPanel casePanel; private javax.swing.JComboBox comboBoxOrgName; private javax.swing.JLabel examinerLabel; + private javax.swing.JPanel examinerPanel; private javax.swing.JTextField examinerTextField; private javax.swing.JLabel lbExaminerEmailLabel; private javax.swing.JLabel lbExaminerPhoneLabel; @@ -519,8 +601,9 @@ final class OptionalCasePropertiesPanel extends javax.swing.JPanel { private javax.swing.JLabel lbPointOfContactNameText; private javax.swing.JLabel lbPointOfContactPhoneLabel; private javax.swing.JLabel lbPointOfContactPhoneText; + private javax.swing.JPanel orgainizationPanel; private javax.swing.JTextArea taNotesText; private javax.swing.JTextField tfExaminerEmailText; private javax.swing.JTextField tfExaminerPhoneText; // End of variables declaration//GEN-END:variables -} +} \ No newline at end of file diff --git a/Core/src/org/sleuthkit/autopsy/report/ReportHTML.java b/Core/src/org/sleuthkit/autopsy/report/ReportHTML.java index 00d8ec6982..b54af094ad 100644 --- a/Core/src/org/sleuthkit/autopsy/report/ReportHTML.java +++ b/Core/src/org/sleuthkit/autopsy/report/ReportHTML.java @@ -1236,25 +1236,7 @@ class ReportHTML implements TableReportModule { "ReportHTML.writeSum.caseNumber=Case Number:", "ReportHTML.writeSum.caseNumImages=Number of Images:", "ReportHTML.writeSum.caseNotes=Notes:", - - "ReportHTML.writeSum.examiner=Examiner:", - "ReportHTML.writeSum.examinerPhone=Phone:", - "ReportHTML.writeSum.examinerEmail=Email:", - - "ReportHTML.writeSum.org=Organization:", - "ReportHTML.writeSum.orgPoc=Point of Contact:", - "ReportHTML.writeSum.orgPhone=Phone:", - "ReportHTML.writeSum.orgEmail=Email:", - - "ReportHTML.writeSum.noCaseNumber=No case number", - "ReportHTML.writeSum.noCaseNotes=No notes", - "ReportHTML.writeSum.noExaminer=No examiner", - "ReportHTML.writeSum.noExaminerPhone=No phone", - "ReportHTML.writeSum.noExaminerEmail=No email", - "ReportHTML.writeSum.noOrg=No organization", - "ReportHTML.writeSum.noOrgPoc=No point of contact", - "ReportHTML.writeSum.noOrgPhone=No phone", - "ReportHTML.writeSum.noOrgEmail=No email", + "ReportHTML.writeSum.examiner=Examiner:" }) /** * Write the case details section of the summary for this report. @@ -1279,34 +1261,6 @@ class ReportHTML implements TableReportModule { // Examiner String examinerName = currentCase.getExaminer(); - String examinerPhone = currentCase.getExaminerPhone(); - String examinerEmail = currentCase.getExaminerEmail(); - - // Organization - String orgName = ""; - String orgPoc = ""; - String orgPhone = ""; - String orgEmail = ""; - if (EamDb.isEnabled()) { - try { - EamDb dbManager = EamDb.getInstance(); - if (dbManager != null) { - CorrelationCase correlationCase = dbManager.getCase(currentCase); - if (null == correlationCase) { - correlationCase = dbManager.newCase(currentCase); - } - EamOrganization organization = correlationCase.getOrg(); - if (organization != null) { - orgName = organization.getName(); - orgPoc = organization.getPocName(); - orgPhone = organization.getPocPhone(); - orgEmail = organization.getPocEmail(); - } - } - } catch (EamDbException ex) { - logger.log(Level.SEVERE, "Unable to access Correlation Case when Central Repo is enabled", ex); - } - } // Start the layout. summary.append("
\n"); //NON-NLS @@ -1323,44 +1277,26 @@ class ReportHTML implements TableReportModule { // Case details summary.append("").append(Bundle.ReportHTML_writeSum_case()).append("") //NON-NLS - .append(formatHtmlString(caseName)) - .append("\n"); //NON-NLS - summary.append("").append(Bundle.ReportHTML_writeSum_caseNumber()).append("") //NON-NLS - .append(!caseNumber.isEmpty() ? formatHtmlString(caseNumber) : Bundle.ReportHTML_writeSum_noCaseNumber()) - .append("\n"); //NON-NLS + .append(formatHtmlString(caseName)).append("\n"); //NON-NLS + + if (!caseNumber.isEmpty()) { + summary.append("").append(Bundle.ReportHTML_writeSum_caseNumber()).append("") //NON-NLS + .append(formatHtmlString(caseNumber)).append("\n"); //NON-NLS + } + summary.append("").append(Bundle.ReportHTML_writeSum_caseNumImages()).append("") //NON-NLS - .append(imagecount) - .append("\n"); //NON-NLS - summary.append("").append(Bundle.ReportHTML_writeSum_caseNotes()).append("") //NON-NLS - .append(!caseNotes.isEmpty() ? formatHtmlString(caseNotes) : Bundle.ReportHTML_writeSum_noCaseNotes()) - .append("\n"); //NON-NLS - summary.append("\n"); //NON-NLS + .append(imagecount).append("\n"); //NON-NLS + + if (!caseNotes.isEmpty()) { + summary.append("").append(Bundle.ReportHTML_writeSum_caseNotes()).append("") //NON-NLS + .append(formatHtmlString(caseNotes)).append("\n"); //NON-NLS + } // Examiner details - summary.append("").append(Bundle.ReportHTML_writeSum_examiner()).append("") //NON-NLS - .append(!examinerName.isEmpty() ? formatHtmlString(examinerName) : Bundle.ReportHTML_writeSum_noExaminer()) - .append("\n"); //NON-NLS - summary.append("").append(Bundle.ReportHTML_writeSum_examinerPhone()).append("") //NON-NLS - .append(!examinerPhone.isEmpty() ? formatHtmlString(examinerPhone) : Bundle.ReportHTML_writeSum_noExaminerPhone()) - .append("\n"); //NON-NLS - summary.append("").append(Bundle.ReportHTML_writeSum_examinerEmail()).append("") //NON-NLS - .append(!examinerEmail.isEmpty() ? formatHtmlString(examinerEmail) : Bundle.ReportHTML_writeSum_noExaminerEmail()) - .append("\n"); //NON-NLS - summary.append("\n"); //NON-NLS - - // Organization details - summary.append("").append(Bundle.ReportHTML_writeSum_org()).append("") //NON-NLS - .append(!orgName.isEmpty() ? formatHtmlString(orgName) : Bundle.ReportHTML_writeSum_noOrg()) - .append("\n"); //NON-NLS - summary.append("").append(Bundle.ReportHTML_writeSum_orgPoc()).append("") //NON-NLS - .append(!orgPoc.isEmpty() ? formatHtmlString(orgPoc) : Bundle.ReportHTML_writeSum_noOrgPoc()) - .append("\n"); //NON-NLS - summary.append("").append(Bundle.ReportHTML_writeSum_orgPhone()).append("") //NON-NLS - .append(!orgPhone.isEmpty() ? formatHtmlString(orgPhone) : Bundle.ReportHTML_writeSum_noOrgPhone()) - .append("\n"); //NON-NLS - summary.append("").append(Bundle.ReportHTML_writeSum_orgEmail()).append("") //NON-NLS - .append(!orgEmail.isEmpty() ? formatHtmlString(orgEmail) : Bundle.ReportHTML_writeSum_noOrgEmail()) - .append("\n"); //NON-NLS + if (!examinerName.isEmpty()) { + summary.append("").append(Bundle.ReportHTML_writeSum_examiner()).append("") //NON-NLS + .append(formatHtmlString(examinerName)).append("\n"); //NON-NLS + } // End the layout. summary.append("\n"); //NON-NLS From 8398c7a29c0dba17981f07a5180e1d250888c723 Mon Sep 17 00:00:00 2001 From: "U-BASIS\\dgrove" Date: Fri, 28 Dec 2018 16:51:38 -0500 Subject: [PATCH 09/13] Reverted UI changes. --- .../autopsy/casemodule/Bundle.properties | 29 +-- .../casemodule/CasePropertiesPanel.form | 218 +++++++++--------- .../casemodule/CasePropertiesPanel.java | 102 ++++---- .../OptionalCasePropertiesPanel.form | 204 +++++++++------- .../OptionalCasePropertiesPanel.java | 187 ++++++++------- 5 files changed, 386 insertions(+), 354 deletions(-) diff --git a/Core/src/org/sleuthkit/autopsy/casemodule/Bundle.properties b/Core/src/org/sleuthkit/autopsy/casemodule/Bundle.properties index bec1300db8..32e02fdbca 100644 --- a/Core/src/org/sleuthkit/autopsy/casemodule/Bundle.properties +++ b/Core/src/org/sleuthkit/autopsy/casemodule/Bundle.properties @@ -240,31 +240,4 @@ ImageFilePanel.sha1HashTextField.text= ImageFilePanel.md5HashTextField.text= ImageFilePanel.errorLabel.text=Error Label ImageFilePanel.hashValuesNoteLabel.text=NOTE: These values will not be validated when the data source is added. -ImageFilePanel.hashValuesLabel.text=Hash Values (optional): -CasePropertiesPanel.lbCaseUUIDLabel.text=Case UUID: -CasePropertiesPanel.lbNotesLabel.text=Notes: -CasePropertiesPanel.examinerPanel.AccessibleContext.accessibleName=Examiner -CasePropertiesPanel.examinerPanel.border.title=Examiner -CasePropertiesPanel.pnOrganization.border.title=Organization -CasePropertiesPanel.casePanel.border.title=Case -CasePropertiesPanel.examinerLabel.text=Name: -CasePropertiesPanel.lbExaminerPhoneLabel.text=Phone: -CasePropertiesPanel.lbExaminerEmailLabel.text=Email: -CasePropertiesPanel.lbOrganizationNameLabel.text=Name: -CasePropertiesPanel.lbPointOfContactNameLabel.text=Point of Contact: -CasePropertiesPanel.lbPointOfContactPhoneLabel.text=Phone: -CasePropertiesPanel.lbPointOfContactEmailLabel.text=Email: -OptionalCasePropertiesPanel.casePanel.border.title=Case -OptionalCasePropertiesPanel.caseDisplayNameLabel.text=Name: -OptionalCasePropertiesPanel.caseNumberLabel.text=Number: -OptionalCasePropertiesPanel.examinerPanel.border.title=Examiner -OptionalCasePropertiesPanel.examinerLabel.text=Name: -OptionalCasePropertiesPanel.lbExaminerPhoneLabel.text=Phone: -OptionalCasePropertiesPanel.lbExaminerEmailLabel.text=Email: -OptionalCasePropertiesPanel.lbNotesLabel.text=Notes: -OptionalCasePropertiesPanel.orgainizationPanel.border.title=Organization -OptionalCasePropertiesPanel.lbOrganizationNameLabel.text=Organization analysis is being done for: -OptionalCasePropertiesPanel.lbPointOfContactNameLabel.text=Point of Contact: -OptionalCasePropertiesPanel.lbPointOfContactPhoneLabel.text=Phone: -OptionalCasePropertiesPanel.lbPointOfContactEmailLabel.text=Email: -OptionalCasePropertiesPanel.bnNewOrganization.text=Manage Organizations \ No newline at end of file +ImageFilePanel.hashValuesLabel.text=Hash Values (optional): \ No newline at end of file diff --git a/Core/src/org/sleuthkit/autopsy/casemodule/CasePropertiesPanel.form b/Core/src/org/sleuthkit/autopsy/casemodule/CasePropertiesPanel.form index 6fb7c3e0b4..436ec68cda 100644 --- a/Core/src/org/sleuthkit/autopsy/casemodule/CasePropertiesPanel.form +++ b/Core/src/org/sleuthkit/autopsy/casemodule/CasePropertiesPanel.form @@ -45,6 +45,7 @@ + @@ -70,11 +71,11 @@ - + - + - + @@ -84,7 +85,7 @@ - + @@ -128,11 +129,6 @@ - - - - - @@ -141,7 +137,7 @@ - + @@ -176,11 +172,7 @@ - - - - - + @@ -358,6 +350,84 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -375,6 +445,27 @@ + + + + + + + + + + + + + + + + + + + + + @@ -409,99 +500,6 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -544,7 +542,7 @@ - + @@ -678,4 +676,4 @@ - + \ No newline at end of file diff --git a/Core/src/org/sleuthkit/autopsy/casemodule/CasePropertiesPanel.java b/Core/src/org/sleuthkit/autopsy/casemodule/CasePropertiesPanel.java index f9c5c53a7d..3b7951ff80 100644 --- a/Core/src/org/sleuthkit/autopsy/casemodule/CasePropertiesPanel.java +++ b/Core/src/org/sleuthkit/autopsy/casemodule/CasePropertiesPanel.java @@ -20,6 +20,7 @@ package org.sleuthkit.autopsy.casemodule; import java.nio.file.Paths; import java.util.logging.Level; +import org.openide.util.NbBundle.Messages; import org.sleuthkit.autopsy.centralrepository.datamodel.CorrelationCase; import org.sleuthkit.autopsy.centralrepository.datamodel.EamDb; import org.sleuthkit.autopsy.centralrepository.datamodel.EamDbException; @@ -111,6 +112,19 @@ final class CasePropertiesPanel extends javax.swing.JPanel { repaint(); } + @Messages({"CasePropertiesPanel.casePanel.border.title=Case", + "CasePropertiesPanel.lbCaseUUIDLabel.text=Case UUID:", + "CasePropertiesPanel.examinerPanel.border.title=Examiner", + "CasePropertiesPanel.examinerLabel.text=Name:", + "CasePropertiesPanel.lbExaminerPhoneLabel.text=Phone:", + "CasePropertiesPanel.lbExaminerEmailLabel.text=Email:", + "CasePropertiesPanel.lbNotesLabel.text=Notes:", + "CasePropertiesPanel.pnOrganization.border.title=Organization", + "CasePropertiesPanel.lbOrganizationNameLabel.text=Name:", + "CasePropertiesPanel.lbPointOfContactNameLabel.text=Point of Contact:", + "CasePropertiesPanel.lbPointOfContactPhoneLabel.text=Phone:", + "CasePropertiesPanel.lbPointOfContactEmailLabel.text=Email:"}) + /** * In this generated code below, there are 2 strings "Path" and "Remove" * that are table column headers in the DefaultTableModel. When this model @@ -147,12 +161,12 @@ final class CasePropertiesPanel extends javax.swing.JPanel { lbCaseUIDText = new javax.swing.JLabel(); lbCaseNameText = new javax.swing.JLabel(); lbCaseNumberText = new javax.swing.JLabel(); - lbNotesLabel = new javax.swing.JLabel(); - caseNotesScrollPane = new javax.swing.JScrollPane(); - taNotesText = new javax.swing.JTextArea(); examinerPanel = new javax.swing.JPanel(); lbExaminerNameText = new javax.swing.JLabel(); + lbNotesLabel = new javax.swing.JLabel(); examinerLabel = new javax.swing.JLabel(); + caseNotesScrollPane = new javax.swing.JScrollPane(); + taNotesText = new javax.swing.JTextArea(); lbExaminerEmailLabel = new javax.swing.JLabel(); lbExaminerPhoneLabel = new javax.swing.JLabel(); lbExaminerPhoneText = new javax.swing.JLabel(); @@ -221,26 +235,6 @@ final class CasePropertiesPanel extends javax.swing.JPanel { lbCaseNumberText.setMinimumSize(new java.awt.Dimension(25, 14)); - lbNotesLabel.setText(org.openide.util.NbBundle.getMessage(CasePropertiesPanel.class, "CasePropertiesPanel.lbNotesLabel.text")); // NOI18N - lbNotesLabel.setMaximumSize(new java.awt.Dimension(82, 14)); - lbNotesLabel.setMinimumSize(new java.awt.Dimension(82, 14)); - lbNotesLabel.setPreferredSize(new java.awt.Dimension(82, 14)); - lbNotesLabel.setRequestFocusEnabled(false); - - caseNotesScrollPane.setBorder(null); - - taNotesText.setEditable(false); - taNotesText.setBackground(new java.awt.Color(240, 240, 240)); - taNotesText.setColumns(20); - taNotesText.setFont(new java.awt.Font("Tahoma", 0, 11)); // NOI18N - taNotesText.setLineWrap(true); - taNotesText.setRows(2); - taNotesText.setWrapStyleWord(true); - taNotesText.setBorder(null); - taNotesText.setFocusable(false); - taNotesText.setOpaque(false); - caseNotesScrollPane.setViewportView(taNotesText); - javax.swing.GroupLayout casePanelLayout = new javax.swing.GroupLayout(casePanel); casePanel.setLayout(casePanelLayout); casePanelLayout.setHorizontalGroup( @@ -270,11 +264,7 @@ final class CasePropertiesPanel extends javax.swing.JPanel { .addComponent(caseDirField, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent(caseTypeField, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent(dbNameField, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) - .addComponent(lbCaseUIDText, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))) - .addGroup(casePanelLayout.createSequentialGroup() - .addComponent(lbNotesLabel, javax.swing.GroupLayout.PREFERRED_SIZE, 117, javax.swing.GroupLayout.PREFERRED_SIZE) - .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) - .addComponent(caseNotesScrollPane, javax.swing.GroupLayout.DEFAULT_SIZE, 704, Short.MAX_VALUE))) + .addComponent(lbCaseUIDText, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)))) .addContainerGap()) ); @@ -283,7 +273,7 @@ final class CasePropertiesPanel extends javax.swing.JPanel { casePanelLayout.setVerticalGroup( casePanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(casePanelLayout.createSequentialGroup() - .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) + .addContainerGap() .addGroup(casePanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(caseNameLabel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(lbCaseNameText, javax.swing.GroupLayout.PREFERRED_SIZE, 14, javax.swing.GroupLayout.PREFERRED_SIZE)) @@ -311,20 +301,37 @@ final class CasePropertiesPanel extends javax.swing.JPanel { .addGroup(casePanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false) .addComponent(lbCaseUUIDLabel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent(lbCaseUIDText, javax.swing.GroupLayout.PREFERRED_SIZE, 14, javax.swing.GroupLayout.PREFERRED_SIZE)) - .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) - .addGroup(casePanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) - .addComponent(lbNotesLabel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) - .addComponent(caseNotesScrollPane, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))) + .addGap(6, 6, 6)) ); examinerPanel.setBorder(javax.swing.BorderFactory.createTitledBorder(null, org.openide.util.NbBundle.getMessage(CasePropertiesPanel.class, "CasePropertiesPanel.examinerPanel.border.title"), javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font("Tahoma", 0, 12))); // NOI18N + lbNotesLabel.setText(org.openide.util.NbBundle.getMessage(CasePropertiesPanel.class, "CasePropertiesPanel.lbNotesLabel.text")); // NOI18N + lbNotesLabel.setMaximumSize(new java.awt.Dimension(82, 14)); + lbNotesLabel.setMinimumSize(new java.awt.Dimension(82, 14)); + lbNotesLabel.setPreferredSize(new java.awt.Dimension(82, 14)); + lbNotesLabel.setRequestFocusEnabled(false); + examinerLabel.setFont(examinerLabel.getFont().deriveFont(examinerLabel.getFont().getStyle() & ~java.awt.Font.BOLD, 11)); examinerLabel.setText(org.openide.util.NbBundle.getMessage(CasePropertiesPanel.class, "CasePropertiesPanel.examinerLabel.text")); // NOI18N examinerLabel.setMaximumSize(new java.awt.Dimension(82, 14)); examinerLabel.setMinimumSize(new java.awt.Dimension(82, 14)); examinerLabel.setPreferredSize(new java.awt.Dimension(82, 14)); + caseNotesScrollPane.setBorder(null); + + taNotesText.setEditable(false); + taNotesText.setBackground(new java.awt.Color(240, 240, 240)); + taNotesText.setColumns(20); + taNotesText.setFont(new java.awt.Font("Tahoma", 0, 11)); // NOI18N + taNotesText.setLineWrap(true); + taNotesText.setRows(2); + taNotesText.setWrapStyleWord(true); + taNotesText.setBorder(null); + taNotesText.setFocusable(false); + taNotesText.setOpaque(false); + caseNotesScrollPane.setViewportView(taNotesText); + lbExaminerEmailLabel.setText(org.openide.util.NbBundle.getMessage(CasePropertiesPanel.class, "CasePropertiesPanel.lbExaminerEmailLabel.text")); // NOI18N lbExaminerEmailLabel.setMaximumSize(new java.awt.Dimension(82, 14)); lbExaminerEmailLabel.setMinimumSize(new java.awt.Dimension(82, 14)); @@ -343,9 +350,13 @@ final class CasePropertiesPanel extends javax.swing.JPanel { .addContainerGap() .addGroup(examinerPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(examinerPanelLayout.createSequentialGroup() - .addComponent(lbExaminerPhoneLabel, javax.swing.GroupLayout.PREFERRED_SIZE, 115, javax.swing.GroupLayout.PREFERRED_SIZE) + .addGroup(examinerPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addComponent(lbNotesLabel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) + .addComponent(lbExaminerPhoneLabel, javax.swing.GroupLayout.PREFERRED_SIZE, 115, javax.swing.GroupLayout.PREFERRED_SIZE)) .addGap(6, 6, 6) - .addComponent(lbExaminerPhoneText, javax.swing.GroupLayout.DEFAULT_SIZE, 704, Short.MAX_VALUE)) + .addGroup(examinerPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addComponent(lbExaminerPhoneText, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) + .addComponent(caseNotesScrollPane, javax.swing.GroupLayout.DEFAULT_SIZE, 704, Short.MAX_VALUE))) .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, examinerPanelLayout.createSequentialGroup() .addGroup(examinerPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false) .addComponent(lbExaminerEmailLabel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) @@ -357,7 +368,7 @@ final class CasePropertiesPanel extends javax.swing.JPanel { .addContainerGap()) ); - examinerPanelLayout.linkSize(javax.swing.SwingConstants.HORIZONTAL, new java.awt.Component[] {examinerLabel, lbExaminerEmailLabel, lbExaminerPhoneLabel}); + examinerPanelLayout.linkSize(javax.swing.SwingConstants.HORIZONTAL, new java.awt.Component[] {examinerLabel, lbExaminerEmailLabel, lbExaminerPhoneLabel, lbNotesLabel}); examinerPanelLayout.setVerticalGroup( examinerPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) @@ -374,7 +385,11 @@ final class CasePropertiesPanel extends javax.swing.JPanel { .addGroup(examinerPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false) .addComponent(lbExaminerEmailLabel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent(lbExaminerEmailText, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) - .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) + .addGroup(examinerPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addComponent(lbNotesLabel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) + .addComponent(caseNotesScrollPane, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) + .addGap(6, 6, 6)) ); pnOrganization.setBorder(javax.swing.BorderFactory.createTitledBorder(null, org.openide.util.NbBundle.getMessage(CasePropertiesPanel.class, "CasePropertiesPanel.pnOrganization.border.title"), javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font("Tahoma", 0, 12))); // NOI18N @@ -460,15 +475,13 @@ final class CasePropertiesPanel extends javax.swing.JPanel { detailsPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, detailsPanelLayout.createSequentialGroup() .addComponent(casePanel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) - .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) + .addGap(0, 0, 0) .addComponent(examinerPanel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) - .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) + .addGap(0, 0, 0) .addComponent(pnOrganization, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) - .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) + .addContainerGap()) ); - examinerPanel.getAccessibleContext().setAccessibleName(org.openide.util.NbBundle.getMessage(CasePropertiesPanel.class, "CasePropertiesPanel.examinerPanel.AccessibleContext.accessibleName")); // NOI18N - javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this); this.setLayout(layout); layout.setHorizontalGroup( @@ -482,7 +495,8 @@ final class CasePropertiesPanel extends javax.swing.JPanel { layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup() .addGap(0, 0, 0) - .addComponent(detailsPanel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) + .addComponent(detailsPanel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) + .addGap(0, 0, 0)) ); }// //GEN-END:initComponents @@ -526,4 +540,4 @@ final class CasePropertiesPanel extends javax.swing.JPanel { private javax.swing.JTextArea taNotesText; // End of variables declaration//GEN-END:variables -} +} \ No newline at end of file diff --git a/Core/src/org/sleuthkit/autopsy/casemodule/OptionalCasePropertiesPanel.form b/Core/src/org/sleuthkit/autopsy/casemodule/OptionalCasePropertiesPanel.form index 2590534461..11f65db204 100644 --- a/Core/src/org/sleuthkit/autopsy/casemodule/OptionalCasePropertiesPanel.form +++ b/Core/src/org/sleuthkit/autopsy/casemodule/OptionalCasePropertiesPanel.form @@ -32,10 +32,11 @@ - + - - + + + @@ -45,7 +46,7 @@ - + @@ -56,16 +57,14 @@ - + - - - + @@ -85,12 +84,7 @@ - - - - - - + @@ -106,6 +100,15 @@ + + + + + + + + + @@ -148,59 +151,13 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + @@ -214,9 +171,15 @@ - + + + + - + + + + @@ -252,7 +215,12 @@ - + + + + + + @@ -276,6 +244,36 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -324,13 +322,29 @@ + + + + + + + + + + + + + + + + - + @@ -340,16 +354,10 @@ - - + - - - - - - - + + @@ -362,12 +370,16 @@ - + + + + + + - - + @@ -378,11 +390,12 @@ + - + - + @@ -394,9 +407,7 @@ - - - + @@ -436,6 +447,15 @@ + + + + + + + + + @@ -446,6 +466,15 @@ + + + + + + + + + @@ -460,6 +489,15 @@ + + + + + + + + + @@ -483,4 +521,4 @@ - + \ No newline at end of file diff --git a/Core/src/org/sleuthkit/autopsy/casemodule/OptionalCasePropertiesPanel.java b/Core/src/org/sleuthkit/autopsy/casemodule/OptionalCasePropertiesPanel.java index fe9c06a1d5..e4344bbd77 100644 --- a/Core/src/org/sleuthkit/autopsy/casemodule/OptionalCasePropertiesPanel.java +++ b/Core/src/org/sleuthkit/autopsy/casemodule/OptionalCasePropertiesPanel.java @@ -1,7 +1,7 @@ /* * Autopsy Forensic Browser * - * Copyright 2011-2018 Basis Technology Corp. + * Copyright 2011-2017 Basis Technology Corp. * Contact: carrier sleuthkit org * * Licensed under the Apache License, Version 2.0 (the "License"); @@ -36,10 +36,9 @@ import org.sleuthkit.autopsy.coreutils.MessageNotifyUtil; * Panel which allows for editing and setting of the case details which are * optional or otherwise able to be edited. */ -@SuppressWarnings("PMD.SingularField") // UI widgets cause lots of false positives final class OptionalCasePropertiesPanel extends javax.swing.JPanel { - private final static Logger logger = Logger.getLogger(OptionalCasePropertiesPanel.class.getName()); + private final static Logger LOGGER = Logger.getLogger(OptionalCasePropertiesPanel.class.getName()); private static final long serialVersionUID = 1L; private EamOrganization selectedOrg = null; private java.util.List orgs = null; @@ -63,19 +62,12 @@ final class OptionalCasePropertiesPanel extends javax.swing.JPanel { OptionalCasePropertiesPanel(boolean editCurrentCase) { initComponents(); if (editCurrentCase) { - Case openCase; - try { - openCase = Case.getCurrentCaseThrows(); - } catch (NoCurrentCaseException ex) { - logger.log(Level.SEVERE, "Exception while getting open case.", ex); - return; - } - caseDisplayNameTextField.setText(openCase.getDisplayName()); - caseNumberTextField.setText(openCase.getNumber()); - examinerTextField.setText(openCase.getExaminer()); - tfExaminerEmailText.setText(openCase.getExaminerEmail()); - tfExaminerPhoneText.setText(openCase.getExaminerPhone()); - taNotesText.setText(openCase.getCaseNotes()); + caseDisplayNameTextField.setText(Case.getCurrentCase().getDisplayName()); + caseNumberTextField.setText(Case.getCurrentCase().getNumber()); + examinerTextField.setText(Case.getCurrentCase().getExaminer()); + tfExaminerEmailText.setText(Case.getCurrentCase().getExaminerEmail()); + tfExaminerPhoneText.setText(Case.getCurrentCase().getExaminerPhone()); + taNotesText.setText(Case.getCurrentCase().getCaseNotes()); setUpCaseDetailsFields(); setUpOrganizationData(); } else { @@ -94,18 +86,15 @@ final class OptionalCasePropertiesPanel extends javax.swing.JPanel { private void setUpOrganizationData() { if (EamDb.isEnabled()) { - try { - Case currentCase = Case.getCurrentCaseThrows(); - if (currentCase != null) { + Case currentCase = Case.getCurrentCase(); + if (currentCase != null) { + try { EamDb dbManager = EamDb.getInstance(); selectedOrg = dbManager.getCase(currentCase).getOrg(); + } catch (EamDbException ex) { + LOGGER.log(Level.SEVERE, "Unable to get Organization associated with the case from Central Repo", ex); } - } catch (EamDbException ex) { - logger.log(Level.SEVERE, "Unable to get Organization associated with the case from Central Repo", ex); - } catch (NoCurrentCaseException ex) { - logger.log(Level.SEVERE, "Exception while getting open case.", ex); } - if (selectedOrg != null) { setCurrentlySelectedOrganization(selectedOrg.getName()); } @@ -146,7 +135,7 @@ final class OptionalCasePropertiesPanel extends javax.swing.JPanel { }); comboBoxOrgName.setSelectedItem(selectedBeforeLoad); } catch (EamDbException ex) { - logger.log(Level.WARNING, "Unable to populate list of Organizations from Central Repo", ex); + LOGGER.log(Level.WARNING, "Unable to populate list of Organizations from Central Repo", ex); } } @@ -205,6 +194,21 @@ final class OptionalCasePropertiesPanel extends javax.swing.JPanel { taNotesText.setText(caseNotes == null ? "" : caseNotes); } + @Messages({"OptionalCasePropertiesPanel.caseDisplayNameLabel.text=Name:", + "OptionalCasePropertiesPanel.lbPointOfContactEmailLabel.text=Email:", + "OptionalCasePropertiesPanel.lbOrganizationNameLabel.text=Organization analysis is being done for:", + "OptionalCasePropertiesPanel.bnNewOrganization.text=Manage Organizations", + "OptionalCasePropertiesPanel.lbPointOfContactNameLabel.text=Point of Contact:", + "OptionalCasePropertiesPanel.lbPointOfContactPhoneLabel.text=Phone:", + "OptionalCasePropertiesPanel.orgainizationPanel.border.title=Organization", + "OptionalCasePropertiesPanel.lbNotesLabel.text=Notes:", + "OptionalCasePropertiesPanel.examinerLabel.text=Name:", + "OptionalCasePropertiesPanel.lbExaminerEmailLabel.text=Email:", + "OptionalCasePropertiesPanel.lbExaminerPhoneLabel.text=Phone:", + "OptionalCasePropertiesPanel.examinerPanel.border.title=Examiner", + "OptionalCasePropertiesPanel.caseNumberLabel.text=Number:", + "OptionalCasePropertiesPanel.casePanel.border.title=Case" + }) /** * This method is called from within the constructor to initialize the form. * WARNING: Do NOT modify this code. The content of this method is always @@ -219,16 +223,16 @@ final class OptionalCasePropertiesPanel extends javax.swing.JPanel { caseNumberTextField = new javax.swing.JTextField(); caseDisplayNameLabel = new javax.swing.JLabel(); caseDisplayNameTextField = new javax.swing.JTextField(); - caseNotesScrollPane = new javax.swing.JScrollPane(); - taNotesText = new javax.swing.JTextArea(); - lbNotesLabel = new javax.swing.JLabel(); examinerPanel = new javax.swing.JPanel(); tfExaminerPhoneText = new javax.swing.JTextField(); lbExaminerPhoneLabel = new javax.swing.JLabel(); + caseNotesScrollPane = new javax.swing.JScrollPane(); + taNotesText = new javax.swing.JTextArea(); tfExaminerEmailText = new javax.swing.JTextField(); examinerTextField = new javax.swing.JTextField(); lbExaminerEmailLabel = new javax.swing.JLabel(); examinerLabel = new javax.swing.JLabel(); + lbNotesLabel = new javax.swing.JLabel(); orgainizationPanel = new javax.swing.JPanel(); lbPointOfContactPhoneLabel = new javax.swing.JLabel(); comboBoxOrgName = new javax.swing.JComboBox<>(); @@ -244,6 +248,9 @@ final class OptionalCasePropertiesPanel extends javax.swing.JPanel { caseNumberLabel.setFont(caseNumberLabel.getFont().deriveFont(caseNumberLabel.getFont().getStyle() & ~java.awt.Font.BOLD, 11)); org.openide.awt.Mnemonics.setLocalizedText(caseNumberLabel, org.openide.util.NbBundle.getMessage(OptionalCasePropertiesPanel.class, "OptionalCasePropertiesPanel.caseNumberLabel.text")); // NOI18N + caseNumberLabel.setMaximumSize(new java.awt.Dimension(41, 14)); + caseNumberLabel.setMinimumSize(new java.awt.Dimension(41, 14)); + caseNumberLabel.setPreferredSize(new java.awt.Dimension(41, 14)); caseNumberTextField.setFont(caseNumberTextField.getFont().deriveFont(caseNumberTextField.getFont().getStyle() & ~java.awt.Font.BOLD, 11)); @@ -256,21 +263,6 @@ final class OptionalCasePropertiesPanel extends javax.swing.JPanel { caseDisplayNameTextField.setFont(caseDisplayNameTextField.getFont().deriveFont(caseDisplayNameTextField.getFont().getStyle() & ~java.awt.Font.BOLD, 11)); - caseNotesScrollPane.setBorder(javax.swing.BorderFactory.createEtchedBorder()); - - taNotesText.setColumns(20); - taNotesText.setFont(new java.awt.Font("Tahoma", 0, 11)); // NOI18N - taNotesText.setLineWrap(true); - taNotesText.setRows(2); - taNotesText.setWrapStyleWord(true); - taNotesText.setBorder(null); - caseNotesScrollPane.setViewportView(taNotesText); - - org.openide.awt.Mnemonics.setLocalizedText(lbNotesLabel, org.openide.util.NbBundle.getMessage(OptionalCasePropertiesPanel.class, "OptionalCasePropertiesPanel.lbNotesLabel.text")); // NOI18N - lbNotesLabel.setMaximumSize(new java.awt.Dimension(41, 14)); - lbNotesLabel.setMinimumSize(new java.awt.Dimension(41, 14)); - lbNotesLabel.setPreferredSize(new java.awt.Dimension(41, 14)); - javax.swing.GroupLayout casePanelLayout = new javax.swing.GroupLayout(casePanel); casePanel.setLayout(casePanelLayout); casePanelLayout.setHorizontalGroup( @@ -279,12 +271,10 @@ final class OptionalCasePropertiesPanel extends javax.swing.JPanel { .addContainerGap() .addGroup(casePanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false) .addComponent(caseNumberLabel, javax.swing.GroupLayout.DEFAULT_SIZE, 60, Short.MAX_VALUE) - .addComponent(caseDisplayNameLabel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) - .addComponent(lbNotesLabel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) + .addComponent(caseDisplayNameLabel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addGroup(casePanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) - .addComponent(caseNotesScrollPane) - .addComponent(caseNumberTextField, javax.swing.GroupLayout.DEFAULT_SIZE, 425, Short.MAX_VALUE) + .addComponent(caseNumberTextField) .addComponent(caseDisplayNameTextField)) .addContainerGap()) ); @@ -297,13 +287,9 @@ final class OptionalCasePropertiesPanel extends javax.swing.JPanel { .addComponent(caseDisplayNameTextField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addGroup(casePanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) - .addComponent(caseNumberLabel) + .addComponent(caseNumberLabel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(caseNumberTextField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) - .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) - .addGroup(casePanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) - .addComponent(lbNotesLabel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) - .addComponent(caseNotesScrollPane, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) - .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) + .addGap(6, 6, 6)) ); examinerPanel.setBorder(javax.swing.BorderFactory.createTitledBorder(org.openide.util.NbBundle.getMessage(OptionalCasePropertiesPanel.class, "OptionalCasePropertiesPanel.examinerPanel.border.title"))); // NOI18N @@ -313,6 +299,16 @@ final class OptionalCasePropertiesPanel extends javax.swing.JPanel { lbExaminerPhoneLabel.setMinimumSize(new java.awt.Dimension(41, 14)); lbExaminerPhoneLabel.setPreferredSize(new java.awt.Dimension(41, 14)); + caseNotesScrollPane.setBorder(javax.swing.BorderFactory.createEtchedBorder()); + + taNotesText.setColumns(20); + taNotesText.setFont(new java.awt.Font("Tahoma", 0, 11)); // NOI18N + taNotesText.setLineWrap(true); + taNotesText.setRows(2); + taNotesText.setWrapStyleWord(true); + taNotesText.setBorder(null); + caseNotesScrollPane.setViewportView(taNotesText); + examinerTextField.setFont(examinerTextField.getFont().deriveFont(examinerTextField.getFont().getStyle() & ~java.awt.Font.BOLD, 11)); org.openide.awt.Mnemonics.setLocalizedText(lbExaminerEmailLabel, org.openide.util.NbBundle.getMessage(OptionalCasePropertiesPanel.class, "OptionalCasePropertiesPanel.lbExaminerEmailLabel.text")); // NOI18N @@ -326,6 +322,11 @@ final class OptionalCasePropertiesPanel extends javax.swing.JPanel { examinerLabel.setMinimumSize(new java.awt.Dimension(41, 14)); examinerLabel.setPreferredSize(new java.awt.Dimension(41, 14)); + org.openide.awt.Mnemonics.setLocalizedText(lbNotesLabel, org.openide.util.NbBundle.getMessage(OptionalCasePropertiesPanel.class, "OptionalCasePropertiesPanel.lbNotesLabel.text")); // NOI18N + lbNotesLabel.setMaximumSize(new java.awt.Dimension(41, 14)); + lbNotesLabel.setMinimumSize(new java.awt.Dimension(41, 14)); + lbNotesLabel.setPreferredSize(new java.awt.Dimension(41, 14)); + javax.swing.GroupLayout examinerPanelLayout = new javax.swing.GroupLayout(examinerPanel); examinerPanel.setLayout(examinerPanelLayout); examinerPanelLayout.setHorizontalGroup( @@ -334,9 +335,13 @@ final class OptionalCasePropertiesPanel extends javax.swing.JPanel { .addContainerGap() .addGroup(examinerPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(examinerPanelLayout.createSequentialGroup() - .addComponent(lbExaminerPhoneLabel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) + .addGroup(examinerPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addComponent(lbNotesLabel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) + .addComponent(lbExaminerPhoneLabel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) - .addComponent(tfExaminerPhoneText, javax.swing.GroupLayout.DEFAULT_SIZE, 424, Short.MAX_VALUE)) + .addGroup(examinerPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addComponent(caseNotesScrollPane) + .addComponent(tfExaminerPhoneText))) .addGroup(examinerPanelLayout.createSequentialGroup() .addGroup(examinerPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(lbExaminerEmailLabel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) @@ -348,7 +353,7 @@ final class OptionalCasePropertiesPanel extends javax.swing.JPanel { .addGap(11, 11, 11)) ); - examinerPanelLayout.linkSize(javax.swing.SwingConstants.HORIZONTAL, new java.awt.Component[] {examinerLabel, lbExaminerEmailLabel, lbExaminerPhoneLabel}); + examinerPanelLayout.linkSize(javax.swing.SwingConstants.HORIZONTAL, new java.awt.Component[] {examinerLabel, lbExaminerEmailLabel, lbExaminerPhoneLabel, lbNotesLabel}); examinerPanelLayout.setVerticalGroup( examinerPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) @@ -365,7 +370,11 @@ final class OptionalCasePropertiesPanel extends javax.swing.JPanel { .addGroup(examinerPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(tfExaminerEmailText, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(lbExaminerEmailLabel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) - .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) + .addGroup(examinerPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addComponent(lbNotesLabel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) + .addComponent(caseNotesScrollPane, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) + .addGap(6, 6, 6)) ); orgainizationPanel.setBorder(javax.swing.BorderFactory.createTitledBorder(org.openide.util.NbBundle.getMessage(OptionalCasePropertiesPanel.class, "OptionalCasePropertiesPanel.orgainizationPanel.border.title"))); // NOI18N @@ -382,9 +391,15 @@ final class OptionalCasePropertiesPanel extends javax.swing.JPanel { }); org.openide.awt.Mnemonics.setLocalizedText(lbPointOfContactNameLabel, org.openide.util.NbBundle.getMessage(OptionalCasePropertiesPanel.class, "OptionalCasePropertiesPanel.lbPointOfContactNameLabel.text")); // NOI18N + lbPointOfContactNameLabel.setMaximumSize(new java.awt.Dimension(82, 14)); + lbPointOfContactNameLabel.setMinimumSize(new java.awt.Dimension(82, 14)); + lbPointOfContactNameLabel.setPreferredSize(new java.awt.Dimension(82, 14)); org.openide.awt.Mnemonics.setLocalizedText(bnNewOrganization, org.openide.util.NbBundle.getMessage(OptionalCasePropertiesPanel.class, "OptionalCasePropertiesPanel.bnNewOrganization.text")); // NOI18N bnNewOrganization.setMargin(new java.awt.Insets(2, 6, 2, 6)); + bnNewOrganization.setMaximumSize(new java.awt.Dimension(123, 23)); + bnNewOrganization.setMinimumSize(new java.awt.Dimension(123, 23)); + bnNewOrganization.setPreferredSize(new java.awt.Dimension(123, 23)); bnNewOrganization.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { bnNewOrganizationActionPerformed(evt); @@ -392,6 +407,9 @@ final class OptionalCasePropertiesPanel extends javax.swing.JPanel { }); org.openide.awt.Mnemonics.setLocalizedText(lbOrganizationNameLabel, org.openide.util.NbBundle.getMessage(OptionalCasePropertiesPanel.class, "OptionalCasePropertiesPanel.lbOrganizationNameLabel.text")); // NOI18N + lbOrganizationNameLabel.setMaximumSize(new java.awt.Dimension(189, 14)); + lbOrganizationNameLabel.setMinimumSize(new java.awt.Dimension(189, 14)); + lbOrganizationNameLabel.setPreferredSize(new java.awt.Dimension(189, 14)); org.openide.awt.Mnemonics.setLocalizedText(lbPointOfContactEmailLabel, org.openide.util.NbBundle.getMessage(OptionalCasePropertiesPanel.class, "OptionalCasePropertiesPanel.lbPointOfContactEmailLabel.text")); // NOI18N lbPointOfContactEmailLabel.setMaximumSize(new java.awt.Dimension(82, 14)); @@ -403,14 +421,9 @@ final class OptionalCasePropertiesPanel extends javax.swing.JPanel { orgainizationPanelLayout.setHorizontalGroup( orgainizationPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(orgainizationPanelLayout.createSequentialGroup() - .addContainerGap() .addGroup(orgainizationPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(orgainizationPanelLayout.createSequentialGroup() - .addComponent(lbOrganizationNameLabel, javax.swing.GroupLayout.DEFAULT_SIZE, 206, Short.MAX_VALUE) - .addGap(18, 18, 18) - .addComponent(comboBoxOrgName, javax.swing.GroupLayout.PREFERRED_SIZE, 108, javax.swing.GroupLayout.PREFERRED_SIZE) - .addGap(157, 157, 157)) - .addGroup(orgainizationPanelLayout.createSequentialGroup() + .addGap(106, 106, 106) .addGroup(orgainizationPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(lbPointOfContactPhoneLabel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent(lbPointOfContactEmailLabel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) @@ -421,8 +434,12 @@ final class OptionalCasePropertiesPanel extends javax.swing.JPanel { .addComponent(lbPointOfContactNameText, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent(lbPointOfContactEmailText, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))) .addGroup(orgainizationPanelLayout.createSequentialGroup() - .addComponent(bnNewOrganization, javax.swing.GroupLayout.PREFERRED_SIZE, 147, javax.swing.GroupLayout.PREFERRED_SIZE) - .addGap(0, 0, Short.MAX_VALUE))) + .addContainerGap() + .addComponent(lbOrganizationNameLabel, javax.swing.GroupLayout.DEFAULT_SIZE, 206, Short.MAX_VALUE) + .addGap(18, 18, 18) + .addComponent(comboBoxOrgName, javax.swing.GroupLayout.PREFERRED_SIZE, 108, javax.swing.GroupLayout.PREFERRED_SIZE) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) + .addComponent(bnNewOrganization, javax.swing.GroupLayout.PREFERRED_SIZE, 147, javax.swing.GroupLayout.PREFERRED_SIZE))) .addContainerGap()) ); @@ -433,12 +450,13 @@ final class OptionalCasePropertiesPanel extends javax.swing.JPanel { .addGroup(orgainizationPanelLayout.createSequentialGroup() .addContainerGap() .addGroup(orgainizationPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) - .addComponent(lbOrganizationNameLabel) - .addComponent(comboBoxOrgName, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) - .addGap(18, 18, 18) + .addComponent(lbOrganizationNameLabel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) + .addComponent(comboBoxOrgName, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) + .addComponent(bnNewOrganization, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) .addGroup(orgainizationPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false) .addComponent(lbPointOfContactNameText, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) - .addComponent(lbPointOfContactNameLabel)) + .addComponent(lbPointOfContactNameLabel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addGroup(orgainizationPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false) .addComponent(lbPointOfContactPhoneLabel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) @@ -447,9 +465,7 @@ final class OptionalCasePropertiesPanel extends javax.swing.JPanel { .addGroup(orgainizationPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false) .addComponent(lbPointOfContactEmailLabel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent(lbPointOfContactEmailText, javax.swing.GroupLayout.PREFERRED_SIZE, 14, javax.swing.GroupLayout.PREFERRED_SIZE)) - .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) - .addComponent(bnNewOrganization) - .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) + .addGap(6, 6, 6)) ); javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this); @@ -469,10 +485,11 @@ final class OptionalCasePropertiesPanel extends javax.swing.JPanel { .addGroup(layout.createSequentialGroup() .addContainerGap() .addComponent(casePanel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) - .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) + .addGap(0, 0, 0) .addComponent(examinerPanel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) - .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) - .addComponent(orgainizationPanel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) + .addGap(0, 0, 0) + .addComponent(orgainizationPanel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) + .addGap(0, 0, 0)) ); }// //GEN-END:initComponents @@ -516,8 +533,7 @@ final class OptionalCasePropertiesPanel extends javax.swing.JPanel { @Messages({ "OptionalCasePropertiesPanel.errorDialog.emptyCaseNameMessage=No case name entered.", - "OptionalCasePropertiesPanel.errorDialog.invalidCaseNameMessage=Case names cannot include the following symbols: \\, /, :, *, ?, \", <, >, |", - "OptionalCasePropertiesPanel.errorDialog.noOpenCase.errMsg=Exception while getting open case." + "OptionalCasePropertiesPanel.errorDialog.invalidCaseNameMessage=Case names cannot include the following symbols: \\, /, :, *, ?, \", <, >, |" }) void saveUpdatedCaseDetails() { if (caseDisplayNameTextField.getText().trim().isEmpty()) { @@ -528,19 +544,14 @@ final class OptionalCasePropertiesPanel extends javax.swing.JPanel { MessageNotifyUtil.Message.error(Bundle.OptionalCasePropertiesPanel_errorDialog_invalidCaseNameMessage()); return; } - try { - updateCaseDetails(); - } catch (NoCurrentCaseException ex) { - MessageNotifyUtil.Message.error(Bundle.OptionalCasePropertiesPanel_errorDialog_noOpenCase_errMsg()); - return; - } + updateCaseDetails(); updateCorrelationCase(); } - private void updateCaseDetails() throws NoCurrentCaseException { + private void updateCaseDetails() { if (caseDisplayNameTextField.isVisible()) { try { - Case.getCurrentCaseThrows().updateCaseDetails(new CaseDetails( + Case.getCurrentCase().updateCaseDetails(new CaseDetails( caseDisplayNameTextField.getText(), caseNumberTextField.getText(), examinerTextField.getText(), tfExaminerPhoneText.getText(), tfExaminerEmailText.getText(), taNotesText.getText())); @@ -559,7 +570,7 @@ final class OptionalCasePropertiesPanel extends javax.swing.JPanel { if (EamDb.isEnabled()) { try { EamDb dbManager = EamDb.getInstance(); - CorrelationCase correlationCase = dbManager.getCase(Case.getCurrentCaseThrows()); + CorrelationCase correlationCase = dbManager.getCase(Case.getCurrentCase()); if (caseDisplayNameTextField.isVisible()) { correlationCase.setDisplayName(caseDisplayNameTextField.getText()); } @@ -571,9 +582,7 @@ final class OptionalCasePropertiesPanel extends javax.swing.JPanel { correlationCase.setNotes(taNotesText.getText()); dbManager.updateCase(correlationCase); } catch (EamDbException ex) { - logger.log(Level.SEVERE, "Error connecting to central repository database", ex); // NON-NLS - } catch (NoCurrentCaseException ex) { - logger.log(Level.SEVERE, "Exception while getting open case.", ex); // NON-NLS + LOGGER.log(Level.SEVERE, "Error connecting to central repository database", ex); // NON-NLS } finally { setCursor(Cursor.getPredefinedCursor(Cursor.DEFAULT_CURSOR)); } From 9d0b3cc4c1a681e7685ca761f85d6c4e4e4b98e8 Mon Sep 17 00:00:00 2001 From: "U-BASIS\\dgrove" Date: Fri, 28 Dec 2018 16:54:26 -0500 Subject: [PATCH 10/13] Reverted OptionalCasePropertiesPanel.java. --- .../OptionalCasePropertiesPanel.java | 59 ++++++++++++------- 1 file changed, 39 insertions(+), 20 deletions(-) diff --git a/Core/src/org/sleuthkit/autopsy/casemodule/OptionalCasePropertiesPanel.java b/Core/src/org/sleuthkit/autopsy/casemodule/OptionalCasePropertiesPanel.java index e4344bbd77..241054f078 100644 --- a/Core/src/org/sleuthkit/autopsy/casemodule/OptionalCasePropertiesPanel.java +++ b/Core/src/org/sleuthkit/autopsy/casemodule/OptionalCasePropertiesPanel.java @@ -1,7 +1,7 @@ /* * Autopsy Forensic Browser * - * Copyright 2011-2017 Basis Technology Corp. + * Copyright 2011-2018 Basis Technology Corp. * Contact: carrier sleuthkit org * * Licensed under the Apache License, Version 2.0 (the "License"); @@ -36,9 +36,10 @@ import org.sleuthkit.autopsy.coreutils.MessageNotifyUtil; * Panel which allows for editing and setting of the case details which are * optional or otherwise able to be edited. */ +@SuppressWarnings("PMD.SingularField") // UI widgets cause lots of false positives final class OptionalCasePropertiesPanel extends javax.swing.JPanel { - private final static Logger LOGGER = Logger.getLogger(OptionalCasePropertiesPanel.class.getName()); + private final static Logger logger = Logger.getLogger(OptionalCasePropertiesPanel.class.getName()); private static final long serialVersionUID = 1L; private EamOrganization selectedOrg = null; private java.util.List orgs = null; @@ -62,12 +63,19 @@ final class OptionalCasePropertiesPanel extends javax.swing.JPanel { OptionalCasePropertiesPanel(boolean editCurrentCase) { initComponents(); if (editCurrentCase) { - caseDisplayNameTextField.setText(Case.getCurrentCase().getDisplayName()); - caseNumberTextField.setText(Case.getCurrentCase().getNumber()); - examinerTextField.setText(Case.getCurrentCase().getExaminer()); - tfExaminerEmailText.setText(Case.getCurrentCase().getExaminerEmail()); - tfExaminerPhoneText.setText(Case.getCurrentCase().getExaminerPhone()); - taNotesText.setText(Case.getCurrentCase().getCaseNotes()); + Case openCase; + try { + openCase = Case.getCurrentCaseThrows(); + } catch (NoCurrentCaseException ex) { + logger.log(Level.SEVERE, "Exception while getting open case.", ex); + return; + } + caseDisplayNameTextField.setText(openCase.getDisplayName()); + caseNumberTextField.setText(openCase.getNumber()); + examinerTextField.setText(openCase.getExaminer()); + tfExaminerEmailText.setText(openCase.getExaminerEmail()); + tfExaminerPhoneText.setText(openCase.getExaminerPhone()); + taNotesText.setText(openCase.getCaseNotes()); setUpCaseDetailsFields(); setUpOrganizationData(); } else { @@ -86,15 +94,18 @@ final class OptionalCasePropertiesPanel extends javax.swing.JPanel { private void setUpOrganizationData() { if (EamDb.isEnabled()) { - Case currentCase = Case.getCurrentCase(); - if (currentCase != null) { - try { + try { + Case currentCase = Case.getCurrentCaseThrows(); + if (currentCase != null) { EamDb dbManager = EamDb.getInstance(); selectedOrg = dbManager.getCase(currentCase).getOrg(); - } catch (EamDbException ex) { - LOGGER.log(Level.SEVERE, "Unable to get Organization associated with the case from Central Repo", ex); } + } catch (EamDbException ex) { + logger.log(Level.SEVERE, "Unable to get Organization associated with the case from Central Repo", ex); + } catch (NoCurrentCaseException ex) { + logger.log(Level.SEVERE, "Exception while getting open case.", ex); } + if (selectedOrg != null) { setCurrentlySelectedOrganization(selectedOrg.getName()); } @@ -135,7 +146,7 @@ final class OptionalCasePropertiesPanel extends javax.swing.JPanel { }); comboBoxOrgName.setSelectedItem(selectedBeforeLoad); } catch (EamDbException ex) { - LOGGER.log(Level.WARNING, "Unable to populate list of Organizations from Central Repo", ex); + logger.log(Level.WARNING, "Unable to populate list of Organizations from Central Repo", ex); } } @@ -533,7 +544,8 @@ final class OptionalCasePropertiesPanel extends javax.swing.JPanel { @Messages({ "OptionalCasePropertiesPanel.errorDialog.emptyCaseNameMessage=No case name entered.", - "OptionalCasePropertiesPanel.errorDialog.invalidCaseNameMessage=Case names cannot include the following symbols: \\, /, :, *, ?, \", <, >, |" + "OptionalCasePropertiesPanel.errorDialog.invalidCaseNameMessage=Case names cannot include the following symbols: \\, /, :, *, ?, \", <, >, |", + "OptionalCasePropertiesPanel.errorDialog.noOpenCase.errMsg=Exception while getting open case." }) void saveUpdatedCaseDetails() { if (caseDisplayNameTextField.getText().trim().isEmpty()) { @@ -544,14 +556,19 @@ final class OptionalCasePropertiesPanel extends javax.swing.JPanel { MessageNotifyUtil.Message.error(Bundle.OptionalCasePropertiesPanel_errorDialog_invalidCaseNameMessage()); return; } - updateCaseDetails(); + try { + updateCaseDetails(); + } catch (NoCurrentCaseException ex) { + MessageNotifyUtil.Message.error(Bundle.OptionalCasePropertiesPanel_errorDialog_noOpenCase_errMsg()); + return; + } updateCorrelationCase(); } - private void updateCaseDetails() { + private void updateCaseDetails() throws NoCurrentCaseException { if (caseDisplayNameTextField.isVisible()) { try { - Case.getCurrentCase().updateCaseDetails(new CaseDetails( + Case.getCurrentCaseThrows().updateCaseDetails(new CaseDetails( caseDisplayNameTextField.getText(), caseNumberTextField.getText(), examinerTextField.getText(), tfExaminerPhoneText.getText(), tfExaminerEmailText.getText(), taNotesText.getText())); @@ -570,7 +587,7 @@ final class OptionalCasePropertiesPanel extends javax.swing.JPanel { if (EamDb.isEnabled()) { try { EamDb dbManager = EamDb.getInstance(); - CorrelationCase correlationCase = dbManager.getCase(Case.getCurrentCase()); + CorrelationCase correlationCase = dbManager.getCase(Case.getCurrentCaseThrows()); if (caseDisplayNameTextField.isVisible()) { correlationCase.setDisplayName(caseDisplayNameTextField.getText()); } @@ -582,7 +599,9 @@ final class OptionalCasePropertiesPanel extends javax.swing.JPanel { correlationCase.setNotes(taNotesText.getText()); dbManager.updateCase(correlationCase); } catch (EamDbException ex) { - LOGGER.log(Level.SEVERE, "Error connecting to central repository database", ex); // NON-NLS + logger.log(Level.SEVERE, "Error connecting to central repository database", ex); // NON-NLS + } catch (NoCurrentCaseException ex) { + logger.log(Level.SEVERE, "Exception while getting open case.", ex); // NON-NLS } finally { setCursor(Cursor.getPredefinedCursor(Cursor.DEFAULT_CURSOR)); } From a43274134d91fba32a9d3ded70bc8b07c5672e6d Mon Sep 17 00:00:00 2001 From: "U-BASIS\\dgrove" Date: Mon, 31 Dec 2018 16:50:27 -0500 Subject: [PATCH 11/13] Fixed tests. --- ...ngestedWithHashAndFileTypeInterCaseTests.java | 16 +++++++++++++--- .../commonfilessearch/InterCaseTestUtils.java | 4 ++-- 2 files changed, 15 insertions(+), 5 deletions(-) diff --git a/Core/test/qa-functional/src/org/sleuthkit/autopsy/commonfilessearch/IngestedWithHashAndFileTypeInterCaseTests.java b/Core/test/qa-functional/src/org/sleuthkit/autopsy/commonfilessearch/IngestedWithHashAndFileTypeInterCaseTests.java index 1993b6a0f6..478c165eaa 100644 --- a/Core/test/qa-functional/src/org/sleuthkit/autopsy/commonfilessearch/IngestedWithHashAndFileTypeInterCaseTests.java +++ b/Core/test/qa-functional/src/org/sleuthkit/autopsy/commonfilessearch/IngestedWithHashAndFileTypeInterCaseTests.java @@ -21,6 +21,7 @@ package org.sleuthkit.autopsy.commonfilessearch; import java.nio.file.Path; import java.sql.SQLException; +import java.util.Set; import junit.framework.Test; import org.netbeans.junit.NbModuleSuite; import org.netbeans.junit.NbTestCase; @@ -96,7 +97,7 @@ public class IngestedWithHashAndFileTypeInterCaseTests extends NbTestCase { */ public void testOne() { try { - AbstractCommonAttributeSearcher builder = new AllInterCaseCommonAttributeSearcher(false, false, this.utils.FILE_TYPE, 0); + AbstractCommonAttributeSearcher builder = new AllInterCaseCommonAttributeSearcher(false, false, this.utils.FILE_TYPE, 100); CommonAttributeCountSearchResults metadata = builder.findMatchesByCount(); assertTrue("Results should not be empty", metadata.size() != 0); @@ -143,9 +144,18 @@ public class IngestedWithHashAndFileTypeInterCaseTests extends NbTestCase { */ public void testTwo() { try { - int matchesMustAlsoBeFoundInThisCase = this.utils.getCaseMap().get(CASE2); + int matchesMustAlsoBeFoundInThisCase = 0; + + // Filter out the time stamp to get the correct case name. + Set caseNames = this.utils.getCaseMap().keySet(); + for (String caseName : caseNames) { + if (caseName.substring(0, caseName.length() - 20).equalsIgnoreCase(CASE2)) { + // Case match found. Get the number of matches. + matchesMustAlsoBeFoundInThisCase = this.utils.getCaseMap().get(caseName); + } + } CorrelationAttributeInstance.Type fileType = CorrelationAttributeInstance.getDefaultCorrelationTypes().get(0); - AbstractCommonAttributeSearcher builder = new SingleInterCaseCommonAttributeSearcher(matchesMustAlsoBeFoundInThisCase, false, false, fileType, 0); + AbstractCommonAttributeSearcher builder = new SingleInterCaseCommonAttributeSearcher(matchesMustAlsoBeFoundInThisCase, false, false, fileType, 100); CommonAttributeCountSearchResults metadata = builder.findMatchesByCount(); diff --git a/Core/test/qa-functional/src/org/sleuthkit/autopsy/commonfilessearch/InterCaseTestUtils.java b/Core/test/qa-functional/src/org/sleuthkit/autopsy/commonfilessearch/InterCaseTestUtils.java index 01cf1f7bcc..917a34fc7c 100644 --- a/Core/test/qa-functional/src/org/sleuthkit/autopsy/commonfilessearch/InterCaseTestUtils.java +++ b/Core/test/qa-functional/src/org/sleuthkit/autopsy/commonfilessearch/InterCaseTestUtils.java @@ -426,7 +426,7 @@ class InterCaseTestUtils { boolean sameFileName = testFileName.equalsIgnoreCase(fileName); boolean sameDataSource = testDataSource.equalsIgnoreCase(dataSource); - boolean sameCrCase = testCaseName.equalsIgnoreCase(crCase); + boolean sameCrCase = testCaseName.substring(0, testCaseName.length() - 20).equalsIgnoreCase(crCase); if (sameFileName && sameDataSource && sameCrCase) { tally++; @@ -443,7 +443,7 @@ class InterCaseTestUtils { final String testDataSource = node.getDataSource(); boolean sameFileName = testFileName.equalsIgnoreCase(fileName); - boolean sameCaseName = testCaseName.equalsIgnoreCase(crCase); + boolean sameCaseName = testCaseName.substring(0, testCaseName.length() - 20).equalsIgnoreCase(crCase); boolean sameDataSource = testDataSource.equalsIgnoreCase(dataSource); if (sameFileName && sameDataSource && sameCaseName) { From 8d4ba12033e68a9fd56177dc60cc427a6ec03fa1 Mon Sep 17 00:00:00 2001 From: "U-BASIS\\dgrove" Date: Wed, 2 Jan 2019 11:25:53 -0500 Subject: [PATCH 12/13] Using TimeZoneUtils. --- .../IngestedWithHashAndFileTypeInterCaseTests.java | 4 ++-- .../autopsy/commonfilessearch/InterCaseTestUtils.java | 5 +++-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/Core/test/qa-functional/src/org/sleuthkit/autopsy/commonfilessearch/IngestedWithHashAndFileTypeInterCaseTests.java b/Core/test/qa-functional/src/org/sleuthkit/autopsy/commonfilessearch/IngestedWithHashAndFileTypeInterCaseTests.java index 478c165eaa..b11352175c 100644 --- a/Core/test/qa-functional/src/org/sleuthkit/autopsy/commonfilessearch/IngestedWithHashAndFileTypeInterCaseTests.java +++ b/Core/test/qa-functional/src/org/sleuthkit/autopsy/commonfilessearch/IngestedWithHashAndFileTypeInterCaseTests.java @@ -97,7 +97,7 @@ public class IngestedWithHashAndFileTypeInterCaseTests extends NbTestCase { */ public void testOne() { try { - AbstractCommonAttributeSearcher builder = new AllInterCaseCommonAttributeSearcher(false, false, this.utils.FILE_TYPE, 100); + AbstractCommonAttributeSearcher builder = new AllInterCaseCommonAttributeSearcher(false, false, this.utils.FILE_TYPE, 0); CommonAttributeCountSearchResults metadata = builder.findMatchesByCount(); assertTrue("Results should not be empty", metadata.size() != 0); @@ -155,7 +155,7 @@ public class IngestedWithHashAndFileTypeInterCaseTests extends NbTestCase { } } CorrelationAttributeInstance.Type fileType = CorrelationAttributeInstance.getDefaultCorrelationTypes().get(0); - AbstractCommonAttributeSearcher builder = new SingleInterCaseCommonAttributeSearcher(matchesMustAlsoBeFoundInThisCase, false, false, fileType, 100); + AbstractCommonAttributeSearcher builder = new SingleInterCaseCommonAttributeSearcher(matchesMustAlsoBeFoundInThisCase, false, false, fileType, 0); CommonAttributeCountSearchResults metadata = builder.findMatchesByCount(); diff --git a/Core/test/qa-functional/src/org/sleuthkit/autopsy/commonfilessearch/InterCaseTestUtils.java b/Core/test/qa-functional/src/org/sleuthkit/autopsy/commonfilessearch/InterCaseTestUtils.java index 917a34fc7c..eb95ff61f0 100644 --- a/Core/test/qa-functional/src/org/sleuthkit/autopsy/commonfilessearch/InterCaseTestUtils.java +++ b/Core/test/qa-functional/src/org/sleuthkit/autopsy/commonfilessearch/InterCaseTestUtils.java @@ -59,6 +59,7 @@ import org.sleuthkit.autopsy.commonfilesearch.CommonAttributeCountSearchResults; import org.sleuthkit.autopsy.datamodel.utils.DataSourceLoader; import org.sleuthkit.autopsy.commonfilesearch.CommonAttributeValue; import org.sleuthkit.autopsy.commonfilesearch.CommonAttributeValueList; +import org.sleuthkit.autopsy.coreutils.TimeStampUtils; import org.sleuthkit.autopsy.datamodel.DisplayableItemNode; import org.sleuthkit.autopsy.modules.dataSourceIntegrity.DataSourceIntegrityModuleFactory; import org.sleuthkit.autopsy.modules.embeddedfileextractor.EmbeddedFileExtractorModuleFactory; @@ -426,7 +427,7 @@ class InterCaseTestUtils { boolean sameFileName = testFileName.equalsIgnoreCase(fileName); boolean sameDataSource = testDataSource.equalsIgnoreCase(dataSource); - boolean sameCrCase = testCaseName.substring(0, testCaseName.length() - 20).equalsIgnoreCase(crCase); + boolean sameCrCase = TimeStampUtils.removeTimeStamp(testCaseName).equalsIgnoreCase(crCase); if (sameFileName && sameDataSource && sameCrCase) { tally++; @@ -443,7 +444,7 @@ class InterCaseTestUtils { final String testDataSource = node.getDataSource(); boolean sameFileName = testFileName.equalsIgnoreCase(fileName); - boolean sameCaseName = testCaseName.substring(0, testCaseName.length() - 20).equalsIgnoreCase(crCase); + boolean sameCaseName = TimeStampUtils.removeTimeStamp(testCaseName).equalsIgnoreCase(crCase); boolean sameDataSource = testDataSource.equalsIgnoreCase(dataSource); if (sameFileName && sameDataSource && sameCaseName) { From 257df2f13323c75e772e2d9b7471ae8a04bf5c06 Mon Sep 17 00:00:00 2001 From: "U-BASIS\\dgrove" Date: Wed, 2 Jan 2019 15:56:05 -0500 Subject: [PATCH 13/13] Made Excel report consistent; added Case Notes. --- .../sleuthkit/autopsy/report/ReportExcel.java | 52 +++++++++++++------ 1 file changed, 37 insertions(+), 15 deletions(-) diff --git a/Core/src/org/sleuthkit/autopsy/report/ReportExcel.java b/Core/src/org/sleuthkit/autopsy/report/ReportExcel.java index 3dcc416ef3..8503003e50 100644 --- a/Core/src/org/sleuthkit/autopsy/report/ReportExcel.java +++ b/Core/src/org/sleuthkit/autopsy/report/ReportExcel.java @@ -26,6 +26,7 @@ import java.util.logging.Level; import org.apache.poi.ss.usermodel.*; import org.apache.poi.xssf.usermodel.XSSFWorkbook; import org.openide.util.NbBundle; +import org.openide.util.NbBundle.Messages; import org.sleuthkit.autopsy.casemodule.Case; import org.sleuthkit.autopsy.casemodule.NoCurrentCaseException; import org.sleuthkit.autopsy.coreutils.Logger; @@ -302,6 +303,15 @@ class ReportExcel implements TableReportModule { return text.replaceAll("[\\/\\:\\?\\*\\\\]", "_"); } + @Messages({ + "ReportExcel.writeSummary.sheetName=Summary", + "ReportExcel.writeSummary.summary=Summary", + "ReportExcel.writeSummary.caseName=Case Name:", + "ReportExcel.writeSummary.numImages=Number of Images:", + "ReportExcel.writeSummary.caseNum=Case Number:", + "ReportExcel.writeSummary.caseNotes=Case Notes:", + "ReportExcel.writeSummary.examiner=Examiner:" + }) private void writeSummaryWorksheet() { Case currentCase; try { @@ -310,12 +320,12 @@ class ReportExcel implements TableReportModule { logger.log(Level.SEVERE, "Exception while getting open case.", ex); //NON-NLS return; } - sheet = wb.createSheet(NbBundle.getMessage(this.getClass(), "ReportExcel.sheetName.text")); + sheet = wb.createSheet(Bundle.ReportExcel_writeSummary_sheetName()); rowIndex = 0; Row row = sheet.createRow(rowIndex); row.setRowStyle(setStyle); - row.createCell(0).setCellValue(NbBundle.getMessage(this.getClass(), "ReportExcel.cellVal.summary")); + row.createCell(0).setCellValue(Bundle.ReportExcel_writeSummary_summary()); ++rowIndex; sheet.createRow(rowIndex); @@ -323,25 +333,21 @@ class ReportExcel implements TableReportModule { row = sheet.createRow(rowIndex); row.setRowStyle(setStyle); - row.createCell(0).setCellValue(NbBundle.getMessage(this.getClass(), "ReportExcel.cellVal.caseName")); + row.createCell(0).setCellValue(Bundle.ReportExcel_writeSummary_caseName()); row.createCell(1).setCellValue(currentCase.getDisplayName()); ++rowIndex; - row = sheet.createRow(rowIndex); - row.setRowStyle(setStyle); - row.createCell(0).setCellValue(NbBundle.getMessage(this.getClass(), "ReportExcel.cellVal.caseNum")); - row.createCell(1).setCellValue(currentCase.getNumber()); - ++rowIndex; + if (!currentCase.getNumber().isEmpty()) { + row = sheet.createRow(rowIndex); + row.setRowStyle(setStyle); + row.createCell(0).setCellValue(Bundle.ReportExcel_writeSummary_caseNum()); + row.createCell(1).setCellValue(currentCase.getNumber()); + ++rowIndex; + } row = sheet.createRow(rowIndex); row.setRowStyle(setStyle); - row.createCell(0).setCellValue(NbBundle.getMessage(this.getClass(), "ReportExcel.cellVal.examiner")); - row.createCell(1).setCellValue(currentCase.getExaminer()); - ++rowIndex; - - row = sheet.createRow(rowIndex); - row.setRowStyle(setStyle); - row.createCell(0).setCellValue(NbBundle.getMessage(this.getClass(), "ReportExcel.cellVal.numImages")); + row.createCell(0).setCellValue(Bundle.ReportExcel_writeSummary_numImages()); int numImages; try { numImages = currentCase.getDataSources().size(); @@ -351,6 +357,22 @@ class ReportExcel implements TableReportModule { row.createCell(1).setCellValue(numImages); ++rowIndex; + if (!currentCase.getCaseNotes().isEmpty()) { + row = sheet.createRow(rowIndex); + row.setRowStyle(setStyle); + row.createCell(0).setCellValue(Bundle.ReportExcel_writeSummary_caseNotes()); + row.createCell(1).setCellValue(currentCase.getCaseNotes()); + ++rowIndex; + } + + if (!currentCase.getExaminer().isEmpty()) { + row = sheet.createRow(rowIndex); + row.setRowStyle(setStyle); + row.createCell(0).setCellValue(Bundle.ReportExcel_writeSummary_examiner()); + row.createCell(1).setCellValue(currentCase.getExaminer()); + ++rowIndex; + } + sheet.autoSizeColumn(0); sheet.autoSizeColumn(1); }