diff --git a/Core/src/org/sleuthkit/autopsy/actions/Bundle.properties b/Core/src/org/sleuthkit/autopsy/actions/Bundle.properties
index 8f8b3b4b42..a2feedc54f 100644
--- a/Core/src/org/sleuthkit/autopsy/actions/Bundle.properties
+++ b/Core/src/org/sleuthkit/autopsy/actions/Bundle.properties
@@ -36,10 +36,10 @@ GetTagNameDialog.tagNameExistsTskCore.msg=The {0} tag name already exists in the
OpenLogFolder.error1=Log File Not Found: {0}
OpenLogFolder.CouldNotOpenLogFolder=Could not open log folder
CTL_OpenLogFolder=Open Log Folder
-CTL_OpenOutputFolder=Open Output Folder
-OpenOutputFolder.error1=Output Folder Not Found: {0}
-OpenOutputFolder.noCaseOpen=No open case, therefore no current output folder available.
-OpenOutputFolder.CouldNotOpenOutputFolder=Could not open output folder
+CTL_OpenOutputFolder=Open Case Folder
+OpenOutputFolder.error1=Case Folder Not Found: {0}
+OpenOutputFolder.noCaseOpen=No open case, therefore no current case folder available.
+OpenOutputFolder.CouldNotOpenOutputFolder=Could not open case folder
ShowIngestProgressSnapshotAction.actionName.text=Get Ingest Progress Snapshot
OpenPythonModulesFolderAction.actionName.text=Python Plugins
OpenPythonModulesFolderAction.errorMsg.folderNotFound=Python plugins folder not found: {0}
diff --git a/Core/src/org/sleuthkit/autopsy/actions/Bundle.properties-MERGED b/Core/src/org/sleuthkit/autopsy/actions/Bundle.properties-MERGED
index 506786c42d..a3a13c0cff 100755
--- a/Core/src/org/sleuthkit/autopsy/actions/Bundle.properties-MERGED
+++ b/Core/src/org/sleuthkit/autopsy/actions/Bundle.properties-MERGED
@@ -79,10 +79,10 @@ GetTagNameDialog.tagNameExistsTskCore.msg=The {0} tag name already exists in the
OpenLogFolder.error1=Log File Not Found: {0}
OpenLogFolder.CouldNotOpenLogFolder=Could not open log folder
CTL_OpenLogFolder=Open Log Folder
-CTL_OpenOutputFolder=Open Output Folder
-OpenOutputFolder.error1=Output Folder Not Found: {0}
-OpenOutputFolder.noCaseOpen=No open case, therefore no current output folder available.
-OpenOutputFolder.CouldNotOpenOutputFolder=Could not open output folder
+CTL_OpenOutputFolder=Open Case Folder
+OpenOutputFolder.error1=Case Folder Not Found: {0}
+OpenOutputFolder.noCaseOpen=No open case, therefore no current case folder available.
+OpenOutputFolder.CouldNotOpenOutputFolder=Could not open case folder
# {0} - old tag name
# {1} - artifactID
ReplaceBlackboardArtifactTagAction.replaceTag.alert=Unable to replace tag {0} for artifact {1}.
diff --git a/Core/src/org/sleuthkit/autopsy/casemodule/OpenRecentCasePanel.form b/Core/src/org/sleuthkit/autopsy/casemodule/OpenRecentCasePanel.form
index bb12ba69d9..5e9ec1f38a 100644
--- a/Core/src/org/sleuthkit/autopsy/casemodule/OpenRecentCasePanel.form
+++ b/Core/src/org/sleuthkit/autopsy/casemodule/OpenRecentCasePanel.form
@@ -76,6 +76,7 @@
+
diff --git a/Core/src/org/sleuthkit/autopsy/casemodule/OpenRecentCasePanel.java b/Core/src/org/sleuthkit/autopsy/casemodule/OpenRecentCasePanel.java
index 5f164cd00f..401663056b 100644
--- a/Core/src/org/sleuthkit/autopsy/casemodule/OpenRecentCasePanel.java
+++ b/Core/src/org/sleuthkit/autopsy/casemodule/OpenRecentCasePanel.java
@@ -1,7 +1,7 @@
/*
* Autopsy Forensic Browser
*
- * Copyright 2011-2018 Basis Technology Corp.
+ * Copyright 2011-2019 Basis Technology Corp.
* Contact: carrier sleuthkit org
*
* Licensed under the Apache License, Version 2.0 (the "License");
@@ -24,7 +24,10 @@ import java.io.File;
import java.util.logging.Level;
import javax.swing.JOptionPane;
import javax.swing.JTable;
+import javax.swing.ListSelectionModel;
import javax.swing.SwingUtilities;
+import javax.swing.event.ListSelectionEvent;
+import javax.swing.event.ListSelectionListener;
import javax.swing.table.AbstractTableModel;
import org.openide.util.NbBundle;
import org.openide.windows.WindowManager;
@@ -51,6 +54,16 @@ class OpenRecentCasePanel extends javax.swing.JPanel {
*/
private OpenRecentCasePanel() {
initComponents();
+ imagesTable.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
+ imagesTable.getSelectionModel().addListSelectionListener(new ListSelectionListener() {
+ @Override
+ public void valueChanged(ListSelectionEvent e) {
+ //enable the ok button when something is selected
+ if (!e.getValueIsAdjusting()){
+ openButton.setEnabled(imagesTable.getSelectedRowCount() > 0);
+ }
+ }
+ });
}
/*
@@ -90,9 +103,6 @@ class OpenRecentCasePanel extends javax.swing.JPanel {
// If there are any images, let's select the first one
if (imagesTable.getRowCount() > 0) {
imagesTable.setRowSelectionInterval(0, 0);
- openButton.setEnabled(true);
- } else {
- openButton.setEnabled(false);
}
}
@@ -251,6 +261,7 @@ class OpenRecentCasePanel extends javax.swing.JPanel {
cancelButton.setText(org.openide.util.NbBundle.getMessage(OpenRecentCasePanel.class, "OpenRecentCasePanel.cancelButton.text")); // NOI18N
openButton.setText(org.openide.util.NbBundle.getMessage(OpenRecentCasePanel.class, "OpenRecentCasePanel.openButton.text")); // NOI18N
+ openButton.setEnabled(false);
openButton.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
openButtonActionPerformed(evt);
diff --git a/Core/src/org/sleuthkit/autopsy/casemodule/services/FileManager.java b/Core/src/org/sleuthkit/autopsy/casemodule/services/FileManager.java
index 5a2521ef8e..31ccf6bac7 100644
--- a/Core/src/org/sleuthkit/autopsy/casemodule/services/FileManager.java
+++ b/Core/src/org/sleuthkit/autopsy/casemodule/services/FileManager.java
@@ -754,9 +754,8 @@ public class FileManager implements Closeable {
* the parent local directory.
* @param localFile The local/logical file or directory.
* @param progressUpdater notifier to receive progress notifications on
- * folders added, or null if not used
- * @param progressUpdater Called after each file/directory is added to the
- * case database.
+ * folders added, or null if not used. Called after
+ * each file/directory is added to the case database.
*
* @return An AbstractFile representation of the local/logical file.
*
diff --git a/Core/src/org/sleuthkit/autopsy/centralrepository/contentviewer/DataContentViewerOtherCases.java b/Core/src/org/sleuthkit/autopsy/centralrepository/contentviewer/DataContentViewerOtherCases.java
index 259831824c..9713a5b47a 100644
--- a/Core/src/org/sleuthkit/autopsy/centralrepository/contentviewer/DataContentViewerOtherCases.java
+++ b/Core/src/org/sleuthkit/autopsy/centralrepository/contentviewer/DataContentViewerOtherCases.java
@@ -810,6 +810,13 @@ public class DataContentViewerOtherCases extends JPanel implements DataContentVi
occurrencePanel.getPreferredSize();
detailsPanelScrollPane.setViewportView(occurrencePanel);
} else {
+ String currentCaseName;
+ try {
+ currentCaseName = Case.getCurrentCaseThrows().getName();
+ } catch (NoCurrentCaseException ex) {
+ currentCaseName = null;
+ LOGGER.log(Level.WARNING, "Unable to get current case for other occurrences content viewer", ex);
+ }
for (CorrelationAttributeInstance corAttr : correlationAttributes) {
Map correlatedNodeDataMap = new HashMap<>(0);
@@ -823,7 +830,7 @@ public class DataContentViewerOtherCases extends JPanel implements DataContentVi
&& casesTableModel.getCorrelationCase(casesTable.convertRowIndexToModel(selectedRow)).getCaseUUID().equals(nodeData.getCorrelationAttributeInstance().getCorrelationCase().getCaseUUID())) {
dataSourcesTableModel.addNodeData(nodeData);
}
- } else {
+ } else if (currentCaseName != null && (casesTableModel.getCorrelationCase(casesTable.convertRowIndexToModel(selectedRow)).getCaseUUID().equals(currentCaseName))) {
dataSourcesTableModel.addNodeData(nodeData);
}
} catch (EamDbException ex) {
@@ -1153,8 +1160,14 @@ public class DataContentViewerOtherCases extends JPanel implements DataContentVi
try {
tempCaseUUID = nodeData.getCorrelationAttributeInstance().getCorrelationCase().getCaseUUID();
} catch (EamDbException ignored) {
- tempCaseUUID = UUID_PLACEHOLDER_STRING;
- //place holder value will be used since correlation attribute was unavailble
+ //non central repo nodeData won't have a correlation case
+ try {
+ tempCaseUUID = Case.getCurrentCaseThrows().getName();
+ //place holder value will be used since correlation attribute was unavailble
+ } catch (NoCurrentCaseException ex) {
+ LOGGER.log(Level.WARNING, "Unable to get current case", ex);
+ tempCaseUUID = UUID_PLACEHOLDER_STRING;
+ }
}
caseUUID = tempCaseUUID;
}
diff --git a/Core/src/org/sleuthkit/autopsy/centralrepository/contentviewer/OtherOccurrencesDataSourcesTableModel.java b/Core/src/org/sleuthkit/autopsy/centralrepository/contentviewer/OtherOccurrencesDataSourcesTableModel.java
index 240826b8b7..76871d074d 100644
--- a/Core/src/org/sleuthkit/autopsy/centralrepository/contentviewer/OtherOccurrencesDataSourcesTableModel.java
+++ b/Core/src/org/sleuthkit/autopsy/centralrepository/contentviewer/OtherOccurrencesDataSourcesTableModel.java
@@ -21,9 +21,13 @@ package org.sleuthkit.autopsy.centralrepository.contentviewer;
import java.util.LinkedHashSet;
import java.util.Objects;
import java.util.Set;
+import java.util.logging.Level;
import javax.swing.table.AbstractTableModel;
import org.openide.util.NbBundle;
+import org.sleuthkit.autopsy.casemodule.Case;
+import org.sleuthkit.autopsy.casemodule.NoCurrentCaseException;
import org.sleuthkit.autopsy.centralrepository.datamodel.EamDbException;
+import org.sleuthkit.autopsy.coreutils.Logger;
/**
* Model for cells in the data sources section of the other occurrences data
@@ -32,6 +36,7 @@ import org.sleuthkit.autopsy.centralrepository.datamodel.EamDbException;
final class OtherOccurrencesDataSourcesTableModel extends AbstractTableModel {
private static final long serialVersionUID = 1L;
+ private static final Logger logger = Logger.getLogger(OtherOccurrencesDataSourcesTableModel.class.getName());
private final Set dataSourceSet = new LinkedHashSet<>();
/**
@@ -140,8 +145,14 @@ final class OtherOccurrencesDataSourcesTableModel extends AbstractTableModel {
try {
caseUUID = nodeData.getCorrelationAttributeInstance().getCorrelationCase().getCaseUUID();
} catch (EamDbException ignored) {
- caseUUID = DataContentViewerOtherCases.getPlaceholderUUID();
- //place holder value will be used since correlation attribute was unavailble
+ //non central repo nodeData won't have a correlation case
+ try {
+ caseUUID = Case.getCurrentCaseThrows().getName();
+ //place holder value will be used since correlation attribute was unavailble
+ } catch (NoCurrentCaseException ex) {
+ logger.log(Level.WARNING, "Unable to get current case", ex);
+ caseUUID = DataContentViewerOtherCases.getPlaceholderUUID();
+ }
}
dataSourceSet.add(new DataSourceColumnItem(nodeData.getCaseName(), nodeData.getDeviceID(), nodeData.getDataSourceName(), caseUUID));
fireTableDataChanged();
diff --git a/Core/src/org/sleuthkit/autopsy/centralrepository/contentviewer/OtherOccurrencesFilesTableModel.java b/Core/src/org/sleuthkit/autopsy/centralrepository/contentviewer/OtherOccurrencesFilesTableModel.java
index f759ecfd2a..3344951857 100644
--- a/Core/src/org/sleuthkit/autopsy/centralrepository/contentviewer/OtherOccurrencesFilesTableModel.java
+++ b/Core/src/org/sleuthkit/autopsy/centralrepository/contentviewer/OtherOccurrencesFilesTableModel.java
@@ -22,10 +22,14 @@ import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
+import java.util.logging.Level;
import javax.swing.table.AbstractTableModel;
import org.openide.util.NbBundle.Messages;
import org.apache.commons.io.FilenameUtils;
+import org.sleuthkit.autopsy.casemodule.Case;
+import org.sleuthkit.autopsy.casemodule.NoCurrentCaseException;
import org.sleuthkit.autopsy.centralrepository.datamodel.EamDbException;
+import org.sleuthkit.autopsy.coreutils.Logger;
/**
* Model for cells in the files section of the other occurrences data content
@@ -34,6 +38,7 @@ import org.sleuthkit.autopsy.centralrepository.datamodel.EamDbException;
public class OtherOccurrencesFilesTableModel extends AbstractTableModel {
private static final long serialVersionUID = 1L;
+ private static final Logger logger = Logger.getLogger(OtherOccurrencesFilesTableModel.class.getName());
private final List nodeKeys = new ArrayList<>();
private final Map> nodeMap = new HashMap<>();
@@ -119,8 +124,14 @@ public class OtherOccurrencesFilesTableModel extends AbstractTableModel {
try {
caseUUID = nodeData.getCorrelationAttributeInstance().getCorrelationCase().getCaseUUID();
} catch (EamDbException ignored) {
- caseUUID = DataContentViewerOtherCases.getPlaceholderUUID();
- //place holder value will be used since correlation attribute was unavailble
+ //non central repo nodeData won't have a correlation case
+ try {
+ caseUUID = Case.getCurrentCaseThrows().getName();
+ //place holder value will be used since correlation attribute was unavailble
+ } catch (NoCurrentCaseException ex) {
+ logger.log(Level.WARNING, "Unable to get current case", ex);
+ caseUUID = DataContentViewerOtherCases.getPlaceholderUUID();
+ }
}
return nodeData.getCaseName() + nodeData.getDataSourceName() + nodeData.getDeviceID() + nodeData.getFilePath() + caseUUID;
}
diff --git a/Core/src/org/sleuthkit/autopsy/centralrepository/datamodel/CorrelationAttributeNormalizer.java b/Core/src/org/sleuthkit/autopsy/centralrepository/datamodel/CorrelationAttributeNormalizer.java
index f6f3b52c6e..08ed088cf1 100644
--- a/Core/src/org/sleuthkit/autopsy/centralrepository/datamodel/CorrelationAttributeNormalizer.java
+++ b/Core/src/org/sleuthkit/autopsy/centralrepository/datamodel/CorrelationAttributeNormalizer.java
@@ -123,7 +123,7 @@ final public class CorrelationAttributeNormalizer {
/**
* Verify there are no slashes or invalid domain name characters (such as
- * '?' or \: ). Normalize to lower case.
+ * '?'). Normalize to lower case.
*/
private static String normalizeDomain(String data) throws CorrelationAttributeNormalizationException {
DomainValidator validator = DomainValidator.getInstance(true);
diff --git a/Core/src/org/sleuthkit/autopsy/centralrepository/ingestmodule/IngestSettingsPanel.form b/Core/src/org/sleuthkit/autopsy/centralrepository/ingestmodule/IngestSettingsPanel.form
index 82383f135f..6c189d736e 100755
--- a/Core/src/org/sleuthkit/autopsy/centralrepository/ingestmodule/IngestSettingsPanel.form
+++ b/Core/src/org/sleuthkit/autopsy/centralrepository/ingestmodule/IngestSettingsPanel.form
@@ -29,7 +29,7 @@
-
+
@@ -44,7 +44,7 @@
-
+
diff --git a/Core/src/org/sleuthkit/autopsy/centralrepository/ingestmodule/IngestSettingsPanel.java b/Core/src/org/sleuthkit/autopsy/centralrepository/ingestmodule/IngestSettingsPanel.java
index 6438b399e7..c9ecbfc146 100755
--- a/Core/src/org/sleuthkit/autopsy/centralrepository/ingestmodule/IngestSettingsPanel.java
+++ b/Core/src/org/sleuthkit/autopsy/centralrepository/ingestmodule/IngestSettingsPanel.java
@@ -88,7 +88,7 @@ final class IngestSettingsPanel extends IngestModuleIngestJobSettingsPanel {
.addComponent(flagTaggedNotableItemsCheckbox, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addComponent(flagPreviouslySeenDevicesCheckbox, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addComponent(createCorrelationPropertiesCheckbox, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))))
- .addContainerGap(65, Short.MAX_VALUE))
+ .addContainerGap(47, Short.MAX_VALUE))
);
layout.setVerticalGroup(
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
@@ -101,7 +101,7 @@ final class IngestSettingsPanel extends IngestModuleIngestJobSettingsPanel {
.addComponent(flagTaggedNotableItemsCheckbox)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(flagPreviouslySeenDevicesCheckbox)
- .addContainerGap(197, Short.MAX_VALUE))
+ .addContainerGap(47, Short.MAX_VALUE))
);
}// //GEN-END:initComponents
diff --git a/Core/src/org/sleuthkit/autopsy/centralrepository/optionspanel/Bundle.properties b/Core/src/org/sleuthkit/autopsy/centralrepository/optionspanel/Bundle.properties
index 635f5a558c..0b30e2584f 100644
--- a/Core/src/org/sleuthkit/autopsy/centralrepository/optionspanel/Bundle.properties
+++ b/Core/src/org/sleuthkit/autopsy/centralrepository/optionspanel/Bundle.properties
@@ -57,7 +57,6 @@ ManageCorrelationPropertiesDialog.cancelButton.text=Cancel
ManageCorrelationPropertiesDialog.okButton.text=OK
GlobalSettingsPanel.bnManageProperties.text=Manage Correlation Properties
EamDbSettingsDialog.lbDatabaseDesc.text=Database File:
-EamDbSettingsDialog.lbFullDbPath.text=
GlobalSettingsPanel.cbUseCentralRepo.text=Use a Central Repository
GlobalSettingsPanel.organizationTextArea.text=Organization information can be tracked in the Central Repository.
GlobalSettingsPanel.manageOrganizationButton.text=Manage Organizations
@@ -84,4 +83,4 @@ ManageCasesDialog.orgLabel.text=Organization:
ManageCasesDialog.closeButton.text=Close
ManageCasesDialog.notesLabel.text=Notes:
ManageCasesDialog.dataSourcesLabel.text=Data Sources:
-ManageCasesDialog.caseInfoLabel.text=Case Info:
\ No newline at end of file
+ManageCasesDialog.caseInfoLabel.text=Case Info:
diff --git a/Core/src/org/sleuthkit/autopsy/centralrepository/optionspanel/Bundle.properties-MERGED b/Core/src/org/sleuthkit/autopsy/centralrepository/optionspanel/Bundle.properties-MERGED
index 454cb29e39..dc42aa3b68 100755
--- a/Core/src/org/sleuthkit/autopsy/centralrepository/optionspanel/Bundle.properties-MERGED
+++ b/Core/src/org/sleuthkit/autopsy/centralrepository/optionspanel/Bundle.properties-MERGED
@@ -115,7 +115,6 @@ ManageCorrelationPropertiesDialog.cancelButton.text=Cancel
ManageCorrelationPropertiesDialog.okButton.text=OK
GlobalSettingsPanel.bnManageProperties.text=Manage Correlation Properties
EamDbSettingsDialog.lbDatabaseDesc.text=Database File:
-EamDbSettingsDialog.lbFullDbPath.text=
GlobalSettingsPanel.cbUseCentralRepo.text=Use a Central Repository
GlobalSettingsPanel.organizationTextArea.text=Organization information can be tracked in the Central Repository.
GlobalSettingsPanel.manageOrganizationButton.text=Manage Organizations
diff --git a/Core/src/org/sleuthkit/autopsy/centralrepository/optionspanel/EamDbSettingsDialog.form b/Core/src/org/sleuthkit/autopsy/centralrepository/optionspanel/EamDbSettingsDialog.form
index 50979ba938..b063773f48 100644
--- a/Core/src/org/sleuthkit/autopsy/centralrepository/optionspanel/EamDbSettingsDialog.form
+++ b/Core/src/org/sleuthkit/autopsy/centralrepository/optionspanel/EamDbSettingsDialog.form
@@ -9,6 +9,7 @@
+
@@ -35,18 +36,18 @@
-
+
-
-
-
+
+
+
-
+
@@ -59,9 +60,9 @@
-
+
-
+
@@ -85,6 +86,15 @@
+
+
+
+
+
+
+
+
+
@@ -115,43 +125,37 @@
-
+
-
-
+
+
+
-
+
-
-
-
-
-
-
-
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
@@ -171,40 +175,42 @@
-
+
-
+
-
+
-
+
-
+
-
+
-
-
-
-
+
+
+
+
+
+
+
+
-
-
@@ -215,6 +221,9 @@
+
+
+
@@ -225,6 +234,9 @@
+
+
+
@@ -242,42 +254,77 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -291,6 +338,9 @@
+
+
+
@@ -298,6 +348,15 @@
+
+
+
+
+
+
+
+
+
@@ -305,12 +364,8 @@
-
-
-
-
-
-
+
+
@@ -324,6 +379,34 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/Core/src/org/sleuthkit/autopsy/centralrepository/optionspanel/EamDbSettingsDialog.java b/Core/src/org/sleuthkit/autopsy/centralrepository/optionspanel/EamDbSettingsDialog.java
index 19b1c4c8e5..5c68b51b92 100644
--- a/Core/src/org/sleuthkit/autopsy/centralrepository/optionspanel/EamDbSettingsDialog.java
+++ b/Core/src/org/sleuthkit/autopsy/centralrepository/optionspanel/EamDbSettingsDialog.java
@@ -142,12 +142,17 @@ public class EamDbSettingsDialog extends JDialog {
lbSingleUserSqLite = new javax.swing.JLabel();
lbDatabaseType = new javax.swing.JLabel();
lbDatabaseDesc = new javax.swing.JLabel();
- lbFullDbPath = new javax.swing.JLabel();
filler1 = new javax.swing.Box.Filler(new java.awt.Dimension(0, 0), new java.awt.Dimension(0, 0), new java.awt.Dimension(0, 32767));
+ dataBaseFileScrollPane = new javax.swing.JScrollPane();
+ dataBaseFileTextArea = new javax.swing.JTextArea();
setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);
+ setResizable(false);
org.openide.awt.Mnemonics.setLocalizedText(bnCancel, org.openide.util.NbBundle.getMessage(EamDbSettingsDialog.class, "EamDbSettingsDialog.bnCancel.text")); // NOI18N
+ bnCancel.setMaximumSize(new java.awt.Dimension(79, 23));
+ bnCancel.setMinimumSize(new java.awt.Dimension(79, 23));
+ bnCancel.setPreferredSize(new java.awt.Dimension(79, 23));
bnCancel.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
bnCancelActionPerformed(evt);
@@ -169,25 +174,30 @@ public class EamDbSettingsDialog extends JDialog {
.addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addComponent(bnOk)
.addGap(11, 11, 11)
- .addComponent(bnCancel)
+ .addComponent(bnCancel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addContainerGap())
);
+
+ pnButtonsLayout.linkSize(javax.swing.SwingConstants.HORIZONTAL, new java.awt.Component[] {bnCancel, bnOk});
+
pnButtonsLayout.setVerticalGroup(
pnButtonsLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(pnButtonsLayout.createSequentialGroup()
.addGap(0, 0, 0)
.addGroup(pnButtonsLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(bnOk)
- .addComponent(bnCancel))
+ .addComponent(bnCancel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
.addGap(0, 0, 0))
);
pnSQLiteSettings.setBorder(javax.swing.BorderFactory.createEtchedBorder());
org.openide.awt.Mnemonics.setLocalizedText(lbDatabasePath, org.openide.util.NbBundle.getMessage(EamDbSettingsDialog.class, "EamDbSettingsDialog.lbDatabasePath.text")); // NOI18N
+ lbDatabasePath.setPreferredSize(new java.awt.Dimension(80, 14));
tfDatabasePath.setText(org.openide.util.NbBundle.getMessage(EamDbSettingsDialog.class, "EamDbSettingsDialog.tfDatabasePath.text")); // NOI18N
tfDatabasePath.setToolTipText(org.openide.util.NbBundle.getMessage(EamDbSettingsDialog.class, "EamDbSettingsDialog.tfDatabasePath.toolTipText")); // NOI18N
+ tfDatabasePath.setPreferredSize(new java.awt.Dimension(420, 23));
org.openide.awt.Mnemonics.setLocalizedText(bnDatabasePathFileOpen, org.openide.util.NbBundle.getMessage(EamDbSettingsDialog.class, "EamDbSettingsDialog.bnDatabasePathFileOpen.text")); // NOI18N
bnDatabasePathFileOpen.addActionListener(new java.awt.event.ActionListener() {
@@ -197,14 +207,27 @@ public class EamDbSettingsDialog extends JDialog {
});
org.openide.awt.Mnemonics.setLocalizedText(lbHostName, org.openide.util.NbBundle.getMessage(EamDbSettingsDialog.class, "EamDbSettingsDialog.lbHostName.text")); // NOI18N
+ lbHostName.setPreferredSize(new java.awt.Dimension(80, 14));
+
+ tbDbHostname.setPreferredSize(new java.awt.Dimension(509, 20));
org.openide.awt.Mnemonics.setLocalizedText(lbPort, org.openide.util.NbBundle.getMessage(EamDbSettingsDialog.class, "EamDbSettingsDialog.lbPort.text")); // NOI18N
+ lbPort.setPreferredSize(new java.awt.Dimension(80, 14));
+
+ tbDbPort.setPreferredSize(new java.awt.Dimension(509, 20));
org.openide.awt.Mnemonics.setLocalizedText(lbUserName, org.openide.util.NbBundle.getMessage(EamDbSettingsDialog.class, "EamDbSettingsDialog.lbUserName.text")); // NOI18N
+ lbUserName.setPreferredSize(new java.awt.Dimension(80, 14));
+
+ tbDbUsername.setPreferredSize(new java.awt.Dimension(509, 20));
org.openide.awt.Mnemonics.setLocalizedText(lbUserPassword, org.openide.util.NbBundle.getMessage(EamDbSettingsDialog.class, "EamDbSettingsDialog.lbUserPassword.text")); // NOI18N
+ lbUserPassword.setPreferredSize(new java.awt.Dimension(80, 14));
+
+ jpDbPassword.setPreferredSize(new java.awt.Dimension(509, 20));
cbDatabaseType.setModel(new javax.swing.DefaultComboBoxModel<>(new EamDbPlatformEnum[]{EamDbPlatformEnum.POSTGRESQL, EamDbPlatformEnum.SQLITE}));
+ cbDatabaseType.setPreferredSize(new java.awt.Dimension(120, 20));
cbDatabaseType.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
cbDatabaseTypeActionPerformed(evt);
@@ -212,12 +235,25 @@ public class EamDbSettingsDialog extends JDialog {
});
org.openide.awt.Mnemonics.setLocalizedText(lbSingleUserSqLite, org.openide.util.NbBundle.getMessage(EamDbSettingsDialog.class, "EamDbSettingsDialog.lbSingleUserSqLite.text")); // NOI18N
+ lbSingleUserSqLite.setPreferredSize(new java.awt.Dimension(381, 14));
org.openide.awt.Mnemonics.setLocalizedText(lbDatabaseType, org.openide.util.NbBundle.getMessage(EamDbSettingsDialog.class, "EamDbSettingsDialog.lbDatabaseType.text")); // NOI18N
+ lbDatabaseType.setMaximumSize(new java.awt.Dimension(80, 14));
+ lbDatabaseType.setMinimumSize(new java.awt.Dimension(80, 14));
+ lbDatabaseType.setPreferredSize(new java.awt.Dimension(80, 14));
org.openide.awt.Mnemonics.setLocalizedText(lbDatabaseDesc, org.openide.util.NbBundle.getMessage(EamDbSettingsDialog.class, "EamDbSettingsDialog.lbDatabaseDesc.text")); // NOI18N
+ lbDatabaseDesc.setPreferredSize(new java.awt.Dimension(80, 14));
- org.openide.awt.Mnemonics.setLocalizedText(lbFullDbPath, org.openide.util.NbBundle.getMessage(EamDbSettingsDialog.class, "EamDbSettingsDialog.lbFullDbPath.text")); // NOI18N
+ dataBaseFileScrollPane.setBorder(null);
+
+ dataBaseFileTextArea.setEditable(false);
+ dataBaseFileTextArea.setBackground(new java.awt.Color(240, 240, 240));
+ dataBaseFileTextArea.setColumns(20);
+ dataBaseFileTextArea.setFont(new java.awt.Font("Tahoma", 0, 11)); // NOI18N
+ dataBaseFileTextArea.setLineWrap(true);
+ dataBaseFileTextArea.setRows(3);
+ dataBaseFileScrollPane.setViewportView(dataBaseFileTextArea);
javax.swing.GroupLayout pnSQLiteSettingsLayout = new javax.swing.GroupLayout(pnSQLiteSettings);
pnSQLiteSettings.setLayout(pnSQLiteSettingsLayout);
@@ -226,34 +262,30 @@ public class EamDbSettingsDialog extends JDialog {
.addGroup(pnSQLiteSettingsLayout.createSequentialGroup()
.addContainerGap()
.addGroup(pnSQLiteSettingsLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
- .addComponent(lbHostName)
- .addComponent(lbPort)
- .addComponent(lbUserName)
- .addComponent(lbDatabaseType)
+ .addComponent(lbHostName, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
+ .addComponent(lbDatabaseType, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
+ .addComponent(lbDatabasePath, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
+ .addComponent(lbUserName, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
+ .addComponent(lbPort, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addGroup(pnSQLiteSettingsLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)
- .addComponent(lbDatabasePath, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
- .addComponent(lbUserPassword, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
- .addComponent(lbDatabaseDesc))
+ .addComponent(lbDatabaseDesc, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
+ .addComponent(lbUserPassword, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)))
.addGap(10, 10, 10)
.addGroup(pnSQLiteSettingsLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
- .addComponent(lbFullDbPath, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
+ .addGroup(pnSQLiteSettingsLayout.createSequentialGroup()
+ .addComponent(tfDatabasePath, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
+ .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
+ .addComponent(bnDatabasePathFileOpen))
.addGroup(pnSQLiteSettingsLayout.createSequentialGroup()
.addComponent(cbDatabaseType, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
- .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
- .addComponent(lbSingleUserSqLite, javax.swing.GroupLayout.DEFAULT_SIZE, 467, Short.MAX_VALUE)
- .addGap(9, 9, 9))
- .addGroup(pnSQLiteSettingsLayout.createSequentialGroup()
- .addComponent(tfDatabasePath)
- .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
- .addComponent(bnDatabasePathFileOpen)
- .addGap(11, 11, 11))
- .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, pnSQLiteSettingsLayout.createSequentialGroup()
- .addGroup(pnSQLiteSettingsLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
- .addComponent(tbDbHostname, javax.swing.GroupLayout.Alignment.LEADING)
- .addComponent(jpDbPassword, javax.swing.GroupLayout.Alignment.LEADING)
- .addComponent(tbDbUsername)
- .addComponent(tbDbPort, javax.swing.GroupLayout.Alignment.LEADING))
- .addGap(10, 10, 10))))
+ .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
+ .addComponent(lbSingleUserSqLite, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
+ .addComponent(jpDbPassword, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
+ .addComponent(tbDbUsername, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
+ .addComponent(tbDbPort, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
+ .addComponent(tbDbHostname, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
+ .addComponent(dataBaseFileScrollPane, javax.swing.GroupLayout.PREFERRED_SIZE, 509, javax.swing.GroupLayout.PREFERRED_SIZE))
+ .addContainerGap())
.addGroup(pnSQLiteSettingsLayout.createSequentialGroup()
.addGap(55, 55, 55)
.addComponent(filler1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
@@ -266,35 +298,36 @@ public class EamDbSettingsDialog extends JDialog {
.addGroup(pnSQLiteSettingsLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(pnSQLiteSettingsLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(cbDatabaseType, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
- .addComponent(lbSingleUserSqLite))
- .addComponent(lbDatabaseType, javax.swing.GroupLayout.Alignment.TRAILING))
+ .addComponent(lbSingleUserSqLite, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
+ .addComponent(lbDatabaseType, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addGroup(pnSQLiteSettingsLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
- .addComponent(lbDatabasePath)
- .addComponent(tfDatabasePath, javax.swing.GroupLayout.PREFERRED_SIZE, 23, javax.swing.GroupLayout.PREFERRED_SIZE)
+ .addComponent(lbDatabasePath, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
+ .addComponent(tfDatabasePath, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(bnDatabasePathFileOpen))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addGroup(pnSQLiteSettingsLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(tbDbHostname, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
- .addComponent(lbHostName))
+ .addComponent(lbHostName, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addGroup(pnSQLiteSettingsLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(tbDbPort, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
- .addComponent(lbPort))
+ .addComponent(lbPort, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addGroup(pnSQLiteSettingsLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(tbDbUsername, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
- .addComponent(lbUserName))
+ .addComponent(lbUserName, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addGroup(pnSQLiteSettingsLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(jpDbPassword, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
- .addComponent(lbUserPassword))
+ .addComponent(lbUserPassword, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
- .addGroup(pnSQLiteSettingsLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
- .addComponent(lbFullDbPath, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
- .addComponent(lbDatabaseDesc, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
- .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
- .addComponent(filler1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
+ .addGroup(pnSQLiteSettingsLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
+ .addGroup(pnSQLiteSettingsLayout.createSequentialGroup()
+ .addComponent(lbDatabaseDesc, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
+ .addGap(18, 18, 18)
+ .addComponent(filler1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
+ .addComponent(dataBaseFileScrollPane, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
.addContainerGap())
);
@@ -312,11 +345,11 @@ public class EamDbSettingsDialog extends JDialog {
layout.setVerticalGroup(
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(layout.createSequentialGroup()
- .addGap(10, 10, 10)
- .addComponent(pnSQLiteSettings, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
- .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 11, Short.MAX_VALUE)
+ .addContainerGap()
+ .addComponent(pnSQLiteSettings, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
+ .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addComponent(pnButtons, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
- .addGap(10, 10, 10))
+ .addContainerGap())
);
pack();
@@ -357,6 +390,7 @@ public class EamDbSettingsDialog extends JDialog {
}
try {
tfDatabasePath.setText(databaseFile.getCanonicalPath());
+ tfDatabasePath.setCaretPosition(tfDatabasePath.getText().length());
valid();
} catch (IOException ex) {
logger.log(Level.SEVERE, "Failed to get path of selected database file", ex); // NON-NLS
@@ -584,14 +618,15 @@ public class EamDbSettingsDialog extends JDialog {
}//GEN-LAST:event_cbDatabaseTypeActionPerformed
private void updateFullDbPath() {
- lbFullDbPath.setText(tfDatabasePath.getText() + File.separator + CENTRAL_REPO_DB_NAME + CENTRAL_REPO_SQLITE_EXT);
+ dataBaseFileTextArea.setText(tfDatabasePath.getText() + File.separator + CENTRAL_REPO_DB_NAME + CENTRAL_REPO_SQLITE_EXT);
+ dataBaseFileTextArea.setCaretPosition(dataBaseFileTextArea.getText().length());
}
private void displayDatabaseSettings(boolean isPostgres) {
lbDatabasePath.setVisible(!isPostgres);
tfDatabasePath.setVisible(!isPostgres);
lbDatabaseDesc.setVisible(!isPostgres);
- lbFullDbPath.setVisible(!isPostgres);
+ dataBaseFileTextArea.setVisible(!isPostgres);
lbSingleUserSqLite.setVisible(!isPostgres);
bnDatabasePathFileOpen.setVisible(!isPostgres);
lbHostName.setVisible(isPostgres);
@@ -855,13 +890,14 @@ public class EamDbSettingsDialog extends JDialog {
private javax.swing.ButtonGroup bnGrpDatabasePlatforms;
private javax.swing.JButton bnOk;
private javax.swing.JComboBox cbDatabaseType;
+ private javax.swing.JScrollPane dataBaseFileScrollPane;
+ private javax.swing.JTextArea dataBaseFileTextArea;
private javax.swing.JFileChooser fcDatabasePath;
private javax.swing.Box.Filler filler1;
private javax.swing.JPasswordField jpDbPassword;
private javax.swing.JLabel lbDatabaseDesc;
private javax.swing.JLabel lbDatabasePath;
private javax.swing.JLabel lbDatabaseType;
- private javax.swing.JLabel lbFullDbPath;
private javax.swing.JLabel lbHostName;
private javax.swing.JLabel lbPort;
private javax.swing.JLabel lbSingleUserSqLite;
diff --git a/Core/src/org/sleuthkit/autopsy/centralrepository/optionspanel/ManageCorrelationPropertiesDialog.form b/Core/src/org/sleuthkit/autopsy/centralrepository/optionspanel/ManageCorrelationPropertiesDialog.form
index 5124d1d85d..a3ab756f64 100644
--- a/Core/src/org/sleuthkit/autopsy/centralrepository/optionspanel/ManageCorrelationPropertiesDialog.form
+++ b/Core/src/org/sleuthkit/autopsy/centralrepository/optionspanel/ManageCorrelationPropertiesDialog.form
@@ -7,6 +7,7 @@
+
@@ -49,16 +50,16 @@
-
-
-
+
+
+
-
+
-
+
diff --git a/Core/src/org/sleuthkit/autopsy/centralrepository/optionspanel/ManageCorrelationPropertiesDialog.java b/Core/src/org/sleuthkit/autopsy/centralrepository/optionspanel/ManageCorrelationPropertiesDialog.java
index 550244dffe..883efff72b 100644
--- a/Core/src/org/sleuthkit/autopsy/centralrepository/optionspanel/ManageCorrelationPropertiesDialog.java
+++ b/Core/src/org/sleuthkit/autopsy/centralrepository/optionspanel/ManageCorrelationPropertiesDialog.java
@@ -132,6 +132,7 @@ final class ManageCorrelationPropertiesDialog extends javax.swing.JDialog {
taInstructions = new javax.swing.JTextArea();
setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);
+ setResizable(false);
org.openide.awt.Mnemonics.setLocalizedText(okButton, org.openide.util.NbBundle.getMessage(ManageCorrelationPropertiesDialog.class, "ManageCorrelationPropertiesDialog.okButton.text")); // NOI18N
okButton.addActionListener(new java.awt.event.ActionListener() {
@@ -220,14 +221,14 @@ final class ManageCorrelationPropertiesDialog extends javax.swing.JDialog {
.addGap(20, 20, 20)
.addComponent(taInstructions, javax.swing.GroupLayout.PREFERRED_SIZE, 34, javax.swing.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
- .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 180, javax.swing.GroupLayout.PREFERRED_SIZE)
+ .addComponent(jScrollPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 254, Short.MAX_VALUE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(lbWarningMsg, javax.swing.GroupLayout.PREFERRED_SIZE, 25, javax.swing.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(okButton)
.addComponent(cancelButton))
- .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
+ .addContainerGap())
);
pack();
diff --git a/Core/src/org/sleuthkit/autopsy/centralrepository/optionspanel/ManageOrganizationsDialog.form b/Core/src/org/sleuthkit/autopsy/centralrepository/optionspanel/ManageOrganizationsDialog.form
index 7bccab25f6..33c03ebf9d 100644
--- a/Core/src/org/sleuthkit/autopsy/centralrepository/optionspanel/ManageOrganizationsDialog.form
+++ b/Core/src/org/sleuthkit/autopsy/centralrepository/optionspanel/ManageOrganizationsDialog.form
@@ -3,7 +3,10 @@
diff --git a/Core/src/org/sleuthkit/autopsy/communications/CVTTopComponent.java b/Core/src/org/sleuthkit/autopsy/communications/CVTTopComponent.java
index 0032793584..2a5dd8c0d1 100644
--- a/Core/src/org/sleuthkit/autopsy/communications/CVTTopComponent.java
+++ b/Core/src/org/sleuthkit/autopsy/communications/CVTTopComponent.java
@@ -20,7 +20,6 @@ package org.sleuthkit.autopsy.communications;
import com.google.common.eventbus.Subscribe;
import java.awt.Component;
-import java.awt.Dimension;
import java.awt.Font;
import java.awt.GridBagConstraints;
import java.awt.GridBagLayout;
@@ -28,6 +27,7 @@ import java.awt.Insets;
import java.util.List;
import java.util.stream.Collectors;
import javax.swing.ImageIcon;
+import javax.swing.JSplitPane;
import javax.swing.JTabbedPane;
import org.openide.util.Lookup;
import org.openide.util.NbBundle;
@@ -68,7 +68,6 @@ public final class CVTTopComponent extends TopComponent {
Lookup lookup = ((Lookup.Provider)selectedComponent).getLookup();
proxyLookup.setNewLookups(lookup);
}
- filtersPane.setDeviceAccountTypeEnabled(browseVisualizeTabPane.getSelectedIndex() != 0);
});
@@ -80,6 +79,9 @@ public final class CVTTopComponent extends TopComponent {
CVTEvents.getCVTEventBus().register(vizPanel);
CVTEvents.getCVTEventBus().register(accountsBrowser);
CVTEvents.getCVTEventBus().register(filtersPane);
+
+ mainSplitPane.setResizeWeight(0.5);
+ mainSplitPane.setDividerLocation(0.25);
}
@Subscribe
@@ -96,37 +98,28 @@ public final class CVTTopComponent extends TopComponent {
private void initComponents() {
GridBagConstraints gridBagConstraints;
+ mainSplitPane = new JSplitPane();
+ filtersPane = new FiltersPanel();
browseVisualizeTabPane = new JTabbedPane();
accountsBrowser = new AccountsBrowser();
vizPanel = new VisualizationPanel();
- filtersPane = new FiltersPanel();
setLayout(new GridBagLayout());
+ mainSplitPane.setLeftComponent(filtersPane);
+
browseVisualizeTabPane.setFont(new Font("Tahoma", 0, 18)); // NOI18N
browseVisualizeTabPane.addTab(NbBundle.getMessage(CVTTopComponent.class, "CVTTopComponent.accountsBrowser.TabConstraints.tabTitle_1"), new ImageIcon(getClass().getResource("/org/sleuthkit/autopsy/communications/images/table.png")), accountsBrowser); // NOI18N
browseVisualizeTabPane.addTab(NbBundle.getMessage(CVTTopComponent.class, "CVTTopComponent.vizPanel.TabConstraints.tabTitle_1"), new ImageIcon(getClass().getResource("/org/sleuthkit/autopsy/communications/images/emblem-web.png")), vizPanel); // NOI18N
- gridBagConstraints = new GridBagConstraints();
- gridBagConstraints.gridx = 1;
- gridBagConstraints.gridy = 0;
- gridBagConstraints.fill = GridBagConstraints.BOTH;
- gridBagConstraints.anchor = GridBagConstraints.NORTHWEST;
- gridBagConstraints.weightx = 0.75;
- gridBagConstraints.weighty = 1.0;
- gridBagConstraints.insets = new Insets(15, 0, 15, 15);
- add(browseVisualizeTabPane, gridBagConstraints);
+ mainSplitPane.setRightComponent(browseVisualizeTabPane);
browseVisualizeTabPane.getAccessibleContext().setAccessibleName(NbBundle.getMessage(CVTTopComponent.class, "CVTTopComponent.browseVisualizeTabPane.AccessibleContext.accessibleName")); // NOI18N
gridBagConstraints = new GridBagConstraints();
- gridBagConstraints.gridx = 0;
- gridBagConstraints.gridy = 0;
gridBagConstraints.fill = GridBagConstraints.BOTH;
- gridBagConstraints.anchor = GridBagConstraints.NORTHWEST;
- gridBagConstraints.weightx = 0.25;
+ gridBagConstraints.weightx = 1.0;
gridBagConstraints.weighty = 1.0;
- gridBagConstraints.insets = new Insets(15, 15, 15, 5);
- add(filtersPane, gridBagConstraints);
+ add(mainSplitPane, gridBagConstraints);
}// //GEN-END:initComponents
@@ -134,6 +127,7 @@ public final class CVTTopComponent extends TopComponent {
private AccountsBrowser accountsBrowser;
private JTabbedPane browseVisualizeTabPane;
private FiltersPanel filtersPane;
+ private JSplitPane mainSplitPane;
private VisualizationPanel vizPanel;
// End of variables declaration//GEN-END:variables
diff --git a/Core/src/org/sleuthkit/autopsy/communications/FiltersPanel.form b/Core/src/org/sleuthkit/autopsy/communications/FiltersPanel.form
index 1aba67e76c..33fe6d5228 100644
--- a/Core/src/org/sleuthkit/autopsy/communications/FiltersPanel.form
+++ b/Core/src/org/sleuthkit/autopsy/communications/FiltersPanel.form
@@ -16,77 +16,6 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
@@ -95,7 +24,7 @@
-
+
@@ -108,7 +37,7 @@
-
+
@@ -199,7 +128,7 @@
-
+
@@ -293,7 +222,7 @@
-
+
@@ -490,6 +419,77 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/Core/src/org/sleuthkit/autopsy/communications/FiltersPanel.java b/Core/src/org/sleuthkit/autopsy/communications/FiltersPanel.java
index 76c2f189ad..445bf25c87 100644
--- a/Core/src/org/sleuthkit/autopsy/communications/FiltersPanel.java
+++ b/Core/src/org/sleuthkit/autopsy/communications/FiltersPanel.java
@@ -322,11 +322,6 @@ final public class FiltersPanel extends JPanel {
panel.setSelected(initalState);
panel.addItemListener(validationListener);
- if (type.equals(Account.Type.DEVICE)) {
- //Deveice type filter is enabled based on whether we are in table or graph view.
- panel.setEnabled(deviceAccountTypeEnabled);
- }
-
return panel;
}
@@ -474,54 +469,6 @@ final public class FiltersPanel extends JPanel {
setLayout(new java.awt.GridBagLayout());
- topPane.setLayout(new java.awt.GridBagLayout());
-
- filtersTitleLabel.setIcon(new javax.swing.ImageIcon(getClass().getResource("/org/sleuthkit/autopsy/communications/images/funnel.png"))); // NOI18N
- filtersTitleLabel.setText(org.openide.util.NbBundle.getMessage(FiltersPanel.class, "FiltersPanel.filtersTitleLabel.text")); // NOI18N
- gridBagConstraints = new java.awt.GridBagConstraints();
- gridBagConstraints.gridx = 0;
- gridBagConstraints.gridy = 0;
- gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
- gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
- gridBagConstraints.weightx = 1.0;
- topPane.add(filtersTitleLabel, gridBagConstraints);
-
- refreshButton.setIcon(new javax.swing.ImageIcon(getClass().getResource("/org/sleuthkit/autopsy/communications/images/arrow-circle-double-135.png"))); // NOI18N
- refreshButton.setText(org.openide.util.NbBundle.getMessage(FiltersPanel.class, "FiltersPanel.refreshButton.text")); // NOI18N
- gridBagConstraints = new java.awt.GridBagConstraints();
- gridBagConstraints.gridx = 2;
- gridBagConstraints.gridy = 0;
- gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHEAST;
- topPane.add(refreshButton, gridBagConstraints);
-
- applyFiltersButton.setIcon(new javax.swing.ImageIcon(getClass().getResource("/org/sleuthkit/autopsy/communications/images/tick.png"))); // NOI18N
- applyFiltersButton.setText(org.openide.util.NbBundle.getMessage(FiltersPanel.class, "FiltersPanel.applyFiltersButton.text")); // NOI18N
- gridBagConstraints = new java.awt.GridBagConstraints();
- gridBagConstraints.gridx = 1;
- gridBagConstraints.gridy = 0;
- gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHEAST;
- gridBagConstraints.insets = new java.awt.Insets(0, 0, 0, 5);
- topPane.add(applyFiltersButton, gridBagConstraints);
-
- needsRefreshLabel.setText(org.openide.util.NbBundle.getMessage(FiltersPanel.class, "FiltersPanel.needsRefreshLabel.text")); // NOI18N
- needsRefreshLabel.setForeground(new java.awt.Color(255, 0, 0));
- gridBagConstraints = new java.awt.GridBagConstraints();
- gridBagConstraints.gridx = 0;
- gridBagConstraints.gridy = 1;
- gridBagConstraints.gridwidth = 3;
- gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
- gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
- gridBagConstraints.weightx = 1.0;
- topPane.add(needsRefreshLabel, gridBagConstraints);
-
- gridBagConstraints = new java.awt.GridBagConstraints();
- gridBagConstraints.gridx = 0;
- gridBagConstraints.gridy = 0;
- gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
- gridBagConstraints.anchor = java.awt.GridBagConstraints.FIRST_LINE_END;
- gridBagConstraints.weightx = 1.0;
- add(topPane, gridBagConstraints);
-
scrollPane.setBorder(null);
mainPanel.setLayout(new java.awt.GridBagLayout());
@@ -581,7 +528,7 @@ final public class FiltersPanel extends JPanel {
gridBagConstraints = new java.awt.GridBagConstraints();
gridBagConstraints.gridx = 0;
- gridBagConstraints.gridy = 3;
+ gridBagConstraints.gridy = 4;
gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
gridBagConstraints.weightx = 1.0;
@@ -649,7 +596,7 @@ final public class FiltersPanel extends JPanel {
gridBagConstraints = new java.awt.GridBagConstraints();
gridBagConstraints.gridx = 0;
- gridBagConstraints.gridy = 2;
+ gridBagConstraints.gridy = 3;
gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
gridBagConstraints.weightx = 1.0;
@@ -726,7 +673,7 @@ final public class FiltersPanel extends JPanel {
gridBagConstraints = new java.awt.GridBagConstraints();
gridBagConstraints.gridx = 0;
- gridBagConstraints.gridy = 0;
+ gridBagConstraints.gridy = 2;
gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
gridBagConstraints.ipady = 100;
gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
@@ -808,16 +755,65 @@ final public class FiltersPanel extends JPanel {
gridBagConstraints.insets = new java.awt.Insets(15, 0, 0, 0);
mainPanel.add(accountTypesPane, gridBagConstraints);
+ topPane.setLayout(new java.awt.GridBagLayout());
+
+ filtersTitleLabel.setIcon(new javax.swing.ImageIcon(getClass().getResource("/org/sleuthkit/autopsy/communications/images/funnel.png"))); // NOI18N
+ filtersTitleLabel.setText(org.openide.util.NbBundle.getMessage(FiltersPanel.class, "FiltersPanel.filtersTitleLabel.text")); // NOI18N
+ gridBagConstraints = new java.awt.GridBagConstraints();
+ gridBagConstraints.gridx = 0;
+ gridBagConstraints.gridy = 0;
+ gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
+ gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
+ gridBagConstraints.weightx = 1.0;
+ topPane.add(filtersTitleLabel, gridBagConstraints);
+
+ refreshButton.setIcon(new javax.swing.ImageIcon(getClass().getResource("/org/sleuthkit/autopsy/communications/images/arrow-circle-double-135.png"))); // NOI18N
+ refreshButton.setText(org.openide.util.NbBundle.getMessage(FiltersPanel.class, "FiltersPanel.refreshButton.text")); // NOI18N
+ gridBagConstraints = new java.awt.GridBagConstraints();
+ gridBagConstraints.gridx = 2;
+ gridBagConstraints.gridy = 0;
+ gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHEAST;
+ topPane.add(refreshButton, gridBagConstraints);
+
+ applyFiltersButton.setIcon(new javax.swing.ImageIcon(getClass().getResource("/org/sleuthkit/autopsy/communications/images/tick.png"))); // NOI18N
+ applyFiltersButton.setText(org.openide.util.NbBundle.getMessage(FiltersPanel.class, "FiltersPanel.applyFiltersButton.text")); // NOI18N
+ gridBagConstraints = new java.awt.GridBagConstraints();
+ gridBagConstraints.gridx = 1;
+ gridBagConstraints.gridy = 0;
+ gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHEAST;
+ gridBagConstraints.weightx = 1.0;
+ gridBagConstraints.insets = new java.awt.Insets(0, 0, 0, 5);
+ topPane.add(applyFiltersButton, gridBagConstraints);
+
+ needsRefreshLabel.setText(org.openide.util.NbBundle.getMessage(FiltersPanel.class, "FiltersPanel.needsRefreshLabel.text")); // NOI18N
+ needsRefreshLabel.setForeground(new java.awt.Color(255, 0, 0));
+ gridBagConstraints = new java.awt.GridBagConstraints();
+ gridBagConstraints.gridx = 0;
+ gridBagConstraints.gridy = 1;
+ gridBagConstraints.gridwidth = 3;
+ gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
+ gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
+ gridBagConstraints.weightx = 1.0;
+ topPane.add(needsRefreshLabel, gridBagConstraints);
+
+ gridBagConstraints = new java.awt.GridBagConstraints();
+ gridBagConstraints.gridx = 0;
+ gridBagConstraints.gridy = 0;
+ gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
+ gridBagConstraints.anchor = java.awt.GridBagConstraints.FIRST_LINE_END;
+ gridBagConstraints.weightx = 1.0;
+ mainPanel.add(topPane, gridBagConstraints);
+
scrollPane.setViewportView(mainPanel);
gridBagConstraints = new java.awt.GridBagConstraints();
gridBagConstraints.gridx = 0;
- gridBagConstraints.gridy = 1;
+ gridBagConstraints.gridy = 0;
gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
gridBagConstraints.weightx = 1.0;
gridBagConstraints.weighty = 1.0;
- gridBagConstraints.insets = new java.awt.Insets(9, 0, 0, 0);
+ gridBagConstraints.insets = new java.awt.Insets(9, 15, 0, 0);
add(scrollPane, gridBagConstraints);
}// //GEN-END:initComponents
@@ -913,21 +909,6 @@ final public class FiltersPanel extends JPanel {
return new DateControlState (endDatePicker.getDate(), endCheckBox.isSelected());
}
- /**
- * Enable or disable the device account type filter. The filter should be
- * disabled for the browse/table mode and enabled for the visualization.
- *
- * @param enable True to enable the device account type filter, False to
- * disable it.
- */
- void setDeviceAccountTypeEnabled(boolean enable) {
- deviceAccountTypeEnabled = enable;
- JCheckBox deviceCheckbox = accountTypeMap.get(Account.Type.DEVICE);
- if (deviceCheckbox != null) {
- deviceCheckbox.setEnabled(deviceAccountTypeEnabled);
- }
- }
-
/**
* Set the selection state of all the account type check boxes
*
@@ -949,11 +930,11 @@ final public class FiltersPanel extends JPanel {
}
/**
- * Helper method that sets all the checkboxes in the given map to the given
+ * Helper method that sets all the check boxes in the given map to the given
* selection state.
*
* @param map A map from anything to JCheckBoxes.
- * @param selected The selection state to set all the checkboxes to.
+ * @param selected The selection state to set all the check boxes to.
*/
@ThreadConfined(type = ThreadConfined.ThreadType.AWT)
private void setAllSelected(Map, JCheckBox> map, boolean selected) {
diff --git a/Core/src/org/sleuthkit/autopsy/communications/VisualizationPanel.form b/Core/src/org/sleuthkit/autopsy/communications/VisualizationPanel.form
index f2e3052f47..e85901a1ba 100644
--- a/Core/src/org/sleuthkit/autopsy/communications/VisualizationPanel.form
+++ b/Core/src/org/sleuthkit/autopsy/communications/VisualizationPanel.form
@@ -105,10 +105,10 @@
-
-
+
+
@@ -134,8 +134,8 @@
-
+
@@ -241,13 +241,6 @@
-
-
-
-
-
-
-
@@ -255,6 +248,13 @@
+
+
+
+
+
+
+
@@ -320,6 +320,9 @@
+
+
+
diff --git a/Core/src/org/sleuthkit/autopsy/communications/VisualizationPanel.java b/Core/src/org/sleuthkit/autopsy/communications/VisualizationPanel.java
index 10732c630f..8a5404bb1a 100644
--- a/Core/src/org/sleuthkit/autopsy/communications/VisualizationPanel.java
+++ b/Core/src/org/sleuthkit/autopsy/communications/VisualizationPanel.java
@@ -213,7 +213,7 @@ final public class VisualizationPanel extends JPanel {
lockedVertexModel.registerhandler(this);
final mxEventSource.mxIEventListener scaleListener = (Object sender, mxEventObject evt)
- -> zoomLabel.setText(DecimalFormat.getPercentInstance().format(graph.getView().getScale()));
+ -> zoomPercentLabel.setText(DecimalFormat.getPercentInstance().format(graph.getView().getScale()));
graph.getView().addListener(mxEvent.SCALE, scaleListener);
graph.getView().addListener(mxEvent.SCALE_AND_TRANSLATE, scaleListener);
@@ -373,223 +373,220 @@ final public class VisualizationPanel extends JPanel {
// //GEN-BEGIN:initComponents
private void initComponents() {
- splitPane = new javax.swing.JSplitPane();
- borderLayoutPanel = new javax.swing.JPanel();
- placeHolderPanel = new javax.swing.JPanel();
- jTextArea1 = new javax.swing.JTextArea();
- toolbar = new javax.swing.JPanel();
- fastOrganicLayoutButton = new javax.swing.JButton();
- zoomOutButton = new javax.swing.JButton();
- zoomInButton = new javax.swing.JButton();
- zoomActualButton = new javax.swing.JButton();
- fitZoomButton = new javax.swing.JButton();
- jLabel2 = new javax.swing.JLabel();
- zoomLabel = new javax.swing.JLabel();
- clearVizButton = new javax.swing.JButton();
- jSeparator2 = new javax.swing.JToolBar.Separator();
- backButton = new javax.swing.JButton();
- forwardButton = new javax.swing.JButton();
- snapshotButton = new javax.swing.JButton();
- jSeparator3 = new javax.swing.JToolBar.Separator();
- jSeparator4 = new javax.swing.JToolBar.Separator();
- notificationsJFXPanel = new javafx.embed.swing.JFXPanel();
+ splitPane = new JSplitPane();
+ borderLayoutPanel = new JPanel();
+ placeHolderPanel = new JPanel();
+ jTextArea1 = new JTextArea();
+ toolbar = new JPanel();
+ fastOrganicLayoutButton = new JButton();
+ zoomOutButton = new JButton();
+ zoomInButton = new JButton();
+ zoomActualButton = new JButton();
+ fitZoomButton = new JButton();
+ zoomLabel = new JLabel();
+ zoomPercentLabel = new JLabel();
+ clearVizButton = new JButton();
+ jSeparator2 = new JToolBar.Separator();
+ backButton = new JButton();
+ forwardButton = new JButton();
+ snapshotButton = new JButton();
+ jSeparator3 = new JToolBar.Separator();
+ jSeparator4 = new JToolBar.Separator();
+ notificationsJFXPanel = new JFXPanel();
- setLayout(new java.awt.BorderLayout());
+ setLayout(new BorderLayout());
splitPane.setDividerLocation(800);
splitPane.setResizeWeight(0.5);
- borderLayoutPanel.setLayout(new java.awt.BorderLayout());
+ borderLayoutPanel.setLayout(new BorderLayout());
- jTextArea1.setBackground(new java.awt.Color(240, 240, 240));
+ jTextArea1.setBackground(new Color(240, 240, 240));
jTextArea1.setColumns(20);
jTextArea1.setLineWrap(true);
jTextArea1.setRows(5);
- jTextArea1.setText(org.openide.util.NbBundle.getMessage(VisualizationPanel.class, "VisualizationPanel.jTextArea1.text")); // NOI18N
+ jTextArea1.setText(NbBundle.getMessage(VisualizationPanel.class, "VisualizationPanel.jTextArea1.text")); // NOI18N
- org.jdesktop.layout.GroupLayout placeHolderPanelLayout = new org.jdesktop.layout.GroupLayout(placeHolderPanel);
+ GroupLayout placeHolderPanelLayout = new GroupLayout(placeHolderPanel);
placeHolderPanel.setLayout(placeHolderPanelLayout);
- placeHolderPanelLayout.setHorizontalGroup(
- placeHolderPanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
+ placeHolderPanelLayout.setHorizontalGroup(placeHolderPanelLayout.createParallelGroup(GroupLayout.LEADING)
.add(placeHolderPanelLayout.createSequentialGroup()
.addContainerGap(250, Short.MAX_VALUE)
- .add(jTextArea1, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 424, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
+ .add(jTextArea1, GroupLayout.PREFERRED_SIZE, 424, GroupLayout.PREFERRED_SIZE)
.addContainerGap(423, Short.MAX_VALUE))
);
- placeHolderPanelLayout.setVerticalGroup(
- placeHolderPanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
+ placeHolderPanelLayout.setVerticalGroup(placeHolderPanelLayout.createParallelGroup(GroupLayout.LEADING)
.add(placeHolderPanelLayout.createSequentialGroup()
- .addContainerGap(org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
- .add(jTextArea1, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 47, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
- .addContainerGap(org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
+ .addContainerGap(GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
+ .add(jTextArea1, GroupLayout.PREFERRED_SIZE, 47, GroupLayout.PREFERRED_SIZE)
+ .addContainerGap(GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
);
- borderLayoutPanel.add(placeHolderPanel, java.awt.BorderLayout.CENTER);
+ borderLayoutPanel.add(placeHolderPanel, BorderLayout.CENTER);
- fastOrganicLayoutButton.setIcon(new javax.swing.ImageIcon(getClass().getResource("/org/sleuthkit/autopsy/communications/images/arrow-circle-double-135.png"))); // NOI18N
- fastOrganicLayoutButton.setText(org.openide.util.NbBundle.getMessage(VisualizationPanel.class, "VisualizationPanel.fastOrganicLayoutButton.text")); // NOI18N
- fastOrganicLayoutButton.setToolTipText(org.openide.util.NbBundle.getMessage(VisualizationPanel.class, "VisualizationPanel.fastOrganicLayoutButton.toolTipText")); // NOI18N
+ fastOrganicLayoutButton.setIcon(new ImageIcon(getClass().getResource("/org/sleuthkit/autopsy/communications/images/arrow-circle-double-135.png"))); // NOI18N
+ fastOrganicLayoutButton.setText(NbBundle.getMessage(VisualizationPanel.class, "VisualizationPanel.fastOrganicLayoutButton.text")); // NOI18N
+ fastOrganicLayoutButton.setToolTipText(NbBundle.getMessage(VisualizationPanel.class, "VisualizationPanel.fastOrganicLayoutButton.toolTipText")); // NOI18N
fastOrganicLayoutButton.setFocusable(false);
- fastOrganicLayoutButton.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);
+ fastOrganicLayoutButton.setVerticalTextPosition(SwingConstants.BOTTOM);
- zoomOutButton.setIcon(new javax.swing.ImageIcon(getClass().getResource("/org/sleuthkit/autopsy/communications/images/magnifier-zoom-out-red.png"))); // NOI18N
- zoomOutButton.setText(org.openide.util.NbBundle.getMessage(VisualizationPanel.class, "VisualizationPanel.zoomOutButton.text")); // NOI18N
- zoomOutButton.setToolTipText(org.openide.util.NbBundle.getMessage(VisualizationPanel.class, "VisualizationPanel.zoomOutButton.toolTipText")); // NOI18N
+ zoomOutButton.setIcon(new ImageIcon(getClass().getResource("/org/sleuthkit/autopsy/communications/images/magnifier-zoom-out-red.png"))); // NOI18N
+ zoomOutButton.setText(NbBundle.getMessage(VisualizationPanel.class, "VisualizationPanel.zoomOutButton.text")); // NOI18N
+ zoomOutButton.setToolTipText(NbBundle.getMessage(VisualizationPanel.class, "VisualizationPanel.zoomOutButton.toolTipText")); // NOI18N
zoomOutButton.setFocusable(false);
- zoomOutButton.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
- zoomOutButton.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);
- zoomOutButton.addActionListener(new java.awt.event.ActionListener() {
- public void actionPerformed(java.awt.event.ActionEvent evt) {
+ zoomOutButton.setHorizontalTextPosition(SwingConstants.CENTER);
+ zoomOutButton.setVerticalTextPosition(SwingConstants.BOTTOM);
+ zoomOutButton.addActionListener(new ActionListener() {
+ public void actionPerformed(ActionEvent evt) {
zoomOutButtonActionPerformed(evt);
}
});
- zoomInButton.setIcon(new javax.swing.ImageIcon(getClass().getResource("/org/sleuthkit/autopsy/communications/images/magnifier-zoom-in-green.png"))); // NOI18N
- zoomInButton.setText(org.openide.util.NbBundle.getMessage(VisualizationPanel.class, "VisualizationPanel.zoomInButton.text")); // NOI18N
- zoomInButton.setToolTipText(org.openide.util.NbBundle.getMessage(VisualizationPanel.class, "VisualizationPanel.zoomInButton.toolTipText")); // NOI18N
+ zoomInButton.setIcon(new ImageIcon(getClass().getResource("/org/sleuthkit/autopsy/communications/images/magnifier-zoom-in-green.png"))); // NOI18N
+ zoomInButton.setText(NbBundle.getMessage(VisualizationPanel.class, "VisualizationPanel.zoomInButton.text")); // NOI18N
+ zoomInButton.setToolTipText(NbBundle.getMessage(VisualizationPanel.class, "VisualizationPanel.zoomInButton.toolTipText")); // NOI18N
zoomInButton.setFocusable(false);
- zoomInButton.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
- zoomInButton.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);
- zoomInButton.addActionListener(new java.awt.event.ActionListener() {
- public void actionPerformed(java.awt.event.ActionEvent evt) {
+ zoomInButton.setHorizontalTextPosition(SwingConstants.CENTER);
+ zoomInButton.setVerticalTextPosition(SwingConstants.BOTTOM);
+ zoomInButton.addActionListener(new ActionListener() {
+ public void actionPerformed(ActionEvent evt) {
zoomInButtonActionPerformed(evt);
}
});
- zoomActualButton.setIcon(new javax.swing.ImageIcon(getClass().getResource("/org/sleuthkit/autopsy/communications/images/magnifier-zoom-actual.png"))); // NOI18N
- zoomActualButton.setText(org.openide.util.NbBundle.getMessage(VisualizationPanel.class, "VisualizationPanel.zoomActualButton.text")); // NOI18N
- zoomActualButton.setToolTipText(org.openide.util.NbBundle.getMessage(VisualizationPanel.class, "VisualizationPanel.zoomActualButton.toolTipText")); // NOI18N
+ zoomActualButton.setIcon(new ImageIcon(getClass().getResource("/org/sleuthkit/autopsy/communications/images/magnifier-zoom-actual.png"))); // NOI18N
+ zoomActualButton.setText(NbBundle.getMessage(VisualizationPanel.class, "VisualizationPanel.zoomActualButton.text")); // NOI18N
+ zoomActualButton.setToolTipText(NbBundle.getMessage(VisualizationPanel.class, "VisualizationPanel.zoomActualButton.toolTipText")); // NOI18N
zoomActualButton.setFocusable(false);
- zoomActualButton.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
- zoomActualButton.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);
- zoomActualButton.addActionListener(new java.awt.event.ActionListener() {
- public void actionPerformed(java.awt.event.ActionEvent evt) {
+ zoomActualButton.setHorizontalTextPosition(SwingConstants.CENTER);
+ zoomActualButton.setVerticalTextPosition(SwingConstants.BOTTOM);
+ zoomActualButton.addActionListener(new ActionListener() {
+ public void actionPerformed(ActionEvent evt) {
zoomActualButtonActionPerformed(evt);
}
});
- fitZoomButton.setIcon(new javax.swing.ImageIcon(getClass().getResource("/org/sleuthkit/autopsy/communications/images/magnifier-zoom-fit.png"))); // NOI18N
- fitZoomButton.setText(org.openide.util.NbBundle.getMessage(VisualizationPanel.class, "VisualizationPanel.fitZoomButton.text")); // NOI18N
- fitZoomButton.setToolTipText(org.openide.util.NbBundle.getMessage(VisualizationPanel.class, "VisualizationPanel.fitZoomButton.toolTipText")); // NOI18N
+ fitZoomButton.setIcon(new ImageIcon(getClass().getResource("/org/sleuthkit/autopsy/communications/images/magnifier-zoom-fit.png"))); // NOI18N
+ fitZoomButton.setText(NbBundle.getMessage(VisualizationPanel.class, "VisualizationPanel.fitZoomButton.text")); // NOI18N
+ fitZoomButton.setToolTipText(NbBundle.getMessage(VisualizationPanel.class, "VisualizationPanel.fitZoomButton.toolTipText")); // NOI18N
fitZoomButton.setFocusable(false);
- fitZoomButton.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
- fitZoomButton.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);
- fitZoomButton.addActionListener(new java.awt.event.ActionListener() {
- public void actionPerformed(java.awt.event.ActionEvent evt) {
+ fitZoomButton.setHorizontalTextPosition(SwingConstants.CENTER);
+ fitZoomButton.setVerticalTextPosition(SwingConstants.BOTTOM);
+ fitZoomButton.addActionListener(new ActionListener() {
+ public void actionPerformed(ActionEvent evt) {
fitZoomButtonActionPerformed(evt);
}
});
- jLabel2.setText(org.openide.util.NbBundle.getMessage(VisualizationPanel.class, "VisualizationPanel.jLabel2.text")); // NOI18N
+ zoomLabel.setText(NbBundle.getMessage(VisualizationPanel.class, "VisualizationPanel.zoomLabel.text")); // NOI18N
- zoomLabel.setText(org.openide.util.NbBundle.getMessage(VisualizationPanel.class, "VisualizationPanel.zoomLabel.text")); // NOI18N
+ zoomPercentLabel.setText(NbBundle.getMessage(VisualizationPanel.class, "VisualizationPanel.zoomPercentLabel.text")); // NOI18N
- clearVizButton.setIcon(new javax.swing.ImageIcon(getClass().getResource("/org/sleuthkit/autopsy/communications/images/broom.png"))); // NOI18N
- clearVizButton.setText(org.openide.util.NbBundle.getMessage(VisualizationPanel.class, "VisualizationPanel.clearVizButton.text_1")); // NOI18N
- clearVizButton.setToolTipText(org.openide.util.NbBundle.getMessage(VisualizationPanel.class, "VisualizationPanel.clearVizButton.toolTipText")); // NOI18N
- clearVizButton.setActionCommand(org.openide.util.NbBundle.getMessage(VisualizationPanel.class, "VisualizationPanel.clearVizButton.actionCommand")); // NOI18N
- clearVizButton.addActionListener(new java.awt.event.ActionListener() {
- public void actionPerformed(java.awt.event.ActionEvent evt) {
+ clearVizButton.setIcon(new ImageIcon(getClass().getResource("/org/sleuthkit/autopsy/communications/images/broom.png"))); // NOI18N
+ clearVizButton.setText(NbBundle.getMessage(VisualizationPanel.class, "VisualizationPanel.clearVizButton.text_1")); // NOI18N
+ clearVizButton.setToolTipText(NbBundle.getMessage(VisualizationPanel.class, "VisualizationPanel.clearVizButton.toolTipText")); // NOI18N
+ clearVizButton.setActionCommand(NbBundle.getMessage(VisualizationPanel.class, "VisualizationPanel.clearVizButton.actionCommand")); // NOI18N
+ clearVizButton.addActionListener(new ActionListener() {
+ public void actionPerformed(ActionEvent evt) {
clearVizButtonActionPerformed(evt);
}
});
- jSeparator2.setOrientation(javax.swing.SwingConstants.VERTICAL);
+ jSeparator2.setOrientation(SwingConstants.VERTICAL);
- backButton.setIcon(new javax.swing.ImageIcon(getClass().getResource("/org/sleuthkit/autopsy/images/resultset_previous.png"))); // NOI18N
- backButton.setText(org.openide.util.NbBundle.getMessage(VisualizationPanel.class, "VisualizationPanel.backButton.text_1")); // NOI18N
- backButton.setToolTipText(org.openide.util.NbBundle.getMessage(VisualizationPanel.class, "VisualizationPanel.backButton.toolTipText")); // NOI18N
- backButton.addActionListener(new java.awt.event.ActionListener() {
- public void actionPerformed(java.awt.event.ActionEvent evt) {
+ backButton.setIcon(new ImageIcon(getClass().getResource("/org/sleuthkit/autopsy/images/resultset_previous.png"))); // NOI18N
+ backButton.setText(NbBundle.getMessage(VisualizationPanel.class, "VisualizationPanel.backButton.text_1")); // NOI18N
+ backButton.setToolTipText(NbBundle.getMessage(VisualizationPanel.class, "VisualizationPanel.backButton.toolTipText")); // NOI18N
+ backButton.addActionListener(new ActionListener() {
+ public void actionPerformed(ActionEvent evt) {
backButtonActionPerformed(evt);
}
});
- forwardButton.setIcon(new javax.swing.ImageIcon(getClass().getResource("/org/sleuthkit/autopsy/images/resultset_next.png"))); // NOI18N
- forwardButton.setText(org.openide.util.NbBundle.getMessage(VisualizationPanel.class, "VisualizationPanel.forwardButton.text")); // NOI18N
- forwardButton.setToolTipText(org.openide.util.NbBundle.getMessage(VisualizationPanel.class, "VisualizationPanel.forwardButton.toolTipText")); // NOI18N
- forwardButton.setHorizontalTextPosition(javax.swing.SwingConstants.LEADING);
- forwardButton.addActionListener(new java.awt.event.ActionListener() {
- public void actionPerformed(java.awt.event.ActionEvent evt) {
+ forwardButton.setIcon(new ImageIcon(getClass().getResource("/org/sleuthkit/autopsy/images/resultset_next.png"))); // NOI18N
+ forwardButton.setText(NbBundle.getMessage(VisualizationPanel.class, "VisualizationPanel.forwardButton.text")); // NOI18N
+ forwardButton.setToolTipText(NbBundle.getMessage(VisualizationPanel.class, "VisualizationPanel.forwardButton.toolTipText")); // NOI18N
+ forwardButton.setHorizontalTextPosition(SwingConstants.LEADING);
+ forwardButton.addActionListener(new ActionListener() {
+ public void actionPerformed(ActionEvent evt) {
forwardButtonActionPerformed(evt);
}
});
- snapshotButton.setIcon(new javax.swing.ImageIcon(getClass().getResource("/org/sleuthkit/autopsy/report/images/image.png"))); // NOI18N
- snapshotButton.setText(org.openide.util.NbBundle.getMessage(VisualizationPanel.class, "VisualizationPanel.snapshotButton.text_1")); // NOI18N
- snapshotButton.addActionListener(new java.awt.event.ActionListener() {
- public void actionPerformed(java.awt.event.ActionEvent evt) {
+ snapshotButton.setIcon(new ImageIcon(getClass().getResource("/org/sleuthkit/autopsy/report/images/image.png"))); // NOI18N
+ snapshotButton.setText(NbBundle.getMessage(VisualizationPanel.class, "VisualizationPanel.snapshotButton.text_1")); // NOI18N
+ snapshotButton.setToolTipText(NbBundle.getMessage(VisualizationPanel.class, "VisualizationPanel.snapshotButton.toolTipText")); // NOI18N
+ snapshotButton.addActionListener(new ActionListener() {
+ public void actionPerformed(ActionEvent evt) {
snapshotButtonActionPerformed(evt);
}
});
- jSeparator3.setOrientation(javax.swing.SwingConstants.VERTICAL);
+ jSeparator3.setOrientation(SwingConstants.VERTICAL);
- jSeparator4.setOrientation(javax.swing.SwingConstants.VERTICAL);
+ jSeparator4.setOrientation(SwingConstants.VERTICAL);
- org.jdesktop.layout.GroupLayout toolbarLayout = new org.jdesktop.layout.GroupLayout(toolbar);
+ GroupLayout toolbarLayout = new GroupLayout(toolbar);
toolbar.setLayout(toolbarLayout);
- toolbarLayout.setHorizontalGroup(
- toolbarLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
+ toolbarLayout.setHorizontalGroup(toolbarLayout.createParallelGroup(GroupLayout.LEADING)
.add(toolbarLayout.createSequentialGroup()
.addContainerGap()
.add(backButton)
- .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
+ .addPreferredGap(LayoutStyle.RELATED)
.add(forwardButton)
- .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
- .add(jSeparator4, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 10, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
- .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
+ .addPreferredGap(LayoutStyle.RELATED)
+ .add(jSeparator4, GroupLayout.PREFERRED_SIZE, 10, GroupLayout.PREFERRED_SIZE)
+ .addPreferredGap(LayoutStyle.RELATED)
.add(fastOrganicLayoutButton)
- .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
+ .addPreferredGap(LayoutStyle.RELATED)
.add(clearVizButton)
- .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
- .add(jSeparator2, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 10, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
- .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
- .add(jLabel2)
- .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
+ .addPreferredGap(LayoutStyle.RELATED)
+ .add(jSeparator2, GroupLayout.PREFERRED_SIZE, 10, GroupLayout.PREFERRED_SIZE)
+ .addPreferredGap(LayoutStyle.RELATED)
.add(zoomLabel)
- .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
- .add(zoomOutButton, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 32, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
- .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
- .add(zoomInButton, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 32, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
- .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
- .add(zoomActualButton, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 33, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
- .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
- .add(fitZoomButton, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 32, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
- .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
- .add(jSeparator3, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 10, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
- .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
+ .addPreferredGap(LayoutStyle.RELATED)
+ .add(zoomPercentLabel)
+ .addPreferredGap(LayoutStyle.RELATED)
+ .add(zoomOutButton, GroupLayout.PREFERRED_SIZE, 32, GroupLayout.PREFERRED_SIZE)
+ .addPreferredGap(LayoutStyle.RELATED)
+ .add(zoomInButton, GroupLayout.PREFERRED_SIZE, 32, GroupLayout.PREFERRED_SIZE)
+ .addPreferredGap(LayoutStyle.RELATED)
+ .add(zoomActualButton, GroupLayout.PREFERRED_SIZE, 33, GroupLayout.PREFERRED_SIZE)
+ .addPreferredGap(LayoutStyle.RELATED)
+ .add(fitZoomButton, GroupLayout.PREFERRED_SIZE, 32, GroupLayout.PREFERRED_SIZE)
+ .addPreferredGap(LayoutStyle.RELATED)
+ .add(jSeparator3, GroupLayout.PREFERRED_SIZE, 10, GroupLayout.PREFERRED_SIZE)
+ .addPreferredGap(LayoutStyle.RELATED)
.add(snapshotButton)
- .addContainerGap(org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
+ .addContainerGap(GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
);
- toolbarLayout.setVerticalGroup(
- toolbarLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
+ toolbarLayout.setVerticalGroup(toolbarLayout.createParallelGroup(GroupLayout.LEADING)
.add(toolbarLayout.createSequentialGroup()
.add(3, 3, 3)
- .add(toolbarLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.CENTER)
+ .add(toolbarLayout.createParallelGroup(GroupLayout.CENTER)
.add(fastOrganicLayoutButton)
.add(zoomOutButton)
- .add(zoomInButton, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
- .add(zoomActualButton, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
- .add(fitZoomButton, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
- .add(jLabel2)
+ .add(zoomInButton, GroupLayout.DEFAULT_SIZE, GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
+ .add(zoomActualButton, GroupLayout.DEFAULT_SIZE, GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
+ .add(fitZoomButton, GroupLayout.DEFAULT_SIZE, GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.add(zoomLabel)
+ .add(zoomPercentLabel)
.add(clearVizButton)
- .add(jSeparator2, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
+ .add(jSeparator2, GroupLayout.DEFAULT_SIZE, GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.add(backButton)
.add(forwardButton)
.add(snapshotButton)
- .add(jSeparator3, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
- .add(jSeparator4, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
+ .add(jSeparator3, GroupLayout.DEFAULT_SIZE, GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
+ .add(jSeparator4, GroupLayout.DEFAULT_SIZE, GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
.add(3, 3, 3))
);
- borderLayoutPanel.add(toolbar, java.awt.BorderLayout.PAGE_START);
- borderLayoutPanel.add(notificationsJFXPanel, java.awt.BorderLayout.PAGE_END);
+ borderLayoutPanel.add(toolbar, BorderLayout.PAGE_START);
+ borderLayoutPanel.add(notificationsJFXPanel, BorderLayout.PAGE_END);
splitPane.setLeftComponent(borderLayoutPanel);
- add(splitPane, java.awt.BorderLayout.CENTER);
+ add(splitPane, BorderLayout.CENTER);
}// //GEN-END:initComponents
private void fitZoomButtonActionPerformed(ActionEvent evt) {//GEN-FIRST:event_fitZoomButtonActionPerformed
@@ -880,26 +877,26 @@ final public class VisualizationPanel extends JPanel {
}
// Variables declaration - do not modify//GEN-BEGIN:variables
- private javax.swing.JButton backButton;
- private javax.swing.JPanel borderLayoutPanel;
- private javax.swing.JButton clearVizButton;
- private javax.swing.JButton fastOrganicLayoutButton;
- private javax.swing.JButton fitZoomButton;
- private javax.swing.JButton forwardButton;
- private javax.swing.JLabel jLabel2;
- private javax.swing.JToolBar.Separator jSeparator2;
- private javax.swing.JToolBar.Separator jSeparator3;
- private javax.swing.JToolBar.Separator jSeparator4;
- private javax.swing.JTextArea jTextArea1;
- private javafx.embed.swing.JFXPanel notificationsJFXPanel;
- private javax.swing.JPanel placeHolderPanel;
- private javax.swing.JButton snapshotButton;
- private javax.swing.JSplitPane splitPane;
- private javax.swing.JPanel toolbar;
- private javax.swing.JButton zoomActualButton;
- private javax.swing.JButton zoomInButton;
- private javax.swing.JLabel zoomLabel;
- private javax.swing.JButton zoomOutButton;
+ private JButton backButton;
+ private JPanel borderLayoutPanel;
+ private JButton clearVizButton;
+ private JButton fastOrganicLayoutButton;
+ private JButton fitZoomButton;
+ private JButton forwardButton;
+ private JToolBar.Separator jSeparator2;
+ private JToolBar.Separator jSeparator3;
+ private JToolBar.Separator jSeparator4;
+ private JTextArea jTextArea1;
+ private JFXPanel notificationsJFXPanel;
+ private JPanel placeHolderPanel;
+ private JButton snapshotButton;
+ private JSplitPane splitPane;
+ private JPanel toolbar;
+ private JButton zoomActualButton;
+ private JButton zoomInButton;
+ private JLabel zoomLabel;
+ private JButton zoomOutButton;
+ private JLabel zoomPercentLabel;
// End of variables declaration//GEN-END:variables
/**
diff --git a/Core/src/org/sleuthkit/autopsy/communications/images/defaultContact.png b/Core/src/org/sleuthkit/autopsy/communications/images/defaultContact.png
new file mode 100755
index 0000000000..80d697fac5
Binary files /dev/null and b/Core/src/org/sleuthkit/autopsy/communications/images/defaultContact.png differ
diff --git a/Core/src/org/sleuthkit/autopsy/communications/relationships/BlackboardArtifactDateComparator.java b/Core/src/org/sleuthkit/autopsy/communications/relationships/BlackboardArtifactDateComparator.java
new file mode 100755
index 0000000000..b4279c8193
--- /dev/null
+++ b/Core/src/org/sleuthkit/autopsy/communications/relationships/BlackboardArtifactDateComparator.java
@@ -0,0 +1,98 @@
+/*
+ * Autopsy Forensic Browser
+ *
+ * Copyright 2019 Basis Technology Corp.
+ * Contact: carrier sleuthkit 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 obt ain 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.communications.relationships;
+
+import java.util.Comparator;
+import java.util.logging.Level;
+import org.sleuthkit.autopsy.coreutils.Logger;
+import org.sleuthkit.datamodel.BlackboardArtifact;
+import org.sleuthkit.datamodel.BlackboardAttribute;
+import org.sleuthkit.datamodel.TskCoreException;
+
+ /**
+* A comparator class for comparing BlackboardArtifacts of type
+* TSK_EMAIL_MSG, TSK_MESSAGE, and TSK_CALLLOG by their respective creation
+* date-time.
+*/
+class BlackboardArtifactDateComparator implements Comparator {
+ static final int ACCENDING = 1;
+ static final int DECENDING = -1;
+
+ private static final Logger logger = Logger.getLogger(BlackboardArtifactDateComparator.class.getName());
+
+ private final int direction;
+
+ BlackboardArtifactDateComparator(int direction) {
+ this.direction = direction;
+ }
+
+ @Override
+ public int compare(BlackboardArtifact bba1, BlackboardArtifact bba2) {
+
+ BlackboardAttribute attribute1 = getTimeAttributeForArtifact(bba1);
+ BlackboardAttribute attribute2 = getTimeAttributeForArtifact(bba2);
+ // Inializing to Long.MAX_VALUE so that if a BlackboardArtifact of
+ // any unexpected type is passed in, it will bubble to the top of
+ // the list.
+ long dateTime1 = Long.MAX_VALUE;
+ long dateTime2 = Long.MAX_VALUE;
+
+ if (attribute1 != null) {
+ dateTime1 = attribute1.getValueLong();
+ }
+
+ if (attribute2 != null) {
+ dateTime2 = attribute2.getValueLong();
+ }
+
+ return Long.compare(dateTime1, dateTime2) * direction;
+ }
+
+ private BlackboardAttribute getTimeAttributeForArtifact(BlackboardArtifact artifact) {
+ if(artifact == null) {
+ return null;
+ }
+
+ BlackboardAttribute attribute = null;
+
+ BlackboardArtifact.ARTIFACT_TYPE fromID = BlackboardArtifact.ARTIFACT_TYPE.fromID(artifact.getArtifactTypeID());
+ if (fromID != null) {
+ try {
+ switch (fromID) {
+ case TSK_EMAIL_MSG:
+ attribute = artifact.getAttribute(new BlackboardAttribute.Type(BlackboardAttribute.ATTRIBUTE_TYPE.TSK_DATETIME_SENT));
+ break;
+ case TSK_MESSAGE:
+ attribute = artifact.getAttribute(new BlackboardAttribute.Type(BlackboardAttribute.ATTRIBUTE_TYPE.TSK_DATETIME));
+ break;
+ case TSK_CALLLOG:
+ attribute = artifact.getAttribute(new BlackboardAttribute.Type(BlackboardAttribute.ATTRIBUTE_TYPE.TSK_DATETIME_START));
+ break;
+ default:
+ attribute = null;
+ break;
+ }
+ } catch (TskCoreException ex) {
+ logger.log(Level.WARNING, String.format("Unable to compare attributes for artifact %d", artifact.getArtifactID()), ex);
+ }
+ }
+
+ return attribute;
+ }
+}
diff --git a/Core/src/org/sleuthkit/autopsy/communications/relationships/Bundle.properties-MERGED b/Core/src/org/sleuthkit/autopsy/communications/relationships/Bundle.properties-MERGED
index f82411bf9d..f2aa0df8e1 100755
--- a/Core/src/org/sleuthkit/autopsy/communications/relationships/Bundle.properties-MERGED
+++ b/Core/src/org/sleuthkit/autopsy/communications/relationships/Bundle.properties-MERGED
@@ -1,3 +1,8 @@
+CallLogViewer_device_label=Device
+CallLogViewer_duration_label=Duration(seconds)
+CallLogViewer_noCallLogs=
+CallLogViewer_recipient_label=To/From
+CallLogViewer_title=Call Logs
ContactDetailsPane.nameLabel.text=Placeholder
ContactNode_Email=Email Address
ContactNode_Home_Number=Home Number
diff --git a/Core/src/org/sleuthkit/autopsy/communications/relationships/CallLogNode.java b/Core/src/org/sleuthkit/autopsy/communications/relationships/CallLogNode.java
new file mode 100755
index 0000000000..a9e92d6451
--- /dev/null
+++ b/Core/src/org/sleuthkit/autopsy/communications/relationships/CallLogNode.java
@@ -0,0 +1,117 @@
+/*
+ * Autopsy Forensic Browser
+ *
+ * Copyright 2019 Basis Technology Corp.
+ * Contact: carrier sleuthkit 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.communications.relationships;
+
+import java.util.logging.Level;
+import org.openide.nodes.Sheet;
+import org.sleuthkit.autopsy.communications.Utils;
+import static org.sleuthkit.autopsy.communications.relationships.RelationshipsNodeUtilities.getAttributeDisplayString;
+import org.sleuthkit.autopsy.coreutils.Logger;
+import org.sleuthkit.autopsy.datamodel.BlackboardArtifactNode;
+import org.sleuthkit.autopsy.datamodel.NodeProperty;
+import org.sleuthkit.datamodel.Account;
+import org.sleuthkit.datamodel.BlackboardArtifact;
+import static org.sleuthkit.datamodel.BlackboardArtifact.ARTIFACT_TYPE.TSK_CALLLOG;
+import org.sleuthkit.datamodel.BlackboardAttribute;
+import static org.sleuthkit.datamodel.BlackboardAttribute.ATTRIBUTE_TYPE.TSK_DATETIME_START;
+import static org.sleuthkit.datamodel.BlackboardAttribute.ATTRIBUTE_TYPE.TSK_DATETIME_END;
+import static org.sleuthkit.datamodel.BlackboardAttribute.ATTRIBUTE_TYPE.TSK_PHONE_NUMBER_FROM;
+import static org.sleuthkit.datamodel.BlackboardAttribute.ATTRIBUTE_TYPE.TSK_PHONE_NUMBER_TO;
+import static org.sleuthkit.datamodel.BlackboardAttribute.ATTRIBUTE_TYPE.TSK_DIRECTION;
+import static org.sleuthkit.datamodel.BlackboardAttribute.ATTRIBUTE_TYPE.TSK_PHONE_NUMBER;
+import org.sleuthkit.datamodel.TskCoreException;
+
+/**
+ * A BlackboardArtifactNode for Calllogs.
+ */
+final class CallLogNode extends BlackboardArtifactNode {
+
+ private static final Logger logger = Logger.getLogger(CallLogNode.class.getName());
+
+ final static String DURATION_PROP = "duration";
+
+ CallLogNode(BlackboardArtifact artifact, String deviceID) {
+ super(artifact, Utils.getIconFilePath(Account.Type.PHONE));
+ setDisplayName(deviceID);
+ }
+
+ @Override
+ protected Sheet createSheet() {
+ Sheet sheet = super.createSheet();
+ Sheet.Set sheetSet = sheet.get(Sheet.PROPERTIES);
+ if (sheetSet == null) {
+ sheetSet = Sheet.createPropertiesSet();
+ sheet.put(sheetSet);
+ }
+
+ final BlackboardArtifact artifact = getArtifact();
+
+ BlackboardArtifact.ARTIFACT_TYPE fromID = BlackboardArtifact.ARTIFACT_TYPE.fromID(artifact.getArtifactTypeID());
+ if (null != fromID && fromID != TSK_CALLLOG) {
+ return sheet;
+ }
+
+ String phoneNumber = getAttributeDisplayString(artifact, TSK_PHONE_NUMBER_FROM);
+ if(phoneNumber == null || phoneNumber.isEmpty()) {
+ phoneNumber = getAttributeDisplayString(artifact, TSK_PHONE_NUMBER_TO);
+ }
+
+ long duration = -1;
+ try{
+ duration = getCallDuration(artifact);
+ } catch(TskCoreException ex) {
+ logger.log(Level.WARNING, String.format("Unable to get calllog duration for artifact: %d", artifact.getArtifactID()), ex);
+ }
+
+ sheetSet.put(createNode(TSK_DATETIME_START, artifact));
+ sheetSet.put(createNode(TSK_DIRECTION, artifact));
+ sheetSet.put(new NodeProperty<>(TSK_PHONE_NUMBER.getLabel(), TSK_PHONE_NUMBER.getDisplayName(), "", phoneNumber));
+ if(duration != -1) {
+ sheetSet.put(new NodeProperty<>("duration", "Duration", "", Long.toString(duration)));
+ }
+
+ return sheet;
+ }
+
+ NodeProperty> createNode(BlackboardAttribute.ATTRIBUTE_TYPE type, BlackboardArtifact artifact) {
+ return new NodeProperty<>(type.getLabel(), type.getDisplayName(), type.getDisplayName(), getAttributeDisplayString(artifact, type));
+ }
+
+ long getCallDuration(BlackboardArtifact artifact) throws TskCoreException {
+ BlackboardAttribute startAttribute = artifact.getAttribute(new BlackboardAttribute.Type(BlackboardAttribute.ATTRIBUTE_TYPE.fromID(TSK_DATETIME_START.getTypeID())));
+ BlackboardAttribute endAttribute = artifact.getAttribute(new BlackboardAttribute.Type(BlackboardAttribute.ATTRIBUTE_TYPE.fromID(TSK_DATETIME_END.getTypeID())));
+
+ if(startAttribute == null || endAttribute == null) {
+ return -1;
+ }
+
+ return endAttribute.getValueLong() - startAttribute.getValueLong();
+ }
+
+ /**
+ * Circumvent DataResultFilterNode's slightly odd delegation to
+ * BlackboardArtifactNode.getSourceName().
+ *
+ * @return the displayName of this Node, which is the type.
+ */
+ @Override
+ public String getSourceName() {
+ return getDisplayName();
+ }
+}
diff --git a/Core/src/org/sleuthkit/autopsy/communications/relationships/CallLogViewer.form b/Core/src/org/sleuthkit/autopsy/communications/relationships/CallLogViewer.form
new file mode 100755
index 0000000000..cab67d7f86
--- /dev/null
+++ b/Core/src/org/sleuthkit/autopsy/communications/relationships/CallLogViewer.form
@@ -0,0 +1,27 @@
+
+
+
diff --git a/Core/src/org/sleuthkit/autopsy/communications/relationships/CallLogViewer.java b/Core/src/org/sleuthkit/autopsy/communications/relationships/CallLogViewer.java
new file mode 100755
index 0000000000..cb5d34d7f9
--- /dev/null
+++ b/Core/src/org/sleuthkit/autopsy/communications/relationships/CallLogViewer.java
@@ -0,0 +1,146 @@
+/*
+ * Autopsy Forensic Browser
+ *
+ * Copyright 2019 Basis Technology Corp.
+ * Contact: carrier sleuthkit 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.communications.relationships;
+
+import javax.swing.JPanel;
+import org.netbeans.swing.outline.DefaultOutlineModel;
+import org.netbeans.swing.outline.Outline;
+import org.openide.nodes.AbstractNode;
+import org.openide.nodes.Children;
+import org.openide.nodes.NodeAdapter;
+import org.openide.nodes.NodeMemberEvent;
+import org.openide.util.Lookup;
+import org.openide.util.NbBundle.Messages;
+import org.sleuthkit.autopsy.corecomponents.TableFilterNode;
+import org.sleuthkit.autopsy.directorytree.DataResultFilterNode;
+import static org.sleuthkit.datamodel.BlackboardAttribute.ATTRIBUTE_TYPE.TSK_PHONE_NUMBER;
+import static org.sleuthkit.datamodel.BlackboardAttribute.ATTRIBUTE_TYPE.TSK_DATETIME_START;
+import static org.sleuthkit.datamodel.BlackboardAttribute.ATTRIBUTE_TYPE.TSK_DIRECTION;
+
+/**
+ *
+ * CallLogViewer Panel
+ */
+final class CallLogViewer extends javax.swing.JPanel implements RelationshipsViewer {
+
+ private final CallLogsChildNodeFactory nodeFactory;
+
+ @Messages({
+ "CallLogViewer_title=Call Logs",
+ "CallLogViewer_noCallLogs=",
+ "CallLogViewer_recipient_label=To/From",
+ "CallLogViewer_duration_label=Duration(seconds)",
+ "CallLogViewer_device_label=Device"
+ })
+
+ /**
+ * Creates new form CallLogViewer
+ */
+ public CallLogViewer() {
+ initComponents();
+
+ nodeFactory = new CallLogsChildNodeFactory(null);
+ outlineViewPanel.hideOutlineView(Bundle.CallLogViewer_noCallLogs());
+
+ outlineViewPanel.getOutlineView().setPropertyColumns(
+ TSK_DIRECTION.getLabel(), TSK_DIRECTION.getDisplayName(),
+ TSK_PHONE_NUMBER.getLabel(), Bundle.CallLogViewer_recipient_label(),
+ TSK_DATETIME_START.getLabel(), TSK_DATETIME_START.getDisplayName(),
+ CallLogNode.DURATION_PROP, Bundle.CallLogViewer_duration_label()
+ );
+
+ Outline outline = outlineViewPanel.getOutlineView().getOutline();
+ outline.setRootVisible(false);
+ ((DefaultOutlineModel) outline.getOutlineModel()).setNodesColumnLabel(Bundle.CallLogViewer_device_label());
+
+ outlineViewPanel.getExplorerManager().setRootContext(
+ new TableFilterNode(
+ new DataResultFilterNode(
+ new AbstractNode(Children.create(nodeFactory, true)), outlineViewPanel.getExplorerManager()), true));
+
+ outlineViewPanel.getExplorerManager().getRootContext().addNodeListener(new NodeAdapter(){
+ @Override
+ public void childrenAdded(NodeMemberEvent nme) {
+ updateOutlineViewPanel();
+ }
+
+ @Override
+ public void childrenRemoved(NodeMemberEvent nme) {
+ updateOutlineViewPanel();
+ }
+ });
+
+ }
+
+ /**
+ * 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
+ * regenerated by the Form Editor.
+ */
+ @SuppressWarnings("unchecked")
+ // //GEN-BEGIN:initComponents
+ private void initComponents() {
+ java.awt.GridBagConstraints gridBagConstraints;
+
+ outlineViewPanel = new org.sleuthkit.autopsy.communications.relationships.OutlineViewPanel();
+
+ setLayout(new java.awt.GridBagLayout());
+ gridBagConstraints = new java.awt.GridBagConstraints();
+ gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
+ gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHEAST;
+ gridBagConstraints.weightx = 1.0;
+ gridBagConstraints.weighty = 1.0;
+ gridBagConstraints.insets = new java.awt.Insets(15, 15, 15, 15);
+ add(outlineViewPanel, gridBagConstraints);
+ }// //GEN-END:initComponents
+
+ @Override
+ public String getDisplayName() {
+ return Bundle.CallLogViewer_title();
+ }
+
+ @Override
+ public JPanel getPanel() {
+ return this;
+ }
+
+ @Override
+ public void setSelectionInfo(SelectionInfo info) {
+ nodeFactory.refresh(info);
+ }
+
+ @Override
+ public Lookup getLookup() {
+ return outlineViewPanel.getLookup();
+ }
+
+ private void updateOutlineViewPanel() {
+ int nodeCount = outlineViewPanel.getExplorerManager().getRootContext().getChildren().getNodesCount();
+ if(nodeCount == 0) {
+ outlineViewPanel.hideOutlineView(Bundle.ContactsViewer_noContacts_message());
+ } else {
+ outlineViewPanel.showOutlineView();
+ }
+ }
+
+
+ // Variables declaration - do not modify//GEN-BEGIN:variables
+ private org.sleuthkit.autopsy.communications.relationships.OutlineViewPanel outlineViewPanel;
+ // End of variables declaration//GEN-END:variables
+}
diff --git a/Core/src/org/sleuthkit/autopsy/communications/relationships/CallLogsChildNodeFactory.java b/Core/src/org/sleuthkit/autopsy/communications/relationships/CallLogsChildNodeFactory.java
new file mode 100755
index 0000000000..5bfd1bdb96
--- /dev/null
+++ b/Core/src/org/sleuthkit/autopsy/communications/relationships/CallLogsChildNodeFactory.java
@@ -0,0 +1,204 @@
+/*
+ * Autopsy Forensic Browser
+ *
+ * Copyright 2019 Basis Technology Corp.
+ * Contact: carrier sleuthkit 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 obt ain 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.communications.relationships;
+
+import java.util.ArrayList;
+import java.util.Comparator;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+import java.util.logging.Level;
+import org.openide.nodes.ChildFactory;
+import org.openide.nodes.Node;
+import org.sleuthkit.autopsy.casemodule.Case;
+import org.sleuthkit.autopsy.casemodule.NoCurrentCaseException;
+import org.sleuthkit.autopsy.communications.relationships.CallLogsChildNodeFactory.CallLogNodeKey;
+import org.sleuthkit.autopsy.coreutils.Logger;
+import org.sleuthkit.datamodel.Account;
+import org.sleuthkit.datamodel.AccountDeviceInstance;
+import org.sleuthkit.datamodel.BlackboardArtifact;
+import org.sleuthkit.datamodel.CommunicationsFilter;
+import org.sleuthkit.datamodel.CommunicationsManager;
+import org.sleuthkit.datamodel.Content;
+import org.sleuthkit.datamodel.TskCoreException;
+
+/**
+ *A ChildFactory for CallLog artifacts.
+ */
+final class CallLogsChildNodeFactory extends ChildFactory{
+
+ private static final Logger logger = Logger.getLogger(CallLogsChildNodeFactory.class.getName());
+
+ private SelectionInfo selectionInfo;
+
+ private final Map deviceIDMap = new HashMap<>();
+
+ CallLogsChildNodeFactory(SelectionInfo selectionInfo) {
+ this.selectionInfo = selectionInfo;
+ }
+
+ void refresh(SelectionInfo selectionInfo) {
+ this.selectionInfo = selectionInfo;
+ refresh(true);
+ }
+
+ @Override
+ protected boolean createKeys(List list) {
+
+ if(selectionInfo == null) {
+ return true;
+ }
+
+ final Set relationshipSources;
+ try {
+ relationshipSources = selectionInfo.getRelationshipSources();
+ } catch (TskCoreException ex) {
+ logger.log(Level.SEVERE, "Failed to load relationship sources.", ex); //NON-NLS
+ return false;
+ }
+
+
+ for(Content content: relationshipSources) {
+ if( !(content instanceof BlackboardArtifact)){
+ continue;
+ }
+
+ BlackboardArtifact bba = (BlackboardArtifact) content;
+ BlackboardArtifact.ARTIFACT_TYPE fromID = BlackboardArtifact.ARTIFACT_TYPE.fromID(bba.getArtifactTypeID());
+
+ if ( fromID == BlackboardArtifact.ARTIFACT_TYPE.TSK_CALLLOG) {
+
+ String deviceID = "";
+ try {
+ deviceID = getDeviceIDForDataSource(bba.getDataSource().getName());
+ } catch (NoCurrentCaseException | TskCoreException ex) {
+ logger.log(Level.WARNING, String.format("Unable to get account for artifact data source: artifactID = %d", bba.getId()), ex);
+ }
+
+ list.add(new CallLogNodeKey(bba, deviceID));
+ }
+ }
+
+ list.sort(new CallLogComparator(BlackboardArtifactDateComparator.ACCENDING));
+
+ return true;
+ }
+
+ @Override
+ protected Node createNodeForKey(CallLogNodeKey key) {
+
+ return new CallLogNode(key.getArtifact(), key.getDeviceID());
+ }
+
+ /**
+ * Gets the device ID for the given data source.
+ *
+ * To reduce lookup calls to the DB unique dataSourceName\deviceID pairs
+ * are stored in deviceIDMap.
+ *
+ * @param dataSourceName String name of data source
+ *
+ * @return device ID for given dataSourceName or empty string if non is found.
+ *
+ * @throws NoCurrentCaseException
+ * @throws TskCoreException
+ */
+ private String getDeviceIDForDataSource(String dataSourceName) throws NoCurrentCaseException, TskCoreException{
+
+ String deviceID = deviceIDMap.get(dataSourceName);
+
+ if(deviceID == null) {
+ CommunicationsManager manager = Case.getCurrentCaseThrows().getSleuthkitCase().getCommunicationsManager();
+ CommunicationsFilter filter = new CommunicationsFilter();
+
+ List list = new ArrayList<>();
+ list.add(dataSourceName);
+
+ List typeList = new ArrayList();
+ typeList.add(Account.Type.DEVICE);
+
+ filter.addAndFilter(new CommunicationsFilter.DeviceFilter(list));
+ filter.addAndFilter(new CommunicationsFilter.AccountTypeFilter(typeList));
+
+
+ // This list should just have 1 item in it
+ List adiList = manager.getAccountDeviceInstancesWithRelationships(filter);
+
+ if( adiList != null && !adiList.isEmpty() ) {
+ deviceID = adiList.get(0).getDeviceId();
+ } else {
+ deviceID = "";
+ }
+
+ deviceIDMap.put(dataSourceName, deviceID);
+ }
+
+ return (deviceID != null ? deviceID : "");
+ }
+
+ /**
+ * ChildFactory key class which contains a BlackboardArtifact and its
+ * data source deviceID
+ */
+ final class CallLogNodeKey{
+ private final BlackboardArtifact artifact;
+ private final String deviceID;
+
+ private CallLogNodeKey(BlackboardArtifact artifact, String deviceID) {
+ this.artifact = artifact;
+ this.deviceID = deviceID;
+ }
+
+ /**
+ * Get the BlackboardArtifact for this key
+ *
+ * @return BlackboardArtifact instance
+ */
+ BlackboardArtifact getArtifact() {
+ return artifact;
+ }
+
+ /**
+ * Gets the BlackboardArtifact data source device ID.
+ *
+ * @return String device id.
+ */
+ String getDeviceID() {
+ return deviceID;
+ }
+ }
+
+ /**
+ * A comparator for CallLogNodeKey objects
+ */
+ final class CallLogComparator implements Comparator{
+
+ final BlackboardArtifactDateComparator comparator;
+
+ CallLogComparator(int direction) {
+ comparator = new BlackboardArtifactDateComparator(direction);
+ }
+
+ @Override
+ public int compare(CallLogNodeKey key1, CallLogNodeKey key2) {
+ return comparator.compare(key1.getArtifact(), key2.getArtifact());
+ }
+ }
+}
diff --git a/Core/src/org/sleuthkit/autopsy/communications/relationships/ContactDetailsPane.form b/Core/src/org/sleuthkit/autopsy/communications/relationships/ContactDetailsPane.form
index 671fac333e..0536cb5b11 100755
--- a/Core/src/org/sleuthkit/autopsy/communications/relationships/ContactDetailsPane.form
+++ b/Core/src/org/sleuthkit/autopsy/communications/relationships/ContactDetailsPane.form
@@ -1,10 +1,6 @@
@@ -563,5 +568,19 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/Core/src/org/sleuthkit/autopsy/logicalimager/configuration/ConfigVisualPanel2.java b/Core/src/org/sleuthkit/autopsy/logicalimager/configuration/ConfigVisualPanel2.java
index 5b2468efdc..65fe93fcd3 100644
--- a/Core/src/org/sleuthkit/autopsy/logicalimager/configuration/ConfigVisualPanel2.java
+++ b/Core/src/org/sleuthkit/autopsy/logicalimager/configuration/ConfigVisualPanel2.java
@@ -110,6 +110,7 @@ final class ConfigVisualPanel2 extends JPanel {
minSizeTextField = new javax.swing.JFormattedTextField();
maxSizeLabel = new javax.swing.JLabel();
maxSizeTextField = new javax.swing.JFormattedTextField();
+ promptBeforeExit = new javax.swing.JCheckBox();
org.openide.awt.Mnemonics.setLocalizedText(modifiedDateLabel, org.openide.util.NbBundle.getMessage(ConfigVisualPanel2.class, "ConfigVisualPanel2.modifiedDateLabel.text")); // NOI18N
@@ -120,7 +121,6 @@ final class ConfigVisualPanel2 extends JPanel {
modifiedWithinTextField.setPreferredSize(new java.awt.Dimension(60, 20));
org.openide.awt.Mnemonics.setLocalizedText(daysIncludedLabel, org.openide.util.NbBundle.getMessage(ConfigVisualPanel2.class, "ConfigVisualPanel2.daysIncludedLabel.text")); // NOI18N
- daysIncludedLabel.setEnabled(false);
org.openide.awt.Mnemonics.setLocalizedText(fullPathsLabel, org.openide.util.NbBundle.getMessage(ConfigVisualPanel2.class, "ConfigVisualPanel2.fullPathsLabel.text")); // NOI18N
@@ -255,6 +255,15 @@ final class ConfigVisualPanel2 extends JPanel {
maxSizeTextField.setFormatterFactory(new javax.swing.text.DefaultFormatterFactory(new javax.swing.text.NumberFormatter(new java.text.DecimalFormat("#,###; "))));
maxSizeTextField.setEnabled(false);
+ promptBeforeExit.setSelected(true);
+ org.openide.awt.Mnemonics.setLocalizedText(promptBeforeExit, org.openide.util.NbBundle.getMessage(ConfigVisualPanel2.class, "ConfigVisualPanel2.promptBeforeExit.text")); // NOI18N
+ promptBeforeExit.setActionCommand(org.openide.util.NbBundle.getMessage(ConfigVisualPanel2.class, "ConfigVisualPanel2.promptBeforeExit.actionCommand")); // NOI18N
+ promptBeforeExit.addActionListener(new java.awt.event.ActionListener() {
+ public void actionPerformed(java.awt.event.ActionEvent evt) {
+ promptBeforeExitActionPerformed(evt);
+ }
+ });
+
javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);
this.setLayout(layout);
layout.setHorizontalGroup(
@@ -268,7 +277,7 @@ final class ConfigVisualPanel2 extends JPanel {
.addGroup(layout.createSequentialGroup()
.addContainerGap()
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
- .addGroup(layout.createSequentialGroup()
+ .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
.addComponent(newRuleButton)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
.addComponent(editRuleButton)
@@ -281,48 +290,57 @@ final class ConfigVisualPanel2 extends JPanel {
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(layout.createSequentialGroup()
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
- .addComponent(flagEncryptionProgramsCheckBox)
- .addComponent(finalizeImageWriter)
- .addComponent(shouldSaveCheckBox)
- .addComponent(shouldAlertCheckBox)
.addComponent(extensionsLabel)
.addComponent(filenamesLabel)
.addComponent(descriptionLabel)
.addComponent(ruleNameLabel)
- .addGroup(layout.createSequentialGroup()
- .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
- .addComponent(modifiedDateLabel, javax.swing.GroupLayout.PREFERRED_SIZE, 79, javax.swing.GroupLayout.PREFERRED_SIZE)
- .addComponent(fileSizeLabel)
- .addComponent(fullPathsLabel)
- .addComponent(folderNamesLabel))
- .addGap(4, 4, 4)
- .addComponent(minSizeLabel)
- .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
- .addComponent(minSizeTextField, javax.swing.GroupLayout.PREFERRED_SIZE, 63, javax.swing.GroupLayout.PREFERRED_SIZE)
- .addGap(18, 18, 18)
- .addComponent(maxSizeLabel)
- .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
- .addComponent(maxSizeTextField, javax.swing.GroupLayout.PREFERRED_SIZE, 63, javax.swing.GroupLayout.PREFERRED_SIZE)))
- .addGap(107, 107, 107))
+ .addComponent(fullPathsLabel)
+ .addComponent(folderNamesLabel))
+ .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
.addGroup(layout.createSequentialGroup()
- .addGap(129, 129, 129)
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(layout.createSequentialGroup()
- .addComponent(modifiedWithinTextField, javax.swing.GroupLayout.PREFERRED_SIZE, 54, javax.swing.GroupLayout.PREFERRED_SIZE)
- .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
- .addComponent(daysIncludedLabel))
- .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
+ .addGap(129, 129, 129)
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
.addComponent(ruleNameEditTextField, javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(descriptionEditTextField, javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(extensionsTextField, javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(fullPathsScrollPane, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.PREFERRED_SIZE, 0, Short.MAX_VALUE)
.addComponent(filenamesScrollPane, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.PREFERRED_SIZE, 0, Short.MAX_VALUE)
- .addComponent(folderNamesScrollPane, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.PREFERRED_SIZE, 0, Short.MAX_VALUE))
- .addContainerGap())))))
+ .addComponent(folderNamesScrollPane, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.PREFERRED_SIZE, 0, Short.MAX_VALUE)))
+ .addGroup(layout.createSequentialGroup()
+ .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
+ .addComponent(shouldSaveCheckBox)
+ .addComponent(shouldAlertCheckBox)
+ .addGroup(layout.createSequentialGroup()
+ .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
+ .addComponent(modifiedDateLabel, javax.swing.GroupLayout.PREFERRED_SIZE, 79, javax.swing.GroupLayout.PREFERRED_SIZE)
+ .addComponent(fileSizeLabel))
+ .addGap(4, 4, 4)
+ .addComponent(minSizeLabel)
+ .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
+ .addComponent(minSizeTextField, javax.swing.GroupLayout.PREFERRED_SIZE, 63, javax.swing.GroupLayout.PREFERRED_SIZE)
+ .addGap(18, 18, 18)
+ .addComponent(maxSizeLabel)
+ .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
+ .addComponent(maxSizeTextField, javax.swing.GroupLayout.PREFERRED_SIZE, 63, javax.swing.GroupLayout.PREFERRED_SIZE))
+ .addGroup(layout.createSequentialGroup()
+ .addGap(129, 129, 129)
+ .addComponent(modifiedWithinTextField, javax.swing.GroupLayout.PREFERRED_SIZE, 54, javax.swing.GroupLayout.PREFERRED_SIZE)
+ .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
+ .addComponent(daysIncludedLabel)))
+ .addGap(0, 0, Short.MAX_VALUE)))
+ .addContainerGap())))
.addGroup(layout.createSequentialGroup()
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
- .addComponent(jSeparator1))))
+ .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
+ .addGroup(layout.createSequentialGroup()
+ .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
+ .addComponent(flagEncryptionProgramsCheckBox)
+ .addComponent(finalizeImageWriter)
+ .addComponent(promptBeforeExit))
+ .addGap(0, 0, Short.MAX_VALUE))
+ .addComponent(jSeparator1)))))
);
layout.linkSize(javax.swing.SwingConstants.HORIZONTAL, new java.awt.Component[] {deleteRuleButton, editRuleButton, newRuleButton});
@@ -337,12 +355,13 @@ final class ConfigVisualPanel2 extends JPanel {
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(layout.createSequentialGroup()
- .addComponent(rulesScrollPane, javax.swing.GroupLayout.DEFAULT_SIZE, 479, Short.MAX_VALUE)
+ .addComponent(rulesScrollPane, javax.swing.GroupLayout.DEFAULT_SIZE, 478, Short.MAX_VALUE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(newRuleButton)
.addComponent(editRuleButton)
- .addComponent(deleteRuleButton)))
+ .addComponent(deleteRuleButton))
+ .addContainerGap())
.addGroup(layout.createSequentialGroup()
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(layout.createSequentialGroup()
@@ -360,23 +379,16 @@ final class ConfigVisualPanel2 extends JPanel {
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(filenamesScrollPane, javax.swing.GroupLayout.PREFERRED_SIZE, 0, Short.MAX_VALUE)
- .addGroup(layout.createSequentialGroup()
- .addComponent(filenamesLabel)
- .addGap(0, 0, Short.MAX_VALUE)))
- .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
+ .addComponent(filenamesLabel))
+ .addGap(16, 16, 16)
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(folderNamesScrollPane, javax.swing.GroupLayout.PREFERRED_SIZE, 0, Short.MAX_VALUE)
- .addGroup(layout.createSequentialGroup()
- .addComponent(folderNamesLabel)
- .addGap(0, 0, Short.MAX_VALUE)))
- .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
+ .addComponent(folderNamesLabel))
+ .addGap(18, 18, 18)
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
- .addGroup(layout.createSequentialGroup()
- .addComponent(fullPathsLabel)
- .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
- .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
- .addComponent(fullPathsScrollPane, javax.swing.GroupLayout.PREFERRED_SIZE, 0, Short.MAX_VALUE)
- .addGap(11, 11, 11)))
+ .addComponent(fullPathsLabel)
+ .addComponent(fullPathsScrollPane, javax.swing.GroupLayout.PREFERRED_SIZE, 0, Short.MAX_VALUE))
+ .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.CENTER)
.addComponent(minSizeLabel)
.addComponent(minSizeTextField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
@@ -392,13 +404,15 @@ final class ConfigVisualPanel2 extends JPanel {
.addComponent(shouldSaveCheckBox)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(shouldAlertCheckBox)
- .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
- .addComponent(jSeparator1, javax.swing.GroupLayout.PREFERRED_SIZE, 2, javax.swing.GroupLayout.PREFERRED_SIZE)
+ .addGap(18, 18, 18)
+ .addComponent(jSeparator1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
.addComponent(flagEncryptionProgramsCheckBox)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
- .addComponent(finalizeImageWriter)))
- .addContainerGap())
+ .addComponent(finalizeImageWriter)
+ .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
+ .addComponent(promptBeforeExit)
+ .addGap(21, 21, 21))))
);
}// //GEN-END:initComponents
@@ -426,6 +440,13 @@ final class ConfigVisualPanel2 extends JPanel {
if (option == JOptionPane.OK_OPTION) {
try {
ImmutablePair ruleMap = editPanel.toRule();
+ if (!ruleName.equals(ruleMap.getKey()) && ruleExists(ruleMap)) {
+ JOptionPane.showMessageDialog(this,
+ Bundle.ConfigVisualPanel2_newRuleError_duplicateName(ruleMap.getKey()),
+ Bundle.ConfigVisualPanel2_editRuleError(),
+ JOptionPane.ERROR_MESSAGE);
+ continue;
+ }
updateRow(row, ruleMap);
break;
} catch (IOException | NumberFormatException ex) {
@@ -442,7 +463,10 @@ final class ConfigVisualPanel2 extends JPanel {
}
}//GEN-LAST:event_editRuleButtonActionPerformed
- @Messages({"ConfigVisualPanel2.newRule.name=New Rule"})
+ @Messages({"ConfigVisualPanel2.newRule.name=New Rule",
+ "ConfigVisualPanel2.newRuleError.title=New rule error",
+ "# {0} - ruleName",
+ "ConfigVisualPanel2.newRuleError.duplicateName=A rule with name \"{0}\" already exists. Please enter a different rule name"})
private void newRuleButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_newRuleButtonActionPerformed
NewRulePanel panel;
panel = new NewRulePanel(okButton, cancelButton);
@@ -455,14 +479,22 @@ final class ConfigVisualPanel2 extends JPanel {
null, new Object[]{okButton, cancelButton}, okButton);
if (option == JOptionPane.OK_OPTION) {
try {
- // Save the new rule
+
ImmutablePair ruleMap = panel.toRule();
+ if (ruleExists(ruleMap)) {
+ JOptionPane.showMessageDialog(this,
+ Bundle.ConfigVisualPanel2_newRuleError_duplicateName(ruleMap.getKey()),
+ Bundle.ConfigVisualPanel2_newRuleError_title(),
+ JOptionPane.ERROR_MESSAGE);
+ continue;
+ }
+ // Save the new rule
appendRow(ruleMap);
break;
} catch (IOException | NumberFormatException ex) {
JOptionPane.showMessageDialog(this,
ex.getMessage(),
- "New rule error",
+ Bundle.ConfigVisualPanel2_newRuleError_title(),
JOptionPane.ERROR_MESSAGE);
// let user fix the error
}
@@ -510,6 +542,10 @@ final class ConfigVisualPanel2 extends JPanel {
config.setFinalizeImageWriter(finalizeImageWriter.isSelected());
}//GEN-LAST:event_finalizeImageWriterActionPerformed
+ private void promptBeforeExitActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_promptBeforeExitActionPerformed
+ config.setPromptBeforeExit(promptBeforeExit.isSelected());
+ }//GEN-LAST:event_promptBeforeExitActionPerformed
+
/**
* Set the whether the a rule for detecting encryption programs will be
* added to the rules in this config
@@ -579,6 +615,7 @@ final class ConfigVisualPanel2 extends JPanel {
private javax.swing.JLabel modifiedDateLabel;
private javax.swing.JTextField modifiedWithinTextField;
private javax.swing.JButton newRuleButton;
+ private javax.swing.JCheckBox promptBeforeExit;
private javax.swing.JTextField ruleNameEditTextField;
private javax.swing.JLabel ruleNameLabel;
private javax.swing.JLabel ruleSetFileLabel;
@@ -607,6 +644,7 @@ final class ConfigVisualPanel2 extends JPanel {
private void updatePanel(String configFilePath, LogicalImagerConfig config, String rowSelectionkey) {
configFileTextField.setText(configFilePath);
finalizeImageWriter.setSelected(config.isFinalizeImageWriter());
+ promptBeforeExit.setSelected(config.isPromptBeforeExit());
LogicalImagerRuleSet ruleSet = getRuleSetFromCurrentConfig();
flagEncryptionProgramsCheckBox.setSelected(ruleSet.find(EncryptionProgramsRule.getName()) != null);
RulesTableModel rulesTableModel = new RulesTableModel();
@@ -767,6 +805,22 @@ final class ConfigVisualPanel2 extends JPanel {
updatePanel(configFilename, config, ruleMap.getKey());
}
+ /**
+ * Check if a rule with the same name as this rule already exists
+ *
+ * @param ruleMap the rule to check the name of
+ *
+ * @return true if it exists, false otherwise
+ */
+ private boolean ruleExists(ImmutablePair ruleMap) {
+ for (LogicalImagerRule rule : getRuleSetFromCurrentConfig().getRules()) {
+ if (rule.getName().equals(ruleMap.getKey())) {
+ return true;
+ }
+ }
+ return false;
+ }
+
private void appendRow(ImmutablePair ruleMap) {
getRuleSetFromCurrentConfig().getRules().add(ruleMap.getValue());
updatePanel(configFilename, config, ruleMap.getKey());
diff --git a/Core/src/org/sleuthkit/autopsy/logicalimager/configuration/EditFullPathsRulePanel.java b/Core/src/org/sleuthkit/autopsy/logicalimager/configuration/EditFullPathsRulePanel.java
index af65e8eacb..c40d05cffc 100644
--- a/Core/src/org/sleuthkit/autopsy/logicalimager/configuration/EditFullPathsRulePanel.java
+++ b/Core/src/org/sleuthkit/autopsy/logicalimager/configuration/EditFullPathsRulePanel.java
@@ -54,10 +54,6 @@ final class EditFullPathsRulePanel extends javax.swing.JPanel {
EditFullPathsRulePanel(JButton okButton, JButton cancelButton, String ruleName, LogicalImagerRule rule, boolean editing) {
initComponents();
- if (editing) {
- ruleNameTextField.setEnabled(!editing);
- }
-
this.setRule(ruleName, rule);
this.setButtons(okButton, cancelButton);
diff --git a/Core/src/org/sleuthkit/autopsy/logicalimager/configuration/EditNonFullPathsRulePanel.java b/Core/src/org/sleuthkit/autopsy/logicalimager/configuration/EditNonFullPathsRulePanel.java
index a48db9b2c4..8b9ead7efb 100644
--- a/Core/src/org/sleuthkit/autopsy/logicalimager/configuration/EditNonFullPathsRulePanel.java
+++ b/Core/src/org/sleuthkit/autopsy/logicalimager/configuration/EditNonFullPathsRulePanel.java
@@ -66,14 +66,11 @@ final class EditNonFullPathsRulePanel extends javax.swing.JPanel {
"EditNonFullPathsRulePanel.example=Example: ",
"EditNonFullPathsRulePanel.units.bytes=Bytes",
"EditNonFullPathsRulePanel.units.kilobytes=Kilobytes",
- "EditNonFullPathsRulePanel.units.megabytes=MegaBytes",
+ "EditNonFullPathsRulePanel.units.megabytes=Megabytes",
"EditNonFullPathsRulePanel.units.gigabytes=Gigabytes"
})
EditNonFullPathsRulePanel(JButton okButton, JButton cancelButton, String ruleName, LogicalImagerRule rule, boolean editing) {
initComponents();
- if (editing) {
- ruleNameTextField.setEnabled(!editing);
- }
this.setRule(ruleName, rule);
this.setButtons(okButton, cancelButton);
@@ -710,9 +707,9 @@ final class EditNonFullPathsRulePanel extends javax.swing.JPanel {
return (extensionsCheckbox.isSelected() && !StringUtils.isBlank(extensionsTextField.getText()) && !validateExtensions(extensionsTextField).isEmpty())
|| (fileNamesCheckbox.isSelected() && !StringUtils.isBlank(fileNamesTextArea.getText()))
|| (folderNamesCheckbox.isSelected() && !StringUtils.isBlank(folderNamesTextArea.getText()))
- || (minSizeCheckbox.isSelected() && !StringUtils.isBlank(minSizeTextField.getText()) && isNonZeroLong(minSizeTextField.getText()))
- || (maxSizeCheckbox.isSelected() && !StringUtils.isBlank(maxSizeTextField.getText()) && isNonZeroLong(maxSizeTextField.getText()))
- || (modifiedWithinCheckbox.isSelected() && !StringUtils.isBlank(modifiedWithinTextField.getText()));
+ || (minSizeCheckbox.isSelected() && !StringUtils.isBlank(minSizeTextField.getText()) && isNonZeroLong(minSizeTextField.getValue()))
+ || (maxSizeCheckbox.isSelected() && !StringUtils.isBlank(maxSizeTextField.getText()) && isNonZeroLong(maxSizeTextField.getValue()))
+ || (modifiedWithinCheckbox.isSelected() && !StringUtils.isBlank(modifiedWithinTextField.getText()) && isNonZeroLong(modifiedWithinTextField.getValue()));
} catch (IOException ex) {
logger.log(Level.WARNING, "Invalid contents of extensionsTextField", ex);
return false;
@@ -722,14 +719,16 @@ final class EditNonFullPathsRulePanel extends javax.swing.JPanel {
/**
* Check that value could be a non zero long
*
- * @param numberString the string to check
+ * @param numberObject the object to check
*
* @return true if the value is a non-zero long
*/
- private boolean isNonZeroLong(String numberString) {
+ private boolean isNonZeroLong(Object numberObject) {
Long value = 0L;
try {
- value = Long.parseLong(numberString);
+ if (numberObject instanceof Number) {
+ value = ((Number) numberObject).longValue();
+ }
} catch (NumberFormatException ignored) {
//The string was not a number, this method will return false becaue the value is still 0L
}
diff --git a/Core/src/org/sleuthkit/autopsy/logicalimager/configuration/LogicalImagerConfig.java b/Core/src/org/sleuthkit/autopsy/logicalimager/configuration/LogicalImagerConfig.java
index 685a2c8d35..9d1c175de3 100644
--- a/Core/src/org/sleuthkit/autopsy/logicalimager/configuration/LogicalImagerConfig.java
+++ b/Core/src/org/sleuthkit/autopsy/logicalimager/configuration/LogicalImagerConfig.java
@@ -38,6 +38,10 @@ class LogicalImagerConfig {
@Expose(serialize = true)
private boolean finalizeImageWriter;
+ @SerializedName("prompt-before-exit")
+ @Expose(serialize = true)
+ private boolean promptBeforeExit;
+
@SerializedName("rule-sets")
@Expose(serialize = true)
private List ruleSets;
@@ -45,6 +49,7 @@ class LogicalImagerConfig {
LogicalImagerConfig() {
this.version = CURRENT_VERSION;
this.finalizeImageWriter = false;
+ this.promptBeforeExit = true;
this.ruleSets = new ArrayList<>();
}
@@ -54,6 +59,7 @@ class LogicalImagerConfig {
) {
this.version = CURRENT_VERSION;
this.finalizeImageWriter = finalizeImageWriter;
+ this.promptBeforeExit = true;
this.ruleSets = ruleSets;
}
@@ -64,6 +70,19 @@ class LogicalImagerConfig {
) {
this.version = version;
this.finalizeImageWriter = finalizeImageWriter;
+ this.promptBeforeExit = true;
+ this.ruleSets = ruleSets;
+ }
+
+ LogicalImagerConfig(
+ String version,
+ boolean finalizeImageWriter,
+ boolean promptBeforeExit,
+ List ruleSets
+ ) {
+ this.version = version;
+ this.finalizeImageWriter = finalizeImageWriter;
+ this.promptBeforeExit = promptBeforeExit;
this.ruleSets = ruleSets;
}
@@ -87,6 +106,14 @@ class LogicalImagerConfig {
this.finalizeImageWriter = finalizeImageWriter;
}
+ boolean isPromptBeforeExit() {
+ return promptBeforeExit;
+ }
+
+ void setPromptBeforeExit(boolean promptBeforeExit) {
+ this.promptBeforeExit = promptBeforeExit;
+ }
+
List getRuleSets() {
return ruleSets;
}
diff --git a/Core/src/org/sleuthkit/autopsy/logicalimager/configuration/LogicalImagerConfigDeserializer.java b/Core/src/org/sleuthkit/autopsy/logicalimager/configuration/LogicalImagerConfigDeserializer.java
index a9c049ce08..dd433b68cf 100644
--- a/Core/src/org/sleuthkit/autopsy/logicalimager/configuration/LogicalImagerConfigDeserializer.java
+++ b/Core/src/org/sleuthkit/autopsy/logicalimager/configuration/LogicalImagerConfigDeserializer.java
@@ -45,6 +45,7 @@ class LogicalImagerConfigDeserializer implements JsonDeserializer parseRules(JsonArray asJsonArray) {
diff --git a/Core/src/org/sleuthkit/autopsy/logicalimager/dsp/AddLogicalImageTask.java b/Core/src/org/sleuthkit/autopsy/logicalimager/dsp/AddLogicalImageTask.java
index 19ff3079e1..9070dfc197 100644
--- a/Core/src/org/sleuthkit/autopsy/logicalimager/dsp/AddLogicalImageTask.java
+++ b/Core/src/org/sleuthkit/autopsy/logicalimager/dsp/AddLogicalImageTask.java
@@ -88,7 +88,7 @@ final class AddLogicalImageTask extends AddMultipleImageTask {
// Copy directory failed
String msg = Bundle.AddLogicalImageTask_failedToCopyDirectory(src.toString(), dest.toString());
errorList.add(msg);
- logger.log(Level.SEVERE, String.format("Failed to copy directory {0} to {1}", src.toString(), dest.toString()));
+ logger.log(Level.SEVERE, String.format("Failed to copy directory %s to %s", src.toString(), dest.toString()), ex);
callback.done(DataSourceProcessorCallback.DataSourceProcessorResult.CRITICAL_ERRORS, errorList, emptyDataSources);
return;
}
@@ -136,7 +136,7 @@ final class AddLogicalImageTask extends AddMultipleImageTask {
return null;
} catch (TskCoreException ex) {
String msg = Bundle.AddLogicalImageTask_failedToAddReport(reportPath.toString(), ex.getMessage());
- logger.log(Level.SEVERE, String.format("Failed to add report {0}. Reason= {1}", reportPath.toString(), ex.getMessage()));
+ logger.log(Level.SEVERE, String.format("Failed to add report %s. Reason= %s", reportPath.toString(), ex.getMessage()), ex);
return msg;
}
}
diff --git a/Core/src/org/sleuthkit/autopsy/logicalimager/dsp/AddMultipleImageTask.java b/Core/src/org/sleuthkit/autopsy/logicalimager/dsp/AddMultipleImageTask.java
index 60f2e43a4f..ea09ee0e2e 100644
--- a/Core/src/org/sleuthkit/autopsy/logicalimager/dsp/AddMultipleImageTask.java
+++ b/Core/src/org/sleuthkit/autopsy/logicalimager/dsp/AddMultipleImageTask.java
@@ -18,26 +18,23 @@
*/
package org.sleuthkit.autopsy.logicalimager.dsp;
-import java.nio.file.Paths;
import java.util.ArrayList;
import java.util.List;
import java.util.logging.Level;
import org.openide.util.NbBundle.Messages;
import org.sleuthkit.autopsy.casemodule.Case;
import org.sleuthkit.autopsy.casemodule.NoCurrentCaseException;
-import org.sleuthkit.autopsy.casemodule.services.FileManager;
import org.sleuthkit.autopsy.corecomponentinterfaces.DataSourceProcessorCallback;
import org.sleuthkit.autopsy.corecomponentinterfaces.DataSourceProcessorCallback.DataSourceProcessorResult;
import org.sleuthkit.autopsy.corecomponentinterfaces.DataSourceProcessorProgressMonitor;
import org.sleuthkit.autopsy.coreutils.Logger;
-import org.sleuthkit.datamodel.AbstractFile;
import org.sleuthkit.datamodel.Content;
import org.sleuthkit.datamodel.Image;
-import org.sleuthkit.datamodel.LocalFilesDataSource;
import org.sleuthkit.datamodel.SleuthkitCase;
import org.sleuthkit.datamodel.SleuthkitJNI;
import org.sleuthkit.datamodel.TskCoreException;
import org.sleuthkit.datamodel.TskDataException;
+import org.sleuthkit.datamodel.TskFileRange;
/**
*
@@ -51,12 +48,15 @@ class AddMultipleImageTask implements Runnable {
private static final Logger LOGGER = Logger.getLogger(AddMultipleImageTask.class.getName());
public static final String TSK_FS_TYPE_UNKNOWN_ERR_MSG = Bundle.AddMultipleImageTask_fsTypeUnknownErr();
+ private static final long TWO_GB = 2000000000L;
private final String deviceId;
private final List imageFilePaths;
private final String timeZone;
+ private final long chunkSize = TWO_GB;
private final DataSourceProcessorProgressMonitor progressMonitor;
private final DataSourceProcessorCallback callback;
private final Case currentCase;
+
private boolean criticalErrorOccurred;
private volatile boolean cancelled;
@@ -79,7 +79,7 @@ class AddMultipleImageTask implements Runnable {
* @throws NoCurrentCaseException The exception if there is no open case.
*/
@Messages({
- "# {0} - file", "AddMultipleImageTask.addingFileAsLogicalFile=Adding: {0} as logical file",
+ "# {0} - file", "AddMultipleImageTask.addingFileAsLogicalFile=Adding: {0} as an unallocated space file.",
"# {0} - deviceId", "# {1} - exceptionMessage",
"AddMultipleImageTask.errorAddingImgWithoutFileSystem=Error adding images without file systems for device %s: %s",})
AddMultipleImageTask(String deviceId, List imageFilePaths, String timeZone,
@@ -98,14 +98,14 @@ class AddMultipleImageTask implements Runnable {
* Try to add the input image files as images.
*/
List newDataSources = new ArrayList<>();
- List localFileDataSourcePaths = new ArrayList<>();
+ List corruptedImageFilePaths = new ArrayList<>();
List errorMessages = new ArrayList<>();
currentCase.getSleuthkitCase().acquireSingleUserCaseWriteLock();
try {
progressMonitor.setIndeterminate(true);
for (String imageFilePath : imageFilePaths) {
if (!cancelled) {
- addImageToCase(imageFilePath, newDataSources, localFileDataSourcePaths, errorMessages);
+ addImageToCase(imageFilePath, newDataSources, corruptedImageFilePaths, errorMessages);
}
}
} finally {
@@ -114,20 +114,42 @@ class AddMultipleImageTask implements Runnable {
/*
* Try to add any input image files that did not have file systems as a
- * single local/logical files set with the device id as the root virtual
+ * single an unallocated space file with the device id as the root virtual
* directory name.
*/
- if (!cancelled && !localFileDataSourcePaths.isEmpty()) {
- FileManager fileManager = currentCase.getServices().getFileManager();
- FileManager.FileAddProgressUpdater progressUpdater = (final AbstractFile newFile) -> {
- progressMonitor.setProgressText(Bundle.AddMultipleImageTask_addingFileAsLogicalFile(Paths.get(newFile.getParentPath(), newFile.getName())));
- };
+ if (!cancelled && !corruptedImageFilePaths.isEmpty()) {
+ SleuthkitCase caseDatabase;
+ caseDatabase = currentCase.getSleuthkitCase();
try {
- LocalFilesDataSource localFilesDataSource = fileManager.addLocalFilesDataSource(deviceId, "", timeZone, localFileDataSourcePaths, progressUpdater);
- newDataSources.add(localFilesDataSource);
- } catch (TskCoreException | TskDataException ex) {
+ progressMonitor.setProgressText(Bundle.AddMultipleImageTask_addingFileAsLogicalFile(corruptedImageFilePaths.toString()));
+
+ caseDatabase.acquireSingleUserCaseWriteLock();
+
+ Image dataSource = caseDatabase.addImageInfo(0, corruptedImageFilePaths, timeZone);
+ newDataSources.add(dataSource);
+ List fileRanges = new ArrayList<>();
+
+ long imageSize = dataSource.getSize();
+ int sequence = 0;
+ //start byte and end byte
+ long start = 0;
+ if (chunkSize > 0 && imageSize >= TWO_GB) {
+ for (double size = TWO_GB; size < dataSource.getSize(); size += TWO_GB) {
+ fileRanges.add(new TskFileRange(start, TWO_GB, sequence));
+ start += TWO_GB;
+ sequence++;
+ }
+
+ }
+ double leftoverSize = imageSize - sequence * TWO_GB;
+ fileRanges.add(new TskFileRange(start, (long)leftoverSize, sequence));
+
+ caseDatabase.addLayoutFiles(dataSource, fileRanges);
+ } catch (TskCoreException ex) {
errorMessages.add(Bundle.AddMultipleImageTask_errorAddingImgWithoutFileSystem(deviceId, ex.getLocalizedMessage()));
criticalErrorOccurred = true;
+ } finally {
+ caseDatabase.releaseSingleUserCaseWriteLock();
}
}
@@ -169,11 +191,10 @@ class AddMultipleImageTask implements Runnable {
* @param newDataSources If the image is added, a data source is
* added to this list for eventual return to
* the caller via the callback.
- * @param localFileDataSourcePaths If the image cannot be added because
+ * @param corruptedImageFilePaths If the image cannot be added because
* Sleuth Kit cannot detect a filesystem,
* the image file path is added to this list
- * for later addition as a part of a
- * local/logical files data source.
+ * for later addition as an unallocated space file.
* @param errorMessages If there are any error messages, the
* error messages are added to this list for
* eventual return to the caller via the
@@ -184,7 +205,7 @@ class AddMultipleImageTask implements Runnable {
"# {0} - imageFilePath", "# {1} - deviceId", "# {2} - exceptionMessage", "AddMultipleImageTask.criticalErrorAdding=Critical error adding {0} for device {1}: {2}",
"# {0} - imageFilePath", "# {1} - deviceId", "# {2} - exceptionMessage", "AddMultipleImageTask.criticalErrorReverting=Critical error reverting add image process for {0} for device {1}: {2}",
"# {0} - imageFilePath", "# {1} - deviceId", "# {2} - exceptionMessage", "AddMultipleImageTask.nonCriticalErrorAdding=Non-critical error adding {0} for device {1}: {2}",})
- private void addImageToCase(String imageFilePath, List newDataSources, List localFileDataSourcePaths, List errorMessages) {
+ private void addImageToCase(String imageFilePath, List newDataSources, List corruptedImageFilePaths, List errorMessages) {
/*
* Try to add the image to the case database as a data source.
*/
@@ -198,10 +219,10 @@ class AddMultipleImageTask implements Runnable {
/*
* If Sleuth Kit failed to add the image because it did not find
* a file system, save the image path so it can be added to the
- * case as part of a local/logical files data source. All other
+ * case as an unallocated space file. All other
* errors are critical.
*/
- localFileDataSourcePaths.add(imageFilePath);
+ corruptedImageFilePaths.add(imageFilePath);
} else {
errorMessages.add(Bundle.AddMultipleImageTask_criticalErrorAdding(imageFilePath, deviceId, ex.getLocalizedMessage()));
criticalErrorOccurred = true;
diff --git a/Core/src/org/sleuthkit/autopsy/logicalimager/dsp/Bundle.properties b/Core/src/org/sleuthkit/autopsy/logicalimager/dsp/Bundle.properties
index d6cc1be0e7..665b9f3f2e 100644
--- a/Core/src/org/sleuthkit/autopsy/logicalimager/dsp/Bundle.properties
+++ b/Core/src/org/sleuthkit/autopsy/logicalimager/dsp/Bundle.properties
@@ -5,10 +5,7 @@
LogicalImagerPanel.selectFromDriveLabel.text=Select Acquisition From Drive
LogicalImagerPanel.selectDriveLabel.text=Select Drive
LogicalImagerPanel.selectFolderLabel.text=Selected Folder:
-LogicalImagerPanel.messageTextArea.text=
-LogicalImagerPanel.pathTextField.text=
LogicalImagerPanel.manualRadioButton.text=Manually Choose Folder
-LogicalImagerPanel.importRadioButton.toolTipText=
LogicalImagerPanel.importRadioButton.text=Import From External Drive
LogicalImagerPanel.browseButton.text=Browse
LogicalImagerPanel.refreshButton.text=Refresh
diff --git a/Core/src/org/sleuthkit/autopsy/logicalimager/dsp/Bundle.properties-MERGED b/Core/src/org/sleuthkit/autopsy/logicalimager/dsp/Bundle.properties-MERGED
index 76b0cf6c23..32bd3c7868 100644
--- a/Core/src/org/sleuthkit/autopsy/logicalimager/dsp/Bundle.properties-MERGED
+++ b/Core/src/org/sleuthkit/autopsy/logicalimager/dsp/Bundle.properties-MERGED
@@ -19,7 +19,7 @@ AddLogicalImageTask.failedToCopyDirectory=Failed to copy directory {0} to {1}
# {0} - imageFilePath
AddMultipleImageTask.adding=Adding: {0}
# {0} - file
-AddMultipleImageTask.addingFileAsLogicalFile=Adding: {0} as logical file
+AddMultipleImageTask.addingFileAsLogicalFile=Adding: {0} as an unallocated space file.
# {0} - imageFilePath
# {1} - deviceId
# {2} - exceptionMessage
@@ -48,6 +48,7 @@ LogicalImagerDSProcessor.imageDirPathNotFound={0} not found.\nUSB drive has been
LogicalImagerDSProcessor.noCurrentCase=No current case
LogicalImagerPanel.imageTable.columnModel.title0=Hostname
LogicalImagerPanel.imageTable.columnModel.title1=Extracted Date
+LogicalImagerPanel.imageTable.columnModel.title2=Path
# {0} - sparseImageDirectory
LogicalImagerPanel.messageLabel.directoryDoesNotContainSparseImage=Directory {0} does not contain any images
# {0} - invalidFormatDirectory
@@ -60,10 +61,7 @@ LogicalImagerPanel.selectAcquisitionFromDriveLabel.text=Select acquisition from
LogicalImagerPanel.selectFromDriveLabel.text=Select Acquisition From Drive
LogicalImagerPanel.selectDriveLabel.text=Select Drive
LogicalImagerPanel.selectFolderLabel.text=Selected Folder:
-LogicalImagerPanel.messageTextArea.text=
-LogicalImagerPanel.pathTextField.text=
LogicalImagerPanel.manualRadioButton.text=Manually Choose Folder
-LogicalImagerPanel.importRadioButton.toolTipText=
LogicalImagerPanel.importRadioButton.text=Import From External Drive
LogicalImagerPanel.browseButton.text=Browse
LogicalImagerPanel.refreshButton.text=Refresh
diff --git a/Core/src/org/sleuthkit/autopsy/logicalimager/dsp/DriveListUtils.java b/Core/src/org/sleuthkit/autopsy/logicalimager/dsp/DriveListUtils.java
index 12b10d3000..d033d0fdce 100644
--- a/Core/src/org/sleuthkit/autopsy/logicalimager/dsp/DriveListUtils.java
+++ b/Core/src/org/sleuthkit/autopsy/logicalimager/dsp/DriveListUtils.java
@@ -18,6 +18,12 @@
*/
package org.sleuthkit.autopsy.logicalimager.dsp;
+import java.io.BufferedReader;
+import java.io.IOException;
+import java.io.InputStreamReader;
+import java.util.Arrays;
+import java.util.List;
+
/**
* Utility class for displaying a list of drives
*/
@@ -48,4 +54,33 @@ public final class DriveListUtils {
private DriveListUtils() {
//empty private constructor for util class
}
+
+ /** Use the command net
to determine what this drive is.
+ * net use
will return an error for anything which isn't a share.
+ */
+ public static boolean isNetworkDrive(String driveLetter) {
+ List cmd = Arrays.asList("cmd", "/c", "net", "use", driveLetter + ":");
+
+ try {
+ Process p = new ProcessBuilder(cmd)
+ .redirectErrorStream(true)
+ .start();
+
+ p.getOutputStream().close();
+
+ StringBuilder consoleOutput = new StringBuilder();
+
+ String line;
+ try (BufferedReader in = new BufferedReader(new InputStreamReader(p.getInputStream()))) {
+ while ((line = in.readLine()) != null) {
+ consoleOutput.append(line).append("\r\n");
+ }
+ }
+
+ int rc = p.waitFor();
+ return rc == 0;
+ } catch(IOException | InterruptedException e) {
+ return false; // assume not a network drive
+ }
+ }
}
diff --git a/Core/src/org/sleuthkit/autopsy/logicalimager/dsp/LogicalImagerPanel.form b/Core/src/org/sleuthkit/autopsy/logicalimager/dsp/LogicalImagerPanel.form
index 43a8e0f1ca..8f864e1f20 100644
--- a/Core/src/org/sleuthkit/autopsy/logicalimager/dsp/LogicalImagerPanel.form
+++ b/Core/src/org/sleuthkit/autopsy/logicalimager/dsp/LogicalImagerPanel.form
@@ -89,7 +89,7 @@
-
+
@@ -133,9 +133,7 @@
-
-
-
+
@@ -156,9 +154,6 @@
-
-
-
@@ -231,6 +226,7 @@
+
@@ -246,7 +242,6 @@
-
@@ -280,9 +275,6 @@
-
-
-
diff --git a/Core/src/org/sleuthkit/autopsy/logicalimager/dsp/LogicalImagerPanel.java b/Core/src/org/sleuthkit/autopsy/logicalimager/dsp/LogicalImagerPanel.java
index 880259f95a..06722722d6 100644
--- a/Core/src/org/sleuthkit/autopsy/logicalimager/dsp/LogicalImagerPanel.java
+++ b/Core/src/org/sleuthkit/autopsy/logicalimager/dsp/LogicalImagerPanel.java
@@ -39,8 +39,8 @@ import javax.swing.ListSelectionModel;
import javax.swing.event.DocumentEvent;
import javax.swing.event.DocumentListener;
import javax.swing.filechooser.FileSystemView;
-import javax.swing.table.AbstractTableModel;
-import javax.swing.table.TableModel;
+import javax.swing.table.DefaultTableModel;
+import javax.swing.table.TableColumn;
import org.openide.util.NbBundle.Messages;
import org.sleuthkit.autopsy.corecomponentinterfaces.DataSourceProcessor;
import org.sleuthkit.autopsy.coreutils.Logger;
@@ -60,12 +60,14 @@ final class LogicalImagerPanel extends JPanel implements DocumentListener {
private static final long serialVersionUID = 1L;
private static final String NO_IMAGE_SELECTED = Bundle.LogicalImagerPanel_messageLabel_noImageSelected();
private static final String DRIVE_HAS_NO_IMAGES = Bundle.LogicalImagerPanel_messageLabel_driveHasNoImages();
+ private static final int COLUMN_TO_SORT_ON_INDEX = 1;
+ private static final int NUMBER_OF_VISIBLE_COLUMNS = 2;
private static final String[] EMPTY_LIST_DATA = {};
private final JFileChooser fileChooser = new JFileChooser();
private final Pattern regex = Pattern.compile("Logical_Imager_(.+)_(\\d{4})(\\d{2})(\\d{2})_(\\d{2})_(\\d{2})_(\\d{2})");
- private Path choosenImageDirPath;
- private TableModel imageTableModel;
+ private Path manualImageDirPath;
+ private DefaultTableModel imageTableModel;
/**
* Creates new form LogicalImagerPanel
@@ -75,10 +77,28 @@ final class LogicalImagerPanel extends JPanel implements DocumentListener {
*/
private LogicalImagerPanel(String context) {
initComponents();
+ configureImageTable();
jScrollPane1.setBorder(null);
clearImageTable();
}
+ /**
+ * Perform the Image Table configuration necessary when a new table model is
+ * set.
+ */
+ private void configureImageTable() {
+ //hide path column while leaving it in model
+ if (imageTable.getColumnCount() > NUMBER_OF_VISIBLE_COLUMNS) {
+ TableColumn columnToHide = imageTable.getColumn(imageTableModel.getColumnName(NUMBER_OF_VISIBLE_COLUMNS));
+ if (columnToHide != null) {
+ imageTable.removeColumn(columnToHide);
+ }
+ //sort on specified column in decending order, the first call will toggle to ascending order, the second to descending order
+ imageTable.getRowSorter().toggleSortOrder(COLUMN_TO_SORT_ON_INDEX);
+ imageTable.getRowSorter().toggleSortOrder(COLUMN_TO_SORT_ON_INDEX);
+ }
+ }
+
/**
* Creates and returns an instance of a LogicalImagerPanel.
*
@@ -133,7 +153,7 @@ final class LogicalImagerPanel extends JPanel implements DocumentListener {
buttonGroup1.add(importRadioButton);
importRadioButton.setSelected(true);
org.openide.awt.Mnemonics.setLocalizedText(importRadioButton, org.openide.util.NbBundle.getMessage(LogicalImagerPanel.class, "LogicalImagerPanel.importRadioButton.text")); // NOI18N
- importRadioButton.setToolTipText(org.openide.util.NbBundle.getMessage(LogicalImagerPanel.class, "LogicalImagerPanel.importRadioButton.toolTipText")); // NOI18N
+ importRadioButton.setToolTipText("");
importRadioButton.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
importRadioButtonActionPerformed(evt);
@@ -148,7 +168,6 @@ final class LogicalImagerPanel extends JPanel implements DocumentListener {
}
});
- pathTextField.setText(org.openide.util.NbBundle.getMessage(LogicalImagerPanel.class, "LogicalImagerPanel.pathTextField.text")); // NOI18N
pathTextField.setDisabledTextColor(java.awt.Color.black);
pathTextField.setEnabled(false);
@@ -180,6 +199,7 @@ final class LogicalImagerPanel extends JPanel implements DocumentListener {
imageScrollPane.setPreferredSize(new java.awt.Dimension(346, 402));
+ imageTable.setAutoCreateRowSorter(true);
imageTable.setModel(new javax.swing.table.DefaultTableModel(
new Object [][] {
@@ -193,7 +213,6 @@ final class LogicalImagerPanel extends JPanel implements DocumentListener {
imageTable.setShowHorizontalLines(false);
imageTable.setShowVerticalLines(false);
imageTable.getTableHeader().setReorderingAllowed(false);
- imageTable.setUpdateSelectionOnSort(false);
imageTable.addMouseListener(new java.awt.event.MouseAdapter() {
public void mouseReleased(java.awt.event.MouseEvent evt) {
imageTableMouseReleased(evt);
@@ -214,7 +233,6 @@ final class LogicalImagerPanel extends JPanel implements DocumentListener {
messageTextArea.setForeground(java.awt.Color.red);
messageTextArea.setLineWrap(true);
messageTextArea.setRows(3);
- messageTextArea.setText(org.openide.util.NbBundle.getMessage(LogicalImagerPanel.class, "LogicalImagerPanel.messageTextArea.text")); // NOI18N
messageTextArea.setBorder(null);
messageTextArea.setDisabledTextColor(java.awt.Color.red);
messageTextArea.setEnabled(false);
@@ -272,7 +290,7 @@ final class LogicalImagerPanel extends JPanel implements DocumentListener {
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(imageScrollPane, javax.swing.GroupLayout.PREFERRED_SIZE, 0, Short.MAX_VALUE)
- .addComponent(driveListScrollPane, javax.swing.GroupLayout.DEFAULT_SIZE, 106, Short.MAX_VALUE))
+ .addComponent(driveListScrollPane, javax.swing.GroupLayout.DEFAULT_SIZE, 23, Short.MAX_VALUE))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
.addComponent(refreshButton)
.addGap(18, 18, 18)
@@ -299,7 +317,7 @@ final class LogicalImagerPanel extends JPanel implements DocumentListener {
})
private void browseButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_browseButtonActionPerformed
imageTable.clearSelection();
- choosenImageDirPath = null;
+ manualImageDirPath = null;
setErrorMessage(NO_IMAGE_SELECTED);
fileChooser.setFileSelectionMode(JFileChooser.DIRECTORIES_ONLY);
int retval = fileChooser.showOpenDialog(this);
@@ -319,7 +337,7 @@ final class LogicalImagerPanel extends JPanel implements DocumentListener {
firePropertyChange(DataSourceProcessor.DSP_PANEL_EVENT.UPDATE_UI.toString(), true, false);
return;
}
- choosenImageDirPath = Paths.get(path);
+ manualImageDirPath = Paths.get(path);
setNormalMessage(path);
firePropertyChange(DataSourceProcessor.DSP_PANEL_EVENT.UPDATE_UI.toString(), false, true);
} else {
@@ -334,11 +352,9 @@ final class LogicalImagerPanel extends JPanel implements DocumentListener {
private void imageTableSelect() {
int index = imageTable.getSelectedRow();
if (index != -1) {
- choosenImageDirPath = Paths.get((String) imageTableModel.getValueAt(index, 2));
- setNormalMessage(choosenImageDirPath.toString());
+ setNormalMessage((String) imageTableModel.getValueAt(imageTable.convertRowIndexToModel(index), 2));
firePropertyChange(DataSourceProcessor.DSP_PANEL_EVENT.UPDATE_UI.toString(), false, true);
} else {
- choosenImageDirPath = null;
setErrorMessage(NO_IMAGE_SELECTED);
firePropertyChange(DataSourceProcessor.DSP_PANEL_EVENT.UPDATE_UI.toString(), true, false);
}
@@ -365,7 +381,6 @@ final class LogicalImagerPanel extends JPanel implements DocumentListener {
if (fList != null) {
imageTableModel = new ImageTableModel();
- int row = 0;
// Find all directories with name like Logical_Imager_HOSTNAME_yyyymmdd_HH_MM_SS
// and has vhd files in it
for (File file : fList) {
@@ -383,10 +398,7 @@ final class LogicalImagerPanel extends JPanel implements DocumentListener {
String second = m.group(7);
String extractDate = year + "/" + month + "/" + day
+ " " + hour + ":" + minute + ":" + second;
- imageTableModel.setValueAt(hostname, row, 0);
- imageTableModel.setValueAt(extractDate, row, 1);
- imageTableModel.setValueAt(imageDirPath, row, 2);
- row++;
+ imageTableModel.addRow(new Object[]{hostname, extractDate, imageDirPath});
}
}
}
@@ -394,18 +406,17 @@ final class LogicalImagerPanel extends JPanel implements DocumentListener {
+ " " + driveLetter);
imageTable.setAutoResizeMode(JTable.AUTO_RESIZE_LAST_COLUMN);
imageTable.setModel(imageTableModel);
+ configureImageTable();
fixImageTableColumnWidth();
// If there are any images, select the first one
if (imageTable.getRowCount() > 0) {
imageTable.setRowSelectionInterval(0, 0);
imageTableSelect();
} else {
- choosenImageDirPath = null;
setErrorMessage(DRIVE_HAS_NO_IMAGES);
}
} else {
clearImageTable();
- choosenImageDirPath = null;
setErrorMessage(DRIVE_HAS_NO_IMAGES);
}
}
@@ -430,6 +441,7 @@ final class LogicalImagerPanel extends JPanel implements DocumentListener {
private void clearImageTable() {
imageTableModel = new ImageTableModel();
imageTable.setModel(imageTableModel);
+ configureImageTable();
fixImageTableColumnWidth();
}
@@ -448,7 +460,7 @@ final class LogicalImagerPanel extends JPanel implements DocumentListener {
refreshButton.setEnabled(false);
- choosenImageDirPath = null;
+ manualImageDirPath = null;
setNormalMessage("");
firePropertyChange(DataSourceProcessor.DSP_PANEL_EVENT.UPDATE_UI.toString(), true, false);
}//GEN-LAST:event_manualRadioButtonActionPerformed
@@ -463,7 +475,7 @@ final class LogicalImagerPanel extends JPanel implements DocumentListener {
refreshButton.setEnabled(true);
- choosenImageDirPath = null;
+ manualImageDirPath = null;
setNormalMessage("");
refreshButton.doClick();
}//GEN-LAST:event_importRadioButtonActionPerformed
@@ -481,6 +493,9 @@ final class LogicalImagerPanel extends JPanel implements DocumentListener {
int firstRemovableDrive = -1;
int i = 0;
for (File root : roots) {
+ if (DriveListUtils.isNetworkDrive(root.toString().replace(":\\", ""))) {
+ continue;
+ }
String description = FileSystemView.getFileSystemView().getSystemTypeDescription(root);
long spaceInBytes = root.getTotalSpace();
String sizeWithUnit = DriveListUtils.humanReadableByteCount(spaceInBytes, false);
@@ -558,7 +573,7 @@ final class LogicalImagerPanel extends JPanel implements DocumentListener {
void reset() {
//reset the UI elements to default
- choosenImageDirPath = null;
+ manualImageDirPath = null;
setNormalMessage("");
driveList.setListData(EMPTY_LIST_DATA);
clearImageTable();
@@ -573,11 +588,24 @@ final class LogicalImagerPanel extends JPanel implements DocumentListener {
* @return true if a proper image has been selected, false otherwise
*/
boolean validatePanel() {
- return choosenImageDirPath != null && choosenImageDirPath.toFile().exists();
+ if (manualRadioButton.isSelected()) {
+ return manualImageDirPath != null && manualImageDirPath.toFile().exists();
+ } else if (imageTable.getSelectedRow() != -1) {
+ Path path = Paths.get((String) imageTableModel.getValueAt(imageTable.convertRowIndexToModel(imageTable.getSelectedRow()), 2));
+ return path != null && path.toFile().exists();
+ } else {
+ return false;
+ }
}
Path getImageDirPath() {
- return choosenImageDirPath;
+ if (manualRadioButton.isSelected()) {
+ return manualImageDirPath;
+ } else if (imageTable.getSelectedRow() != -1) {
+ return Paths.get((String) imageTableModel.getValueAt(imageTable.convertRowIndexToModel(imageTable.getSelectedRow()), 2));
+ } else {
+ return null;
+ }
}
@Override
@@ -598,25 +626,19 @@ final class LogicalImagerPanel extends JPanel implements DocumentListener {
/**
* Image Table Model
*/
- private class ImageTableModel extends AbstractTableModel {
+ private class ImageTableModel extends DefaultTableModel {
- private final List hostnames = new ArrayList<>();
- private final List extractDates = new ArrayList<>();
- private final List imageDirPaths = new ArrayList<>();
-
- @Override
- public int getRowCount() {
- return hostnames.size();
- }
+ private static final long serialVersionUID = 1L;
@Override
public int getColumnCount() {
- return 2;
+ return 3;
}
@Messages({
"LogicalImagerPanel.imageTable.columnModel.title0=Hostname",
- "LogicalImagerPanel.imageTable.columnModel.title1=Extracted Date"
+ "LogicalImagerPanel.imageTable.columnModel.title1=Extracted Date",
+ "LogicalImagerPanel.imageTable.columnModel.title2=Path"
})
@Override
public String getColumnName(int column) {
@@ -628,55 +650,18 @@ final class LogicalImagerPanel extends JPanel implements DocumentListener {
case 1:
colName = Bundle.LogicalImagerPanel_imageTable_columnModel_title1();
break;
+ case 2:
+ colName = Bundle.LogicalImagerPanel_imageTable_columnModel_title2();
+ break;
default:
break;
}
return colName;
}
- @Override
- public Object getValueAt(int rowIndex, int columnIndex) {
- Object ret = null;
- switch (columnIndex) {
- case 0:
- ret = hostnames.get(rowIndex);
- break;
- case 1:
- ret = extractDates.get(rowIndex);
- break;
- case 2:
- ret = imageDirPaths.get(rowIndex);
- break;
- default:
- throw new UnsupportedOperationException("Invalid table column index: " + columnIndex); //NON-NLS
- }
- return ret;
- }
-
@Override
public boolean isCellEditable(int rowIndex, int columnIndex) {
return false;
}
-
- @Override
- public void setValueAt(Object aValue, int rowIndex, int columnIndex) {
- switch (columnIndex) {
- case 0:
- hostnames.add((String) aValue);
- break;
- case 1:
- extractDates.add((String) aValue);
- break;
- case 2:
- imageDirPaths.add((String) aValue);
- break;
- default:
- throw new UnsupportedOperationException("Invalid table column index: " + columnIndex); //NON-NLS
- }
- // Only show the hostname and extractDates column
- if (columnIndex < 2) {
- super.setValueAt(aValue, rowIndex, columnIndex);
- }
- }
}
}
diff --git a/Core/src/org/sleuthkit/autopsy/modules/dataSourceIntegrity/DataSourceIntegrityIngestSettingsPanel.form b/Core/src/org/sleuthkit/autopsy/modules/dataSourceIntegrity/DataSourceIntegrityIngestSettingsPanel.form
index b9fc6f08b1..8c970ef7d9 100644
--- a/Core/src/org/sleuthkit/autopsy/modules/dataSourceIntegrity/DataSourceIntegrityIngestSettingsPanel.form
+++ b/Core/src/org/sleuthkit/autopsy/modules/dataSourceIntegrity/DataSourceIntegrityIngestSettingsPanel.form
@@ -1,6 +1,11 @@