mirror of
https://github.com/overcuriousity/autopsy-flatpak.git
synced 2025-07-09 14:49:32 +00:00
4272 first batch of clean up for Case Details dialog on CR panel
This commit is contained in:
parent
ff8c4ff427
commit
d05adf1120
@ -76,20 +76,20 @@ GlobalSettingsPanel.Case\ Details.AccessibleContext.accessibleName=Cases Details
|
||||
ShowCasesDialog.caseDetailsTable.AccessibleContext.accessibleDescription=Click column name to sort.
|
||||
GlobalSettingsPanel.casesTextArea.text=Display table that lists central repository case details.
|
||||
GlobalSettingsPanel.ingestRunningWarningLabel.text=Cannot make changes to central repository settings when ingest is running!
|
||||
CaseInfoDialog.caseInfoLabel.text=Case Info:
|
||||
CaseInfoDialog.dataSourcesLabel.text=DataSources:
|
||||
CaseInfoDialog.notesLabel.text=Notes:
|
||||
CaseInfoDialog.notesTextArea.text=notes here\nmultiple lines\nscrolls\nwhen necessary
|
||||
CaseInfoDialog.casesTable.columnModel.title1=Date
|
||||
CaseInfoDialog.casesTable.columnModel.title0=Case Name
|
||||
CaseInfoDialog.orgLabel.text=Organization:
|
||||
CaseInfoDialog.caseNumberLabel.text=Case Number:
|
||||
CaseInfoDialog.examinerNameLabel.text=Examiner Name:
|
||||
CaseInfoDialog.examinerEmailLabel.text=Examiner Email:
|
||||
CaseInfoDialog.examinerPhoneLabel.text=Examiner Phone:
|
||||
CaseInfoDialog.orgValueLabel.text=a
|
||||
CaseInfoDialog.caseNumberValueLabel.text=b
|
||||
CaseInfoDialog.examinerNameValueLabel.text=c
|
||||
CaseInfoDialog.examinerEmailValueLabel.text=d
|
||||
CaseInfoDialog.examinerPhoneValueLabel.text=e
|
||||
CaseInfoDialog.closeButton.text=Close
|
||||
CaseDetailsDialog.orgLabel.text=Organization:
|
||||
CaseDetailsDialog.closeButton.text=Close
|
||||
CaseDetailsDialog.notesLabel.text=Notes:
|
||||
CaseDetailsDialog.examinerPhoneValueLabel.text=
|
||||
CaseDetailsDialog.dataSourcesLabel.text=DataSources:
|
||||
CaseDetailsDialog.examinerEmailValueLabel.text=
|
||||
CaseDetailsDialog.caseInfoLabel.text=Case Info:
|
||||
CaseDetailsDialog.examinerNameValueLabel.text=
|
||||
CaseDetailsDialog.notesTextArea.text=
|
||||
CaseDetailsDialog.caseNumberValueLabel.text=
|
||||
CaseDetailsDialog.orgValueLabel.text=
|
||||
CaseDetailsDialog.examinerPhoneLabel.text=Examiner Phone:
|
||||
CaseDetailsDialog.examinerNameLabel.text=Examiner Name:
|
||||
CaseDetailsDialog.casesTable.columnModel.title1=Date
|
||||
CaseDetailsDialog.casesTable.columnModel.title0=Case Name
|
||||
CaseDetailsDialog.examinerEmailLabel.text=Examiner Email:
|
||||
CaseDetailsDialog.caseNumberLabel.text=Case Number:
|
||||
|
@ -0,0 +1,73 @@
|
||||
/*
|
||||
* Central Repository
|
||||
*
|
||||
* Copyright 2018 Basis Technology Corp.
|
||||
* Contact: carrier <at> sleuthkit <dot> org
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package org.sleuthkit.autopsy.centralrepository.optionspanel;
|
||||
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
import org.sleuthkit.autopsy.centralrepository.datamodel.CorrelationCase;
|
||||
import org.sleuthkit.autopsy.centralrepository.datamodel.CorrelationDataSource;
|
||||
import org.sleuthkit.autopsy.centralrepository.datamodel.EamOrganization;
|
||||
|
||||
class CaseDataSourcesWrapper {
|
||||
|
||||
private final CorrelationCase eamCase;
|
||||
private final List<CorrelationDataSource> dataSources;
|
||||
|
||||
CaseDataSourcesWrapper(CorrelationCase correlationCase, List<CorrelationDataSource> dataSourceList) {
|
||||
eamCase = correlationCase;
|
||||
dataSources = dataSourceList;
|
||||
}
|
||||
|
||||
String getDisplayName() {
|
||||
return eamCase.getDisplayName();
|
||||
}
|
||||
|
||||
List<CorrelationDataSource> getDataSources() {
|
||||
return Collections.unmodifiableList(dataSources);
|
||||
}
|
||||
|
||||
String getCreationDate() {
|
||||
return eamCase.getCreationDate();
|
||||
}
|
||||
|
||||
String getOrganizationName() {
|
||||
EamOrganization org = eamCase.getOrg();
|
||||
return org == null ? "" : org.getName();
|
||||
}
|
||||
|
||||
String getCaseNumber() {
|
||||
return eamCase.getCaseNumber();
|
||||
}
|
||||
|
||||
String getExaminerName() {
|
||||
return eamCase.getExaminerName();
|
||||
}
|
||||
|
||||
String getExaminerEmail() {
|
||||
return eamCase.getExaminerEmail();
|
||||
}
|
||||
|
||||
String getNotes() {
|
||||
return eamCase.getNotes();
|
||||
}
|
||||
|
||||
String getExaminerPhone() {
|
||||
return eamCase.getExaminerPhone();
|
||||
}
|
||||
}
|
@ -204,7 +204,7 @@
|
||||
<Property name="lineWrap" type="boolean" value="true"/>
|
||||
<Property name="rows" type="int" value="3"/>
|
||||
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="org/sleuthkit/autopsy/centralrepository/optionspanel/Bundle.properties" key="CaseInfoDialog.notesTextArea.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||
<ResourceString bundle="org/sleuthkit/autopsy/centralrepository/optionspanel/Bundle.properties" key="CaseDetailsDialog.notesTextArea.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||
</Property>
|
||||
<Property name="wrapStyleWord" type="boolean" value="true"/>
|
||||
<Property name="border" type="javax.swing.border.Border" editor="org.netbeans.modules.form.editors2.BorderEditor">
|
||||
@ -217,98 +217,98 @@
|
||||
<Component class="javax.swing.JLabel" name="caseInfoLabel">
|
||||
<Properties>
|
||||
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="org/sleuthkit/autopsy/centralrepository/optionspanel/Bundle.properties" key="CaseInfoDialog.caseInfoLabel.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||
<ResourceString bundle="org/sleuthkit/autopsy/centralrepository/optionspanel/Bundle.properties" key="CaseDetailsDialog.caseInfoLabel.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component class="javax.swing.JLabel" name="dataSourcesLabel">
|
||||
<Properties>
|
||||
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="org/sleuthkit/autopsy/centralrepository/optionspanel/Bundle.properties" key="CaseInfoDialog.dataSourcesLabel.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||
<ResourceString bundle="org/sleuthkit/autopsy/centralrepository/optionspanel/Bundle.properties" key="CaseDetailsDialog.dataSourcesLabel.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component class="javax.swing.JLabel" name="notesLabel">
|
||||
<Properties>
|
||||
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="org/sleuthkit/autopsy/centralrepository/optionspanel/Bundle.properties" key="CaseInfoDialog.notesLabel.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||
<ResourceString bundle="org/sleuthkit/autopsy/centralrepository/optionspanel/Bundle.properties" key="CaseDetailsDialog.notesLabel.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component class="javax.swing.JLabel" name="orgLabel">
|
||||
<Properties>
|
||||
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="org/sleuthkit/autopsy/centralrepository/optionspanel/Bundle.properties" key="CaseInfoDialog.orgLabel.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||
<ResourceString bundle="org/sleuthkit/autopsy/centralrepository/optionspanel/Bundle.properties" key="CaseDetailsDialog.orgLabel.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component class="javax.swing.JLabel" name="caseNumberLabel">
|
||||
<Properties>
|
||||
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="org/sleuthkit/autopsy/centralrepository/optionspanel/Bundle.properties" key="CaseInfoDialog.caseNumberLabel.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||
<ResourceString bundle="org/sleuthkit/autopsy/centralrepository/optionspanel/Bundle.properties" key="CaseDetailsDialog.caseNumberLabel.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component class="javax.swing.JLabel" name="examinerEmailLabel">
|
||||
<Properties>
|
||||
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="org/sleuthkit/autopsy/centralrepository/optionspanel/Bundle.properties" key="CaseInfoDialog.examinerEmailLabel.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||
<ResourceString bundle="org/sleuthkit/autopsy/centralrepository/optionspanel/Bundle.properties" key="CaseDetailsDialog.examinerEmailLabel.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component class="javax.swing.JLabel" name="examinerNameLabel">
|
||||
<Properties>
|
||||
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="org/sleuthkit/autopsy/centralrepository/optionspanel/Bundle.properties" key="CaseInfoDialog.examinerNameLabel.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||
<ResourceString bundle="org/sleuthkit/autopsy/centralrepository/optionspanel/Bundle.properties" key="CaseDetailsDialog.examinerNameLabel.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component class="javax.swing.JLabel" name="examinerPhoneLabel">
|
||||
<Properties>
|
||||
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="org/sleuthkit/autopsy/centralrepository/optionspanel/Bundle.properties" key="CaseInfoDialog.examinerPhoneLabel.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||
<ResourceString bundle="org/sleuthkit/autopsy/centralrepository/optionspanel/Bundle.properties" key="CaseDetailsDialog.examinerPhoneLabel.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component class="javax.swing.JLabel" name="orgValueLabel">
|
||||
<Properties>
|
||||
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="org/sleuthkit/autopsy/centralrepository/optionspanel/Bundle.properties" key="CaseInfoDialog.orgValueLabel.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||
<ResourceString bundle="org/sleuthkit/autopsy/centralrepository/optionspanel/Bundle.properties" key="CaseDetailsDialog.orgValueLabel.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component class="javax.swing.JLabel" name="caseNumberValueLabel">
|
||||
<Properties>
|
||||
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="org/sleuthkit/autopsy/centralrepository/optionspanel/Bundle.properties" key="CaseInfoDialog.caseNumberValueLabel.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||
<ResourceString bundle="org/sleuthkit/autopsy/centralrepository/optionspanel/Bundle.properties" key="CaseDetailsDialog.caseNumberValueLabel.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component class="javax.swing.JLabel" name="examinerNameValueLabel">
|
||||
<Properties>
|
||||
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="org/sleuthkit/autopsy/centralrepository/optionspanel/Bundle.properties" key="CaseInfoDialog.examinerNameValueLabel.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||
<ResourceString bundle="org/sleuthkit/autopsy/centralrepository/optionspanel/Bundle.properties" key="CaseDetailsDialog.examinerNameValueLabel.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component class="javax.swing.JLabel" name="examinerEmailValueLabel">
|
||||
<Properties>
|
||||
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="org/sleuthkit/autopsy/centralrepository/optionspanel/Bundle.properties" key="CaseInfoDialog.examinerEmailValueLabel.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||
<ResourceString bundle="org/sleuthkit/autopsy/centralrepository/optionspanel/Bundle.properties" key="CaseDetailsDialog.examinerEmailValueLabel.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component class="javax.swing.JLabel" name="examinerPhoneValueLabel">
|
||||
<Properties>
|
||||
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="org/sleuthkit/autopsy/centralrepository/optionspanel/Bundle.properties" key="CaseInfoDialog.examinerPhoneValueLabel.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||
<ResourceString bundle="org/sleuthkit/autopsy/centralrepository/optionspanel/Bundle.properties" key="CaseDetailsDialog.examinerPhoneValueLabel.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component class="javax.swing.JButton" name="closeButton">
|
||||
<Properties>
|
||||
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="org/sleuthkit/autopsy/centralrepository/optionspanel/Bundle.properties" key="CaseInfoDialog.closeButton.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||
<ResourceString bundle="org/sleuthkit/autopsy/centralrepository/optionspanel/Bundle.properties" key="CaseDetailsDialog.closeButton.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||
</Property>
|
||||
<Property name="maximumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[65, 23]"/>
|
||||
@ -320,6 +320,9 @@
|
||||
<Dimension value="[65, 23]"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
<Events>
|
||||
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="closeButtonActionPerformed"/>
|
||||
</Events>
|
||||
</Component>
|
||||
</SubComponents>
|
||||
</Container>
|
||||
@ -365,14 +368,14 @@
|
||||
<TableColumnModel selectionModel="0">
|
||||
<Column maxWidth="-1" minWidth="-1" prefWidth="-1" resizable="true">
|
||||
<Title editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="org/sleuthkit/autopsy/centralrepository/optionspanel/Bundle.properties" key="CaseInfoDialog.casesTable.columnModel.title0" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||
<ResourceString bundle="org/sleuthkit/autopsy/centralrepository/optionspanel/Bundle.properties" key="CaseDetailsDialog.casesTable.columnModel.title0" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||
</Title>
|
||||
<Editor/>
|
||||
<Renderer/>
|
||||
</Column>
|
||||
<Column maxWidth="-1" minWidth="-1" prefWidth="-1" resizable="true">
|
||||
<Title editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="org/sleuthkit/autopsy/centralrepository/optionspanel/Bundle.properties" key="CaseInfoDialog.casesTable.columnModel.title1" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||
<ResourceString bundle="org/sleuthkit/autopsy/centralrepository/optionspanel/Bundle.properties" key="CaseDetailsDialog.casesTable.columnModel.title1" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||
</Title>
|
||||
<Editor/>
|
||||
<Renderer/>
|
@ -1,7 +1,20 @@
|
||||
/*
|
||||
* To change this license header, choose License Headers in Project Properties.
|
||||
* To change this template file, choose Tools | Templates
|
||||
* and open the template in the editor.
|
||||
* Central Repository
|
||||
*
|
||||
* Copyright 2018 Basis Technology Corp.
|
||||
* Contact: carrier <at> sleuthkit <dot> org
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package org.sleuthkit.autopsy.centralrepository.optionspanel;
|
||||
|
||||
@ -17,26 +30,24 @@ import org.sleuthkit.autopsy.centralrepository.datamodel.CorrelationCase;
|
||||
import org.sleuthkit.autopsy.centralrepository.datamodel.CorrelationDataSource;
|
||||
import org.sleuthkit.autopsy.centralrepository.datamodel.EamDb;
|
||||
import org.sleuthkit.autopsy.centralrepository.datamodel.EamDbException;
|
||||
import org.sleuthkit.autopsy.centralrepository.optionspanel.ShowCasesTableModel.TableCaseWrapper;
|
||||
import org.sleuthkit.autopsy.coreutils.Logger;
|
||||
import org.openide.util.NbBundle.Messages;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author wschaefer
|
||||
*/
|
||||
public class CaseInfoDialog extends javax.swing.JDialog {
|
||||
|
||||
class CaseDetailsDialog extends javax.swing.JDialog {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
private final ShowCasesTableModel tableModel;
|
||||
private final static Logger logger = Logger.getLogger(CaseInfoDialog.class.getName());
|
||||
private final CasesTableModel tableModel;
|
||||
private final static Logger logger = Logger.getLogger(CaseDetailsDialog.class.getName());
|
||||
|
||||
/**
|
||||
* Creates new form CaseInfoDialog
|
||||
*/
|
||||
private CaseInfoDialog() {
|
||||
super(WindowManager.getDefault().getMainWindow(),
|
||||
@Messages({"CaseDetailsDialog.title.text=Case Details"})
|
||||
private CaseDetailsDialog() {
|
||||
super(WindowManager.getDefault().getMainWindow(), Bundle.CaseDetailsDialog_title_text(),
|
||||
true);
|
||||
tableModel = new ShowCasesTableModel();
|
||||
tableModel = new CasesTableModel();
|
||||
initComponents();
|
||||
try {
|
||||
EamDb dbManager = EamDb.getInstance();
|
||||
@ -64,7 +75,7 @@ public class CaseInfoDialog extends javax.swing.JDialog {
|
||||
}
|
||||
|
||||
static void displayCaseInfoDialog() {
|
||||
CaseInfoDialog caseInfoDialog = new CaseInfoDialog();
|
||||
CaseDetailsDialog caseInfoDialog = new CaseDetailsDialog();
|
||||
caseInfoDialog.setLocationRelativeTo(WindowManager.getDefault().getMainWindow());
|
||||
caseInfoDialog.setVisible(true);
|
||||
}
|
||||
@ -134,41 +145,46 @@ public class CaseInfoDialog extends javax.swing.JDialog {
|
||||
notesTextArea.setFont(new java.awt.Font("Tahoma", 0, 11)); // NOI18N
|
||||
notesTextArea.setLineWrap(true);
|
||||
notesTextArea.setRows(3);
|
||||
notesTextArea.setText(org.openide.util.NbBundle.getMessage(CaseInfoDialog.class, "CaseInfoDialog.notesTextArea.text")); // NOI18N
|
||||
notesTextArea.setText(org.openide.util.NbBundle.getMessage(CaseDetailsDialog.class, "CaseDetailsDialog.notesTextArea.text")); // NOI18N
|
||||
notesTextArea.setWrapStyleWord(true);
|
||||
notesTextArea.setBorder(null);
|
||||
notesScrollPane.setViewportView(notesTextArea);
|
||||
|
||||
org.openide.awt.Mnemonics.setLocalizedText(caseInfoLabel, org.openide.util.NbBundle.getMessage(CaseInfoDialog.class, "CaseInfoDialog.caseInfoLabel.text")); // NOI18N
|
||||
org.openide.awt.Mnemonics.setLocalizedText(caseInfoLabel, org.openide.util.NbBundle.getMessage(CaseDetailsDialog.class, "CaseDetailsDialog.caseInfoLabel.text")); // NOI18N
|
||||
|
||||
org.openide.awt.Mnemonics.setLocalizedText(dataSourcesLabel, org.openide.util.NbBundle.getMessage(CaseInfoDialog.class, "CaseInfoDialog.dataSourcesLabel.text")); // NOI18N
|
||||
org.openide.awt.Mnemonics.setLocalizedText(dataSourcesLabel, org.openide.util.NbBundle.getMessage(CaseDetailsDialog.class, "CaseDetailsDialog.dataSourcesLabel.text")); // NOI18N
|
||||
|
||||
org.openide.awt.Mnemonics.setLocalizedText(notesLabel, org.openide.util.NbBundle.getMessage(CaseInfoDialog.class, "CaseInfoDialog.notesLabel.text")); // NOI18N
|
||||
org.openide.awt.Mnemonics.setLocalizedText(notesLabel, org.openide.util.NbBundle.getMessage(CaseDetailsDialog.class, "CaseDetailsDialog.notesLabel.text")); // NOI18N
|
||||
|
||||
org.openide.awt.Mnemonics.setLocalizedText(orgLabel, org.openide.util.NbBundle.getMessage(CaseInfoDialog.class, "CaseInfoDialog.orgLabel.text")); // NOI18N
|
||||
org.openide.awt.Mnemonics.setLocalizedText(orgLabel, org.openide.util.NbBundle.getMessage(CaseDetailsDialog.class, "CaseDetailsDialog.orgLabel.text")); // NOI18N
|
||||
|
||||
org.openide.awt.Mnemonics.setLocalizedText(caseNumberLabel, org.openide.util.NbBundle.getMessage(CaseInfoDialog.class, "CaseInfoDialog.caseNumberLabel.text")); // NOI18N
|
||||
org.openide.awt.Mnemonics.setLocalizedText(caseNumberLabel, org.openide.util.NbBundle.getMessage(CaseDetailsDialog.class, "CaseDetailsDialog.caseNumberLabel.text")); // NOI18N
|
||||
|
||||
org.openide.awt.Mnemonics.setLocalizedText(examinerEmailLabel, org.openide.util.NbBundle.getMessage(CaseInfoDialog.class, "CaseInfoDialog.examinerEmailLabel.text")); // NOI18N
|
||||
org.openide.awt.Mnemonics.setLocalizedText(examinerEmailLabel, org.openide.util.NbBundle.getMessage(CaseDetailsDialog.class, "CaseDetailsDialog.examinerEmailLabel.text")); // NOI18N
|
||||
|
||||
org.openide.awt.Mnemonics.setLocalizedText(examinerNameLabel, org.openide.util.NbBundle.getMessage(CaseInfoDialog.class, "CaseInfoDialog.examinerNameLabel.text")); // NOI18N
|
||||
org.openide.awt.Mnemonics.setLocalizedText(examinerNameLabel, org.openide.util.NbBundle.getMessage(CaseDetailsDialog.class, "CaseDetailsDialog.examinerNameLabel.text")); // NOI18N
|
||||
|
||||
org.openide.awt.Mnemonics.setLocalizedText(examinerPhoneLabel, org.openide.util.NbBundle.getMessage(CaseInfoDialog.class, "CaseInfoDialog.examinerPhoneLabel.text")); // NOI18N
|
||||
org.openide.awt.Mnemonics.setLocalizedText(examinerPhoneLabel, org.openide.util.NbBundle.getMessage(CaseDetailsDialog.class, "CaseDetailsDialog.examinerPhoneLabel.text")); // NOI18N
|
||||
|
||||
org.openide.awt.Mnemonics.setLocalizedText(orgValueLabel, org.openide.util.NbBundle.getMessage(CaseInfoDialog.class, "CaseInfoDialog.orgValueLabel.text")); // NOI18N
|
||||
org.openide.awt.Mnemonics.setLocalizedText(orgValueLabel, org.openide.util.NbBundle.getMessage(CaseDetailsDialog.class, "CaseDetailsDialog.orgValueLabel.text")); // NOI18N
|
||||
|
||||
org.openide.awt.Mnemonics.setLocalizedText(caseNumberValueLabel, org.openide.util.NbBundle.getMessage(CaseInfoDialog.class, "CaseInfoDialog.caseNumberValueLabel.text")); // NOI18N
|
||||
org.openide.awt.Mnemonics.setLocalizedText(caseNumberValueLabel, org.openide.util.NbBundle.getMessage(CaseDetailsDialog.class, "CaseDetailsDialog.caseNumberValueLabel.text")); // NOI18N
|
||||
|
||||
org.openide.awt.Mnemonics.setLocalizedText(examinerNameValueLabel, org.openide.util.NbBundle.getMessage(CaseInfoDialog.class, "CaseInfoDialog.examinerNameValueLabel.text")); // NOI18N
|
||||
org.openide.awt.Mnemonics.setLocalizedText(examinerNameValueLabel, org.openide.util.NbBundle.getMessage(CaseDetailsDialog.class, "CaseDetailsDialog.examinerNameValueLabel.text")); // NOI18N
|
||||
|
||||
org.openide.awt.Mnemonics.setLocalizedText(examinerEmailValueLabel, org.openide.util.NbBundle.getMessage(CaseInfoDialog.class, "CaseInfoDialog.examinerEmailValueLabel.text")); // NOI18N
|
||||
org.openide.awt.Mnemonics.setLocalizedText(examinerEmailValueLabel, org.openide.util.NbBundle.getMessage(CaseDetailsDialog.class, "CaseDetailsDialog.examinerEmailValueLabel.text")); // NOI18N
|
||||
|
||||
org.openide.awt.Mnemonics.setLocalizedText(examinerPhoneValueLabel, org.openide.util.NbBundle.getMessage(CaseInfoDialog.class, "CaseInfoDialog.examinerPhoneValueLabel.text")); // NOI18N
|
||||
org.openide.awt.Mnemonics.setLocalizedText(examinerPhoneValueLabel, org.openide.util.NbBundle.getMessage(CaseDetailsDialog.class, "CaseDetailsDialog.examinerPhoneValueLabel.text")); // NOI18N
|
||||
|
||||
org.openide.awt.Mnemonics.setLocalizedText(closeButton, org.openide.util.NbBundle.getMessage(CaseInfoDialog.class, "CaseInfoDialog.closeButton.text")); // NOI18N
|
||||
org.openide.awt.Mnemonics.setLocalizedText(closeButton, org.openide.util.NbBundle.getMessage(CaseDetailsDialog.class, "CaseDetailsDialog.closeButton.text")); // NOI18N
|
||||
closeButton.setMaximumSize(new java.awt.Dimension(65, 23));
|
||||
closeButton.setMinimumSize(new java.awt.Dimension(65, 23));
|
||||
closeButton.setPreferredSize(new java.awt.Dimension(65, 23));
|
||||
closeButton.addActionListener(new java.awt.event.ActionListener() {
|
||||
public void actionPerformed(java.awt.event.ActionEvent evt) {
|
||||
closeButtonActionPerformed(evt);
|
||||
}
|
||||
});
|
||||
|
||||
javax.swing.GroupLayout caseInfoPanelLayout = new javax.swing.GroupLayout(caseInfoPanel);
|
||||
caseInfoPanel.setLayout(caseInfoPanelLayout);
|
||||
@ -259,8 +275,8 @@ public class CaseInfoDialog extends javax.swing.JDialog {
|
||||
casesTable.setSelectionMode(javax.swing.ListSelectionModel.SINGLE_SELECTION);
|
||||
casesScrollPane.setViewportView(casesTable);
|
||||
if (casesTable.getColumnModel().getColumnCount() > 0) {
|
||||
casesTable.getColumnModel().getColumn(0).setHeaderValue(org.openide.util.NbBundle.getMessage(CaseInfoDialog.class, "CaseInfoDialog.casesTable.columnModel.title0")); // NOI18N
|
||||
casesTable.getColumnModel().getColumn(1).setHeaderValue(org.openide.util.NbBundle.getMessage(CaseInfoDialog.class, "CaseInfoDialog.casesTable.columnModel.title1")); // NOI18N
|
||||
casesTable.getColumnModel().getColumn(0).setHeaderValue(org.openide.util.NbBundle.getMessage(CaseDetailsDialog.class, "CaseDetailsDialog.casesTable.columnModel.title0")); // NOI18N
|
||||
casesTable.getColumnModel().getColumn(1).setHeaderValue(org.openide.util.NbBundle.getMessage(CaseDetailsDialog.class, "CaseDetailsDialog.casesTable.columnModel.title1")); // NOI18N
|
||||
}
|
||||
|
||||
javax.swing.GroupLayout casesPanelLayout = new javax.swing.GroupLayout(casesPanel);
|
||||
@ -294,12 +310,13 @@ public class CaseInfoDialog extends javax.swing.JDialog {
|
||||
pack();
|
||||
}// </editor-fold>//GEN-END:initComponents
|
||||
|
||||
private void closeButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_closeButtonActionPerformed
|
||||
this.dispose();
|
||||
}//GEN-LAST:event_closeButtonActionPerformed
|
||||
|
||||
private void updateSelection() {
|
||||
if (casesTable.getSelectedRow() >= 0 && casesTable.getSelectedRow() < casesTable.getRowCount()) {
|
||||
System.out.println("VALID INDEX");
|
||||
TableCaseWrapper caseWrapper = tableModel.getEamCase(casesTable.getSelectedRow());
|
||||
System.out.println("CASE NAME AGAINL " + caseWrapper.getDisplayName());
|
||||
System.out.println("CASE ORG " + caseWrapper.getOrganizationName());
|
||||
CaseDataSourcesWrapper caseWrapper = tableModel.getEamCase(casesTable.getSelectedRow());
|
||||
orgValueLabel.setText(caseWrapper.getOrganizationName());
|
||||
caseNumberValueLabel.setText(caseWrapper.getCaseNumber());
|
||||
examinerNameValueLabel.setText(caseWrapper.getExaminerName());
|
||||
@ -310,7 +327,6 @@ public class CaseInfoDialog extends javax.swing.JDialog {
|
||||
dataSourcesModel.addDataSources(caseWrapper.getDataSources());
|
||||
dataSourcesTable.setModel(dataSourcesModel);
|
||||
} else {
|
||||
System.out.println("INVALID INDEX");
|
||||
orgValueLabel.setText("");
|
||||
caseNumberValueLabel.setText("");
|
||||
examinerNameValueLabel.setText("");
|
@ -19,27 +19,25 @@
|
||||
package org.sleuthkit.autopsy.centralrepository.optionspanel;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
import javax.swing.table.AbstractTableModel;
|
||||
import org.openide.util.NbBundle.Messages;
|
||||
import org.sleuthkit.autopsy.centralrepository.datamodel.CorrelationCase;
|
||||
import org.sleuthkit.autopsy.centralrepository.datamodel.CorrelationDataSource;
|
||||
import org.sleuthkit.autopsy.centralrepository.datamodel.EamOrganization;
|
||||
|
||||
/**
|
||||
* Model for cells to display correlation case information
|
||||
*/
|
||||
class ShowCasesTableModel extends AbstractTableModel {
|
||||
class CasesTableModel extends AbstractTableModel {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* list of Eam Cases from central repository.
|
||||
*/
|
||||
private final List<TableCaseWrapper> eamCases;
|
||||
private final List<CaseDataSourcesWrapper> eamCases;
|
||||
|
||||
ShowCasesTableModel() {
|
||||
CasesTableModel() {
|
||||
eamCases = new ArrayList<>();
|
||||
}
|
||||
|
||||
@ -93,35 +91,18 @@ class ShowCasesTableModel extends AbstractTableModel {
|
||||
*
|
||||
* @return value in the cell
|
||||
*/
|
||||
@Messages({"CasesTableModel.noData=No Cases"})
|
||||
private Object mapValueById(int rowIdx, TableColumns colId) {
|
||||
TableCaseWrapper eamCase = eamCases.get(rowIdx);
|
||||
CaseDataSourcesWrapper eamCase = eamCases.get(rowIdx);
|
||||
String value = Bundle.ShowCasesTableModel_noData();
|
||||
|
||||
switch (colId) {
|
||||
case CASE_NAME:
|
||||
value = eamCase.getDisplayName();
|
||||
break;
|
||||
// case DATA_SOURCE:
|
||||
// value = eamCase.getDataSources();
|
||||
// break;
|
||||
case CREATION_DATE:
|
||||
value = eamCase.getCreationDate();
|
||||
break;
|
||||
// case CASE_NUMBER:
|
||||
// value = eamCase.getCaseNumber();
|
||||
// break;
|
||||
// case EXAMINER_NAME:
|
||||
// value = eamCase.getExaminerName();
|
||||
// break;
|
||||
// case EXAMINER_EMAIL:
|
||||
// value = eamCase.getExaminerEmail();
|
||||
// break;
|
||||
// case EXAMINER_PHONE:
|
||||
// value = eamCase.getExaminerPhone();
|
||||
// break;
|
||||
// case NOTES:
|
||||
// value = eamCase.getNotes();
|
||||
// break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
@ -139,11 +120,11 @@ class ShowCasesTableModel extends AbstractTableModel {
|
||||
* @param eamCase central repository case to add to the table
|
||||
*/
|
||||
void addEamCase(CorrelationCase eamCase, List<CorrelationDataSource> dataSourceList) {
|
||||
eamCases.add(new TableCaseWrapper(eamCase, dataSourceList));
|
||||
eamCases.add(new CaseDataSourcesWrapper(eamCase, dataSourceList));
|
||||
fireTableDataChanged();
|
||||
}
|
||||
|
||||
TableCaseWrapper getEamCase(int listIndex) {
|
||||
CaseDataSourcesWrapper getEamCase(int listIndex) {
|
||||
return eamCases.get(listIndex);
|
||||
}
|
||||
|
||||
@ -152,17 +133,16 @@ class ShowCasesTableModel extends AbstractTableModel {
|
||||
fireTableDataChanged();
|
||||
}
|
||||
|
||||
@Messages({"ShowCasesTableModel.case=Case Name",
|
||||
"ShowCasesTableModel.creationDate=Creation Date",
|
||||
"ShowCasesTableModel.noData=No Cases"})
|
||||
/**
|
||||
* Enum which lists columns of interest from CorrelationCase.
|
||||
*/
|
||||
@Messages({"CasesTableModel.case=Case Name",
|
||||
"CasesTableModel.creationDate=Creation Date"})
|
||||
private enum TableColumns {
|
||||
// Ordering here determines displayed column order in Content Viewer.
|
||||
// If order is changed, update the CellRenderer to ensure correct row coloring.
|
||||
CASE_NAME(Bundle.ShowCasesTableModel_case(), 120),
|
||||
CREATION_DATE(Bundle.ShowCasesTableModel_creationDate(), 120);
|
||||
CASE_NAME(Bundle.CasesTableModel_case(), 120),
|
||||
CREATION_DATE(Bundle.CasesTableModel_creationDate(), 120);
|
||||
|
||||
private final String columnName;
|
||||
private final int columnWidth;
|
||||
@ -180,53 +160,4 @@ class ShowCasesTableModel extends AbstractTableModel {
|
||||
return columnWidth;
|
||||
}
|
||||
}
|
||||
|
||||
class TableCaseWrapper {
|
||||
|
||||
private final CorrelationCase eamCase;
|
||||
private final List<CorrelationDataSource> dataSources;
|
||||
|
||||
TableCaseWrapper(CorrelationCase correlationCase, List<CorrelationDataSource> dataSourceList) {
|
||||
eamCase = correlationCase;
|
||||
dataSources = dataSourceList;
|
||||
}
|
||||
|
||||
String getDisplayName() {
|
||||
return eamCase.getDisplayName();
|
||||
}
|
||||
|
||||
List<CorrelationDataSource> getDataSources() {
|
||||
return Collections.unmodifiableList(dataSources);
|
||||
}
|
||||
|
||||
String getCreationDate() {
|
||||
return eamCase.getCreationDate();
|
||||
}
|
||||
|
||||
String getOrganizationName() {
|
||||
EamOrganization org = eamCase.getOrg();
|
||||
return org == null ? "" : org.getName();
|
||||
}
|
||||
|
||||
String getCaseNumber() {
|
||||
return eamCase.getCaseNumber();
|
||||
}
|
||||
|
||||
String getExaminerName() {
|
||||
return eamCase.getExaminerName();
|
||||
}
|
||||
|
||||
String getExaminerEmail() {
|
||||
return eamCase.getExaminerEmail();
|
||||
}
|
||||
|
||||
String getNotes() {
|
||||
return eamCase.getNotes();
|
||||
}
|
||||
|
||||
String getExaminerPhone() {
|
||||
return eamCase.getExaminerPhone();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
@ -22,7 +22,6 @@ import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import javax.swing.table.AbstractTableModel;
|
||||
import org.openide.util.NbBundle.Messages;
|
||||
import org.sleuthkit.autopsy.centralrepository.datamodel.CorrelationCase;
|
||||
import org.sleuthkit.autopsy.centralrepository.datamodel.CorrelationDataSource;
|
||||
|
||||
/**
|
||||
@ -87,6 +86,7 @@ class DataSourcesTableModel extends AbstractTableModel {
|
||||
*
|
||||
* @return value in the cell
|
||||
*/
|
||||
@Messages({"DataSourcesTableModel.noData=No Cases"})
|
||||
private Object mapValueById(int rowIdx, TableColumns colId) {
|
||||
CorrelationDataSource dataSource = dataSources.get(rowIdx);
|
||||
String value = Bundle.DataSourcesTableModel_noData();
|
||||
@ -126,8 +126,7 @@ class DataSourcesTableModel extends AbstractTableModel {
|
||||
}
|
||||
|
||||
@Messages({"DataSourcesTableModel.dataSource=Data Source",
|
||||
"DataSourcesTableModel.deviceId=Device ID",
|
||||
"DataSourcesTableModel.noData=No Cases"})
|
||||
"DataSourcesTableModel.deviceId=Device ID"})
|
||||
/**
|
||||
* Enum which lists columns of interest from CorrelationCase.
|
||||
*/
|
||||
|
@ -442,7 +442,7 @@ public final class GlobalSettingsPanel extends IngestModuleGlobalSettingsPanel i
|
||||
private void showCasesButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_showCasesButtonActionPerformed
|
||||
store();
|
||||
// ShowCasesDialog showCasesDialog = new ShowCasesDialog();
|
||||
CaseInfoDialog.displayCaseInfoDialog();
|
||||
CaseDetailsDialog.displayCaseInfoDialog();
|
||||
}//GEN-LAST:event_showCasesButtonActionPerformed
|
||||
|
||||
@Override
|
||||
|
Loading…
x
Reference in New Issue
Block a user