From 995701d9c8cf9bd15573f6c9185a9dc54157039a Mon Sep 17 00:00:00 2001 From: Kelly Kelly Date: Fri, 27 Mar 2020 09:22:34 -0400 Subject: [PATCH 001/137] Added a properychange listener to HashLookupSettingsPanel --- .../hashdatabase/HashLookupSettingsPanel.java | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/Core/src/org/sleuthkit/autopsy/modules/hashdatabase/HashLookupSettingsPanel.java b/Core/src/org/sleuthkit/autopsy/modules/hashdatabase/HashLookupSettingsPanel.java index ebe59fe535..c0f5a05104 100644 --- a/Core/src/org/sleuthkit/autopsy/modules/hashdatabase/HashLookupSettingsPanel.java +++ b/Core/src/org/sleuthkit/autopsy/modules/hashdatabase/HashLookupSettingsPanel.java @@ -53,6 +53,7 @@ import org.sleuthkit.autopsy.modules.hashdatabase.HashDbManager.CentralRepoHashS import org.sleuthkit.autopsy.modules.hashdatabase.HashDbManager.HashDb.KnownFilesType; import org.sleuthkit.datamodel.TskCoreException; import org.sleuthkit.autopsy.modules.hashdatabase.HashDbManager.HashDb; +import org.sleuthkit.autopsy.modules.hashdatabase.HashDbManager.SetEvt; /** * Instances of this class provide a comprehensive UI for managing the hash sets @@ -94,6 +95,17 @@ public final class HashLookupSettingsPanel extends IngestModuleGlobalSettingsPan } } }); + + HashDbManager.getInstance().addPropertyChangeListener(new PropertyChangeListener() { + @Override + public void propertyChange(PropertyChangeEvent evt) { + String propName = evt.getPropertyName(); + if(propName.equals(SetEvt.DB_ADDED.toString()) || + propName.equals(SetEvt.DB_DELETED.toString())) { + hashSetTableModel.refreshModel(); + } + } + }); } @NbBundle.Messages({"HashLookupSettingsPanel.Title=Global Hash Lookup Settings"}) From 763acad24ce539d783a570a00851a09d6111f014 Mon Sep 17 00:00:00 2001 From: Greg DiCristofaro Date: Mon, 30 Mar 2020 09:28:11 -0400 Subject: [PATCH 002/137] multi user options panel label change --- .../autopsy/corecomponents/Bundle.properties | 6 +++--- .../autopsy/corecomponents/Bundle.properties-MERGED | 12 ++++++------ 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/Core/src/org/sleuthkit/autopsy/corecomponents/Bundle.properties b/Core/src/org/sleuthkit/autopsy/corecomponents/Bundle.properties index 15ee654347..4571bcc3df 100644 --- a/Core/src/org/sleuthkit/autopsy/corecomponents/Bundle.properties +++ b/Core/src/org/sleuthkit/autopsy/corecomponents/Bundle.properties @@ -77,9 +77,9 @@ DataResultViewerThumbnail.switchPage.done.errMsg=Error making thumbnails: {0} AboutWindowPanel.actVerboseLogging.text=Activate verbose logging OptionsCategory_Name_Multi_User_Settings=Multi-User OptionsCategory_Keywords_Multi_User_Options=Multi-User Settings -MultiUserSettingsPanel.lbSolrSettings.text=Solr Settings +MultiUserSettingsPanel.lbSolrSettings.text=Solr Server Settings MultiUserSettingsPanel.cbEnableMultiUser.text=Enable multi-user cases -MultiUserSettingsPanel.lbDatabaseSettings.text=Database Settings +MultiUserSettingsPanel.lbDatabaseSettings.text=Database Server Settings MultiUserSettingsPanel.validationErrMsg.incomplete=Fill in all values MultiUserSettingsPanel.nonWindowsOs.msg=Multi-user cases are only available on Windows platforms MultiUserSettingsPanel.validationErrMsg.invalidDatabasePort=Invalid database port number @@ -107,7 +107,7 @@ MultiUserSettingsPanel.tbSolrHostname.toolTipText=Hostname or IP Address MultiUserSettingsPanel.tbSolrPort.toolTipText=Port Number MultiUserSettingsPanel.lbTestMessageService.text= MultiUserSettingsPanel.bnTestMessageService.text=Test -MultiUserSettingsPanel.lbMessageServiceSettings.text=ActiveMQ Message Service Settings +MultiUserSettingsPanel.lbMessageServiceSettings.text=ActiveMQ Message Server Settings MultiUserSettingsPanel.tbMsgPort.toolTipText=Port Number MultiUserSettingsPanel.tbMsgPort.text= MultiUserSettingsPanel.tbMsgUsername.toolTipText=User Name (optional) diff --git a/Core/src/org/sleuthkit/autopsy/corecomponents/Bundle.properties-MERGED b/Core/src/org/sleuthkit/autopsy/corecomponents/Bundle.properties-MERGED index f252420726..544cfa63c0 100755 --- a/Core/src/org/sleuthkit/autopsy/corecomponents/Bundle.properties-MERGED +++ b/Core/src/org/sleuthkit/autopsy/corecomponents/Bundle.properties-MERGED @@ -63,9 +63,9 @@ DataContentViewerHex.totalPageLabel.text_1=100 DataContentViewerHex.pageLabel2.text=Page # Product Information panel -LBL_Description=
\n Product Version: {0} ({9})
Sleuth Kit Version: {7}
Netbeans RCP Build: {8}
Java: {1}; {2}
System: {3}; {4}; {5}
Userdir: {6}
+LBL_Description=
\n Product Version: {0} ({9})
Sleuth Kit Version: {7}
Netbeans RCP Build: {8}
Java: {1}; {2}
System: {3}; {4}; {5}
Userdir: {6}
Format_OperatingSystem_Value={0} version {1} running on {2} -LBL_Copyright=
Autopsy™ is a digital forensics platform based on The Sleuth Kit™ and other tools.
Copyright © 2003-2018.
+LBL_Copyright=
Autopsy™ is a digital forensics platform based on The Sleuth Kit™ and other tools.
Copyright © 2003-2018.
SortChooser.dialogTitle=Choose Sort Criteria ThumbnailViewChildren.progress.cancelling=(Cancelling) # {0} - file name @@ -95,7 +95,7 @@ DataResultViewerThumbnail.pageNextButton.text= DataResultViewerThumbnail.imagesLabel.text=Images: DataResultViewerThumbnail.imagesRangeLabel.text=- DataResultViewerThumbnail.pageNumLabel.text=- -DataResultViewerThumbnail.filePathLabel.text=\ +DataResultViewerThumbnail.filePathLabel.text=\ \ \ DataResultViewerThumbnail.goToPageLabel.text=Go to Page: DataResultViewerThumbnail.goToPageField.text= AdvancedConfigurationDialog.cancelButton.text=Cancel @@ -129,9 +129,9 @@ DataResultViewerThumbnail.switchPage.done.errMsg=Error making thumbnails: {0} AboutWindowPanel.actVerboseLogging.text=Activate verbose logging OptionsCategory_Name_Multi_User_Settings=Multi-User OptionsCategory_Keywords_Multi_User_Options=Multi-User Settings -MultiUserSettingsPanel.lbSolrSettings.text=Solr Settings +MultiUserSettingsPanel.lbSolrSettings.text=Solr Server Settings MultiUserSettingsPanel.cbEnableMultiUser.text=Enable multi-user cases -MultiUserSettingsPanel.lbDatabaseSettings.text=Database Settings +MultiUserSettingsPanel.lbDatabaseSettings.text=Database Server Settings MultiUserSettingsPanel.validationErrMsg.incomplete=Fill in all values MultiUserSettingsPanel.nonWindowsOs.msg=Multi-user cases are only available on Windows platforms MultiUserSettingsPanel.validationErrMsg.invalidDatabasePort=Invalid database port number @@ -159,7 +159,7 @@ MultiUserSettingsPanel.tbSolrHostname.toolTipText=Hostname or IP Address MultiUserSettingsPanel.tbSolrPort.toolTipText=Port Number MultiUserSettingsPanel.lbTestMessageService.text= MultiUserSettingsPanel.bnTestMessageService.text=Test -MultiUserSettingsPanel.lbMessageServiceSettings.text=ActiveMQ Message Service Settings +MultiUserSettingsPanel.lbMessageServiceSettings.text=ActiveMQ Message Server Settings MultiUserSettingsPanel.tbMsgPort.toolTipText=Port Number MultiUserSettingsPanel.tbMsgPort.text= MultiUserSettingsPanel.tbMsgUsername.toolTipText=User Name (optional) From 6a95fcca57d4a2f183252cb68aa4ff33036f2d4a Mon Sep 17 00:00:00 2001 From: Greg DiCristofaro Date: Mon, 30 Mar 2020 10:21:54 -0400 Subject: [PATCH 003/137] mostly done with removing items that change settings --- .../datamodel/CentralRepoDbManager.java | 53 +--------------- .../optionspanel/GlobalSettingsPanel.java | 60 ++++++++++--------- 2 files changed, 34 insertions(+), 79 deletions(-) diff --git a/Core/src/org/sleuthkit/autopsy/centralrepository/datamodel/CentralRepoDbManager.java b/Core/src/org/sleuthkit/autopsy/centralrepository/datamodel/CentralRepoDbManager.java index 3fab7af47f..cbbfdc0b9c 100755 --- a/Core/src/org/sleuthkit/autopsy/centralrepository/datamodel/CentralRepoDbManager.java +++ b/Core/src/org/sleuthkit/autopsy/centralrepository/datamodel/CentralRepoDbManager.java @@ -39,38 +39,23 @@ public class CentralRepoDbManager { private static final String CENTRAL_REPO_DB_NAME = "central_repository"; private static final String CENTRAL_REPOSITORY_SETTINGS_KEY = "CentralRepository"; private static final String DB_SELECTED_PLATFORM_KEY = "db.selectedPlatform"; - private static final String DISABLED_DUE_TO_FAILURE_KEY = "disabledDueToFailure"; private static volatile CentralRepoDbChoice savedChoice = null; private static final PropertyChangeSupport propertyChangeSupport = new PropertyChangeSupport(CentralRepoDbManager.class); private static final Object dbChoiceLock = new Object(); - private static final Object disabledDueToFailureLock = new Object(); - /** - * This saves the currently selected database choice and clears any disabledDueToFailure flag. - * @param choice The choice to save. - * @return The newly saved choice. - */ - public static CentralRepoDbChoice saveDbChoice(CentralRepoDbChoice choice) { - return saveDbChoice(choice, true); - } - /** * This saves the currently selected database choice. * @param choice The choice to save. * @param clearDisabledDueToError Whether or not to clear the 'disabledDueToFailure' settings key. * @return The newly saved choice. */ - public static CentralRepoDbChoice saveDbChoice(CentralRepoDbChoice choice, boolean clearDisabledDueToError) { + public static CentralRepoDbChoice saveDbChoice(CentralRepoDbChoice choice) { synchronized(dbChoiceLock) { - // clear disabling due to a failure - if (clearDisabledDueToError) - setDisabledDueToFailure(false); - // change the settings CentralRepoDbChoice newChoice = (choice == null) ? CentralRepoDbChoice.DISABLED : choice; CentralRepoDbChoice oldChoice = savedChoice; @@ -113,41 +98,7 @@ public class CentralRepoDbManager { } } - /** - * This method disables the central repository and indicates through a flag that this was due to a failure during database setup. - * This is used when re-enabling multi-user as a flag to determine whether or not CR should be re-enabled. - */ - public static void disableDueToFailure() { - CentralRepoDbUtil.setUseCentralRepo(false); - setDisabledDueToFailure(true); - } - /** - * This method sets whether or not the repository has been disabled due to a database setup issue; - * This is used when re-enabling multi-user as a flag to determine whether or not CR should be re-enabled. - * - * @param disabledDueToFailure Whether or not the repository has been disabled due to a database setup issue. - */ - private static void setDisabledDueToFailure(boolean disabledDueToFailure) { - synchronized(disabledDueToFailureLock) { - boolean oldValue = isDisabledDueToFailure(); - ModuleSettings.setConfigSetting(CENTRAL_REPOSITORY_SETTINGS_KEY, DISABLED_DUE_TO_FAILURE_KEY, Boolean.toString(disabledDueToFailure)); - propertyChangeSupport.firePropertyChange("disabledDueToFailure", oldValue, disabledDueToFailure); - } - } - - /** - * This method retrieves setting whether or not the repository has been disabled due to a database setup issue; - * this is used when re-enabling multi-user as a flag to determine whether or not CR should be re-enabled. - * - * @return Whether or not the repository has been disabled due to a database setup issue. - */ - public static boolean isDisabledDueToFailure() { - synchronized(disabledDueToFailureLock) { - return Boolean.toString(true).equals(ModuleSettings.getConfigSetting(CENTRAL_REPOSITORY_SETTINGS_KEY, DISABLED_DUE_TO_FAILURE_KEY)); - } - } - /** * This method adds a property change listener. * NOTE: currently only listening for changes in currently saved db choice and disabling due to failure. @@ -288,7 +239,7 @@ public class CentralRepoDbManager { } catch (CentralRepoException ex2) { logger.log(Level.SEVERE, "Error shutting down central repo connection pool", ex2); } - saveDbChoice(CentralRepoDbChoice.DISABLED, false); + saveDbChoice(CentralRepoDbChoice.DISABLED); if (innerException == null) { throw new CentralRepoException(message, desc); } else { diff --git a/Core/src/org/sleuthkit/autopsy/centralrepository/optionspanel/GlobalSettingsPanel.java b/Core/src/org/sleuthkit/autopsy/centralrepository/optionspanel/GlobalSettingsPanel.java index bdf1839526..23e25db520 100644 --- a/Core/src/org/sleuthkit/autopsy/centralrepository/optionspanel/GlobalSettingsPanel.java +++ b/Core/src/org/sleuthkit/autopsy/centralrepository/optionspanel/GlobalSettingsPanel.java @@ -18,7 +18,6 @@ */ package org.sleuthkit.autopsy.centralrepository.optionspanel; -import java.awt.Cursor; import java.awt.EventQueue; import org.sleuthkit.autopsy.coreutils.Logger; import java.beans.PropertyChangeEvent; @@ -44,6 +43,9 @@ import org.sleuthkit.autopsy.centralrepository.datamodel.PostgresCentralRepoSett import org.sleuthkit.autopsy.centralrepository.datamodel.SqliteCentralRepoSettings; import java.awt.Component; import java.util.logging.Level; +import org.sleuthkit.autopsy.centralrepository.optionspanel.Bundle; + + /** * Main settings panel for the Central Repository @@ -121,24 +123,23 @@ public final class GlobalSettingsPanel extends IngestModuleGlobalSettingsPanel i public static void onMultiUserChange(Component parent, boolean muPreviouslySelected, boolean muCurrentlySelected) { boolean crEnabled = CentralRepoDbUtil.allowUseOfCentralRepository(); boolean crMultiUser = CentralRepoDbManager.getSavedDbChoice() == CentralRepoDbChoice.POSTGRESQL_MULTIUSER; - boolean crDisabledDueToFailure = CentralRepoDbManager.isDisabledDueToFailure(); if (!muPreviouslySelected && muCurrentlySelected) { SwingUtilities.invokeLater(() -> { if (JOptionPane.YES_OPTION == JOptionPane.showConfirmDialog(parent, "" + "
" - + "

" + NbBundle.getMessage(GlobalSettingsPanel.class, "GlobalSettingsPanel.onMultiUserChange.enable.description") + "

" - + "

" + NbBundle.getMessage(GlobalSettingsPanel.class, "GlobalSettingsPanel.onMultiUserChange.enable.description2") + "

" + + "

" + Bundle.GlobalSettingsPanel_onMultiUserChange_enable_description() + "

" + + "

" + Bundle.GlobalSettingsPanel_onMultiUserChange_enable_description2() + "

" + "
" + "", - NbBundle.getMessage(GlobalSettingsPanel.class, "GlobalSettingsPanel.onMultiUserChange.enable.title"), + Bundle.GlobalSettingsPanel_onMultiUserChange_enable_title(), JOptionPane.YES_NO_OPTION)) { // setup database for CR CentralRepoDbUtil.setUseCentralRepo(true); CentralRepoDbManager.saveDbChoice(CentralRepoDbChoice.POSTGRESQL_MULTIUSER); - handleDbChange(parent); + checkStatusAndCreateDb(parent); } }); } // moving from selected to not selected && 'PostgreSQL using multi-user settings' is selected @@ -148,12 +149,22 @@ public final class GlobalSettingsPanel extends IngestModuleGlobalSettingsPanel i }); } // changing multi-user settings connection && 'PostgreSQL using multi-user settings' is selected && // central repo either enabled or was disabled due to error - else if (muPreviouslySelected && muCurrentlySelected && crMultiUser && (crEnabled || crDisabledDueToFailure)) { - // test databse for CR change - CentralRepoDbUtil.setUseCentralRepo(true); - handleDbChange(parent); + else if (muPreviouslySelected && muCurrentlySelected && crEnabled && crMultiUser) { + checkStatusAndCreateDb(parent); } } + + + /** + * Checks the status of current connectivity for CR and reports any issues. Will also prompt user to create + * database if cr database is absent. + * @param parent the parent component to which the dialogs will be associated. + */ + private static void checkStatusAndCreateDb(Component parent) { + SwingUtilities.invokeLater(() -> { + EamDbSettingsDialog.testStatusAndCreate(parent, new CentralRepoDbManager()); + }); + } /** * This method is called when a user must select a new database other than @@ -165,28 +176,27 @@ public final class GlobalSettingsPanel extends IngestModuleGlobalSettingsPanel i @NbBundle.Messages({ "GlobalSettingsPanel.onMultiUserChange.disabledMu.title=Central Repository Change Necessary", "GlobalSettingsPanel.onMultiUserChange.disabledMu.description=The Central Repository will be reconfigured to use a local SQLite database.", - "GlobalSettingsPanel.onMultiUserChange.disabledMu.description2=Press Configure PostgreSQL to change to a PostgreSQL database." + "GlobalSettingsPanel.onMultiUserChange.disabledMu.description2=Press Configure PostgreSQL to change to a PostgreSQL database.", + "GlobalSettingsPanel.askForCentralRepoDbChoice.sqliteChoice.text=Use SQLite", + "GlobalSettingsPanel.askForCentralRepoDbChoice.customPostgrestChoice.text=Configure PostgreSQL", + "GlobalSettingsPanel.askForCentralRepoDbChoice.disableChoice.text=Disable Central Repository" }) private static void askForCentralRepoDbChoice(Component parent) { - // disable central repository until user makes choice - CentralRepoDbUtil.setUseCentralRepo(false); - CentralRepoDbManager.saveDbChoice(CentralRepoDbChoice.DISABLED, false); - Object[] options = { - "Use SQLite", - "Configure PostgreSQL", - "Disable Central Repository" + Bundle.GlobalSettingsPanel_askForCentralRepoDbChoice_sqliteChoice_text(), + Bundle.GlobalSettingsPanel_askForCentralRepoDbChoice_customPostgrestChoice_text(), + Bundle.GlobalSettingsPanel_askForCentralRepoDbChoice_disableChoice_text() }; int result = JOptionPane.showOptionDialog( parent, "" + "
" - + "

" + NbBundle.getMessage(GlobalSettingsPanel.class, "GlobalSettingsPanel.onMultiUserChange.disabledMu.description") + "

" - + "

" + NbBundle.getMessage(GlobalSettingsPanel.class, "GlobalSettingsPanel.onMultiUserChange.disabledMu.description2") + "

" + + "

" + Bundle.GlobalSettingsPanel_onMultiUserChange_disabledMu_description() + "

" + + "

" + Bundle.GlobalSettingsPanel_onMultiUserChange_disabledMu_description2() + "

" + "
" + "", - NbBundle.getMessage(GlobalSettingsPanel.class, "GlobalSettingsPanel.onMultiUserChange.disabledMu.title"), + Bundle.GlobalSettingsPanel_onMultiUserChange_disabledMu_title(), JOptionPane.YES_NO_CANCEL_OPTION, JOptionPane.PLAIN_MESSAGE, null, @@ -201,13 +211,7 @@ public final class GlobalSettingsPanel extends IngestModuleGlobalSettingsPanel i } } - private static void handleDbChange(Component parent) { - SwingUtilities.invokeLater(() -> { - if (!EamDbSettingsDialog.testStatusAndCreate(parent, new CentralRepoDbManager())) { - CentralRepoDbManager.disableDueToFailure(); - } - }); - } + /** * This method is called from within the constructor to initialize the form. From 883c494e3d10bccc99ed5d3b4423916aaae1cf38 Mon Sep 17 00:00:00 2001 From: Greg DiCristofaro Date: Mon, 30 Mar 2020 13:20:10 -0400 Subject: [PATCH 004/137] working to create test button --- .../optionspanel/Bundle.properties | 3 ++ .../optionspanel/Bundle_ja.properties | 2 + .../optionspanel/GlobalSettingsPanel.form | 43 +++++++++++++++--- .../optionspanel/GlobalSettingsPanel.java | 44 ++++++++++++++++--- 4 files changed, 80 insertions(+), 12 deletions(-) diff --git a/Core/src/org/sleuthkit/autopsy/centralrepository/optionspanel/Bundle.properties b/Core/src/org/sleuthkit/autopsy/centralrepository/optionspanel/Bundle.properties index 0b30e2584f..a9f4326b26 100644 --- a/Core/src/org/sleuthkit/autopsy/centralrepository/optionspanel/Bundle.properties +++ b/Core/src/org/sleuthkit/autopsy/centralrepository/optionspanel/Bundle.properties @@ -84,3 +84,6 @@ ManageCasesDialog.closeButton.text=Close ManageCasesDialog.notesLabel.text=Notes: ManageCasesDialog.dataSourcesLabel.text=Data Sources: ManageCasesDialog.caseInfoLabel.text=Case Info: +GlobalSettingsPanel.bnTestConfigure.text=Test +GlobalSettingsPanel.testStatusLabel.toolTipText= +GlobalSettingsPanel.testStatusLabel.text= diff --git a/Core/src/org/sleuthkit/autopsy/centralrepository/optionspanel/Bundle_ja.properties b/Core/src/org/sleuthkit/autopsy/centralrepository/optionspanel/Bundle_ja.properties index 96e0634149..e1c3de35ad 100644 --- a/Core/src/org/sleuthkit/autopsy/centralrepository/optionspanel/Bundle_ja.properties +++ b/Core/src/org/sleuthkit/autopsy/centralrepository/optionspanel/Bundle_ja.properties @@ -143,3 +143,5 @@ ManageCasesDialog.closeButton.text=\u9589\u3058\u308b ManageCasesDialog.notesLabel.text=\u5099\u8003: ManageCasesDialog.dataSourcesLabel.text=\u30c7\u30fc\u30bf\u30bd\u30fc\u30b9: ManageCasesDialog.caseInfoLabel.text=\u30b1\u30fc\u30b9\u60c5\u5831: +GlobalSettingsPanel.bnTestConfigure.text=\u69cb\u6210 +GlobalSettingsPanel.testStatusLabel.text=\u30a4\u30f3\u30b8\u30a7\u30b9\u30c8\u5b9f\u884c\u4e2d\u306f\u30bb\u30f3\u30c8\u30e9\u30eb\u30fb\u30ec\u30dd\u30b8\u30c8\u30ea\u30fc\u8a2d\u5b9a\u3092\u5909\u66f4\u3067\u304d\u307e\u305b\u3093! diff --git a/Core/src/org/sleuthkit/autopsy/centralrepository/optionspanel/GlobalSettingsPanel.form b/Core/src/org/sleuthkit/autopsy/centralrepository/optionspanel/GlobalSettingsPanel.form index 99594871b0..99e350375f 100644 --- a/Core/src/org/sleuthkit/autopsy/centralrepository/optionspanel/GlobalSettingsPanel.form +++ b/Core/src/org/sleuthkit/autopsy/centralrepository/optionspanel/GlobalSettingsPanel.form @@ -138,10 +138,6 @@ - - - - @@ -155,6 +151,14 @@ + + + + + + + + @@ -178,7 +182,11 @@ - + + + + + @@ -222,6 +230,31 @@ + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Core/src/org/sleuthkit/autopsy/centralrepository/optionspanel/GlobalSettingsPanel.java b/Core/src/org/sleuthkit/autopsy/centralrepository/optionspanel/GlobalSettingsPanel.java index 23e25db520..46e279c17e 100644 --- a/Core/src/org/sleuthkit/autopsy/centralrepository/optionspanel/GlobalSettingsPanel.java +++ b/Core/src/org/sleuthkit/autopsy/centralrepository/optionspanel/GlobalSettingsPanel.java @@ -234,6 +234,8 @@ public final class GlobalSettingsPanel extends IngestModuleGlobalSettingsPanel i lbDbPlatformValue = new javax.swing.JLabel(); lbDbNameValue = new javax.swing.JLabel(); lbDbLocationValue = new javax.swing.JLabel(); + bnTestConfigure = new javax.swing.JButton(); + testStatusLabel = new javax.swing.JLabel(); pnCorrelationProperties = new javax.swing.JPanel(); bnManageTypes = new javax.swing.JButton(); correlationPropertiesScrollPane = new javax.swing.JScrollPane(); @@ -282,6 +284,17 @@ public final class GlobalSettingsPanel extends IngestModuleGlobalSettingsPanel i } }); + org.openide.awt.Mnemonics.setLocalizedText(bnTestConfigure, org.openide.util.NbBundle.getMessage(GlobalSettingsPanel.class, "GlobalSettingsPanel.bnTestConfigure.text")); // NOI18N + bnTestConfigure.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + bnTestConfigureActionPerformed(evt); + } + }); + + testStatusLabel.setFont(testStatusLabel.getFont().deriveFont(testStatusLabel.getFont().getStyle() & ~java.awt.Font.BOLD, 11)); + org.openide.awt.Mnemonics.setLocalizedText(testStatusLabel, org.openide.util.NbBundle.getMessage(GlobalSettingsPanel.class, "GlobalSettingsPanel.testStatusLabel.text")); // NOI18N + testStatusLabel.setToolTipText(org.openide.util.NbBundle.getMessage(GlobalSettingsPanel.class, "GlobalSettingsPanel.testStatusLabel.toolTipText")); // NOI18N + javax.swing.GroupLayout pnDatabaseConfigurationLayout = new javax.swing.GroupLayout(pnDatabaseConfiguration); pnDatabaseConfiguration.setLayout(pnDatabaseConfigurationLayout); pnDatabaseConfigurationLayout.setHorizontalGroup( @@ -289,9 +302,6 @@ public final class GlobalSettingsPanel extends IngestModuleGlobalSettingsPanel i .addGroup(pnDatabaseConfigurationLayout.createSequentialGroup() .addContainerGap() .addGroup(pnDatabaseConfigurationLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) - .addGroup(pnDatabaseConfigurationLayout.createSequentialGroup() - .addComponent(bnDbConfigure) - .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) .addGroup(pnDatabaseConfigurationLayout.createSequentialGroup() .addGroup(pnDatabaseConfigurationLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false) .addComponent(lbDbPlatformTypeLabel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) @@ -301,7 +311,14 @@ public final class GlobalSettingsPanel extends IngestModuleGlobalSettingsPanel i .addGroup(pnDatabaseConfigurationLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING) .addComponent(lbDbNameValue, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, 936, Short.MAX_VALUE) .addComponent(lbDbPlatformValue, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) - .addComponent(lbDbLocationValue, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))))) + .addComponent(lbDbLocationValue, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))) + .addGroup(pnDatabaseConfigurationLayout.createSequentialGroup() + .addComponent(bnDbConfigure) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) + .addComponent(bnTestConfigure) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) + .addComponent(testStatusLabel, javax.swing.GroupLayout.DEFAULT_SIZE, 836, Short.MAX_VALUE) + .addContainerGap()))) ); pnDatabaseConfigurationLayout.setVerticalGroup( pnDatabaseConfigurationLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) @@ -319,7 +336,10 @@ public final class GlobalSettingsPanel extends IngestModuleGlobalSettingsPanel i .addComponent(lbDbLocationLabel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent(lbDbLocationValue, javax.swing.GroupLayout.PREFERRED_SIZE, 14, javax.swing.GroupLayout.PREFERRED_SIZE)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) - .addComponent(bnDbConfigure) + .addGroup(pnDatabaseConfigurationLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) + .addComponent(bnDbConfigure) + .addComponent(bnTestConfigure) + .addComponent(testStatusLabel)) .addGap(8, 8, 8)) ); @@ -364,7 +384,7 @@ public final class GlobalSettingsPanel extends IngestModuleGlobalSettingsPanel i pnCorrelationPropertiesLayout.setVerticalGroup( pnCorrelationPropertiesLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, pnCorrelationPropertiesLayout.createSequentialGroup() - .addComponent(correlationPropertiesScrollPane, javax.swing.GroupLayout.DEFAULT_SIZE, 32, Short.MAX_VALUE) + .addComponent(correlationPropertiesScrollPane, javax.swing.GroupLayout.DEFAULT_SIZE, 25, Short.MAX_VALUE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(bnManageTypes) .addGap(8, 8, 8)) @@ -480,7 +500,7 @@ public final class GlobalSettingsPanel extends IngestModuleGlobalSettingsPanel i .addGroup(jPanel1Layout.createSequentialGroup() .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(pnDatabaseConfiguration, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) - .addComponent(pnCorrelationProperties, javax.swing.GroupLayout.DEFAULT_SIZE, 1012, Short.MAX_VALUE) + .addComponent(pnCorrelationProperties, javax.swing.GroupLayout.DEFAULT_SIZE, 1016, Short.MAX_VALUE) .addComponent(organizationPanel, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent(casesPanel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addGroup(jPanel1Layout.createSequentialGroup() @@ -571,6 +591,10 @@ public final class GlobalSettingsPanel extends IngestModuleGlobalSettingsPanel i firePropertyChange(OptionsPanelController.PROP_CHANGED, null, null); }//GEN-LAST:event_cbUseCentralRepoActionPerformed + private void bnTestConfigureActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_bnTestConfigureActionPerformed + testCurrentConfiguration(); + }//GEN-LAST:event_bnTestConfigureActionPerformed + @Override @Messages({"GlobalSettingsPanel.validationerrMsg.mustConfigure=Configure the database to enable this module."}) public void load() { @@ -699,6 +723,8 @@ public final class GlobalSettingsPanel extends IngestModuleGlobalSettingsPanel i enableDatabaseConfigureButton(cbUseCentralRepo.isSelected() && !caseIsOpen); } + + /** * Enable the Configure button @@ -710,8 +736,10 @@ public final class GlobalSettingsPanel extends IngestModuleGlobalSettingsPanel i private void enableDatabaseConfigureButton(Boolean enable) { boolean ingestRunning = IngestManager.getInstance().isIngestRunning(); ingestRunningWarningLabel.setVisible(ingestRunning); + pnDatabaseConfiguration.setEnabled(enable && !ingestRunning); bnDbConfigure.setEnabled(enable && !ingestRunning); + bnTestConfigure.setEnabled(enable && !ingestRunning); lbDbLocationLabel.setEnabled(enable && !ingestRunning); lbDbLocationValue.setEnabled(enable && !ingestRunning); lbDbNameLabel.setEnabled(enable && !ingestRunning); @@ -746,6 +774,7 @@ public final class GlobalSettingsPanel extends IngestModuleGlobalSettingsPanel i // Variables declaration - do not modify//GEN-BEGIN:variables private javax.swing.JButton bnDbConfigure; private javax.swing.JButton bnManageTypes; + private javax.swing.JButton bnTestConfigure; private javax.swing.JPanel casesPanel; private javax.swing.JScrollPane casesScrollPane; private javax.swing.JTextArea casesTextArea; @@ -770,5 +799,6 @@ public final class GlobalSettingsPanel extends IngestModuleGlobalSettingsPanel i private javax.swing.JPanel pnDatabaseConfiguration; private javax.swing.JButton showCasesButton; private javax.swing.JTextField tbOops; + private javax.swing.JLabel testStatusLabel; // End of variables declaration//GEN-END:variables } From 279a5a461356093284eef9730b2e6bbd3b347fe9 Mon Sep 17 00:00:00 2001 From: Greg DiCristofaro Date: Tue, 31 Mar 2020 08:17:44 -0400 Subject: [PATCH 005/137] update in global settings panel for updates --- .../datamodel/CentralRepoDbManager.java | 70 ++++++++++------- .../CentralRepoDbUpgrader13To14.java | 2 +- .../datamodel/CentralRepository.java | 4 +- .../datamodel/CentralRepositoryService.java | 2 +- .../PostgresCentralRepoSettings.java | 2 +- .../datamodel/RdbmsCentralRepo.java | 2 +- .../eventlisteners/Installer.java | 3 +- .../ingestmodule/CentralRepoIngestModule.java | 2 +- .../optionspanel/EamDbSettingsDialog.java | 55 +++++++------ .../optionspanel/GlobalSettingsPanel.java | 78 ++++++++++++++----- 10 files changed, 141 insertions(+), 79 deletions(-) diff --git a/Core/src/org/sleuthkit/autopsy/centralrepository/datamodel/CentralRepoDbManager.java b/Core/src/org/sleuthkit/autopsy/centralrepository/datamodel/CentralRepoDbManager.java index cbbfdc0b9c..374fd35048 100755 --- a/Core/src/org/sleuthkit/autopsy/centralrepository/datamodel/CentralRepoDbManager.java +++ b/Core/src/org/sleuthkit/autopsy/centralrepository/datamodel/CentralRepoDbManager.java @@ -39,12 +39,39 @@ public class CentralRepoDbManager { private static final String CENTRAL_REPO_DB_NAME = "central_repository"; private static final String CENTRAL_REPOSITORY_SETTINGS_KEY = "CentralRepository"; private static final String DB_SELECTED_PLATFORM_KEY = "db.selectedPlatform"; + + private static CentralRepoDbManager instance = null; + + public static CentralRepoDbManager getInstance() { + if (instance == null) + instance = new CentralRepoDbManager(); + + return instance; + } - private static volatile CentralRepoDbChoice savedChoice = null; - private static final PropertyChangeSupport propertyChangeSupport = new PropertyChangeSupport(CentralRepoDbManager.class); + // The currently saved db choice. + private volatile CentralRepoDbChoice savedChoice = null; + private final PropertyChangeSupport propertyChangeSupport = new PropertyChangeSupport(CentralRepoDbManager.class); + private final Object dbChoiceLock = new Object(); + + // The currently selected (but not necessarily saved) central repo db choice. + private CentralRepoDbChoice selectedDbChoice; + + private boolean configurationChanged = false; + private DatabaseTestResult testingStatus; + + private final PostgresCentralRepoSettings dbSettingsPostgres; + private final PostgresCentralRepoSettings dbSettingsMultiUser; + private final SqliteCentralRepoSettings dbSettingsSqlite; + + private CentralRepoDbManager() { + selectedDbChoice = getSavedDbChoice(); + dbSettingsPostgres = new PostgresCentralRepoSettings(PostgresSettingsLoader.CUSTOM_SETTINGS_LOADER); + dbSettingsMultiUser = new PostgresCentralRepoSettings(PostgresSettingsLoader.MULTIUSER_SETTINGS_LOADER); + dbSettingsSqlite = new SqliteCentralRepoSettings(); + } - private static final Object dbChoiceLock = new Object(); @@ -54,7 +81,7 @@ public class CentralRepoDbManager { * @param clearDisabledDueToError Whether or not to clear the 'disabledDueToFailure' settings key. * @return The newly saved choice. */ - public static CentralRepoDbChoice saveDbChoice(CentralRepoDbChoice choice) { + public CentralRepoDbChoice saveDbChoice(CentralRepoDbChoice choice) { synchronized(dbChoiceLock) { // change the settings CentralRepoDbChoice newChoice = (choice == null) ? CentralRepoDbChoice.DISABLED : choice; @@ -71,7 +98,7 @@ public class CentralRepoDbManager { * This method indicates whether or not 'PostgreSQL using multi-user settings' is a valid option. * @return True if 'PostgreSQL using multi-user settings' is valid. */ - public static boolean isPostgresMultiuserAllowed() { + public boolean isPostgresMultiuserAllowed() { // if multi user mode is not enabled, then this cannot be used if (!UserPreferences.getIsMultiUserModeEnabled()) return false; @@ -87,7 +114,7 @@ public class CentralRepoDbManager { /** * This method loads the selectedPlatform boolean from the config file if it is set. */ - public static CentralRepoDbChoice getSavedDbChoice() { + public CentralRepoDbChoice getSavedDbChoice() { synchronized(dbChoiceLock) { if (savedChoice == null) { String selectedPlatformString = ModuleSettings.getConfigSetting(CENTRAL_REPOSITORY_SETTINGS_KEY, DB_SELECTED_PLATFORM_KEY); // NON-NLS @@ -105,7 +132,7 @@ public class CentralRepoDbManager { * * @param listener The listener for the event. */ - public static void addPropertyChangeListener(PropertyChangeListener listener) { + public void addPropertyChangeListener(PropertyChangeListener listener) { propertyChangeSupport.addPropertyChangeListener(listener); } @@ -113,13 +140,13 @@ public class CentralRepoDbManager { * This method removes a propert change listener. * @param listener The listener to remove. */ - public static void removePropertyChangeListener(PropertyChangeListener listener) { + public void removePropertyChangeListener(PropertyChangeListener listener) { propertyChangeSupport.removePropertyChangeListener(listener); } - private static CentralRepoDbChoice fromKey(String keyName) { + private CentralRepoDbChoice fromKey(String keyName) { for (CentralRepoDbChoice dbChoice : CentralRepoDbChoice.values()) { if (dbChoice.getSettingKey().equalsIgnoreCase(keyName)) { return dbChoice; @@ -137,7 +164,7 @@ public class CentralRepoDbManager { * @return The CentralRepository object that will be used for connection. * @throws CentralRepoException */ - private static CentralRepository obtainCentralRepository() throws CentralRepoException { + private CentralRepository obtainCentralRepository() throws CentralRepoException { //get connection try { return CentralRepository.getInstance(); @@ -158,7 +185,7 @@ public class CentralRepoDbManager { * @return The lock if acquired. * @throws CentralRepoException */ - private static CoordinationService.Lock obtainCentralRepoLock(CentralRepository db) throws CentralRepoException { + private CoordinationService.Lock obtainCentralRepoLock(CentralRepository db) throws CentralRepoException { try { // This may return null if locking isn't supported, which is fine. It will // throw an exception if locking is supported but we can't get the lock @@ -182,7 +209,7 @@ public class CentralRepoDbManager { * @param lock The acquired lock. * @throws CentralRepoException */ - private static void updatedDbSchema(CentralRepository db, CoordinationService.Lock lock) throws CentralRepoException { + private void updatedDbSchema(CentralRepository db, CoordinationService.Lock lock) throws CentralRepoException { try { db.upgradeSchema(); } catch (CentralRepoException ex) { @@ -213,7 +240,7 @@ public class CentralRepoDbManager { * settings will be cleared. */ @NbBundle.Messages(value = {"EamDbUtil.centralRepoDisabled.message= The Central Repository has been disabled.", "EamDbUtil.centralRepoUpgradeFailed.message=Failed to upgrade Central Repository.", "EamDbUtil.centralRepoConnectionFailed.message=Unable to connect to Central Repository.", "EamDbUtil.exclusiveLockAquisitionFailure.message=Unable to acquire exclusive lock for Central Repository."}) - public static void upgradeDatabase() throws CentralRepoException { + public void upgradeDatabase() throws CentralRepoException { if (!CentralRepository.isEnabled()) { return; } @@ -230,7 +257,7 @@ public class CentralRepoDbManager { } } - private static void onUpgradeError(String message, String desc, Exception innerException) throws CentralRepoException { + private void onUpgradeError(String message, String desc, Exception innerException) throws CentralRepoException { // Disable the central repo and clear the current settings. try { if (null != CentralRepository.getInstance()) { @@ -249,21 +276,6 @@ public class CentralRepoDbManager { - private DatabaseTestResult testingStatus; - private CentralRepoDbChoice selectedDbChoice; - - private final PostgresCentralRepoSettings dbSettingsPostgres; - private final PostgresCentralRepoSettings dbSettingsMultiUser; - private final SqliteCentralRepoSettings dbSettingsSqlite; - - private boolean configurationChanged = false; - - public CentralRepoDbManager() { - selectedDbChoice = getSavedDbChoice(); - dbSettingsPostgres = new PostgresCentralRepoSettings(PostgresSettingsLoader.CUSTOM_SETTINGS_LOADER); - dbSettingsMultiUser = new PostgresCentralRepoSettings(PostgresSettingsLoader.MULTIUSER_SETTINGS_LOADER); - dbSettingsSqlite = new SqliteCentralRepoSettings(); - } /** diff --git a/Core/src/org/sleuthkit/autopsy/centralrepository/datamodel/CentralRepoDbUpgrader13To14.java b/Core/src/org/sleuthkit/autopsy/centralrepository/datamodel/CentralRepoDbUpgrader13To14.java index 0acfd34ea5..944703f532 100644 --- a/Core/src/org/sleuthkit/autopsy/centralrepository/datamodel/CentralRepoDbUpgrader13To14.java +++ b/Core/src/org/sleuthkit/autopsy/centralrepository/datamodel/CentralRepoDbUpgrader13To14.java @@ -39,7 +39,7 @@ public class CentralRepoDbUpgrader13To14 implements CentralRepoDbUpgrader { try (Statement statement = connection.createStatement();) { - CentralRepoPlatforms selectedPlatform = CentralRepoDbManager.getSavedDbChoice().getDbPlatform(); + CentralRepoPlatforms selectedPlatform = CentralRepoDbManager.getInstance().getSavedDbChoice().getDbPlatform(); // Create account_types and accounts tables which are referred by X_instances tables statement.execute(RdbmsCentralRepoFactory.getCreateAccountTypesTableStatement(selectedPlatform)); diff --git a/Core/src/org/sleuthkit/autopsy/centralrepository/datamodel/CentralRepository.java b/Core/src/org/sleuthkit/autopsy/centralrepository/datamodel/CentralRepository.java index 6a4a138cfb..5106f133b4 100755 --- a/Core/src/org/sleuthkit/autopsy/centralrepository/datamodel/CentralRepository.java +++ b/Core/src/org/sleuthkit/autopsy/centralrepository/datamodel/CentralRepository.java @@ -42,7 +42,7 @@ public interface CentralRepository { CentralRepoPlatforms selectedPlatform = CentralRepoPlatforms.DISABLED; if (CentralRepoDbUtil.allowUseOfCentralRepository()) { - selectedPlatform = CentralRepoDbManager.getSavedDbChoice().getDbPlatform(); + selectedPlatform = CentralRepoDbManager.getInstance().getSavedDbChoice().getDbPlatform(); } switch (selectedPlatform) { case POSTGRESQL: @@ -93,7 +93,7 @@ public interface CentralRepository { */ static boolean isEnabled() { return CentralRepoDbUtil.allowUseOfCentralRepository() - && CentralRepoDbManager.getSavedDbChoice() != CentralRepoDbChoice.DISABLED; + && CentralRepoDbManager.getInstance().getSavedDbChoice() != CentralRepoDbChoice.DISABLED; } /** diff --git a/Core/src/org/sleuthkit/autopsy/centralrepository/datamodel/CentralRepositoryService.java b/Core/src/org/sleuthkit/autopsy/centralrepository/datamodel/CentralRepositoryService.java index 8b442efc24..4a02c50569 100644 --- a/Core/src/org/sleuthkit/autopsy/centralrepository/datamodel/CentralRepositoryService.java +++ b/Core/src/org/sleuthkit/autopsy/centralrepository/datamodel/CentralRepositoryService.java @@ -69,7 +69,7 @@ public class CentralRepositoryService implements AutopsyService { */ private void updateSchema() throws AutopsyServiceException { try { - CentralRepoDbManager.upgradeDatabase(); + CentralRepoDbManager.getInstance().upgradeDatabase(); } catch (CentralRepoException ex) { throw new AutopsyServiceException("Failed to update the Central Repository schema", ex); } diff --git a/Core/src/org/sleuthkit/autopsy/centralrepository/datamodel/PostgresCentralRepoSettings.java b/Core/src/org/sleuthkit/autopsy/centralrepository/datamodel/PostgresCentralRepoSettings.java index 165d4ca6e0..68765cf259 100644 --- a/Core/src/org/sleuthkit/autopsy/centralrepository/datamodel/PostgresCentralRepoSettings.java +++ b/Core/src/org/sleuthkit/autopsy/centralrepository/datamodel/PostgresCentralRepoSettings.java @@ -46,7 +46,7 @@ public final class PostgresCentralRepoSettings implements CentralRepoDbConnectiv private PostgresConnectionSettings connSettings; private static PostgresSettingsLoader getLoaderFromSaved() throws CentralRepoException { - CentralRepoDbChoice choice = CentralRepoDbManager.getSavedDbChoice(); + CentralRepoDbChoice choice = CentralRepoDbManager.getInstance().getSavedDbChoice(); if (choice == CentralRepoDbChoice.POSTGRESQL_CUSTOM) return PostgresSettingsLoader.CUSTOM_SETTINGS_LOADER; else if (choice == CentralRepoDbChoice.POSTGRESQL_MULTIUSER) diff --git a/Core/src/org/sleuthkit/autopsy/centralrepository/datamodel/RdbmsCentralRepo.java b/Core/src/org/sleuthkit/autopsy/centralrepository/datamodel/RdbmsCentralRepo.java index 256e5407c9..c0642bc59f 100644 --- a/Core/src/org/sleuthkit/autopsy/centralrepository/datamodel/RdbmsCentralRepo.java +++ b/Core/src/org/sleuthkit/autopsy/centralrepository/datamodel/RdbmsCentralRepo.java @@ -3528,7 +3528,7 @@ abstract class RdbmsCentralRepo implements CentralRepository { conn = connect(false); conn.setAutoCommit(false); statement = conn.createStatement(); - selectedPlatform = CentralRepoDbManager.getSavedDbChoice().getDbPlatform(); + selectedPlatform = CentralRepoDbManager.getInstance().getSavedDbChoice().getDbPlatform(); int minorVersion = 0; String minorVersionStr = null; resultSet = statement.executeQuery("SELECT value FROM db_info WHERE name='" + RdbmsCentralRepo.SCHEMA_MINOR_VERSION_KEY + "'"); diff --git a/Core/src/org/sleuthkit/autopsy/centralrepository/eventlisteners/Installer.java b/Core/src/org/sleuthkit/autopsy/centralrepository/eventlisteners/Installer.java index da58e8936b..ff64ae56f7 100644 --- a/Core/src/org/sleuthkit/autopsy/centralrepository/eventlisteners/Installer.java +++ b/Core/src/org/sleuthkit/autopsy/centralrepository/eventlisteners/Installer.java @@ -181,8 +181,7 @@ public class Installer extends ModuleInstall { * repository. */ private void setupDefaultSqliteCentralRepo() throws CentralRepoException { - CentralRepoDbManager manager = new CentralRepoDbManager(); - manager.setupDefaultSqliteDb(); + CentralRepoDbManager.getInstance().setupDefaultSqliteDb(); } /** diff --git a/Core/src/org/sleuthkit/autopsy/centralrepository/ingestmodule/CentralRepoIngestModule.java b/Core/src/org/sleuthkit/autopsy/centralrepository/ingestmodule/CentralRepoIngestModule.java index 1f7472d330..db44477eb2 100644 --- a/Core/src/org/sleuthkit/autopsy/centralrepository/ingestmodule/CentralRepoIngestModule.java +++ b/Core/src/org/sleuthkit/autopsy/centralrepository/ingestmodule/CentralRepoIngestModule.java @@ -275,7 +275,7 @@ final class CentralRepoIngestModule implements FileIngestModule { // Don't allow sqlite central repo databases to be used for multi user cases if ((autopsyCase.getCaseType() == Case.CaseType.MULTI_USER_CASE) - && (CentralRepoDbManager.getSavedDbChoice().getDbPlatform() == CentralRepoPlatforms.SQLITE)) { + && (CentralRepoDbManager.getInstance().getSavedDbChoice().getDbPlatform() == CentralRepoPlatforms.SQLITE)) { logger.log(Level.SEVERE, "Cannot run correlation engine on a multi-user case with a SQLite central repository."); throw new IngestModuleException("Cannot run on a multi-user case with a SQLite central repository."); // NON-NLS } diff --git a/Core/src/org/sleuthkit/autopsy/centralrepository/optionspanel/EamDbSettingsDialog.java b/Core/src/org/sleuthkit/autopsy/centralrepository/optionspanel/EamDbSettingsDialog.java index 4c70d6aa5c..0cc58d94bd 100644 --- a/Core/src/org/sleuthkit/autopsy/centralrepository/optionspanel/EamDbSettingsDialog.java +++ b/Core/src/org/sleuthkit/autopsy/centralrepository/optionspanel/EamDbSettingsDialog.java @@ -86,8 +86,7 @@ public class EamDbSettingsDialog extends JDialog { private final Collection textBoxes; private final TextBoxChangedListener textBoxChangedListener; - private final CentralRepoDbManager manager = new CentralRepoDbManager(); - private final boolean isMultiUserSelectable = CentralRepoDbManager.isPostgresMultiuserAllowed(); + private final CentralRepoDbManager manager = CentralRepoDbManager.getInstance(); private final DbChoiceRenderer DB_CHOICE_RENDERER = new DbChoiceRenderer(); public EamDbSettingsDialog() { @@ -95,7 +94,7 @@ public class EamDbSettingsDialog extends JDialog { } private boolean isDbChoiceSelectable(CentralRepoDbChoice item) { - return (item != CentralRepoDbChoice.POSTGRESQL_MULTIUSER || isMultiUserSelectable); + return (item != CentralRepoDbChoice.POSTGRESQL_MULTIUSER || manager.isPostgresMultiuserAllowed()); } @@ -181,31 +180,43 @@ public class EamDbSettingsDialog extends JDialog { Bundle.EamDbSettingsDialog_okButton_corruptDatabaseExists_title(), JOptionPane.WARNING_MESSAGE); } else if (manager.getStatus() == DatabaseTestResult.DB_DOES_NOT_EXIST) { - //database doesn't exist. do you want to create? - if (JOptionPane.YES_OPTION == JOptionPane.showConfirmDialog(WindowManager.getDefault().getMainWindow(), - Bundle.EamDbSettingsDialog_okButton_createDbDialog_message(), - Bundle.EamDbSettingsDialog_okButton_createDbDialog_title(), - JOptionPane.YES_NO_OPTION)) { - onUserPromptCreateDb(manager, dialog); - } + promptCreateDatabase(manager, dialog); } return (manager.getStatus() == DatabaseTestResult.TESTED_OK); } - - /** - * When a new database needs to be created on user selecting cr, this code will be ran when user selects create cr. - * @param manager The manager handling the database creation. - * @param dialog The dialog that prompted database creation. + + + /** + * This method prompts the user whether or not they would like to create a database in the instance that + * it doesn't exist. + * @param manager The manager to use when setting up the database. + * @param dialog If non-null value, validates settings and updates 'okay' + * button enabled state. + * + * @return Whether or not the ultimate status after prompts is okay. */ - private static void onUserPromptCreateDb(CentralRepoDbManager manager, EamDbSettingsDialog dialog) { - try { - manager.createDb(); - } catch (CentralRepoException e) { - onPromptStatusError(manager); + public static boolean promptCreateDatabase(CentralRepoDbManager manager, EamDbSettingsDialog dialog) { + //database doesn't exist. do you want to create? + if (JOptionPane.YES_OPTION == JOptionPane.showConfirmDialog(WindowManager.getDefault().getMainWindow(), + Bundle.EamDbSettingsDialog_okButton_createDbDialog_message(), + Bundle.EamDbSettingsDialog_okButton_createDbDialog_title(), + JOptionPane.YES_NO_OPTION)) { + try { + manager.createDb(); + + } catch (CentralRepoException e) { + onPromptStatusError(manager); + return false; + } + + if (dialog != null) { + dialog.valid(); + } + return true; } - if (dialog != null) - dialog.valid(); + + return manager.testStatus() == DatabaseTestResult.TESTED_OK; } diff --git a/Core/src/org/sleuthkit/autopsy/centralrepository/optionspanel/GlobalSettingsPanel.java b/Core/src/org/sleuthkit/autopsy/centralrepository/optionspanel/GlobalSettingsPanel.java index 46e279c17e..6cca8f73b7 100644 --- a/Core/src/org/sleuthkit/autopsy/centralrepository/optionspanel/GlobalSettingsPanel.java +++ b/Core/src/org/sleuthkit/autopsy/centralrepository/optionspanel/GlobalSettingsPanel.java @@ -43,6 +43,9 @@ import org.sleuthkit.autopsy.centralrepository.datamodel.PostgresCentralRepoSett import org.sleuthkit.autopsy.centralrepository.datamodel.SqliteCentralRepoSettings; import java.awt.Component; import java.util.logging.Level; +import javax.swing.ImageIcon; +import org.openide.util.ImageUtilities; +import org.sleuthkit.autopsy.centralrepository.datamodel.DatabaseTestResult; import org.sleuthkit.autopsy.centralrepository.optionspanel.Bundle; @@ -56,16 +59,22 @@ public final class GlobalSettingsPanel extends IngestModuleGlobalSettingsPanel i private static final long serialVersionUID = 1L; private static final Logger logger = Logger.getLogger(GlobalSettingsPanel.class.getName()); private static final Set INGEST_JOB_EVENTS_OF_INTEREST = EnumSet.of(IngestManager.IngestJobEvent.STARTED, IngestManager.IngestJobEvent.CANCELLED, IngestManager.IngestJobEvent.COMPLETED); - private final IngestJobEventPropertyChangeListener ingestJobEventListener; + private final IngestJobEventPropertyChangeListener ingestJobEventListener; + private final CentralRepoDbManager manager; + + private final ImageIcon goodIcon = new ImageIcon(ImageUtilities.loadImage("org/sleuthkit/autopsy/images/good.png", false)); + private final ImageIcon badIcon = new ImageIcon(ImageUtilities.loadImage("org/sleuthkit/autopsy/images/bad.png", false)); + /** * Creates new form EamOptionsPanel */ public GlobalSettingsPanel() { ingestJobEventListener = new IngestJobEventPropertyChangeListener(); - + manager = CentralRepoDbManager.getInstance(); + // listen for change events in currently saved choice - CentralRepoDbManager.addPropertyChangeListener((PropertyChangeEvent evt) -> ingestStateUpdated(Case.isCaseOpen())); + manager.addPropertyChangeListener((PropertyChangeEvent evt) -> ingestStateUpdated(Case.isCaseOpen())); initComponents(); customizeComponents(); addIngestJobEventsListener(); @@ -121,8 +130,9 @@ public final class GlobalSettingsPanel extends IngestModuleGlobalSettingsPanel i "GlobalSettingsPanel.onMultiUserChange.enable.description2=The Central Repository stores hash values and accounts from past cases." }) public static void onMultiUserChange(Component parent, boolean muPreviouslySelected, boolean muCurrentlySelected) { + CentralRepoDbManager manager = CentralRepoDbManager.getInstance(); boolean crEnabled = CentralRepoDbUtil.allowUseOfCentralRepository(); - boolean crMultiUser = CentralRepoDbManager.getSavedDbChoice() == CentralRepoDbChoice.POSTGRESQL_MULTIUSER; + boolean crMultiUser = manager.getSavedDbChoice() == CentralRepoDbChoice.POSTGRESQL_MULTIUSER; if (!muPreviouslySelected && muCurrentlySelected) { SwingUtilities.invokeLater(() -> { @@ -138,8 +148,8 @@ public final class GlobalSettingsPanel extends IngestModuleGlobalSettingsPanel i // setup database for CR CentralRepoDbUtil.setUseCentralRepo(true); - CentralRepoDbManager.saveDbChoice(CentralRepoDbChoice.POSTGRESQL_MULTIUSER); - checkStatusAndCreateDb(parent); + manager.saveDbChoice(CentralRepoDbChoice.POSTGRESQL_MULTIUSER); + checkStatusAndCreateDb(manager, parent); } }); } // moving from selected to not selected && 'PostgreSQL using multi-user settings' is selected @@ -150,7 +160,7 @@ public final class GlobalSettingsPanel extends IngestModuleGlobalSettingsPanel i } // changing multi-user settings connection && 'PostgreSQL using multi-user settings' is selected && // central repo either enabled or was disabled due to error else if (muPreviouslySelected && muCurrentlySelected && crEnabled && crMultiUser) { - checkStatusAndCreateDb(parent); + checkStatusAndCreateDb(manager, parent); } } @@ -160,9 +170,9 @@ public final class GlobalSettingsPanel extends IngestModuleGlobalSettingsPanel i * database if cr database is absent. * @param parent the parent component to which the dialogs will be associated. */ - private static void checkStatusAndCreateDb(Component parent) { + private static void checkStatusAndCreateDb(CentralRepoDbManager manager, Component parent) { SwingUtilities.invokeLater(() -> { - EamDbSettingsDialog.testStatusAndCreate(parent, new CentralRepoDbManager()); + EamDbSettingsDialog.testStatusAndCreate(parent, manager); }); } @@ -210,8 +220,47 @@ public final class GlobalSettingsPanel extends IngestModuleGlobalSettingsPanel i invokeCrChoice(parent, CentralRepoDbChoice.POSTGRESQL_CUSTOM); } } + + @NbBundle.Messages({ + "GlobalSettingsPanel.testCurrentConfiguration.dbDoesNotExist.message=Database does not exist.", + }) + private boolean testCurrentConfiguration() { + DatabaseTestResult testResult = manager.testStatus(); + // if database doesn't exist, prompt user to create database + if (testResult == DatabaseTestResult.DB_DOES_NOT_EXIST) { + boolean success = EamDbSettingsDialog.promptCreateDatabase(manager, null); + if (success) + testResult = DatabaseTestResult.TESTED_OK; + } + + // display to the user the status + switch (testResult) { + case TESTED_OK: return showStatusOkay(); + case DB_DOES_NOT_EXIST: return showStatusFail(Bundle.GlobalSettingsPanel_testCurrentConfiguration_dbDoesNotExist_message()); + case SCHEMA_INVALID: return showStatusFail(Bundle.EamDbSettingsDialog_okButton_corruptDatabaseExists_message()); + case CONNECTION_FAILED: + default: + return showStatusFail(Bundle.EamDbSettingsDialog_okButton_databaseConnectionFailed_message()); + } + } + private boolean showStatusOkay() { + return setStatus(goodIcon, null); + } + + private boolean showStatusFail(String message) { + return setStatus(badIcon, message); + } + private void clearStatus() { + setStatus(null, null); + } + + private boolean setStatus(ImageIcon icon, String text) { + testStatusLabel.setIcon(icon); + testStatusLabel.setText(text); + return true; + } /** * This method is called from within the constructor to initialize the form. @@ -577,15 +626,6 @@ public final class GlobalSettingsPanel extends IngestModuleGlobalSettingsPanel i private void cbUseCentralRepoActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_cbUseCentralRepoActionPerformed //if saved setting is disabled checkbox should be disabled already store(); - - // if moving to using CR, multi-user mode is disabled and selection is multiuser settings, set to disabled - if (cbUseCentralRepo.isSelected() - && !CentralRepoDbManager.isPostgresMultiuserAllowed() - && CentralRepoDbManager.getSavedDbChoice() == CentralRepoDbChoice.POSTGRESQL_MULTIUSER) { - - CentralRepoDbManager.saveDbChoice(CentralRepoDbChoice.DISABLED); - } - load(); this.ingestStateUpdated(Case.isCaseOpen()); firePropertyChange(OptionsPanelController.PROP_CHANGED, null, null); @@ -600,7 +640,7 @@ public final class GlobalSettingsPanel extends IngestModuleGlobalSettingsPanel i public void load() { tbOops.setText(""); enableButtonSubComponents(false); - CentralRepoDbChoice selectedChoice = CentralRepoDbManager.getSavedDbChoice(); + CentralRepoDbChoice selectedChoice = manager.getSavedDbChoice(); cbUseCentralRepo.setSelected(CentralRepoDbUtil.allowUseOfCentralRepository()); // NON-NLS lbDbPlatformValue.setText(selectedChoice.getTitle()); From 4963daef83a990692582d623f2f91e0ced3b4eb0 Mon Sep 17 00:00:00 2001 From: Greg DiCristofaro Date: Tue, 31 Mar 2020 12:05:34 -0400 Subject: [PATCH 006/137] beginnings of horizontal resizing panel in indexed text viewer; needs spacing --- .../autopsy/keywordsearch/Bundle.properties | 18 +- .../keywordsearch/Bundle.properties-MERGED | 25 +- .../keywordsearch/Bundle_ja.properties | 16 +- .../keywordsearch/ExtractedContentPanel.form | 493 +++++++++--------- .../keywordsearch/ExtractedContentPanel.java | 370 ++++++------- .../autopsy/keywordsearch/TextZoomPanel.form | 54 +- .../autopsy/keywordsearch/TextZoomPanel.java | 40 +- 7 files changed, 467 insertions(+), 549 deletions(-) diff --git a/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/Bundle.properties b/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/Bundle.properties index 3dd312becc..19f5a71cb7 100644 --- a/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/Bundle.properties +++ b/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/Bundle.properties @@ -301,21 +301,21 @@ DropdownListSearchPanel.jSaveSearchResults.text=Save search results GlobalEditListPanel.ingestWarningLabel.text=Ingest is ongoing, some settings will be unavailable until it finishes. KeywordSearchGlobalLanguageSettingsPanel.ingestWarningLabel.text=Ingest is ongoing, some settings will be unavailable until it finishes. KeywordSearchGlobalSearchSettingsPanel.ingestWarningLabel.text=Ingest is ongoing, some settings will be unavailable until it finishes. -ExtractedContentPanel.hitCountLabel.text=- +ExtractedContentPanel.AccessibleContext.accessibleName= +ExtractedContentPanel.jLabel1.text=Text Source: +ExtractedContentPanel.hitNextButton.text= ExtractedContentPanel.hitPreviousButton.text= +ExtractedContentPanel.hitButtonsLabel.text=Match ExtractedContentPanel.hitTotalLabel.text=- ExtractedContentPanel.hitOfLabel.text=of -ExtractedContentPanel.hitNextButton.text= -ExtractedContentPanel.hitButtonsLabel.text=Match +ExtractedContentPanel.hitCountLabel.text=- ExtractedContentPanel.hitLabel.toolTipText= ExtractedContentPanel.hitLabel.text=Matches on page: -ExtractedContentPanel.pageCurLabel.text=- +ExtractedContentPanel.pageNextButton.text= ExtractedContentPanel.pagePreviousButton.actionCommand=pagePreviousButton ExtractedContentPanel.pagePreviousButton.text= -ExtractedContentPanel.pageNextButton.text= -ExtractedContentPanel.pagesLabel.text=Page: -ExtractedContentPanel.pageTotalLabel.text=- ExtractedContentPanel.pageButtonsLabel.text=Page +ExtractedContentPanel.pageTotalLabel.text=- ExtractedContentPanel.pageOfLabel.text=of -ExtractedContentPanel.jLabel1.text=Text Source: -ExtractedContentPanel.AccessibleContext.accessibleName= +ExtractedContentPanel.pageCurLabel.text=- +ExtractedContentPanel.pagesLabel.text=Page: diff --git a/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/Bundle.properties-MERGED b/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/Bundle.properties-MERGED index 9aeeabc046..49e29cc69d 100755 --- a/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/Bundle.properties-MERGED +++ b/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/Bundle.properties-MERGED @@ -20,16 +20,12 @@ IndexedText.warningMessage.knownFile=This file i IndexedText.warningMessage.noTextAvailable=No indexed text for this file. KeywordSearchGlobalSettingsPanel.Title=Global Keyword Search Settings KeywordSearchIngestModule.init.badInitMsg=Keyword search server was not properly initialized, cannot run keyword search ingest. -# {0} - Reason for not connecting to Solr KeywordSearchIngestModule.init.exception.errConnToSolr.msg=Error connecting to SOLR server: {0}. -# {0} - Reason for not starting Solr KeywordSearchIngestModule.init.tryStopSolrMsg={0}
Please try stopping Java Solr processes if any exist and restart the application. KeywordSearchIngestModule.metadataTitle=METADATA KeywordSearchIngestModule.noOpenCase.errMsg=No open case available. KeywordSearchIngestModule.startUp.noOpenCore.msg=The index could not be opened or does not exist. -# {0} - schema version number KeywordSearchIngestModule.startupException.indexSchemaNotSupported=Adding text no longer supported for schema version {0} of the text index. -# {0} - Solr version number KeywordSearchIngestModule.startupException.indexSolrVersionNotSupported=Adding text no longer supported for Solr version {0} of the text index. KeywordSearchIngestModule.startupMessage.failedToGetIndexSchema=Failed to get schema version for text index. KeywordSearchResultFactory.createNodeForKey.noResultsFound.text=No results found. @@ -212,7 +208,6 @@ KeywordSearchSettings.propertiesNSRL.text={0}_NSRL KeywordSearchSettings.propertiesScripts.text={0}_Scripts NoOpenCoreException.err.noOpenSorlCore.msg=No currently open Solr core. SearchRunner.query.exception.msg=Error performing query: -# {0} - core name Server.deleteCore.exception.msg=Failed to delete Solr core {0} Server.start.exception.cantStartSolr.msg=Could not start Solr server process Server.start.exception.cantStartSolr.msg2=Could not start Solr server process @@ -340,10 +335,8 @@ SolrSearch.openCore.msg=Opening text index SolrSearch.openGiantCore.msg=Opening text index. Text index for this case is very large and may take long time to load. SolrSearch.openLargeCore.msg=Opening text index. This may take several minutes. SolrSearch.readingIndexes.msg=Reading text index metadata file -# {0} - index folder path SolrSearchService.exceptionMessage.failedToDeleteIndexFiles=Failed to delete text index files at {0} SolrSearchService.exceptionMessage.noCurrentSolrCore=IndexMetadata did not contain a current Solr core so could not delete the case -# {0} - case directory SolrSearchService.exceptionMessage.noIndexMetadata=Unable to create IndexMetaData from case directory: {0} SolrSearchService.indexingError=Unable to index blackboard artifact. SolrSearchService.ServiceName=Solr Keyword Search Service @@ -360,24 +353,24 @@ DropdownListSearchPanel.jSaveSearchResults.text=Save search results GlobalEditListPanel.ingestWarningLabel.text=Ingest is ongoing, some settings will be unavailable until it finishes. KeywordSearchGlobalLanguageSettingsPanel.ingestWarningLabel.text=Ingest is ongoing, some settings will be unavailable until it finishes. KeywordSearchGlobalSearchSettingsPanel.ingestWarningLabel.text=Ingest is ongoing, some settings will be unavailable until it finishes. -ExtractedContentPanel.hitCountLabel.text=- +ExtractedContentPanel.AccessibleContext.accessibleName= +ExtractedContentPanel.jLabel1.text=Text Source: +ExtractedContentPanel.hitNextButton.text= ExtractedContentPanel.hitPreviousButton.text= +ExtractedContentPanel.hitButtonsLabel.text=Match ExtractedContentPanel.hitTotalLabel.text=- ExtractedContentPanel.hitOfLabel.text=of -ExtractedContentPanel.hitNextButton.text= -ExtractedContentPanel.hitButtonsLabel.text=Match +ExtractedContentPanel.hitCountLabel.text=- ExtractedContentPanel.hitLabel.toolTipText= ExtractedContentPanel.hitLabel.text=Matches on page: -ExtractedContentPanel.pageCurLabel.text=- +ExtractedContentPanel.pageNextButton.text= ExtractedContentPanel.pagePreviousButton.actionCommand=pagePreviousButton ExtractedContentPanel.pagePreviousButton.text= -ExtractedContentPanel.pageNextButton.text= -ExtractedContentPanel.pagesLabel.text=Page: -ExtractedContentPanel.pageTotalLabel.text=- ExtractedContentPanel.pageButtonsLabel.text=Page +ExtractedContentPanel.pageTotalLabel.text=- ExtractedContentPanel.pageOfLabel.text=of -ExtractedContentPanel.jLabel1.text=Text Source: -ExtractedContentPanel.AccessibleContext.accessibleName= +ExtractedContentPanel.pageCurLabel.text=- +ExtractedContentPanel.pagesLabel.text=Page: TextZoomPanel.zoomInButton.text= TextZoomPanel.zoomOutButton.text= TextZoomPanel.zoomResetButton.text=Reset diff --git a/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/Bundle_ja.properties b/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/Bundle_ja.properties index c131f5c8cf..b1d833f795 100644 --- a/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/Bundle_ja.properties +++ b/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/Bundle_ja.properties @@ -357,20 +357,20 @@ DropdownListSearchPanel.jSaveSearchResults.text=\u691c\u7d22\u7d50\u679c\u3092\u GlobalEditListPanel.ingestWarningLabel.text=\u30a4\u30f3\u30b8\u30a7\u30b9\u30c8\u304c\u9032\u884c\u4e2d\u3067\u3059\u3002\u30a4\u30f3\u30b8\u30a7\u30b9\u30c8\u304c\u5b8c\u4e86\u3059\u308b\u307e\u3067\u4e00\u90e8\u306e\u8a2d\u5b9a\u3092\u5229\u7528\u3067\u304d\u307e\u305b\u3093\u3002 KeywordSearchGlobalLanguageSettingsPanel.ingestWarningLabel.text=\u30a4\u30f3\u30b8\u30a7\u30b9\u30c8\u304c\u9032\u884c\u4e2d\u3067\u3059\u3002\u30a4\u30f3\u30b8\u30a7\u30b9\u30c8\u304c\u5b8c\u4e86\u3059\u308b\u307e\u3067\u4e00\u90e8\u306e\u8a2d\u5b9a\u3092\u5229\u7528\u3067\u304d\u307e\u305b\u3093\u3002 KeywordSearchGlobalSearchSettingsPanel.ingestWarningLabel.text=\u30a4\u30f3\u30b8\u30a7\u30b9\u30c8\u304c\u9032\u884c\u4e2d\u3067\u3059\u3002\u30a4\u30f3\u30b8\u30a7\u30b9\u30c8\u304c\u5b8c\u4e86\u3059\u308b\u307e\u3067\u4e00\u90e8\u306e\u8a2d\u5b9a\u3092\u5229\u7528\u3067\u304d\u307e\u305b\u3093\u3002 -ExtractedContentPanel.hitCountLabel.text=- +ExtractedContentPanel.jLabel1.text=\u30c6\u30ad\u30b9\u30c8\u30bd\u30fc\u30b9: +ExtractedContentPanel.hitNextButton.text= ExtractedContentPanel.hitPreviousButton.text= +ExtractedContentPanel.hitButtonsLabel.text=\u4e00\u81f4\u3059\u308b\u7d50\u679c ExtractedContentPanel.hitTotalLabel.text=- ExtractedContentPanel.hitOfLabel.text=/ -ExtractedContentPanel.hitNextButton.text= -ExtractedContentPanel.hitButtonsLabel.text=\u4e00\u81f4\u3059\u308b\u7d50\u679c +ExtractedContentPanel.hitCountLabel.text=- ExtractedContentPanel.hitLabel.toolTipText= ExtractedContentPanel.hitLabel.text=\u30da\u30fc\u30b8\u4e0a\u306e\u4e00\u81f4\u3059\u308b\u7d50\u679c: -ExtractedContentPanel.pageCurLabel.text=- +ExtractedContentPanel.pageNextButton.text= ExtractedContentPanel.pagePreviousButton.actionCommand=pagePreviousButton ExtractedContentPanel.pagePreviousButton.text= -ExtractedContentPanel.pageNextButton.text= -ExtractedContentPanel.pagesLabel.text=\u30da\u30fc\u30b8: -ExtractedContentPanel.pageTotalLabel.text=- ExtractedContentPanel.pageButtonsLabel.text=\u30da\u30fc\u30b8 +ExtractedContentPanel.pageTotalLabel.text=- ExtractedContentPanel.pageOfLabel.text=/ -ExtractedContentPanel.jLabel1.text=\u30c6\u30ad\u30b9\u30c8\u30bd\u30fc\u30b9: +ExtractedContentPanel.pageCurLabel.text=- +ExtractedContentPanel.pagesLabel.text=\u30da\u30fc\u30b8: diff --git a/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/ExtractedContentPanel.form b/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/ExtractedContentPanel.form index 2ed8bb9073..f503e37fc5 100644 --- a/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/ExtractedContentPanel.form +++ b/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/ExtractedContentPanel.form @@ -43,177 +43,48 @@ + - - - - - - - - - - - - - - - - - + - - - - - - - - - - - - + + + + + + - + + + + + - - - - - - - - - - - - - - - - - - - - - - - + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + - - - - - - - - - - - - - - - - - - - - - + - + + + + + + + + + @@ -224,13 +95,6 @@ - - - - - - - @@ -239,36 +103,10 @@ - + - - - - - - - - - - - - - - - - - - - - - - - - - - - + @@ -298,38 +136,13 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - + - + @@ -347,8 +160,60 @@ - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -376,6 +241,13 @@
+ + + + + + + @@ -405,43 +277,65 @@ - + - + + + - + - - + + + + - - + + + + + + + - + + + + - - - - - - - - - + + + - + - + + + + + + + + + + + + + + + + + @@ -451,11 +345,120 @@ - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/ExtractedContentPanel.java b/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/ExtractedContentPanel.java index 6cc5e01d42..3e1281720c 100644 --- a/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/ExtractedContentPanel.java +++ b/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/ExtractedContentPanel.java @@ -69,6 +69,7 @@ class ExtractedContentPanel extends javax.swing.JPanel implements ResizableTextP ExtractedContentPanel() { initComponents(); + additionalInit(); setSources("", new ArrayList<>()); hitPreviousButton.setEnabled(false); hitNextButton.setEnabled(false); @@ -183,7 +184,11 @@ class ExtractedContentPanel extends javax.swing.JPanel implements ResizableTextP } - + private void additionalInit() { + // use wrap layout for better component wrapping + WrapLayout layout = new WrapLayout(java.awt.FlowLayout.LEFT); + controlPanel.setLayout(layout); + } /** @@ -198,29 +203,34 @@ class ExtractedContentPanel extends javax.swing.JPanel implements ResizableTextP rightClickMenu = new javax.swing.JPopupMenu(); copyMenuItem = new javax.swing.JMenuItem(); selectAllMenuItem = new javax.swing.JMenuItem(); - extractedScrollPane = new javax.swing.JScrollPane(); - extractedTextPane = new javax.swing.JTextPane(); - controlScrollPane = new javax.swing.JScrollPane(); controlPanel = new javax.swing.JPanel(); - sourceComboBox = new javax.swing.JComboBox<>(); - jLabel1 = new javax.swing.JLabel(); - pageOfLabel = new javax.swing.JLabel(); - pageButtonsLabel = new javax.swing.JLabel(); - pageTotalLabel = new javax.swing.JLabel(); + javax.swing.JPanel pagePanel = new javax.swing.JPanel(); pagesLabel = new javax.swing.JLabel(); - pageNextButton = new javax.swing.JButton(); - pagePreviousButton = new javax.swing.JButton(); pageCurLabel = new javax.swing.JLabel(); + pageOfLabel = new javax.swing.JLabel(); + pageTotalLabel = new javax.swing.JLabel(); + pageButtonsLabel = new javax.swing.JLabel(); + pagePreviousButton = new javax.swing.JButton(); + pageNextButton = new javax.swing.JButton(); + jSeparator2 = new javax.swing.JSeparator(); + javax.swing.JPanel matchesPanel = new javax.swing.JPanel(); hitLabel = new javax.swing.JLabel(); - hitButtonsLabel = new javax.swing.JLabel(); - hitNextButton = new javax.swing.JButton(); + hitCountLabel = new javax.swing.JLabel(); hitOfLabel = new javax.swing.JLabel(); hitTotalLabel = new javax.swing.JLabel(); + hitButtonsLabel = new javax.swing.JLabel(); hitPreviousButton = new javax.swing.JButton(); - hitCountLabel = new javax.swing.JLabel(); - jSeparator2 = new javax.swing.JSeparator(); + hitNextButton = new javax.swing.JButton(); jSeparator3 = new javax.swing.JSeparator(); + javax.swing.JPanel zoomPanelWrapper = new javax.swing.JPanel(); zoomPanel = new TextZoomPanel(this); + jSeparator4 = new javax.swing.JSeparator(); + javax.swing.JPanel textSourcePanel = new javax.swing.JPanel(); + jLabel1 = new javax.swing.JLabel(); + sourceComboBox = new javax.swing.JComboBox<>(); + jSeparator5 = new javax.swing.JSeparator(); + extractedScrollPane = new javax.swing.JScrollPane(); + extractedTextPane = new javax.swing.JTextPane(); copyMenuItem.setText(org.openide.util.NbBundle.getMessage(ExtractedContentPanel.class, "ExtractedContentPanel.copyMenuItem.text")); // NOI18N rightClickMenu.add(copyMenuItem); @@ -230,6 +240,150 @@ class ExtractedContentPanel extends javax.swing.JPanel implements ResizableTextP setMinimumSize(new java.awt.Dimension(100, 0)); setPreferredSize(new java.awt.Dimension(100, 58)); + setLayout(new java.awt.BorderLayout()); + + controlPanel.setLayout(new java.awt.FlowLayout(java.awt.FlowLayout.LEFT, 0, 0)); + + pagePanel.setLayout(new java.awt.FlowLayout(java.awt.FlowLayout.LEFT, 0, 0)); + + pagesLabel.setText(org.openide.util.NbBundle.getMessage(ExtractedContentPanel.class, "ExtractedContentPanel.pagesLabel.text")); // NOI18N + pagePanel.add(pagesLabel); + + pageCurLabel.setHorizontalAlignment(javax.swing.SwingConstants.CENTER); + pageCurLabel.setText(org.openide.util.NbBundle.getMessage(ExtractedContentPanel.class, "ExtractedContentPanel.pageCurLabel.text")); // NOI18N + pagePanel.add(pageCurLabel); + + pageOfLabel.setText(org.openide.util.NbBundle.getMessage(ExtractedContentPanel.class, "ExtractedContentPanel.pageOfLabel.text")); // NOI18N + pagePanel.add(pageOfLabel); + + pageTotalLabel.setHorizontalAlignment(javax.swing.SwingConstants.CENTER); + pageTotalLabel.setText(org.openide.util.NbBundle.getMessage(ExtractedContentPanel.class, "ExtractedContentPanel.pageTotalLabel.text")); // NOI18N + pagePanel.add(pageTotalLabel); + + pageButtonsLabel.setText(org.openide.util.NbBundle.getMessage(ExtractedContentPanel.class, "ExtractedContentPanel.pageButtonsLabel.text")); // NOI18N + pagePanel.add(pageButtonsLabel); + + pagePreviousButton.setIcon(new javax.swing.ImageIcon(getClass().getResource("/org/sleuthkit/autopsy/keywordsearch/btn_step_back.png"))); // NOI18N + pagePreviousButton.setText(org.openide.util.NbBundle.getMessage(ExtractedContentPanel.class, "ExtractedContentPanel.pagePreviousButton.text")); // NOI18N + pagePreviousButton.setActionCommand(org.openide.util.NbBundle.getMessage(ExtractedContentPanel.class, "ExtractedContentPanel.pagePreviousButton.actionCommand")); // NOI18N + pagePreviousButton.setBorder(javax.swing.BorderFactory.createEmptyBorder(1, 1, 1, 1)); + pagePreviousButton.setBorderPainted(false); + pagePreviousButton.setContentAreaFilled(false); + pagePreviousButton.setDisabledIcon(new javax.swing.ImageIcon(getClass().getResource("/org/sleuthkit/autopsy/keywordsearch/btn_step_back_disabled.png"))); // NOI18N + pagePreviousButton.setMargin(new java.awt.Insets(2, 0, 2, 0)); + pagePanel.add(pagePreviousButton); + + pageNextButton.setIcon(new javax.swing.ImageIcon(getClass().getResource("/org/sleuthkit/autopsy/keywordsearch/btn_step_forward.png"))); // NOI18N + pageNextButton.setText(org.openide.util.NbBundle.getMessage(ExtractedContentPanel.class, "ExtractedContentPanel.pageNextButton.text")); // NOI18N + pageNextButton.setBorder(javax.swing.BorderFactory.createEmptyBorder(1, 1, 1, 1)); + pageNextButton.setBorderPainted(false); + pageNextButton.setContentAreaFilled(false); + pageNextButton.setDisabledIcon(new javax.swing.ImageIcon(getClass().getResource("/org/sleuthkit/autopsy/keywordsearch/btn_step_forward_disabled.png"))); // NOI18N + pageNextButton.setMargin(new java.awt.Insets(2, 0, 2, 0)); + pageNextButton.setPreferredSize(new java.awt.Dimension(23, 23)); + pagePanel.add(pageNextButton); + + jSeparator2.setOrientation(javax.swing.SwingConstants.VERTICAL); + jSeparator2.setMaximumSize(new java.awt.Dimension(2, 25)); + jSeparator2.setMinimumSize(new java.awt.Dimension(2, 25)); + jSeparator2.setPreferredSize(new java.awt.Dimension(2, 25)); + pagePanel.add(jSeparator2); + + controlPanel.add(pagePanel); + + matchesPanel.setLayout(new java.awt.FlowLayout(java.awt.FlowLayout.LEFT, 0, 0)); + + hitLabel.setText(org.openide.util.NbBundle.getMessage(ExtractedContentPanel.class, "ExtractedContentPanel.hitLabel.text")); // NOI18N + hitLabel.setToolTipText(org.openide.util.NbBundle.getMessage(ExtractedContentPanel.class, "ExtractedContentPanel.hitLabel.toolTipText")); // NOI18N + matchesPanel.add(hitLabel); + + hitCountLabel.setHorizontalAlignment(javax.swing.SwingConstants.CENTER); + hitCountLabel.setText(org.openide.util.NbBundle.getMessage(ExtractedContentPanel.class, "ExtractedContentPanel.hitCountLabel.text")); // NOI18N + hitCountLabel.setMaximumSize(new java.awt.Dimension(18, 14)); + hitCountLabel.setMinimumSize(new java.awt.Dimension(18, 14)); + hitCountLabel.setPreferredSize(new java.awt.Dimension(18, 14)); + matchesPanel.add(hitCountLabel); + + hitOfLabel.setText(org.openide.util.NbBundle.getMessage(ExtractedContentPanel.class, "ExtractedContentPanel.hitOfLabel.text")); // NOI18N + matchesPanel.add(hitOfLabel); + + hitTotalLabel.setHorizontalAlignment(javax.swing.SwingConstants.CENTER); + hitTotalLabel.setText(org.openide.util.NbBundle.getMessage(ExtractedContentPanel.class, "ExtractedContentPanel.hitTotalLabel.text")); // NOI18N + hitTotalLabel.setMaximumSize(new java.awt.Dimension(18, 14)); + hitTotalLabel.setMinimumSize(new java.awt.Dimension(18, 14)); + hitTotalLabel.setPreferredSize(new java.awt.Dimension(18, 14)); + matchesPanel.add(hitTotalLabel); + + hitButtonsLabel.setText(org.openide.util.NbBundle.getMessage(ExtractedContentPanel.class, "ExtractedContentPanel.hitButtonsLabel.text")); // NOI18N + matchesPanel.add(hitButtonsLabel); + + hitPreviousButton.setIcon(new javax.swing.ImageIcon(getClass().getResource("/org/sleuthkit/autopsy/keywordsearch/btn_step_back.png"))); // NOI18N + hitPreviousButton.setText(org.openide.util.NbBundle.getMessage(ExtractedContentPanel.class, "ExtractedContentPanel.hitPreviousButton.text")); // NOI18N + hitPreviousButton.setBorder(javax.swing.BorderFactory.createEmptyBorder(1, 1, 1, 1)); + hitPreviousButton.setBorderPainted(false); + hitPreviousButton.setContentAreaFilled(false); + hitPreviousButton.setDisabledIcon(new javax.swing.ImageIcon(getClass().getResource("/org/sleuthkit/autopsy/keywordsearch/btn_step_back_disabled.png"))); // NOI18N + hitPreviousButton.setMargin(new java.awt.Insets(2, 0, 2, 0)); + hitPreviousButton.setPreferredSize(new java.awt.Dimension(23, 23)); + hitPreviousButton.setRolloverIcon(new javax.swing.ImageIcon(getClass().getResource("/org/sleuthkit/autopsy/keywordsearch/btn_step_back_hover.png"))); // NOI18N + matchesPanel.add(hitPreviousButton); + + hitNextButton.setIcon(new javax.swing.ImageIcon(getClass().getResource("/org/sleuthkit/autopsy/keywordsearch/btn_step_forward.png"))); // NOI18N + hitNextButton.setText(org.openide.util.NbBundle.getMessage(ExtractedContentPanel.class, "ExtractedContentPanel.hitNextButton.text")); // NOI18N + hitNextButton.setBorder(javax.swing.BorderFactory.createEmptyBorder(1, 1, 1, 1)); + hitNextButton.setBorderPainted(false); + hitNextButton.setContentAreaFilled(false); + hitNextButton.setDisabledIcon(new javax.swing.ImageIcon(getClass().getResource("/org/sleuthkit/autopsy/keywordsearch/btn_step_forward_disabled.png"))); // NOI18N + hitNextButton.setMargin(new java.awt.Insets(2, 0, 2, 0)); + hitNextButton.setPreferredSize(new java.awt.Dimension(23, 23)); + hitNextButton.setRolloverIcon(new javax.swing.ImageIcon(getClass().getResource("/org/sleuthkit/autopsy/keywordsearch/btn_step_forward_hover.png"))); // NOI18N + matchesPanel.add(hitNextButton); + + jSeparator3.setOrientation(javax.swing.SwingConstants.VERTICAL); + jSeparator3.setMaximumSize(new java.awt.Dimension(2, 25)); + jSeparator3.setMinimumSize(new java.awt.Dimension(2, 25)); + jSeparator3.setName(""); // NOI18N + jSeparator3.setPreferredSize(new java.awt.Dimension(2, 25)); + matchesPanel.add(jSeparator3); + + controlPanel.add(matchesPanel); + + zoomPanelWrapper.setLayout(new java.awt.FlowLayout(java.awt.FlowLayout.LEFT, 0, 0)); + + zoomPanel.setLayout(new java.awt.FlowLayout(java.awt.FlowLayout.LEFT, 0, 0)); + zoomPanelWrapper.add(zoomPanel); + zoomPanel.getAccessibleContext().setAccessibleName(org.openide.util.NbBundle.getMessage(ExtractedContentPanel.class, "ExtractedContentPanel.AccessibleContext.accessibleName")); // NOI18N + + jSeparator4.setOrientation(javax.swing.SwingConstants.VERTICAL); + jSeparator4.setMaximumSize(new java.awt.Dimension(2, 25)); + jSeparator4.setMinimumSize(new java.awt.Dimension(2, 25)); + jSeparator4.setName(""); // NOI18N + jSeparator4.setPreferredSize(new java.awt.Dimension(2, 25)); + zoomPanelWrapper.add(jSeparator4); + + controlPanel.add(zoomPanelWrapper); + + textSourcePanel.setLayout(new java.awt.FlowLayout(java.awt.FlowLayout.CENTER, 0, 0)); + + jLabel1.setText(org.openide.util.NbBundle.getMessage(ExtractedContentPanel.class, "ExtractedContentPanel.jLabel1.text")); // NOI18N + textSourcePanel.add(jLabel1); + + sourceComboBox.setModel(new javax.swing.DefaultComboBoxModel()); + sourceComboBox.setMaximumSize(new java.awt.Dimension(150, 32767)); + sourceComboBox.setMinimumSize(new java.awt.Dimension(150, 20)); + sourceComboBox.setPreferredSize(new java.awt.Dimension(150, 20)); + textSourcePanel.add(sourceComboBox); + + jSeparator5.setOrientation(javax.swing.SwingConstants.VERTICAL); + jSeparator5.setMaximumSize(new java.awt.Dimension(2, 25)); + jSeparator5.setMinimumSize(new java.awt.Dimension(2, 25)); + jSeparator5.setName(""); // NOI18N + jSeparator5.setPreferredSize(new java.awt.Dimension(2, 25)); + textSourcePanel.add(jSeparator5); + + controlPanel.add(textSourcePanel); + + add(controlPanel, java.awt.BorderLayout.NORTH); extractedScrollPane.setBackground(new java.awt.Color(255, 255, 255)); extractedScrollPane.setPreferredSize(new java.awt.Dimension(640, 29)); @@ -241,192 +395,10 @@ class ExtractedContentPanel extends javax.swing.JPanel implements ResizableTextP extractedTextPane.setPreferredSize(new java.awt.Dimension(600, 29)); extractedScrollPane.setViewportView(extractedTextPane); - controlScrollPane.setHorizontalScrollBarPolicy(javax.swing.ScrollPaneConstants.HORIZONTAL_SCROLLBAR_NEVER); - controlScrollPane.setVerticalScrollBarPolicy(javax.swing.ScrollPaneConstants.VERTICAL_SCROLLBAR_NEVER); - controlScrollPane.setPreferredSize(new java.awt.Dimension(600, 100)); - - controlPanel.setMinimumSize(new java.awt.Dimension(0, 20)); - controlPanel.setPreferredSize(new java.awt.Dimension(600, 81)); - - sourceComboBox.setModel(new javax.swing.DefaultComboBoxModel()); - sourceComboBox.setMaximumSize(new java.awt.Dimension(150, 32767)); - sourceComboBox.setMinimumSize(new java.awt.Dimension(150, 20)); - sourceComboBox.setPreferredSize(new java.awt.Dimension(150, 20)); - - jLabel1.setText(org.openide.util.NbBundle.getMessage(ExtractedContentPanel.class, "ExtractedContentPanel.jLabel1.text")); // NOI18N - - pageOfLabel.setText(org.openide.util.NbBundle.getMessage(ExtractedContentPanel.class, "ExtractedContentPanel.pageOfLabel.text")); // NOI18N - - pageButtonsLabel.setText(org.openide.util.NbBundle.getMessage(ExtractedContentPanel.class, "ExtractedContentPanel.pageButtonsLabel.text")); // NOI18N - - pageTotalLabel.setHorizontalAlignment(javax.swing.SwingConstants.CENTER); - pageTotalLabel.setText(org.openide.util.NbBundle.getMessage(ExtractedContentPanel.class, "ExtractedContentPanel.pageTotalLabel.text")); // NOI18N - - pagesLabel.setText(org.openide.util.NbBundle.getMessage(ExtractedContentPanel.class, "ExtractedContentPanel.pagesLabel.text")); // NOI18N - - pageNextButton.setIcon(new javax.swing.ImageIcon(getClass().getResource("/org/sleuthkit/autopsy/keywordsearch/btn_step_forward.png"))); // NOI18N - pageNextButton.setText(org.openide.util.NbBundle.getMessage(ExtractedContentPanel.class, "ExtractedContentPanel.pageNextButton.text")); // NOI18N - pageNextButton.setBorder(javax.swing.BorderFactory.createEmptyBorder(1, 1, 1, 1)); - pageNextButton.setBorderPainted(false); - pageNextButton.setContentAreaFilled(false); - pageNextButton.setDisabledIcon(new javax.swing.ImageIcon(getClass().getResource("/org/sleuthkit/autopsy/keywordsearch/btn_step_forward_disabled.png"))); // NOI18N - pageNextButton.setMargin(new java.awt.Insets(2, 0, 2, 0)); - pageNextButton.setPreferredSize(new java.awt.Dimension(23, 23)); - - pagePreviousButton.setIcon(new javax.swing.ImageIcon(getClass().getResource("/org/sleuthkit/autopsy/keywordsearch/btn_step_back.png"))); // NOI18N - pagePreviousButton.setText(org.openide.util.NbBundle.getMessage(ExtractedContentPanel.class, "ExtractedContentPanel.pagePreviousButton.text")); // NOI18N - pagePreviousButton.setActionCommand(org.openide.util.NbBundle.getMessage(ExtractedContentPanel.class, "ExtractedContentPanel.pagePreviousButton.actionCommand")); // NOI18N - pagePreviousButton.setBorder(javax.swing.BorderFactory.createEmptyBorder(1, 1, 1, 1)); - pagePreviousButton.setBorderPainted(false); - pagePreviousButton.setContentAreaFilled(false); - pagePreviousButton.setDisabledIcon(new javax.swing.ImageIcon(getClass().getResource("/org/sleuthkit/autopsy/keywordsearch/btn_step_back_disabled.png"))); // NOI18N - pagePreviousButton.setMargin(new java.awt.Insets(2, 0, 2, 0)); - - pageCurLabel.setHorizontalAlignment(javax.swing.SwingConstants.CENTER); - pageCurLabel.setText(org.openide.util.NbBundle.getMessage(ExtractedContentPanel.class, "ExtractedContentPanel.pageCurLabel.text")); // NOI18N - - hitLabel.setText(org.openide.util.NbBundle.getMessage(ExtractedContentPanel.class, "ExtractedContentPanel.hitLabel.text")); // NOI18N - hitLabel.setToolTipText(org.openide.util.NbBundle.getMessage(ExtractedContentPanel.class, "ExtractedContentPanel.hitLabel.toolTipText")); // NOI18N - - hitButtonsLabel.setText(org.openide.util.NbBundle.getMessage(ExtractedContentPanel.class, "ExtractedContentPanel.hitButtonsLabel.text")); // NOI18N - - hitNextButton.setIcon(new javax.swing.ImageIcon(getClass().getResource("/org/sleuthkit/autopsy/keywordsearch/btn_step_forward.png"))); // NOI18N - hitNextButton.setText(org.openide.util.NbBundle.getMessage(ExtractedContentPanel.class, "ExtractedContentPanel.hitNextButton.text")); // NOI18N - hitNextButton.setBorder(javax.swing.BorderFactory.createEmptyBorder(1, 1, 1, 1)); - hitNextButton.setBorderPainted(false); - hitNextButton.setContentAreaFilled(false); - hitNextButton.setDisabledIcon(new javax.swing.ImageIcon(getClass().getResource("/org/sleuthkit/autopsy/keywordsearch/btn_step_forward_disabled.png"))); // NOI18N - hitNextButton.setMargin(new java.awt.Insets(2, 0, 2, 0)); - hitNextButton.setPreferredSize(new java.awt.Dimension(23, 23)); - hitNextButton.setRolloverIcon(new javax.swing.ImageIcon(getClass().getResource("/org/sleuthkit/autopsy/keywordsearch/btn_step_forward_hover.png"))); // NOI18N - - hitOfLabel.setText(org.openide.util.NbBundle.getMessage(ExtractedContentPanel.class, "ExtractedContentPanel.hitOfLabel.text")); // NOI18N - - hitTotalLabel.setHorizontalAlignment(javax.swing.SwingConstants.CENTER); - hitTotalLabel.setText(org.openide.util.NbBundle.getMessage(ExtractedContentPanel.class, "ExtractedContentPanel.hitTotalLabel.text")); // NOI18N - hitTotalLabel.setMaximumSize(new java.awt.Dimension(18, 14)); - hitTotalLabel.setMinimumSize(new java.awt.Dimension(18, 14)); - hitTotalLabel.setPreferredSize(new java.awt.Dimension(18, 14)); - - hitPreviousButton.setIcon(new javax.swing.ImageIcon(getClass().getResource("/org/sleuthkit/autopsy/keywordsearch/btn_step_back.png"))); // NOI18N - hitPreviousButton.setText(org.openide.util.NbBundle.getMessage(ExtractedContentPanel.class, "ExtractedContentPanel.hitPreviousButton.text")); // NOI18N - hitPreviousButton.setBorder(javax.swing.BorderFactory.createEmptyBorder(1, 1, 1, 1)); - hitPreviousButton.setBorderPainted(false); - hitPreviousButton.setContentAreaFilled(false); - hitPreviousButton.setDisabledIcon(new javax.swing.ImageIcon(getClass().getResource("/org/sleuthkit/autopsy/keywordsearch/btn_step_back_disabled.png"))); // NOI18N - hitPreviousButton.setMargin(new java.awt.Insets(2, 0, 2, 0)); - hitPreviousButton.setPreferredSize(new java.awt.Dimension(23, 23)); - hitPreviousButton.setRolloverIcon(new javax.swing.ImageIcon(getClass().getResource("/org/sleuthkit/autopsy/keywordsearch/btn_step_back_hover.png"))); // NOI18N - - hitCountLabel.setHorizontalAlignment(javax.swing.SwingConstants.CENTER); - hitCountLabel.setText(org.openide.util.NbBundle.getMessage(ExtractedContentPanel.class, "ExtractedContentPanel.hitCountLabel.text")); // NOI18N - hitCountLabel.setMaximumSize(new java.awt.Dimension(18, 14)); - hitCountLabel.setMinimumSize(new java.awt.Dimension(18, 14)); - hitCountLabel.setPreferredSize(new java.awt.Dimension(18, 14)); - - jSeparator2.setOrientation(javax.swing.SwingConstants.VERTICAL); - - jSeparator3.setOrientation(javax.swing.SwingConstants.VERTICAL); - - zoomPanel.setMinimumSize(new java.awt.Dimension(150, 20)); - zoomPanel.setName(""); // NOI18N - zoomPanel.setPreferredSize(new java.awt.Dimension(200, 20)); - - javax.swing.GroupLayout controlPanelLayout = new javax.swing.GroupLayout(controlPanel); - controlPanel.setLayout(controlPanelLayout); - controlPanelLayout.setHorizontalGroup( - controlPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) - .addGroup(controlPanelLayout.createSequentialGroup() - .addContainerGap() - .addComponent(hitLabel) - .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) - .addComponent(hitCountLabel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) - .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) - .addComponent(hitOfLabel) - .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) - .addComponent(hitTotalLabel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) - .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) - .addComponent(hitButtonsLabel) - .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) - .addComponent(hitPreviousButton, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) - .addGap(0, 0, 0) - .addComponent(hitNextButton, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) - .addGap(18, 18, 18) - .addComponent(jSeparator2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) - .addGap(18, 18, 18) - .addComponent(pagesLabel) - .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) - .addComponent(pageCurLabel) - .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) - .addComponent(pageOfLabel) - .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) - .addComponent(pageTotalLabel) - .addGap(18, 18, 18) - .addComponent(pageButtonsLabel) - .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) - .addComponent(pagePreviousButton) - .addGap(0, 0, 0) - .addComponent(pageNextButton, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) - .addGap(18, 18, 18) - .addComponent(jSeparator3, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) - .addGap(18, 18, 18) - .addComponent(zoomPanel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) - .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) - .addComponent(jLabel1) - .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) - .addComponent(sourceComboBox, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) - .addContainerGap()) - ); - controlPanelLayout.setVerticalGroup( - controlPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) - .addGroup(controlPanelLayout.createSequentialGroup() - .addGroup(controlPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.CENTER) - .addComponent(hitPreviousButton, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) - .addComponent(jLabel1) - .addComponent(hitNextButton, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) - .addComponent(pageButtonsLabel) - .addComponent(pagePreviousButton) - .addComponent(pageNextButton, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) - .addComponent(sourceComboBox, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) - .addComponent(pagesLabel) - .addComponent(hitLabel) - .addComponent(jSeparator2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) - .addComponent(pageCurLabel) - .addComponent(pageOfLabel) - .addComponent(hitCountLabel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) - .addComponent(pageTotalLabel) - .addComponent(hitOfLabel) - .addComponent(hitTotalLabel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) - .addComponent(hitButtonsLabel) - .addComponent(jSeparator3, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) - .addComponent(zoomPanel, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) - .addGap(0, 0, 0)) - ); - - controlPanelLayout.linkSize(javax.swing.SwingConstants.VERTICAL, new java.awt.Component[] {hitButtonsLabel, hitCountLabel, hitLabel, hitNextButton, hitOfLabel, hitPreviousButton, hitTotalLabel, jLabel1, jSeparator2, jSeparator3, pageButtonsLabel, pageCurLabel, pageNextButton, pageOfLabel, pagePreviousButton, pageTotalLabel, pagesLabel, sourceComboBox, zoomPanel}); - - zoomPanel.getAccessibleContext().setAccessibleName(org.openide.util.NbBundle.getMessage(ExtractedContentPanel.class, "ExtractedContentPanel.AccessibleContext.accessibleName")); // NOI18N - - controlScrollPane.setViewportView(controlPanel); - - javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this); - this.setLayout(layout); - layout.setHorizontalGroup( - layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) - .addComponent(controlScrollPane, javax.swing.GroupLayout.DEFAULT_SIZE, 980, Short.MAX_VALUE) - .addComponent(extractedScrollPane, javax.swing.GroupLayout.DEFAULT_SIZE, 980, Short.MAX_VALUE) - ); - layout.setVerticalGroup( - layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) - .addGroup(layout.createSequentialGroup() - .addComponent(controlScrollPane, javax.swing.GroupLayout.PREFERRED_SIZE, 29, javax.swing.GroupLayout.PREFERRED_SIZE) - .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) - .addComponent(extractedScrollPane, javax.swing.GroupLayout.DEFAULT_SIZE, 23, Short.MAX_VALUE)) - ); + add(extractedScrollPane, java.awt.BorderLayout.CENTER); }// //GEN-END:initComponents // Variables declaration - do not modify//GEN-BEGIN:variables private javax.swing.JPanel controlPanel; - private javax.swing.JScrollPane controlScrollPane; private javax.swing.JMenuItem copyMenuItem; private javax.swing.JScrollPane extractedScrollPane; private javax.swing.JTextPane extractedTextPane; @@ -440,6 +412,8 @@ class ExtractedContentPanel extends javax.swing.JPanel implements ResizableTextP private javax.swing.JLabel jLabel1; private javax.swing.JSeparator jSeparator2; private javax.swing.JSeparator jSeparator3; + private javax.swing.JSeparator jSeparator4; + private javax.swing.JSeparator jSeparator5; private javax.swing.JLabel pageButtonsLabel; private javax.swing.JLabel pageCurLabel; private javax.swing.JButton pageNextButton; diff --git a/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/TextZoomPanel.form b/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/TextZoomPanel.form index 46d8e3d66f..dc51c409c4 100644 --- a/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/TextZoomPanel.form +++ b/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/TextZoomPanel.form @@ -2,11 +2,15 @@
- - + + + + + + - + @@ -19,35 +23,13 @@ + - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + @@ -125,18 +107,6 @@ - - - - - - - - - - - - diff --git a/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/TextZoomPanel.java b/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/TextZoomPanel.java index eb716df8df..79e433a858 100644 --- a/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/TextZoomPanel.java +++ b/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/TextZoomPanel.java @@ -113,11 +113,13 @@ class TextZoomPanel extends JPanel { zoomTextField = new javax.swing.JTextField(); zoomOutButton = new javax.swing.JButton(); zoomInButton = new javax.swing.JButton(); - javax.swing.JToolBar.Separator jSeparator2 = new javax.swing.JToolBar.Separator(); zoomResetButton = new javax.swing.JButton(); - setMinimumSize(new java.awt.Dimension(150, 20)); - setPreferredSize(new java.awt.Dimension(200, 20)); + setMaximumSize(null); + setMinimumSize(null); + setName(""); // NOI18N + setPreferredSize(null); + setLayout(new java.awt.FlowLayout(java.awt.FlowLayout.LEFT, 0, 0)); zoomTextField.setEditable(false); zoomTextField.setHorizontalAlignment(javax.swing.JTextField.RIGHT); @@ -125,6 +127,7 @@ class TextZoomPanel extends JPanel { zoomTextField.setMaximumSize(new java.awt.Dimension(50, 2147483647)); zoomTextField.setMinimumSize(new java.awt.Dimension(50, 20)); zoomTextField.setPreferredSize(new java.awt.Dimension(50, 20)); + add(zoomTextField); zoomOutButton.setIcon(new javax.swing.ImageIcon(getClass().getResource("/org/sleuthkit/autopsy/keywordsearch/zoom-out.png"))); // NOI18N org.openide.awt.Mnemonics.setLocalizedText(zoomOutButton, org.openide.util.NbBundle.getMessage(TextZoomPanel.class, "TextZoomPanel.zoomOutButton.text")); // NOI18N @@ -140,6 +143,7 @@ class TextZoomPanel extends JPanel { zoomOutButtonActionPerformed(evt); } }); + add(zoomOutButton); zoomInButton.setIcon(new javax.swing.ImageIcon(getClass().getResource("/org/sleuthkit/autopsy/keywordsearch/zoom-in.png"))); // NOI18N org.openide.awt.Mnemonics.setLocalizedText(zoomInButton, org.openide.util.NbBundle.getMessage(TextZoomPanel.class, "TextZoomPanel.zoomInButton.text")); // NOI18N @@ -156,9 +160,7 @@ class TextZoomPanel extends JPanel { zoomInButtonActionPerformed(evt); } }); - - jSeparator2.setOrientation(javax.swing.SwingConstants.VERTICAL); - jSeparator2.setMaximumSize(new java.awt.Dimension(6, 20)); + add(zoomInButton); org.openide.awt.Mnemonics.setLocalizedText(zoomResetButton, org.openide.util.NbBundle.getMessage(TextZoomPanel.class, "TextZoomPanel.zoomResetButton.text")); // NOI18N zoomResetButton.setBorderPainted(false); @@ -172,31 +174,7 @@ class TextZoomPanel extends JPanel { zoomResetButtonActionPerformed(evt); } }); - - javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this); - this.setLayout(layout); - layout.setHorizontalGroup( - layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) - .addGroup(layout.createSequentialGroup() - .addComponent(zoomTextField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) - .addGap(0, 0, 0) - .addComponent(zoomOutButton, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) - .addGap(0, 0, 0) - .addComponent(zoomInButton, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) - .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) - .addComponent(zoomResetButton, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) - .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) - .addComponent(jSeparator2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) - ); - layout.setVerticalGroup( - layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) - .addComponent(jSeparator2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) - .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) - .addComponent(zoomTextField, javax.swing.GroupLayout.Alignment.CENTER, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) - .addComponent(zoomOutButton, javax.swing.GroupLayout.Alignment.CENTER, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) - .addComponent(zoomInButton, javax.swing.GroupLayout.Alignment.CENTER, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) - .addComponent(zoomResetButton, javax.swing.GroupLayout.Alignment.CENTER, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) - ); + add(zoomResetButton); }// //GEN-END:initComponents private void zoomOutButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_zoomOutButtonActionPerformed From 78d1bc1fc042a514adfdc2f2a7048617b5ce6ca9 Mon Sep 17 00:00:00 2001 From: Greg DiCristofaro Date: Tue, 31 Mar 2020 12:06:25 -0400 Subject: [PATCH 007/137] adding wrap layout --- .../autopsy/keywordsearch/WrapLayout.java | 206 ++++++++++++++++++ 1 file changed, 206 insertions(+) create mode 100644 KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/WrapLayout.java diff --git a/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/WrapLayout.java b/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/WrapLayout.java new file mode 100644 index 0000000000..98f98490be --- /dev/null +++ b/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/WrapLayout.java @@ -0,0 +1,206 @@ +/* + * 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.keywordsearch; + + +import java.awt.Component; +import java.awt.Container; +import java.awt.Dimension; +import java.awt.FlowLayout; +import java.awt.Insets; +import javax.swing.JScrollPane; +import javax.swing.SwingUtilities; + +/** +* FlowLayout subclass that fully supports wrapping of components. +* +* Originally written by Rob Camick +* https://tips4java.wordpress.com/2008/11/06/wrap-layout/ +*/ +class WrapLayout extends FlowLayout { + + private static final long serialVersionUID = 1L; + /** + * Constructs a new WrapLayout with a left alignment and a + * default 5-unit horizontal and vertical gap. + */ + public WrapLayout() { + super(); + } + + /** + * Constructs a new FlowLayout with the specified alignment + * and a default 5-unit horizontal and vertical gap. The value of the + * alignment argument must be one of WrapLayout, + * WrapLayout, or WrapLayout. + * + * @param align the alignment value + */ + public WrapLayout(int align) { + super(align); + } + + /** + * Creates a new flow layout manager with the indicated alignment and + * the indicated horizontal and vertical gaps. + *

+ * The value of the alignment argument must be one of + * WrapLayout, WrapLayout, or + * WrapLayout. + * + * @param align the alignment value + * @param hgap the horizontal gap between components + * @param vgap the vertical gap between components + */ + public WrapLayout(int align, int hgap, int vgap) { + super(align, hgap, vgap); + } + + /** + * Returns the preferred dimensions for this layout given the + * visible components in the specified target container. + * + * @param target the component which needs to be laid out + * + * @return the preferred dimensions to lay out the subcomponents of the + * specified container + */ + @Override + public Dimension preferredLayoutSize(Container target) { + return layoutSize(target, true); + } + + /** + * Returns the minimum dimensions needed to layout the visible + * components contained in the specified target container. + * + * @param target the component which needs to be laid out + * + * @return the minimum dimensions to lay out the subcomponents of the + * specified container + */ + @Override + public Dimension minimumLayoutSize(Container target) { + Dimension minimum = layoutSize(target, false); + minimum.width -= (getHgap() + 1); + return minimum; + } + + /** + * Returns the minimum or preferred dimension needed to layout the + * target container. + * + * @param target target to get layout size for + * @param preferred should preferred size be calculated + * + * @return the dimension to layout the target container + */ + private Dimension layoutSize(Container target, boolean preferred) { + synchronized (target.getTreeLock()) { + // Each row must fit with the width allocated to the containter. + // When the container width = 0, the preferred width of the container + // has not yet been calculated so lets ask for the maximum. + + int targetWidth = target.getSize().width; + Container container = target; + + while (container.getSize().width == 0 && container.getParent() != null) { + container = container.getParent(); + } + + targetWidth = container.getSize().width; + + if (targetWidth == 0) { + targetWidth = Integer.MAX_VALUE; + } + + int hgap = getHgap(); + int vgap = getVgap(); + Insets insets = target.getInsets(); + int horizontalInsetsAndGap = insets.left + insets.right + (hgap * 2); + int maxWidth = targetWidth - horizontalInsetsAndGap; + + // Fit components into the allowed width + Dimension dim = new Dimension(0, 0); + int rowWidth = 0; + int rowHeight = 0; + + int nmembers = target.getComponentCount(); + + for (int i = 0; i < nmembers; i++) { + Component m = target.getComponent(i); + + if (m.isVisible()) { + Dimension d = preferred ? m.getPreferredSize() : m.getMinimumSize(); + + // Can't add the component to current row. Start a new row. + if (rowWidth + d.width > maxWidth) { + addRow(dim, rowWidth, rowHeight); + rowWidth = 0; + rowHeight = 0; + } + + // Add a horizontal gap for all components after the first + if (rowWidth != 0) { + rowWidth += hgap; + } + + rowWidth += d.width; + rowHeight = Math.max(rowHeight, d.height); + } + } + + addRow(dim, rowWidth, rowHeight); + + dim.width += horizontalInsetsAndGap; + dim.height += insets.top + insets.bottom + vgap * 2; + + // When using a scroll pane or the DecoratedLookAndFeel we need to + // make sure the preferred size is less than the size of the + // target containter so shrinking the container size works + // correctly. Removing the horizontal gap is an easy way to do this. + Container scrollPane = SwingUtilities.getAncestorOfClass(JScrollPane.class, target); + + if (scrollPane != null && target.isValid()) { + dim.width -= (hgap + 1); + } + + return dim; + } + } + + /* + * A new row has been completed. Use the dimensions of this row to + * update the preferred size for the container. + * + * @param dim update the width and height when appropriate @param + * rowWidth the width of the row to add @param rowHeight the height of + * the row to add + */ + private void addRow(Dimension dim, int rowWidth, int rowHeight) { + dim.width = Math.max(dim.width, rowWidth); + + if (dim.height > 0) { + dim.height += getVgap(); + } + + dim.height += rowHeight; + } + } \ No newline at end of file From e070a5dae1a1ad0e2e350dd42c820518e9070066 Mon Sep 17 00:00:00 2001 From: Greg DiCristofaro Date: Tue, 31 Mar 2020 12:07:12 -0400 Subject: [PATCH 008/137] reverting bundle properties --- .../keywordsearch/Bundle.properties-MERGED | 27 ++++++++++++------- 1 file changed, 17 insertions(+), 10 deletions(-) diff --git a/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/Bundle.properties-MERGED b/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/Bundle.properties-MERGED index 49e29cc69d..9aeeabc046 100755 --- a/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/Bundle.properties-MERGED +++ b/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/Bundle.properties-MERGED @@ -20,12 +20,16 @@ IndexedText.warningMessage.knownFile=This file i IndexedText.warningMessage.noTextAvailable=No indexed text for this file. KeywordSearchGlobalSettingsPanel.Title=Global Keyword Search Settings KeywordSearchIngestModule.init.badInitMsg=Keyword search server was not properly initialized, cannot run keyword search ingest. +# {0} - Reason for not connecting to Solr KeywordSearchIngestModule.init.exception.errConnToSolr.msg=Error connecting to SOLR server: {0}. +# {0} - Reason for not starting Solr KeywordSearchIngestModule.init.tryStopSolrMsg={0}
Please try stopping Java Solr processes if any exist and restart the application. KeywordSearchIngestModule.metadataTitle=METADATA KeywordSearchIngestModule.noOpenCase.errMsg=No open case available. KeywordSearchIngestModule.startUp.noOpenCore.msg=The index could not be opened or does not exist. +# {0} - schema version number KeywordSearchIngestModule.startupException.indexSchemaNotSupported=Adding text no longer supported for schema version {0} of the text index. +# {0} - Solr version number KeywordSearchIngestModule.startupException.indexSolrVersionNotSupported=Adding text no longer supported for Solr version {0} of the text index. KeywordSearchIngestModule.startupMessage.failedToGetIndexSchema=Failed to get schema version for text index. KeywordSearchResultFactory.createNodeForKey.noResultsFound.text=No results found. @@ -208,6 +212,7 @@ KeywordSearchSettings.propertiesNSRL.text={0}_NSRL KeywordSearchSettings.propertiesScripts.text={0}_Scripts NoOpenCoreException.err.noOpenSorlCore.msg=No currently open Solr core. SearchRunner.query.exception.msg=Error performing query: +# {0} - core name Server.deleteCore.exception.msg=Failed to delete Solr core {0} Server.start.exception.cantStartSolr.msg=Could not start Solr server process Server.start.exception.cantStartSolr.msg2=Could not start Solr server process @@ -335,8 +340,10 @@ SolrSearch.openCore.msg=Opening text index SolrSearch.openGiantCore.msg=Opening text index. Text index for this case is very large and may take long time to load. SolrSearch.openLargeCore.msg=Opening text index. This may take several minutes. SolrSearch.readingIndexes.msg=Reading text index metadata file +# {0} - index folder path SolrSearchService.exceptionMessage.failedToDeleteIndexFiles=Failed to delete text index files at {0} SolrSearchService.exceptionMessage.noCurrentSolrCore=IndexMetadata did not contain a current Solr core so could not delete the case +# {0} - case directory SolrSearchService.exceptionMessage.noIndexMetadata=Unable to create IndexMetaData from case directory: {0} SolrSearchService.indexingError=Unable to index blackboard artifact. SolrSearchService.ServiceName=Solr Keyword Search Service @@ -353,24 +360,24 @@ DropdownListSearchPanel.jSaveSearchResults.text=Save search results GlobalEditListPanel.ingestWarningLabel.text=Ingest is ongoing, some settings will be unavailable until it finishes. KeywordSearchGlobalLanguageSettingsPanel.ingestWarningLabel.text=Ingest is ongoing, some settings will be unavailable until it finishes. KeywordSearchGlobalSearchSettingsPanel.ingestWarningLabel.text=Ingest is ongoing, some settings will be unavailable until it finishes. -ExtractedContentPanel.AccessibleContext.accessibleName= -ExtractedContentPanel.jLabel1.text=Text Source: -ExtractedContentPanel.hitNextButton.text= +ExtractedContentPanel.hitCountLabel.text=- ExtractedContentPanel.hitPreviousButton.text= -ExtractedContentPanel.hitButtonsLabel.text=Match ExtractedContentPanel.hitTotalLabel.text=- ExtractedContentPanel.hitOfLabel.text=of -ExtractedContentPanel.hitCountLabel.text=- +ExtractedContentPanel.hitNextButton.text= +ExtractedContentPanel.hitButtonsLabel.text=Match ExtractedContentPanel.hitLabel.toolTipText= ExtractedContentPanel.hitLabel.text=Matches on page: -ExtractedContentPanel.pageNextButton.text= +ExtractedContentPanel.pageCurLabel.text=- ExtractedContentPanel.pagePreviousButton.actionCommand=pagePreviousButton ExtractedContentPanel.pagePreviousButton.text= -ExtractedContentPanel.pageButtonsLabel.text=Page -ExtractedContentPanel.pageTotalLabel.text=- -ExtractedContentPanel.pageOfLabel.text=of -ExtractedContentPanel.pageCurLabel.text=- +ExtractedContentPanel.pageNextButton.text= ExtractedContentPanel.pagesLabel.text=Page: +ExtractedContentPanel.pageTotalLabel.text=- +ExtractedContentPanel.pageButtonsLabel.text=Page +ExtractedContentPanel.pageOfLabel.text=of +ExtractedContentPanel.jLabel1.text=Text Source: +ExtractedContentPanel.AccessibleContext.accessibleName= TextZoomPanel.zoomInButton.text= TextZoomPanel.zoomOutButton.text= TextZoomPanel.zoomResetButton.text=Reset From 8dba59edfb724c866f6a72ad7b4df357ead0a011 Mon Sep 17 00:00:00 2001 From: Greg DiCristofaro Date: Tue, 31 Mar 2020 13:51:59 -0400 Subject: [PATCH 009/137] updated spacing --- .../keywordsearch/ExtractedContentPanel.form | 198 ++++++++++++++++++ .../keywordsearch/ExtractedContentPanel.java | 27 +++ 2 files changed, 225 insertions(+) diff --git a/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/ExtractedContentPanel.form b/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/ExtractedContentPanel.form index f503e37fc5..e7f828ba0f 100644 --- a/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/ExtractedContentPanel.form +++ b/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/ExtractedContentPanel.form @@ -80,6 +80,24 @@ + + + + + + + + + + + + + + + + + + @@ -88,6 +106,24 @@ + + + + + + + + + + + + + + + + + + @@ -95,6 +131,24 @@ + + + + + + + + + + + + + + + + + + @@ -103,6 +157,24 @@ + + + + + + + + + + + + + + + + + + @@ -110,6 +182,24 @@ + + + + + + + + + + + + + + + + + + @@ -162,6 +252,24 @@ + + + + + + + + + + + + + + + + + + @@ -248,6 +356,24 @@ + + + + + + + + + + + + + + + + + + @@ -306,6 +432,24 @@ + + + + + + + + + + + + + + + + + + @@ -351,6 +495,24 @@ + + + + + + + + + + + + + + + + + + @@ -386,6 +548,24 @@ + + + + + + + + + + + + + + + + + + @@ -406,6 +586,24 @@ + + + + + + + + + + + + + + + + + + diff --git a/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/ExtractedContentPanel.java b/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/ExtractedContentPanel.java index 3e1281720c..1eb2a867b8 100644 --- a/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/ExtractedContentPanel.java +++ b/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/ExtractedContentPanel.java @@ -206,12 +206,18 @@ class ExtractedContentPanel extends javax.swing.JPanel implements ResizableTextP controlPanel = new javax.swing.JPanel(); javax.swing.JPanel pagePanel = new javax.swing.JPanel(); pagesLabel = new javax.swing.JLabel(); + fillerSmall1 = new javax.swing.Box.Filler(new java.awt.Dimension(5, 0), new java.awt.Dimension(5, 0), new java.awt.Dimension(5, 32767)); pageCurLabel = new javax.swing.JLabel(); + fillerSmall2 = new javax.swing.Box.Filler(new java.awt.Dimension(5, 0), new java.awt.Dimension(5, 0), new java.awt.Dimension(5, 32767)); pageOfLabel = new javax.swing.JLabel(); + fillerSmall3 = new javax.swing.Box.Filler(new java.awt.Dimension(5, 0), new java.awt.Dimension(5, 0), new java.awt.Dimension(5, 32767)); pageTotalLabel = new javax.swing.JLabel(); + fillerSmall4 = new javax.swing.Box.Filler(new java.awt.Dimension(5, 0), new java.awt.Dimension(5, 0), new java.awt.Dimension(5, 32767)); pageButtonsLabel = new javax.swing.JLabel(); + javax.swing.Box.Filler fillerMed1 = new javax.swing.Box.Filler(new java.awt.Dimension(10, 0), new java.awt.Dimension(10, 0), new java.awt.Dimension(10, 32767)); pagePreviousButton = new javax.swing.JButton(); pageNextButton = new javax.swing.JButton(); + javax.swing.Box.Filler fillerSmall6 = new javax.swing.Box.Filler(new java.awt.Dimension(5, 0), new java.awt.Dimension(5, 0), new java.awt.Dimension(5, 32767)); jSeparator2 = new javax.swing.JSeparator(); javax.swing.JPanel matchesPanel = new javax.swing.JPanel(); hitLabel = new javax.swing.JLabel(); @@ -219,15 +225,20 @@ class ExtractedContentPanel extends javax.swing.JPanel implements ResizableTextP hitOfLabel = new javax.swing.JLabel(); hitTotalLabel = new javax.swing.JLabel(); hitButtonsLabel = new javax.swing.JLabel(); + javax.swing.Box.Filler fillerMed2 = new javax.swing.Box.Filler(new java.awt.Dimension(10, 0), new java.awt.Dimension(10, 0), new java.awt.Dimension(10, 32767)); hitPreviousButton = new javax.swing.JButton(); hitNextButton = new javax.swing.JButton(); + javax.swing.Box.Filler fillerSmall11 = new javax.swing.Box.Filler(new java.awt.Dimension(5, 0), new java.awt.Dimension(5, 0), new java.awt.Dimension(5, 32767)); jSeparator3 = new javax.swing.JSeparator(); javax.swing.JPanel zoomPanelWrapper = new javax.swing.JPanel(); zoomPanel = new TextZoomPanel(this); + javax.swing.Box.Filler fillerSmall14 = new javax.swing.Box.Filler(new java.awt.Dimension(5, 0), new java.awt.Dimension(5, 0), new java.awt.Dimension(5, 32767)); jSeparator4 = new javax.swing.JSeparator(); javax.swing.JPanel textSourcePanel = new javax.swing.JPanel(); jLabel1 = new javax.swing.JLabel(); + javax.swing.Box.Filler fillerSmall12 = new javax.swing.Box.Filler(new java.awt.Dimension(5, 0), new java.awt.Dimension(5, 0), new java.awt.Dimension(5, 32767)); sourceComboBox = new javax.swing.JComboBox<>(); + javax.swing.Box.Filler fillerSmall13 = new javax.swing.Box.Filler(new java.awt.Dimension(5, 0), new java.awt.Dimension(5, 0), new java.awt.Dimension(5, 32767)); jSeparator5 = new javax.swing.JSeparator(); extractedScrollPane = new javax.swing.JScrollPane(); extractedTextPane = new javax.swing.JTextPane(); @@ -248,20 +259,25 @@ class ExtractedContentPanel extends javax.swing.JPanel implements ResizableTextP pagesLabel.setText(org.openide.util.NbBundle.getMessage(ExtractedContentPanel.class, "ExtractedContentPanel.pagesLabel.text")); // NOI18N pagePanel.add(pagesLabel); + pagePanel.add(fillerSmall1); pageCurLabel.setHorizontalAlignment(javax.swing.SwingConstants.CENTER); pageCurLabel.setText(org.openide.util.NbBundle.getMessage(ExtractedContentPanel.class, "ExtractedContentPanel.pageCurLabel.text")); // NOI18N pagePanel.add(pageCurLabel); + pagePanel.add(fillerSmall2); pageOfLabel.setText(org.openide.util.NbBundle.getMessage(ExtractedContentPanel.class, "ExtractedContentPanel.pageOfLabel.text")); // NOI18N pagePanel.add(pageOfLabel); + pagePanel.add(fillerSmall3); pageTotalLabel.setHorizontalAlignment(javax.swing.SwingConstants.CENTER); pageTotalLabel.setText(org.openide.util.NbBundle.getMessage(ExtractedContentPanel.class, "ExtractedContentPanel.pageTotalLabel.text")); // NOI18N pagePanel.add(pageTotalLabel); + pagePanel.add(fillerSmall4); pageButtonsLabel.setText(org.openide.util.NbBundle.getMessage(ExtractedContentPanel.class, "ExtractedContentPanel.pageButtonsLabel.text")); // NOI18N pagePanel.add(pageButtonsLabel); + pagePanel.add(fillerMed1); pagePreviousButton.setIcon(new javax.swing.ImageIcon(getClass().getResource("/org/sleuthkit/autopsy/keywordsearch/btn_step_back.png"))); // NOI18N pagePreviousButton.setText(org.openide.util.NbBundle.getMessage(ExtractedContentPanel.class, "ExtractedContentPanel.pagePreviousButton.text")); // NOI18N @@ -282,6 +298,7 @@ class ExtractedContentPanel extends javax.swing.JPanel implements ResizableTextP pageNextButton.setMargin(new java.awt.Insets(2, 0, 2, 0)); pageNextButton.setPreferredSize(new java.awt.Dimension(23, 23)); pagePanel.add(pageNextButton); + pagePanel.add(fillerSmall6); jSeparator2.setOrientation(javax.swing.SwingConstants.VERTICAL); jSeparator2.setMaximumSize(new java.awt.Dimension(2, 25)); @@ -316,6 +333,7 @@ class ExtractedContentPanel extends javax.swing.JPanel implements ResizableTextP hitButtonsLabel.setText(org.openide.util.NbBundle.getMessage(ExtractedContentPanel.class, "ExtractedContentPanel.hitButtonsLabel.text")); // NOI18N matchesPanel.add(hitButtonsLabel); + matchesPanel.add(fillerMed2); hitPreviousButton.setIcon(new javax.swing.ImageIcon(getClass().getResource("/org/sleuthkit/autopsy/keywordsearch/btn_step_back.png"))); // NOI18N hitPreviousButton.setText(org.openide.util.NbBundle.getMessage(ExtractedContentPanel.class, "ExtractedContentPanel.hitPreviousButton.text")); // NOI18N @@ -338,6 +356,7 @@ class ExtractedContentPanel extends javax.swing.JPanel implements ResizableTextP hitNextButton.setPreferredSize(new java.awt.Dimension(23, 23)); hitNextButton.setRolloverIcon(new javax.swing.ImageIcon(getClass().getResource("/org/sleuthkit/autopsy/keywordsearch/btn_step_forward_hover.png"))); // NOI18N matchesPanel.add(hitNextButton); + matchesPanel.add(fillerSmall11); jSeparator3.setOrientation(javax.swing.SwingConstants.VERTICAL); jSeparator3.setMaximumSize(new java.awt.Dimension(2, 25)); @@ -354,6 +373,8 @@ class ExtractedContentPanel extends javax.swing.JPanel implements ResizableTextP zoomPanelWrapper.add(zoomPanel); zoomPanel.getAccessibleContext().setAccessibleName(org.openide.util.NbBundle.getMessage(ExtractedContentPanel.class, "ExtractedContentPanel.AccessibleContext.accessibleName")); // NOI18N + zoomPanelWrapper.add(fillerSmall14); + jSeparator4.setOrientation(javax.swing.SwingConstants.VERTICAL); jSeparator4.setMaximumSize(new java.awt.Dimension(2, 25)); jSeparator4.setMinimumSize(new java.awt.Dimension(2, 25)); @@ -367,12 +388,14 @@ class ExtractedContentPanel extends javax.swing.JPanel implements ResizableTextP jLabel1.setText(org.openide.util.NbBundle.getMessage(ExtractedContentPanel.class, "ExtractedContentPanel.jLabel1.text")); // NOI18N textSourcePanel.add(jLabel1); + textSourcePanel.add(fillerSmall12); sourceComboBox.setModel(new javax.swing.DefaultComboBoxModel()); sourceComboBox.setMaximumSize(new java.awt.Dimension(150, 32767)); sourceComboBox.setMinimumSize(new java.awt.Dimension(150, 20)); sourceComboBox.setPreferredSize(new java.awt.Dimension(150, 20)); textSourcePanel.add(sourceComboBox); + textSourcePanel.add(fillerSmall13); jSeparator5.setOrientation(javax.swing.SwingConstants.VERTICAL); jSeparator5.setMaximumSize(new java.awt.Dimension(2, 25)); @@ -402,6 +425,10 @@ class ExtractedContentPanel extends javax.swing.JPanel implements ResizableTextP private javax.swing.JMenuItem copyMenuItem; private javax.swing.JScrollPane extractedScrollPane; private javax.swing.JTextPane extractedTextPane; + private javax.swing.Box.Filler fillerSmall1; + private javax.swing.Box.Filler fillerSmall2; + private javax.swing.Box.Filler fillerSmall3; + private javax.swing.Box.Filler fillerSmall4; private javax.swing.JLabel hitButtonsLabel; private javax.swing.JLabel hitCountLabel; private javax.swing.JLabel hitLabel; From d6156be0d8293c5d400bcdf21175b3d816a845d9 Mon Sep 17 00:00:00 2001 From: Greg DiCristofaro Date: Tue, 31 Mar 2020 22:03:45 -0400 Subject: [PATCH 010/137] new layout manager --- .../keywordsearch/ExtractedContentPanel.form | 37 -- .../keywordsearch/ExtractedContentPanel.java | 19 +- .../autopsy/keywordsearch/WrapLayout.java | 581 +++++++++++++----- 3 files changed, 441 insertions(+), 196 deletions(-) diff --git a/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/ExtractedContentPanel.form b/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/ExtractedContentPanel.form index e7f828ba0f..7add18aa42 100644 --- a/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/ExtractedContentPanel.form +++ b/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/ExtractedContentPanel.form @@ -531,10 +531,6 @@ - - - - @@ -586,39 +582,6 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/ExtractedContentPanel.java b/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/ExtractedContentPanel.java index 1eb2a867b8..11425a2a7d 100644 --- a/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/ExtractedContentPanel.java +++ b/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/ExtractedContentPanel.java @@ -24,6 +24,7 @@ import java.awt.Font; import java.awt.event.ActionListener; import java.awt.event.ItemEvent; import java.util.ArrayList; +import java.util.Arrays; import java.util.List; import java.util.concurrent.CancellationException; import java.util.concurrent.ExecutionException; @@ -186,7 +187,9 @@ class ExtractedContentPanel extends javax.swing.JPanel implements ResizableTextP private void additionalInit() { // use wrap layout for better component wrapping - WrapLayout layout = new WrapLayout(java.awt.FlowLayout.LEFT); + WrapLayout layout = new WrapLayout(); + layout.setHgap(5); + layout.setOppositeAligned(Arrays.asList(textSourcePanel)); controlPanel.setLayout(layout); } @@ -234,12 +237,10 @@ class ExtractedContentPanel extends javax.swing.JPanel implements ResizableTextP zoomPanel = new TextZoomPanel(this); javax.swing.Box.Filler fillerSmall14 = new javax.swing.Box.Filler(new java.awt.Dimension(5, 0), new java.awt.Dimension(5, 0), new java.awt.Dimension(5, 32767)); jSeparator4 = new javax.swing.JSeparator(); - javax.swing.JPanel textSourcePanel = new javax.swing.JPanel(); + textSourcePanel = new javax.swing.JPanel(); jLabel1 = new javax.swing.JLabel(); javax.swing.Box.Filler fillerSmall12 = new javax.swing.Box.Filler(new java.awt.Dimension(5, 0), new java.awt.Dimension(5, 0), new java.awt.Dimension(5, 32767)); sourceComboBox = new javax.swing.JComboBox<>(); - javax.swing.Box.Filler fillerSmall13 = new javax.swing.Box.Filler(new java.awt.Dimension(5, 0), new java.awt.Dimension(5, 0), new java.awt.Dimension(5, 32767)); - jSeparator5 = new javax.swing.JSeparator(); extractedScrollPane = new javax.swing.JScrollPane(); extractedTextPane = new javax.swing.JTextPane(); @@ -395,14 +396,6 @@ class ExtractedContentPanel extends javax.swing.JPanel implements ResizableTextP sourceComboBox.setMinimumSize(new java.awt.Dimension(150, 20)); sourceComboBox.setPreferredSize(new java.awt.Dimension(150, 20)); textSourcePanel.add(sourceComboBox); - textSourcePanel.add(fillerSmall13); - - jSeparator5.setOrientation(javax.swing.SwingConstants.VERTICAL); - jSeparator5.setMaximumSize(new java.awt.Dimension(2, 25)); - jSeparator5.setMinimumSize(new java.awt.Dimension(2, 25)); - jSeparator5.setName(""); // NOI18N - jSeparator5.setPreferredSize(new java.awt.Dimension(2, 25)); - textSourcePanel.add(jSeparator5); controlPanel.add(textSourcePanel); @@ -440,7 +433,6 @@ class ExtractedContentPanel extends javax.swing.JPanel implements ResizableTextP private javax.swing.JSeparator jSeparator2; private javax.swing.JSeparator jSeparator3; private javax.swing.JSeparator jSeparator4; - private javax.swing.JSeparator jSeparator5; private javax.swing.JLabel pageButtonsLabel; private javax.swing.JLabel pageCurLabel; private javax.swing.JButton pageNextButton; @@ -451,6 +443,7 @@ class ExtractedContentPanel extends javax.swing.JPanel implements ResizableTextP private javax.swing.JPopupMenu rightClickMenu; private javax.swing.JMenuItem selectAllMenuItem; private javax.swing.JComboBox sourceComboBox; + private javax.swing.JPanel textSourcePanel; private javax.swing.JPanel zoomPanel; // End of variables declaration//GEN-END:variables diff --git a/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/WrapLayout.java b/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/WrapLayout.java index 98f98490be..c64a7eca18 100644 --- a/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/WrapLayout.java +++ b/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/WrapLayout.java @@ -16,161 +16,366 @@ * See the License for the specific language governing permissions and * limitations under the License. */ - package org.sleuthkit.autopsy.keywordsearch; - import java.awt.Component; import java.awt.Container; import java.awt.Dimension; -import java.awt.FlowLayout; import java.awt.Insets; +import java.awt.LayoutManager; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.Collection; +import java.util.Collections; +import java.util.HashSet; +import java.util.List; +import java.util.Set; +import java.util.stream.Collectors; import javax.swing.JScrollPane; import javax.swing.SwingUtilities; /** -* FlowLayout subclass that fully supports wrapping of components. -* -* Originally written by Rob Camick -* https://tips4java.wordpress.com/2008/11/06/wrap-layout/ -*/ -class WrapLayout extends FlowLayout { + * FlowLayout subclass that fully supports wrapping of components. + * + * Originally written by Rob Camick + * https://tips4java.wordpress.com/2008/11/06/wrap-layout/ + */ +public class WrapLayout implements LayoutManager, java.io.Serializable { + + private static final long serialVersionUID = 1L; + - private static final long serialVersionUID = 1L; - /** - * Constructs a new WrapLayout with a left alignment and a - * default 5-unit horizontal and vertical gap. - */ - public WrapLayout() { - super(); + /** + * The flow layout manager allows a seperation of + * components with gaps. The horizontal gap will + * specify the space between components and between + * the components and the borders of the + * Container. + * + * @serial + * @see #getHgap() + * @see #setHgap(int) + */ + int hgap; + + /** + * The flow layout manager allows a seperation of + * components with gaps. The vertical gap will + * specify the space between rows and between the + * the rows and the borders of the Container. + * + * @serial + * @see #getHgap() + * @see #setHgap(int) + */ + int vgap; + + /** + * If true, components will be aligned on their baseline. + */ + private boolean alignOnBaseline; + + + + + + private final Set oppositeAlignedItems = new HashSet<>(); + + /** + * Constructs a new WrapLayout with a left alignment and a + * default 5-unit horizontal and vertical gap. + */ + public WrapLayout() { + super(); + } + + + public void setOppositeAligned(Collection rightAlignedComponents) { + synchronized (this.oppositeAlignedItems) { + this.oppositeAlignedItems.clear(); + this.oppositeAlignedItems.addAll(rightAlignedComponents); } + } - /** - * Constructs a new FlowLayout with the specified alignment - * and a default 5-unit horizontal and vertical gap. The value of the - * alignment argument must be one of WrapLayout, - * WrapLayout, or WrapLayout. - * - * @param align the alignment value - */ - public WrapLayout(int align) { - super(align); - } + public Set getOppositeAlignedItems() { + return oppositeAlignedItems; + } + + + /** + * Gets the horizontal gap between components + * and between the components and the borders + * of the Container + * + * @return the horizontal gap between components + * and between the components and the borders + * of the Container + * @see java.awt.FlowLayout#setHgap + * @since JDK1.1 + */ + public int getHgap() { + return hgap; + } - /** - * Creates a new flow layout manager with the indicated alignment and - * the indicated horizontal and vertical gaps. - *

- * The value of the alignment argument must be one of - * WrapLayout, WrapLayout, or - * WrapLayout. - * - * @param align the alignment value - * @param hgap the horizontal gap between components - * @param vgap the vertical gap between components - */ - public WrapLayout(int align, int hgap, int vgap) { - super(align, hgap, vgap); - } + /** + * Sets the horizontal gap between components and + * between the components and the borders of the + * Container. + * + * @param hgap the horizontal gap between components + * and between the components and the borders + * of the Container + * @see java.awt.FlowLayout#getHgap + * @since JDK1.1 + */ + public void setHgap(int hgap) { + this.hgap = hgap; + } - /** - * Returns the preferred dimensions for this layout given the - * visible components in the specified target container. - * - * @param target the component which needs to be laid out - * - * @return the preferred dimensions to lay out the subcomponents of the - * specified container - */ - @Override - public Dimension preferredLayoutSize(Container target) { - return layoutSize(target, true); - } + /** + * Gets the vertical gap between components and + * between the components and the borders of the + * Container. + * + * @return the vertical gap between components + * and between the components and the borders + * of the Container + * @see java.awt.FlowLayout#setVgap + * @since JDK1.1 + */ + public int getVgap() { + return vgap; + } - /** - * Returns the minimum dimensions needed to layout the visible - * components contained in the specified target container. - * - * @param target the component which needs to be laid out - * - * @return the minimum dimensions to lay out the subcomponents of the - * specified container - */ - @Override - public Dimension minimumLayoutSize(Container target) { - Dimension minimum = layoutSize(target, false); - minimum.width -= (getHgap() + 1); - return minimum; - } + /** + * Sets the vertical gap between components and between + * the components and the borders of the Container. + * + * @param vgap the vertical gap between components + * and between the components and the borders + * of the Container + * @see java.awt.FlowLayout#getVgap + * @since JDK1.1 + */ + public void setVgap(int vgap) { + this.vgap = vgap; + } - /** - * Returns the minimum or preferred dimension needed to layout the - * target container. - * - * @param target target to get layout size for - * @param preferred should preferred size be calculated - * - * @return the dimension to layout the target container - */ - private Dimension layoutSize(Container target, boolean preferred) { - synchronized (target.getTreeLock()) { - // Each row must fit with the width allocated to the containter. - // When the container width = 0, the preferred width of the container - // has not yet been calculated so lets ask for the maximum. + /** + * Sets whether or not components should be vertically aligned along their + * baseline. Components that do not have a baseline will be centered. + * The default is false. + * + * @param alignOnBaseline whether or not components should be + * vertically aligned on their baseline + * @since 1.6 + */ + public void setAlignOnBaseline(boolean alignOnBaseline) { + this.alignOnBaseline = alignOnBaseline; + } - int targetWidth = target.getSize().width; - Container container = target; + /** + * Returns true if components are to be vertically aligned along + * their baseline. The default is false. + * + * @return true if components are to be vertically aligned along + * their baseline + * @since 1.6 + */ + public boolean getAlignOnBaseline() { + return alignOnBaseline; + } - while (container.getSize().width == 0 && container.getParent() != null) { - container = container.getParent(); - } + /** + * Adds the specified component to the layout. + * Not used by this class. + * @param name the name of the component + * @param comp the component to be added + */ + @Override + public void addLayoutComponent(String name, Component comp) { + } - targetWidth = container.getSize().width; + /** + * Removes the specified component from the layout. + * Not used by this class. + * @param comp the component to remove + * @see java.awt.Container#removeAll + */ + @Override + public void removeLayoutComponent(Component comp) { + } + - if (targetWidth == 0) { - targetWidth = Integer.MAX_VALUE; - } + + private int getComponentY(int rowY, boolean alignBaseline, int rowHeight, int itemHeight) { + return alignBaseline ? + rowY + rowHeight - itemHeight : + rowY; + } + + private int getComponentX(int leftX, int rightX, boolean ltr, int xPos, int componentWidth) { + return ltr ? leftX + xPos : rightX - xPos - componentWidth; + } + + private int setComponentDims(Component comp, boolean alignBaseline, boolean ltr, int rowY, int rowHeight, int leftX, int rightX, int xPos) { + Dimension d = comp.getPreferredSize(); + comp.setSize(d); + + int x = getComponentX(leftX, rightX, ltr, xPos, d.width); + int y = getComponentY(rowY, alignBaseline, rowHeight, d.height); + comp.setLocation(x, y); + + return d.width; + } + + + /** + * Lays out the container. This method lets each + * visible component take its preferred size by reshaping the + * components in the target container in order to satisfy the alignment of + * this FlowLayout object. Taken from + * https://raw.githubusercontent.com/mynawang/Java8-Source-Code/master/src/main/jdk8/java/awt/FlowLayout.java. + * + * @param target the specified component being laid out + * + * @see Container + * @see java.awt.Container#doLayout + */ + @Override + public void layoutContainer(Container target) { + synchronized (target.getTreeLock()) { + synchronized (this.oppositeAlignedItems) { + ParentDimensions targetDims = getTargetDimensions(target); + List components = Arrays.asList(target.getComponents()); + List rows = getAllRows(components, true, targetDims.innerWidth); - int hgap = getHgap(); - int vgap = getVgap(); - Insets insets = target.getInsets(); - int horizontalInsetsAndGap = insets.left + insets.right + (hgap * 2); - int maxWidth = targetWidth - horizontalInsetsAndGap; - - // Fit components into the allowed width - Dimension dim = new Dimension(0, 0); - int rowWidth = 0; - int rowHeight = 0; - - int nmembers = target.getComponentCount(); - - for (int i = 0; i < nmembers; i++) { - Component m = target.getComponent(i); - - if (m.isVisible()) { - Dimension d = preferred ? m.getPreferredSize() : m.getMinimumSize(); - - // Can't add the component to current row. Start a new row. - if (rowWidth + d.width > maxWidth) { - addRow(dim, rowWidth, rowHeight); - rowWidth = 0; - rowHeight = 0; - } - - // Add a horizontal gap for all components after the first - if (rowWidth != 0) { - rowWidth += hgap; - } - - rowWidth += d.width; - rowHeight = Math.max(rowHeight, d.height); + boolean ltr = target.getComponentOrientation().isLeftToRight(); + boolean useBaseline = getAlignOnBaseline(); + + int rowY = targetDims.insets.top + getVgap(); + int leftX = targetDims.insets.left + getHgap(); + int rightX = targetDims.outerWidth - targetDims.insets.right - getHgap(); + + for (Row row : rows) { + int rowHeight = row.height; + + int curX = 0; + if (row.components != null) { + for (Component origComp : row.components) + curX += setComponentDims(origComp, useBaseline, ltr, rowY, rowHeight, leftX, rightX, curX) + getHgap(); } + + if (row.oppositeAligned != null) { + curX = 0; + // reverse opposite aligned for layout purposes since flipping ltr + Collections.reverse(row.oppositeAligned); + for (Component oppAlignedComp : row.oppositeAligned) + curX += setComponentDims(oppAlignedComp, useBaseline, !ltr, rowY, rowHeight, leftX, rightX, curX) + getHgap(); + } + + rowY += rowHeight + getVgap(); + } + } + } + } + + /** + * Returns the preferred dimensions for this layout given the + * visible components in the specified target container. + * + * @param target the component which needs to be laid out + * + * @return the preferred dimensions to lay out the subcomponents of the + * specified container + */ + @Override + public Dimension preferredLayoutSize(Container target) { + return layoutSize(target, true); + } + + /** + * Returns the minimum dimensions needed to layout the visible + * components contained in the specified target container. + * + * @param target the component which needs to be laid out + * + * @return the minimum dimensions to lay out the subcomponents of the + * specified container + */ + @Override + public Dimension minimumLayoutSize(Container target) { + Dimension minimum = layoutSize(target, false); + minimum.width -= (getHgap() + 1); + return minimum; + } + + private static class ParentDimensions { + + final int outerWidth; + final int innerWidth; + final Insets insets; + + ParentDimensions(int outerWidth, int innerWidth, Insets insets) { + this.outerWidth = outerWidth; + this.innerWidth = innerWidth; + this.insets = insets; + } + } + + private ParentDimensions getTargetDimensions(Container target) { + // Each row must fit with the width allocated to the containter. + // When the container width = 0, the preferred width of the container + // has not yet been calculated so lets ask for the maximum. + + int targetWidth = target.getSize().width; + Container container = target; + + while (container.getSize().width == 0 && container.getParent() != null) { + container = container.getParent(); + } + + targetWidth = container.getSize().width; + + if (targetWidth == 0) { + targetWidth = Integer.MAX_VALUE; + } + + int hgap = getHgap(); + + Insets insets = target.getInsets(); + int horizontalInsetsAndGap = insets.left + insets.right + (hgap * 2); + int maxWidth = targetWidth - horizontalInsetsAndGap; + + return new ParentDimensions(targetWidth, maxWidth, insets); + } + + /** + * Returns the minimum or preferred dimension needed to layout the target + * container. + * + * @param target target to get layout size for + * @param preferred should preferred size be calculated + * + * @return the dimension to layout the target container + */ + private Dimension layoutSize(Container target, boolean preferred) { + synchronized (target.getTreeLock()) { + synchronized (this.oppositeAlignedItems) { + ParentDimensions targetDims = getTargetDimensions(target); + List components = Arrays.asList(target.getComponents()); + List rows = getAllRows(components, preferred, targetDims.innerWidth); + + Integer containerHeight = rows.stream().map((r) -> r.height).reduce(0, Integer::sum); + // add in vertical gap between rows + if (rows.size() > 1) { + containerHeight += (rows.size() - 1) * getVgap(); } - addRow(dim, rowWidth, rowHeight); + containerHeight += targetDims.insets.top + targetDims.insets.bottom; - dim.width += horizontalInsetsAndGap; - dim.height += insets.top + insets.bottom + vgap * 2; + Integer containerWidth = rows.stream().map((r) -> r.width).reduce(0, Math::max); + containerWidth += targetDims.insets.left + targetDims.insets.right + (getHgap() * 2); // When using a scroll pane or the DecoratedLookAndFeel we need to // make sure the preferred size is less than the size of the @@ -179,28 +384,112 @@ class WrapLayout extends FlowLayout { Container scrollPane = SwingUtilities.getAncestorOfClass(JScrollPane.class, target); if (scrollPane != null && target.isValid()) { - dim.width -= (hgap + 1); + containerWidth -= (getHgap() + 1); } - return dim; + return new Dimension(containerWidth, containerHeight); + } + } + } + + private class Row { + + final List components; + final List oppositeAligned; + final int height; + final int width; + + public Row(List components, List oppositeAligned, int height, int width) { + this.components = components; + this.oppositeAligned = oppositeAligned; + this.height = height; + this.width = width; + } + } + + private List getAllRows(List components, boolean preferred, int maxWidth) { + List originalComp + = components + .stream() + .filter((comp) -> !this.oppositeAlignedItems.contains(comp)) + .collect(Collectors.toList()); + + List originalRowSet = getRowSet(originalComp, preferred, maxWidth); + + List oppositeAlignedComp + = components + .stream() + .filter((comp) -> this.oppositeAlignedItems.contains(comp)) + .collect(Collectors.toList()); + + // go in reverse order and then revert so we can use same getRowSet method + Collections.reverse(oppositeAlignedComp); + List oppositeRowSet = getRowSet(oppositeAlignedComp, preferred, maxWidth) + .stream() + .map((Row row) -> { + Collections.reverse(row.components); + return new Row(null, row.components, row.height, row.width); + }) + .collect(Collectors.toList()); + Collections.reverse(oppositeRowSet); + + List toReturn = new ArrayList<>(); + + if (originalRowSet.size() > 0 && oppositeRowSet.size() > 0) { + Row lastOrig = originalRowSet.get(originalRowSet.size() - 1); + Row firstOpp = oppositeRowSet.get(0); + + int proposedRowWidth = lastOrig.width + firstOpp.width + getHgap(); + if (proposedRowWidth <= maxWidth) { + Row middleRow = new Row(lastOrig.components, firstOpp.oppositeAligned, + Math.max(lastOrig.height, firstOpp.height), proposedRowWidth); + + toReturn.addAll(originalRowSet.subList(0, originalRowSet.size() - 1)); + toReturn.add(middleRow); + toReturn.addAll(oppositeRowSet.subList(1, oppositeRowSet.size())); + return toReturn; } } - /* - * A new row has been completed. Use the dimensions of this row to - * update the preferred size for the container. - * - * @param dim update the width and height when appropriate @param - * rowWidth the width of the row to add @param rowHeight the height of - * the row to add - */ - private void addRow(Dimension dim, int rowWidth, int rowHeight) { - dim.width = Math.max(dim.width, rowWidth); + toReturn.addAll(originalRowSet); + toReturn.addAll(oppositeRowSet); + return toReturn; + } - if (dim.height > 0) { - dim.height += getVgap(); + private List getRowSet(List components, boolean preferred, int maxWidth) { + List rows = new ArrayList<>(); + + List rowComponents = new ArrayList<>(); + int rowWidth = 0; + int rowHeight = 0; + + for (Component m : components) { + if (m.isVisible()) { + Dimension d = preferred ? m.getPreferredSize() : m.getMinimumSize(); + + // Can't add the component to current row. Start a new row. + if (rowWidth + d.width > maxWidth) { + rows.add(new Row(rowComponents, null, rowHeight, rowWidth)); + rowComponents = new ArrayList<>(); + rowWidth = 0; + rowHeight = 0; + } + + // Add a horizontal gap for all components after the first + if (rowWidth != 0) { + rowWidth += getHgap(); + } + + rowComponents.add(m); + rowWidth += d.width; + rowHeight = Math.max(rowHeight, d.height); } - - dim.height += rowHeight; } - } \ No newline at end of file + + if (rowComponents.size() > 0) { + rows.add(new Row(rowComponents, null, rowHeight, rowWidth)); + } + + return rows; + } +} From 3fdd5cd5c185e15396583c0db587cd337d085108 Mon Sep 17 00:00:00 2001 From: Greg DiCristofaro Date: Wed, 1 Apr 2020 11:07:05 -0400 Subject: [PATCH 011/137] updates to central repo db manager --- .../datamodel/CentralRepoDbManager.java | 75 ++++++++++++------- .../optionspanel/EamDbSettingsDialog.java | 12 +-- .../optionspanel/GlobalSettingsPanel.form | 14 ++-- .../optionspanel/GlobalSettingsPanel.java | 44 ++++++----- 4 files changed, 81 insertions(+), 64 deletions(-) diff --git a/Core/src/org/sleuthkit/autopsy/centralrepository/datamodel/CentralRepoDbManager.java b/Core/src/org/sleuthkit/autopsy/centralrepository/datamodel/CentralRepoDbManager.java index 374fd35048..d551f88d46 100755 --- a/Core/src/org/sleuthkit/autopsy/centralrepository/datamodel/CentralRepoDbManager.java +++ b/Core/src/org/sleuthkit/autopsy/centralrepository/datamodel/CentralRepoDbManager.java @@ -50,15 +50,14 @@ public class CentralRepoDbManager { } - // The currently saved db choice. - private volatile CentralRepoDbChoice savedChoice = null; private final PropertyChangeSupport propertyChangeSupport = new PropertyChangeSupport(CentralRepoDbManager.class); private final Object dbChoiceLock = new Object(); + // The currently saved db choice. + private volatile CentralRepoDbChoice savedChoice = null; + // The currently selected (but not necessarily saved) central repo db choice. private CentralRepoDbChoice selectedDbChoice; - - private boolean configurationChanged = false; private DatabaseTestResult testingStatus; private final PostgresCentralRepoSettings dbSettingsPostgres; @@ -328,30 +327,28 @@ public class CentralRepoDbManager { saveNewCentralRepo(); } - /** - * This method returns if changes to the central repository configuration were - * successfully applied. - * - * @return Returns true if the database configuration was successfully changed false - * if it was not. - */ - public boolean wasConfigurationChanged() { - return configurationChanged; + private CentralRepoDbConnectivityManager getSelectedSettings() throws CentralRepoException { + return getSettings(getSelectedDbChoice()); } - private CentralRepoDbConnectivityManager getSelectedSettings() throws CentralRepoException { - if (selectedDbChoice == CentralRepoDbChoice.POSTGRESQL_MULTIUSER) + private CentralRepoDbConnectivityManager getSavedSettings() throws CentralRepoException { + return getSettings(getSavedDbChoice()); + } + + private CentralRepoDbConnectivityManager getSettings(CentralRepoDbChoice dbChoice) throws CentralRepoException { + if (dbChoice == CentralRepoDbChoice.POSTGRESQL_MULTIUSER) return dbSettingsMultiUser; - if (selectedDbChoice == CentralRepoDbChoice.POSTGRESQL_CUSTOM) + if (dbChoice == CentralRepoDbChoice.POSTGRESQL_CUSTOM) return dbSettingsPostgres; - if (selectedDbChoice == CentralRepoDbChoice.SQLITE) + if (dbChoice == CentralRepoDbChoice.SQLITE) return dbSettingsSqlite; - if (selectedDbChoice == CentralRepoDbChoice.DISABLED) + if (dbChoice == CentralRepoDbChoice.DISABLED) return null; - throw new CentralRepoException("Unknown database type: " + selectedDbChoice); + throw new CentralRepoException("Unknown database type: " + dbChoice); } - + + private RdbmsCentralRepoFactory getDbFactory() throws CentralRepoException { if (selectedDbChoice == CentralRepoDbChoice.POSTGRESQL_MULTIUSER) return new RdbmsCentralRepoFactory(CentralRepoPlatforms.POSTGRESQL, dbSettingsMultiUser); @@ -408,7 +405,7 @@ public class CentralRepoDbManager { } /** - * This method saves a new central repository based on current settings. + * This method saves a new central repository based on current selected settings. */ @NbBundle.Messages({"CentralRepoDbManager.connectionErrorMsg.text=Failed to connect to central repository database."}) public void saveNewCentralRepo() throws CentralRepoException { @@ -447,7 +444,6 @@ public class CentralRepoDbManager { try { logger.info("Saving central repo settings for db: " + selectedDbSettings); CentralRepository.getInstance().updateSettings(); - configurationChanged = true; } catch (CentralRepoException ex) { logger.log(Level.SEVERE, Bundle.CentralRepoDbManager_connectionErrorMsg_text(), ex); //NON-NLS return; @@ -479,6 +475,14 @@ public class CentralRepoDbManager { public void clearStatus() { testingStatus = DatabaseTestResult.UNTESTED; } + + /** + * Resets selected db choice to currently saved choice. + */ + public void resetSelectedDbChoice() { + setSelctedDbChoice(getSavedDbChoice()); + } + /** * This method sets the currently selected database choice and sets the testing status to untested. @@ -518,19 +522,38 @@ public class CentralRepoDbManager { } /** - * This method tests the current database settings to see if a valid connection can be made. + * This method tests the current selected (not necessarily saved) database settings to see if a valid connection can be made. * @return The result of testing the connection. */ public DatabaseTestResult testStatus() { + CentralRepoDbConnectivityManager manager = null; try { - CentralRepoDbConnectivityManager manager = getSelectedSettings(); - if (manager != null) - testingStatus = manager.testStatus(); + manager = getSelectedSettings(); } catch (CentralRepoException e) { logger.log(Level.WARNING, "unable to test status of db connection in central repo", e); } + return testStatus(manager); + } + + + public DatabaseTestResult testSavedStatus() { + CentralRepoDbConnectivityManager manager = null; + try { + manager = getSavedSettings(); + } + catch (CentralRepoException e) { + logger.log(Level.WARNING, "unable to test status of db connection in central repo", e); + } + + return testStatus(manager); + } + + private DatabaseTestResult testStatus(CentralRepoDbConnectivityManager manager) { + if (manager != null) + testingStatus = manager.testStatus(); + return testingStatus; } } diff --git a/Core/src/org/sleuthkit/autopsy/centralrepository/optionspanel/EamDbSettingsDialog.java b/Core/src/org/sleuthkit/autopsy/centralrepository/optionspanel/EamDbSettingsDialog.java index 0cc58d94bd..d6d620bb6d 100644 --- a/Core/src/org/sleuthkit/autopsy/centralrepository/optionspanel/EamDbSettingsDialog.java +++ b/Core/src/org/sleuthkit/autopsy/centralrepository/optionspanel/EamDbSettingsDialog.java @@ -586,19 +586,9 @@ public class EamDbSettingsDialog extends JDialog { parent.setCursor(Cursor.getPredefinedCursor(Cursor.DEFAULT_CURSOR)); return true; } - - /** - * This method returns if changes to the central repository configuration were - * successfully applied. - * - * @return True if the database configuration was successfully changed; false - * if it was not. - */ - public boolean wasConfigurationChanged() { - return manager.wasConfigurationChanged(); - } private void bnCancelActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_bnCancelActionPerformed + manager.resetSelectedDbChoice(); dispose(); }//GEN-LAST:event_bnCancelActionPerformed diff --git a/Core/src/org/sleuthkit/autopsy/centralrepository/optionspanel/GlobalSettingsPanel.form b/Core/src/org/sleuthkit/autopsy/centralrepository/optionspanel/GlobalSettingsPanel.form index 99e350375f..1dfe191420 100644 --- a/Core/src/org/sleuthkit/autopsy/centralrepository/optionspanel/GlobalSettingsPanel.form +++ b/Core/src/org/sleuthkit/autopsy/centralrepository/optionspanel/GlobalSettingsPanel.form @@ -67,7 +67,7 @@ - + @@ -146,18 +146,18 @@ - + - + - - - + + + @@ -185,7 +185,7 @@ - + diff --git a/Core/src/org/sleuthkit/autopsy/centralrepository/optionspanel/GlobalSettingsPanel.java b/Core/src/org/sleuthkit/autopsy/centralrepository/optionspanel/GlobalSettingsPanel.java index 6cca8f73b7..1fbe5e0b31 100644 --- a/Core/src/org/sleuthkit/autopsy/centralrepository/optionspanel/GlobalSettingsPanel.java +++ b/Core/src/org/sleuthkit/autopsy/centralrepository/optionspanel/GlobalSettingsPanel.java @@ -74,7 +74,14 @@ public final class GlobalSettingsPanel extends IngestModuleGlobalSettingsPanel i manager = CentralRepoDbManager.getInstance(); // listen for change events in currently saved choice - manager.addPropertyChangeListener((PropertyChangeEvent evt) -> ingestStateUpdated(Case.isCaseOpen())); + manager.addPropertyChangeListener((PropertyChangeEvent evt) -> { + //ingestStateUpdated(Case.isCaseOpen()); + + load(); // reload db settings content and update buttons + firePropertyChange(OptionsPanelController.PROP_CHANGED, null, null); + clearStatus(); + }); + initComponents(); customizeComponents(); addIngestJobEventsListener(); @@ -104,11 +111,10 @@ public final class GlobalSettingsPanel extends IngestModuleGlobalSettingsPanel i * * @return True if there was a change. */ - private static boolean invokeCrChoice(Component parent, CentralRepoDbChoice initialSelection) { + private static void invokeCrChoice(Component parent, CentralRepoDbChoice initialSelection) { EamDbSettingsDialog dialog = (initialSelection != null) - ? new EamDbSettingsDialog(initialSelection) - : new EamDbSettingsDialog(); - return dialog.wasConfigurationChanged(); + ? new EamDbSettingsDialog(initialSelection) + : new EamDbSettingsDialog(); } /** @@ -257,9 +263,11 @@ public final class GlobalSettingsPanel extends IngestModuleGlobalSettingsPanel i } private boolean setStatus(ImageIcon icon, String text) { - testStatusLabel.setIcon(icon); - testStatusLabel.setText(text); - return true; + synchronized (testStatusLabel) { + testStatusLabel.setIcon(icon); + testStatusLabel.setText(text); + return true; + } } /** @@ -358,16 +366,16 @@ public final class GlobalSettingsPanel extends IngestModuleGlobalSettingsPanel i .addComponent(lbDbLocationLabel)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) .addGroup(pnDatabaseConfigurationLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING) - .addComponent(lbDbNameValue, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, 936, Short.MAX_VALUE) + .addComponent(lbDbNameValue, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent(lbDbPlatformValue, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent(lbDbLocationValue, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))) .addGroup(pnDatabaseConfigurationLayout.createSequentialGroup() .addComponent(bnDbConfigure) - .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) + .addGap(18, 18, 18) .addComponent(bnTestConfigure) - .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) - .addComponent(testStatusLabel, javax.swing.GroupLayout.DEFAULT_SIZE, 836, Short.MAX_VALUE) - .addContainerGap()))) + .addGap(18, 18, 18) + .addComponent(testStatusLabel, javax.swing.GroupLayout.PREFERRED_SIZE, 805, javax.swing.GroupLayout.PREFERRED_SIZE) + .addContainerGap(19, Short.MAX_VALUE)))) ); pnDatabaseConfigurationLayout.setVerticalGroup( pnDatabaseConfigurationLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) @@ -388,7 +396,7 @@ public final class GlobalSettingsPanel extends IngestModuleGlobalSettingsPanel i .addGroup(pnDatabaseConfigurationLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(bnDbConfigure) .addComponent(bnTestConfigure) - .addComponent(testStatusLabel)) + .addComponent(testStatusLabel, javax.swing.GroupLayout.PREFERRED_SIZE, 32, javax.swing.GroupLayout.PREFERRED_SIZE)) .addGap(8, 8, 8)) ); @@ -555,7 +563,7 @@ public final class GlobalSettingsPanel extends IngestModuleGlobalSettingsPanel i .addGroup(jPanel1Layout.createSequentialGroup() .addComponent(cbUseCentralRepo, javax.swing.GroupLayout.PREFERRED_SIZE, 162, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) - .addComponent(ingestRunningWarningLabel, javax.swing.GroupLayout.DEFAULT_SIZE, 844, Short.MAX_VALUE)) + .addComponent(ingestRunningWarningLabel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) .addGroup(jPanel1Layout.createSequentialGroup() .addContainerGap() .addComponent(tbOops, javax.swing.GroupLayout.PREFERRED_SIZE, 974, javax.swing.GroupLayout.PREFERRED_SIZE))) @@ -606,11 +614,7 @@ public final class GlobalSettingsPanel extends IngestModuleGlobalSettingsPanel i private void bnDbConfigureActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_bnDbConfigureActionPerformed store(); - boolean changed = invokeCrChoice(this, null); - if (changed) { - load(); // reload db settings content and update buttons - firePropertyChange(OptionsPanelController.PROP_CHANGED, null, null); - } + invokeCrChoice(this, null); }//GEN-LAST:event_bnDbConfigureActionPerformed private void manageOrganizationButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_manageOrganizationButtonActionPerformed From 56f3546baedce6e82bd8eea988a435759c83d1ab Mon Sep 17 00:00:00 2001 From: Greg DiCristofaro Date: Wed, 1 Apr 2020 11:37:52 -0400 Subject: [PATCH 012/137] updates to spacing --- .../datamodel/CentralRepoDbManager.java | 192 ++++++++++-------- .../CentralRepoDbUpgrader13To14.java | 2 +- .../datamodel/CentralRepository.java | 4 +- .../datamodel/CentralRepositoryService.java | 2 +- .../PostgresCentralRepoSettings.java | 2 +- .../datamodel/RdbmsCentralRepo.java | 2 +- .../eventlisteners/Installer.java | 3 +- .../ingestmodule/CentralRepoIngestModule.java | 2 +- .../optionspanel/EamDbSettingsDialog.java | 15 +- .../optionspanel/GlobalSettingsPanel.form | 6 + .../optionspanel/GlobalSettingsPanel.java | 33 +-- 11 files changed, 148 insertions(+), 115 deletions(-) diff --git a/Core/src/org/sleuthkit/autopsy/centralrepository/datamodel/CentralRepoDbManager.java b/Core/src/org/sleuthkit/autopsy/centralrepository/datamodel/CentralRepoDbManager.java index d551f88d46..3fab7af47f 100755 --- a/Core/src/org/sleuthkit/autopsy/centralrepository/datamodel/CentralRepoDbManager.java +++ b/Core/src/org/sleuthkit/autopsy/centralrepository/datamodel/CentralRepoDbManager.java @@ -39,40 +39,25 @@ public class CentralRepoDbManager { private static final String CENTRAL_REPO_DB_NAME = "central_repository"; private static final String CENTRAL_REPOSITORY_SETTINGS_KEY = "CentralRepository"; private static final String DB_SELECTED_PLATFORM_KEY = "db.selectedPlatform"; + private static final String DISABLED_DUE_TO_FAILURE_KEY = "disabledDueToFailure"; + + private static volatile CentralRepoDbChoice savedChoice = null; - private static CentralRepoDbManager instance = null; + private static final PropertyChangeSupport propertyChangeSupport = new PropertyChangeSupport(CentralRepoDbManager.class); - public static CentralRepoDbManager getInstance() { - if (instance == null) - instance = new CentralRepoDbManager(); - - return instance; + private static final Object dbChoiceLock = new Object(); + private static final Object disabledDueToFailureLock = new Object(); + + + + /** + * This saves the currently selected database choice and clears any disabledDueToFailure flag. + * @param choice The choice to save. + * @return The newly saved choice. + */ + public static CentralRepoDbChoice saveDbChoice(CentralRepoDbChoice choice) { + return saveDbChoice(choice, true); } - - - private final PropertyChangeSupport propertyChangeSupport = new PropertyChangeSupport(CentralRepoDbManager.class); - private final Object dbChoiceLock = new Object(); - - // The currently saved db choice. - private volatile CentralRepoDbChoice savedChoice = null; - - // The currently selected (but not necessarily saved) central repo db choice. - private CentralRepoDbChoice selectedDbChoice; - private DatabaseTestResult testingStatus; - - private final PostgresCentralRepoSettings dbSettingsPostgres; - private final PostgresCentralRepoSettings dbSettingsMultiUser; - private final SqliteCentralRepoSettings dbSettingsSqlite; - - private CentralRepoDbManager() { - selectedDbChoice = getSavedDbChoice(); - dbSettingsPostgres = new PostgresCentralRepoSettings(PostgresSettingsLoader.CUSTOM_SETTINGS_LOADER); - dbSettingsMultiUser = new PostgresCentralRepoSettings(PostgresSettingsLoader.MULTIUSER_SETTINGS_LOADER); - dbSettingsSqlite = new SqliteCentralRepoSettings(); - } - - - /** * This saves the currently selected database choice. @@ -80,8 +65,12 @@ public class CentralRepoDbManager { * @param clearDisabledDueToError Whether or not to clear the 'disabledDueToFailure' settings key. * @return The newly saved choice. */ - public CentralRepoDbChoice saveDbChoice(CentralRepoDbChoice choice) { + public static CentralRepoDbChoice saveDbChoice(CentralRepoDbChoice choice, boolean clearDisabledDueToError) { synchronized(dbChoiceLock) { + // clear disabling due to a failure + if (clearDisabledDueToError) + setDisabledDueToFailure(false); + // change the settings CentralRepoDbChoice newChoice = (choice == null) ? CentralRepoDbChoice.DISABLED : choice; CentralRepoDbChoice oldChoice = savedChoice; @@ -97,7 +86,7 @@ public class CentralRepoDbManager { * This method indicates whether or not 'PostgreSQL using multi-user settings' is a valid option. * @return True if 'PostgreSQL using multi-user settings' is valid. */ - public boolean isPostgresMultiuserAllowed() { + public static boolean isPostgresMultiuserAllowed() { // if multi user mode is not enabled, then this cannot be used if (!UserPreferences.getIsMultiUserModeEnabled()) return false; @@ -113,7 +102,7 @@ public class CentralRepoDbManager { /** * This method loads the selectedPlatform boolean from the config file if it is set. */ - public CentralRepoDbChoice getSavedDbChoice() { + public static CentralRepoDbChoice getSavedDbChoice() { synchronized(dbChoiceLock) { if (savedChoice == null) { String selectedPlatformString = ModuleSettings.getConfigSetting(CENTRAL_REPOSITORY_SETTINGS_KEY, DB_SELECTED_PLATFORM_KEY); // NON-NLS @@ -124,14 +113,48 @@ public class CentralRepoDbManager { } } + /** + * This method disables the central repository and indicates through a flag that this was due to a failure during database setup. + * This is used when re-enabling multi-user as a flag to determine whether or not CR should be re-enabled. + */ + public static void disableDueToFailure() { + CentralRepoDbUtil.setUseCentralRepo(false); + setDisabledDueToFailure(true); + } + /** + * This method sets whether or not the repository has been disabled due to a database setup issue; + * This is used when re-enabling multi-user as a flag to determine whether or not CR should be re-enabled. + * + * @param disabledDueToFailure Whether or not the repository has been disabled due to a database setup issue. + */ + private static void setDisabledDueToFailure(boolean disabledDueToFailure) { + synchronized(disabledDueToFailureLock) { + boolean oldValue = isDisabledDueToFailure(); + ModuleSettings.setConfigSetting(CENTRAL_REPOSITORY_SETTINGS_KEY, DISABLED_DUE_TO_FAILURE_KEY, Boolean.toString(disabledDueToFailure)); + propertyChangeSupport.firePropertyChange("disabledDueToFailure", oldValue, disabledDueToFailure); + } + } + + /** + * This method retrieves setting whether or not the repository has been disabled due to a database setup issue; + * this is used when re-enabling multi-user as a flag to determine whether or not CR should be re-enabled. + * + * @return Whether or not the repository has been disabled due to a database setup issue. + */ + public static boolean isDisabledDueToFailure() { + synchronized(disabledDueToFailureLock) { + return Boolean.toString(true).equals(ModuleSettings.getConfigSetting(CENTRAL_REPOSITORY_SETTINGS_KEY, DISABLED_DUE_TO_FAILURE_KEY)); + } + } + /** * This method adds a property change listener. * NOTE: currently only listening for changes in currently saved db choice and disabling due to failure. * * @param listener The listener for the event. */ - public void addPropertyChangeListener(PropertyChangeListener listener) { + public static void addPropertyChangeListener(PropertyChangeListener listener) { propertyChangeSupport.addPropertyChangeListener(listener); } @@ -139,13 +162,13 @@ public class CentralRepoDbManager { * This method removes a propert change listener. * @param listener The listener to remove. */ - public void removePropertyChangeListener(PropertyChangeListener listener) { + public static void removePropertyChangeListener(PropertyChangeListener listener) { propertyChangeSupport.removePropertyChangeListener(listener); } - private CentralRepoDbChoice fromKey(String keyName) { + private static CentralRepoDbChoice fromKey(String keyName) { for (CentralRepoDbChoice dbChoice : CentralRepoDbChoice.values()) { if (dbChoice.getSettingKey().equalsIgnoreCase(keyName)) { return dbChoice; @@ -163,7 +186,7 @@ public class CentralRepoDbManager { * @return The CentralRepository object that will be used for connection. * @throws CentralRepoException */ - private CentralRepository obtainCentralRepository() throws CentralRepoException { + private static CentralRepository obtainCentralRepository() throws CentralRepoException { //get connection try { return CentralRepository.getInstance(); @@ -184,7 +207,7 @@ public class CentralRepoDbManager { * @return The lock if acquired. * @throws CentralRepoException */ - private CoordinationService.Lock obtainCentralRepoLock(CentralRepository db) throws CentralRepoException { + private static CoordinationService.Lock obtainCentralRepoLock(CentralRepository db) throws CentralRepoException { try { // This may return null if locking isn't supported, which is fine. It will // throw an exception if locking is supported but we can't get the lock @@ -208,7 +231,7 @@ public class CentralRepoDbManager { * @param lock The acquired lock. * @throws CentralRepoException */ - private void updatedDbSchema(CentralRepository db, CoordinationService.Lock lock) throws CentralRepoException { + private static void updatedDbSchema(CentralRepository db, CoordinationService.Lock lock) throws CentralRepoException { try { db.upgradeSchema(); } catch (CentralRepoException ex) { @@ -239,7 +262,7 @@ public class CentralRepoDbManager { * settings will be cleared. */ @NbBundle.Messages(value = {"EamDbUtil.centralRepoDisabled.message= The Central Repository has been disabled.", "EamDbUtil.centralRepoUpgradeFailed.message=Failed to upgrade Central Repository.", "EamDbUtil.centralRepoConnectionFailed.message=Unable to connect to Central Repository.", "EamDbUtil.exclusiveLockAquisitionFailure.message=Unable to acquire exclusive lock for Central Repository."}) - public void upgradeDatabase() throws CentralRepoException { + public static void upgradeDatabase() throws CentralRepoException { if (!CentralRepository.isEnabled()) { return; } @@ -256,7 +279,7 @@ public class CentralRepoDbManager { } } - private void onUpgradeError(String message, String desc, Exception innerException) throws CentralRepoException { + private static void onUpgradeError(String message, String desc, Exception innerException) throws CentralRepoException { // Disable the central repo and clear the current settings. try { if (null != CentralRepository.getInstance()) { @@ -265,7 +288,7 @@ public class CentralRepoDbManager { } catch (CentralRepoException ex2) { logger.log(Level.SEVERE, "Error shutting down central repo connection pool", ex2); } - saveDbChoice(CentralRepoDbChoice.DISABLED); + saveDbChoice(CentralRepoDbChoice.DISABLED, false); if (innerException == null) { throw new CentralRepoException(message, desc); } else { @@ -275,6 +298,21 @@ public class CentralRepoDbManager { + private DatabaseTestResult testingStatus; + private CentralRepoDbChoice selectedDbChoice; + + private final PostgresCentralRepoSettings dbSettingsPostgres; + private final PostgresCentralRepoSettings dbSettingsMultiUser; + private final SqliteCentralRepoSettings dbSettingsSqlite; + + private boolean configurationChanged = false; + + public CentralRepoDbManager() { + selectedDbChoice = getSavedDbChoice(); + dbSettingsPostgres = new PostgresCentralRepoSettings(PostgresSettingsLoader.CUSTOM_SETTINGS_LOADER); + dbSettingsMultiUser = new PostgresCentralRepoSettings(PostgresSettingsLoader.MULTIUSER_SETTINGS_LOADER); + dbSettingsSqlite = new SqliteCentralRepoSettings(); + } /** @@ -327,28 +365,30 @@ public class CentralRepoDbManager { saveNewCentralRepo(); } - private CentralRepoDbConnectivityManager getSelectedSettings() throws CentralRepoException { - return getSettings(getSelectedDbChoice()); + /** + * This method returns if changes to the central repository configuration were + * successfully applied. + * + * @return Returns true if the database configuration was successfully changed false + * if it was not. + */ + public boolean wasConfigurationChanged() { + return configurationChanged; } - private CentralRepoDbConnectivityManager getSavedSettings() throws CentralRepoException { - return getSettings(getSavedDbChoice()); - } - - private CentralRepoDbConnectivityManager getSettings(CentralRepoDbChoice dbChoice) throws CentralRepoException { - if (dbChoice == CentralRepoDbChoice.POSTGRESQL_MULTIUSER) + private CentralRepoDbConnectivityManager getSelectedSettings() throws CentralRepoException { + if (selectedDbChoice == CentralRepoDbChoice.POSTGRESQL_MULTIUSER) return dbSettingsMultiUser; - if (dbChoice == CentralRepoDbChoice.POSTGRESQL_CUSTOM) + if (selectedDbChoice == CentralRepoDbChoice.POSTGRESQL_CUSTOM) return dbSettingsPostgres; - if (dbChoice == CentralRepoDbChoice.SQLITE) + if (selectedDbChoice == CentralRepoDbChoice.SQLITE) return dbSettingsSqlite; - if (dbChoice == CentralRepoDbChoice.DISABLED) + if (selectedDbChoice == CentralRepoDbChoice.DISABLED) return null; - throw new CentralRepoException("Unknown database type: " + dbChoice); + throw new CentralRepoException("Unknown database type: " + selectedDbChoice); } - - + private RdbmsCentralRepoFactory getDbFactory() throws CentralRepoException { if (selectedDbChoice == CentralRepoDbChoice.POSTGRESQL_MULTIUSER) return new RdbmsCentralRepoFactory(CentralRepoPlatforms.POSTGRESQL, dbSettingsMultiUser); @@ -405,7 +445,7 @@ public class CentralRepoDbManager { } /** - * This method saves a new central repository based on current selected settings. + * This method saves a new central repository based on current settings. */ @NbBundle.Messages({"CentralRepoDbManager.connectionErrorMsg.text=Failed to connect to central repository database."}) public void saveNewCentralRepo() throws CentralRepoException { @@ -444,6 +484,7 @@ public class CentralRepoDbManager { try { logger.info("Saving central repo settings for db: " + selectedDbSettings); CentralRepository.getInstance().updateSettings(); + configurationChanged = true; } catch (CentralRepoException ex) { logger.log(Level.SEVERE, Bundle.CentralRepoDbManager_connectionErrorMsg_text(), ex); //NON-NLS return; @@ -475,14 +516,6 @@ public class CentralRepoDbManager { public void clearStatus() { testingStatus = DatabaseTestResult.UNTESTED; } - - /** - * Resets selected db choice to currently saved choice. - */ - public void resetSelectedDbChoice() { - setSelctedDbChoice(getSavedDbChoice()); - } - /** * This method sets the currently selected database choice and sets the testing status to untested. @@ -522,38 +555,19 @@ public class CentralRepoDbManager { } /** - * This method tests the current selected (not necessarily saved) database settings to see if a valid connection can be made. + * This method tests the current database settings to see if a valid connection can be made. * @return The result of testing the connection. */ public DatabaseTestResult testStatus() { - CentralRepoDbConnectivityManager manager = null; try { - manager = getSelectedSettings(); + CentralRepoDbConnectivityManager manager = getSelectedSettings(); + if (manager != null) + testingStatus = manager.testStatus(); } catch (CentralRepoException e) { logger.log(Level.WARNING, "unable to test status of db connection in central repo", e); } - return testStatus(manager); - } - - - public DatabaseTestResult testSavedStatus() { - CentralRepoDbConnectivityManager manager = null; - try { - manager = getSavedSettings(); - } - catch (CentralRepoException e) { - logger.log(Level.WARNING, "unable to test status of db connection in central repo", e); - } - - return testStatus(manager); - } - - private DatabaseTestResult testStatus(CentralRepoDbConnectivityManager manager) { - if (manager != null) - testingStatus = manager.testStatus(); - return testingStatus; } } diff --git a/Core/src/org/sleuthkit/autopsy/centralrepository/datamodel/CentralRepoDbUpgrader13To14.java b/Core/src/org/sleuthkit/autopsy/centralrepository/datamodel/CentralRepoDbUpgrader13To14.java index 944703f532..0acfd34ea5 100644 --- a/Core/src/org/sleuthkit/autopsy/centralrepository/datamodel/CentralRepoDbUpgrader13To14.java +++ b/Core/src/org/sleuthkit/autopsy/centralrepository/datamodel/CentralRepoDbUpgrader13To14.java @@ -39,7 +39,7 @@ public class CentralRepoDbUpgrader13To14 implements CentralRepoDbUpgrader { try (Statement statement = connection.createStatement();) { - CentralRepoPlatforms selectedPlatform = CentralRepoDbManager.getInstance().getSavedDbChoice().getDbPlatform(); + CentralRepoPlatforms selectedPlatform = CentralRepoDbManager.getSavedDbChoice().getDbPlatform(); // Create account_types and accounts tables which are referred by X_instances tables statement.execute(RdbmsCentralRepoFactory.getCreateAccountTypesTableStatement(selectedPlatform)); diff --git a/Core/src/org/sleuthkit/autopsy/centralrepository/datamodel/CentralRepository.java b/Core/src/org/sleuthkit/autopsy/centralrepository/datamodel/CentralRepository.java index 5106f133b4..6a4a138cfb 100755 --- a/Core/src/org/sleuthkit/autopsy/centralrepository/datamodel/CentralRepository.java +++ b/Core/src/org/sleuthkit/autopsy/centralrepository/datamodel/CentralRepository.java @@ -42,7 +42,7 @@ public interface CentralRepository { CentralRepoPlatforms selectedPlatform = CentralRepoPlatforms.DISABLED; if (CentralRepoDbUtil.allowUseOfCentralRepository()) { - selectedPlatform = CentralRepoDbManager.getInstance().getSavedDbChoice().getDbPlatform(); + selectedPlatform = CentralRepoDbManager.getSavedDbChoice().getDbPlatform(); } switch (selectedPlatform) { case POSTGRESQL: @@ -93,7 +93,7 @@ public interface CentralRepository { */ static boolean isEnabled() { return CentralRepoDbUtil.allowUseOfCentralRepository() - && CentralRepoDbManager.getInstance().getSavedDbChoice() != CentralRepoDbChoice.DISABLED; + && CentralRepoDbManager.getSavedDbChoice() != CentralRepoDbChoice.DISABLED; } /** diff --git a/Core/src/org/sleuthkit/autopsy/centralrepository/datamodel/CentralRepositoryService.java b/Core/src/org/sleuthkit/autopsy/centralrepository/datamodel/CentralRepositoryService.java index 4a02c50569..8b442efc24 100644 --- a/Core/src/org/sleuthkit/autopsy/centralrepository/datamodel/CentralRepositoryService.java +++ b/Core/src/org/sleuthkit/autopsy/centralrepository/datamodel/CentralRepositoryService.java @@ -69,7 +69,7 @@ public class CentralRepositoryService implements AutopsyService { */ private void updateSchema() throws AutopsyServiceException { try { - CentralRepoDbManager.getInstance().upgradeDatabase(); + CentralRepoDbManager.upgradeDatabase(); } catch (CentralRepoException ex) { throw new AutopsyServiceException("Failed to update the Central Repository schema", ex); } diff --git a/Core/src/org/sleuthkit/autopsy/centralrepository/datamodel/PostgresCentralRepoSettings.java b/Core/src/org/sleuthkit/autopsy/centralrepository/datamodel/PostgresCentralRepoSettings.java index 68765cf259..165d4ca6e0 100644 --- a/Core/src/org/sleuthkit/autopsy/centralrepository/datamodel/PostgresCentralRepoSettings.java +++ b/Core/src/org/sleuthkit/autopsy/centralrepository/datamodel/PostgresCentralRepoSettings.java @@ -46,7 +46,7 @@ public final class PostgresCentralRepoSettings implements CentralRepoDbConnectiv private PostgresConnectionSettings connSettings; private static PostgresSettingsLoader getLoaderFromSaved() throws CentralRepoException { - CentralRepoDbChoice choice = CentralRepoDbManager.getInstance().getSavedDbChoice(); + CentralRepoDbChoice choice = CentralRepoDbManager.getSavedDbChoice(); if (choice == CentralRepoDbChoice.POSTGRESQL_CUSTOM) return PostgresSettingsLoader.CUSTOM_SETTINGS_LOADER; else if (choice == CentralRepoDbChoice.POSTGRESQL_MULTIUSER) diff --git a/Core/src/org/sleuthkit/autopsy/centralrepository/datamodel/RdbmsCentralRepo.java b/Core/src/org/sleuthkit/autopsy/centralrepository/datamodel/RdbmsCentralRepo.java index c0642bc59f..256e5407c9 100644 --- a/Core/src/org/sleuthkit/autopsy/centralrepository/datamodel/RdbmsCentralRepo.java +++ b/Core/src/org/sleuthkit/autopsy/centralrepository/datamodel/RdbmsCentralRepo.java @@ -3528,7 +3528,7 @@ abstract class RdbmsCentralRepo implements CentralRepository { conn = connect(false); conn.setAutoCommit(false); statement = conn.createStatement(); - selectedPlatform = CentralRepoDbManager.getInstance().getSavedDbChoice().getDbPlatform(); + selectedPlatform = CentralRepoDbManager.getSavedDbChoice().getDbPlatform(); int minorVersion = 0; String minorVersionStr = null; resultSet = statement.executeQuery("SELECT value FROM db_info WHERE name='" + RdbmsCentralRepo.SCHEMA_MINOR_VERSION_KEY + "'"); diff --git a/Core/src/org/sleuthkit/autopsy/centralrepository/eventlisteners/Installer.java b/Core/src/org/sleuthkit/autopsy/centralrepository/eventlisteners/Installer.java index ff64ae56f7..da58e8936b 100644 --- a/Core/src/org/sleuthkit/autopsy/centralrepository/eventlisteners/Installer.java +++ b/Core/src/org/sleuthkit/autopsy/centralrepository/eventlisteners/Installer.java @@ -181,7 +181,8 @@ public class Installer extends ModuleInstall { * repository. */ private void setupDefaultSqliteCentralRepo() throws CentralRepoException { - CentralRepoDbManager.getInstance().setupDefaultSqliteDb(); + CentralRepoDbManager manager = new CentralRepoDbManager(); + manager.setupDefaultSqliteDb(); } /** diff --git a/Core/src/org/sleuthkit/autopsy/centralrepository/ingestmodule/CentralRepoIngestModule.java b/Core/src/org/sleuthkit/autopsy/centralrepository/ingestmodule/CentralRepoIngestModule.java index db44477eb2..1f7472d330 100644 --- a/Core/src/org/sleuthkit/autopsy/centralrepository/ingestmodule/CentralRepoIngestModule.java +++ b/Core/src/org/sleuthkit/autopsy/centralrepository/ingestmodule/CentralRepoIngestModule.java @@ -275,7 +275,7 @@ final class CentralRepoIngestModule implements FileIngestModule { // Don't allow sqlite central repo databases to be used for multi user cases if ((autopsyCase.getCaseType() == Case.CaseType.MULTI_USER_CASE) - && (CentralRepoDbManager.getInstance().getSavedDbChoice().getDbPlatform() == CentralRepoPlatforms.SQLITE)) { + && (CentralRepoDbManager.getSavedDbChoice().getDbPlatform() == CentralRepoPlatforms.SQLITE)) { logger.log(Level.SEVERE, "Cannot run correlation engine on a multi-user case with a SQLite central repository."); throw new IngestModuleException("Cannot run on a multi-user case with a SQLite central repository."); // NON-NLS } diff --git a/Core/src/org/sleuthkit/autopsy/centralrepository/optionspanel/EamDbSettingsDialog.java b/Core/src/org/sleuthkit/autopsy/centralrepository/optionspanel/EamDbSettingsDialog.java index d6d620bb6d..4851afd2a2 100644 --- a/Core/src/org/sleuthkit/autopsy/centralrepository/optionspanel/EamDbSettingsDialog.java +++ b/Core/src/org/sleuthkit/autopsy/centralrepository/optionspanel/EamDbSettingsDialog.java @@ -86,7 +86,7 @@ public class EamDbSettingsDialog extends JDialog { private final Collection textBoxes; private final TextBoxChangedListener textBoxChangedListener; - private final CentralRepoDbManager manager = CentralRepoDbManager.getInstance(); + private final CentralRepoDbManager manager = new CentralRepoDbManager(); private final DbChoiceRenderer DB_CHOICE_RENDERER = new DbChoiceRenderer(); public EamDbSettingsDialog() { @@ -586,9 +586,20 @@ public class EamDbSettingsDialog extends JDialog { parent.setCursor(Cursor.getPredefinedCursor(Cursor.DEFAULT_CURSOR)); return true; } + + + /** + * This method returns if changes to the central repository configuration were + * successfully applied. + * + * @return True if the database configuration was successfully changed; false + * if it was not. + */ + public boolean wasConfigurationChanged() { + return manager.wasConfigurationChanged(); + } private void bnCancelActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_bnCancelActionPerformed - manager.resetSelectedDbChoice(); dispose(); }//GEN-LAST:event_bnCancelActionPerformed diff --git a/Core/src/org/sleuthkit/autopsy/centralrepository/optionspanel/GlobalSettingsPanel.form b/Core/src/org/sleuthkit/autopsy/centralrepository/optionspanel/GlobalSettingsPanel.form index 1dfe191420..86ab06dc0c 100644 --- a/Core/src/org/sleuthkit/autopsy/centralrepository/optionspanel/GlobalSettingsPanel.form +++ b/Core/src/org/sleuthkit/autopsy/centralrepository/optionspanel/GlobalSettingsPanel.form @@ -253,6 +253,12 @@ + + + + + + diff --git a/Core/src/org/sleuthkit/autopsy/centralrepository/optionspanel/GlobalSettingsPanel.java b/Core/src/org/sleuthkit/autopsy/centralrepository/optionspanel/GlobalSettingsPanel.java index 1fbe5e0b31..edee10f795 100644 --- a/Core/src/org/sleuthkit/autopsy/centralrepository/optionspanel/GlobalSettingsPanel.java +++ b/Core/src/org/sleuthkit/autopsy/centralrepository/optionspanel/GlobalSettingsPanel.java @@ -61,7 +61,6 @@ public final class GlobalSettingsPanel extends IngestModuleGlobalSettingsPanel i private static final Set INGEST_JOB_EVENTS_OF_INTEREST = EnumSet.of(IngestManager.IngestJobEvent.STARTED, IngestManager.IngestJobEvent.CANCELLED, IngestManager.IngestJobEvent.COMPLETED); private final IngestJobEventPropertyChangeListener ingestJobEventListener; - private final CentralRepoDbManager manager; private final ImageIcon goodIcon = new ImageIcon(ImageUtilities.loadImage("org/sleuthkit/autopsy/images/good.png", false)); private final ImageIcon badIcon = new ImageIcon(ImageUtilities.loadImage("org/sleuthkit/autopsy/images/bad.png", false)); @@ -71,10 +70,9 @@ public final class GlobalSettingsPanel extends IngestModuleGlobalSettingsPanel i */ public GlobalSettingsPanel() { ingestJobEventListener = new IngestJobEventPropertyChangeListener(); - manager = CentralRepoDbManager.getInstance(); - + // listen for change events in currently saved choice - manager.addPropertyChangeListener((PropertyChangeEvent evt) -> { + CentralRepoDbManager.addPropertyChangeListener((PropertyChangeEvent evt) -> { //ingestStateUpdated(Case.isCaseOpen()); load(); // reload db settings content and update buttons @@ -111,10 +109,11 @@ public final class GlobalSettingsPanel extends IngestModuleGlobalSettingsPanel i * * @return True if there was a change. */ - private static void invokeCrChoice(Component parent, CentralRepoDbChoice initialSelection) { + private static boolean invokeCrChoice(Component parent, CentralRepoDbChoice initialSelection) { EamDbSettingsDialog dialog = (initialSelection != null) - ? new EamDbSettingsDialog(initialSelection) - : new EamDbSettingsDialog(); + ? new EamDbSettingsDialog(initialSelection) + : new EamDbSettingsDialog(); + return dialog.wasConfigurationChanged(); } /** @@ -136,9 +135,8 @@ public final class GlobalSettingsPanel extends IngestModuleGlobalSettingsPanel i "GlobalSettingsPanel.onMultiUserChange.enable.description2=The Central Repository stores hash values and accounts from past cases." }) public static void onMultiUserChange(Component parent, boolean muPreviouslySelected, boolean muCurrentlySelected) { - CentralRepoDbManager manager = CentralRepoDbManager.getInstance(); boolean crEnabled = CentralRepoDbUtil.allowUseOfCentralRepository(); - boolean crMultiUser = manager.getSavedDbChoice() == CentralRepoDbChoice.POSTGRESQL_MULTIUSER; + boolean crMultiUser = CentralRepoDbManager.getSavedDbChoice() == CentralRepoDbChoice.POSTGRESQL_MULTIUSER; if (!muPreviouslySelected && muCurrentlySelected) { SwingUtilities.invokeLater(() -> { @@ -154,8 +152,8 @@ public final class GlobalSettingsPanel extends IngestModuleGlobalSettingsPanel i // setup database for CR CentralRepoDbUtil.setUseCentralRepo(true); - manager.saveDbChoice(CentralRepoDbChoice.POSTGRESQL_MULTIUSER); - checkStatusAndCreateDb(manager, parent); + CentralRepoDbManager.saveDbChoice(CentralRepoDbChoice.POSTGRESQL_MULTIUSER); + checkStatusAndCreateDb(parent); } }); } // moving from selected to not selected && 'PostgreSQL using multi-user settings' is selected @@ -166,7 +164,7 @@ public final class GlobalSettingsPanel extends IngestModuleGlobalSettingsPanel i } // changing multi-user settings connection && 'PostgreSQL using multi-user settings' is selected && // central repo either enabled or was disabled due to error else if (muPreviouslySelected && muCurrentlySelected && crEnabled && crMultiUser) { - checkStatusAndCreateDb(manager, parent); + checkStatusAndCreateDb(parent); } } @@ -176,9 +174,9 @@ public final class GlobalSettingsPanel extends IngestModuleGlobalSettingsPanel i * database if cr database is absent. * @param parent the parent component to which the dialogs will be associated. */ - private static void checkStatusAndCreateDb(CentralRepoDbManager manager, Component parent) { + private static void checkStatusAndCreateDb(Component parent) { SwingUtilities.invokeLater(() -> { - EamDbSettingsDialog.testStatusAndCreate(parent, manager); + EamDbSettingsDialog.testStatusAndCreate(parent, new CentralRepoDbManager()); }); } @@ -231,6 +229,7 @@ public final class GlobalSettingsPanel extends IngestModuleGlobalSettingsPanel i "GlobalSettingsPanel.testCurrentConfiguration.dbDoesNotExist.message=Database does not exist.", }) private boolean testCurrentConfiguration() { + CentralRepoDbManager manager = new CentralRepoDbManager(); DatabaseTestResult testResult = manager.testStatus(); // if database doesn't exist, prompt user to create database if (testResult == DatabaseTestResult.DB_DOES_NOT_EXIST) { @@ -251,7 +250,7 @@ public final class GlobalSettingsPanel extends IngestModuleGlobalSettingsPanel i } private boolean showStatusOkay() { - return setStatus(goodIcon, null); + return setStatus(goodIcon, " "); } private boolean showStatusFail(String message) { @@ -351,6 +350,8 @@ public final class GlobalSettingsPanel extends IngestModuleGlobalSettingsPanel i testStatusLabel.setFont(testStatusLabel.getFont().deriveFont(testStatusLabel.getFont().getStyle() & ~java.awt.Font.BOLD, 11)); org.openide.awt.Mnemonics.setLocalizedText(testStatusLabel, org.openide.util.NbBundle.getMessage(GlobalSettingsPanel.class, "GlobalSettingsPanel.testStatusLabel.text")); // NOI18N testStatusLabel.setToolTipText(org.openide.util.NbBundle.getMessage(GlobalSettingsPanel.class, "GlobalSettingsPanel.testStatusLabel.toolTipText")); // NOI18N + testStatusLabel.setMaximumSize(new java.awt.Dimension(387, 40)); + testStatusLabel.setPreferredSize(new java.awt.Dimension(387, 16)); javax.swing.GroupLayout pnDatabaseConfigurationLayout = new javax.swing.GroupLayout(pnDatabaseConfiguration); pnDatabaseConfiguration.setLayout(pnDatabaseConfigurationLayout); @@ -644,7 +645,7 @@ public final class GlobalSettingsPanel extends IngestModuleGlobalSettingsPanel i public void load() { tbOops.setText(""); enableButtonSubComponents(false); - CentralRepoDbChoice selectedChoice = manager.getSavedDbChoice(); + CentralRepoDbChoice selectedChoice = CentralRepoDbManager.getSavedDbChoice(); cbUseCentralRepo.setSelected(CentralRepoDbUtil.allowUseOfCentralRepository()); // NON-NLS lbDbPlatformValue.setText(selectedChoice.getTitle()); From e8c767f9b6aa4b27cea489cd4f46e9c6d5603d7f Mon Sep 17 00:00:00 2001 From: Greg DiCristofaro Date: Wed, 1 Apr 2020 11:41:58 -0400 Subject: [PATCH 013/137] fix for loading issue --- .../centralrepository/optionspanel/GlobalSettingsPanel.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Core/src/org/sleuthkit/autopsy/centralrepository/optionspanel/GlobalSettingsPanel.java b/Core/src/org/sleuthkit/autopsy/centralrepository/optionspanel/GlobalSettingsPanel.java index edee10f795..c354251850 100644 --- a/Core/src/org/sleuthkit/autopsy/centralrepository/optionspanel/GlobalSettingsPanel.java +++ b/Core/src/org/sleuthkit/autopsy/centralrepository/optionspanel/GlobalSettingsPanel.java @@ -615,7 +615,11 @@ public final class GlobalSettingsPanel extends IngestModuleGlobalSettingsPanel i private void bnDbConfigureActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_bnDbConfigureActionPerformed store(); - invokeCrChoice(this, null); + boolean changed = invokeCrChoice(this, null); + if (changed) { + load(); // reload db settings content and update buttons + firePropertyChange(OptionsPanelController.PROP_CHANGED, null, null); + } }//GEN-LAST:event_bnDbConfigureActionPerformed private void manageOrganizationButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_manageOrganizationButtonActionPerformed From 9f43d666e8e9cf980c116432e86e98ad7062a51c Mon Sep 17 00:00:00 2001 From: Greg DiCristofaro Date: Wed, 1 Apr 2020 12:58:57 -0400 Subject: [PATCH 014/137] property change support listeners --- .../optionspanel/GlobalSettingsPanel.form | 22 ++++--- .../optionspanel/GlobalSettingsPanel.java | 65 +++++++++++++------ 2 files changed, 56 insertions(+), 31 deletions(-) diff --git a/Core/src/org/sleuthkit/autopsy/centralrepository/optionspanel/GlobalSettingsPanel.form b/Core/src/org/sleuthkit/autopsy/centralrepository/optionspanel/GlobalSettingsPanel.form index 86ab06dc0c..d9d5b14296 100644 --- a/Core/src/org/sleuthkit/autopsy/centralrepository/optionspanel/GlobalSettingsPanel.form +++ b/Core/src/org/sleuthkit/autopsy/centralrepository/optionspanel/GlobalSettingsPanel.form @@ -155,9 +155,9 @@ - - - + + + @@ -181,11 +181,13 @@ - - - - - + + + + + + + @@ -254,10 +256,10 @@ - + - + diff --git a/Core/src/org/sleuthkit/autopsy/centralrepository/optionspanel/GlobalSettingsPanel.java b/Core/src/org/sleuthkit/autopsy/centralrepository/optionspanel/GlobalSettingsPanel.java index c354251850..2ec00492c7 100644 --- a/Core/src/org/sleuthkit/autopsy/centralrepository/optionspanel/GlobalSettingsPanel.java +++ b/Core/src/org/sleuthkit/autopsy/centralrepository/optionspanel/GlobalSettingsPanel.java @@ -42,6 +42,8 @@ import org.sleuthkit.autopsy.centralrepository.datamodel.CentralRepoDbUtil; import org.sleuthkit.autopsy.centralrepository.datamodel.PostgresCentralRepoSettings; import org.sleuthkit.autopsy.centralrepository.datamodel.SqliteCentralRepoSettings; import java.awt.Component; +import java.awt.Dimension; +import java.beans.PropertyChangeSupport; import java.util.logging.Level; import javax.swing.ImageIcon; import org.openide.util.ImageUtilities; @@ -60,35 +62,54 @@ public final class GlobalSettingsPanel extends IngestModuleGlobalSettingsPanel i private static final Logger logger = Logger.getLogger(GlobalSettingsPanel.class.getName()); private static final Set INGEST_JOB_EVENTS_OF_INTEREST = EnumSet.of(IngestManager.IngestJobEvent.STARTED, IngestManager.IngestJobEvent.CANCELLED, IngestManager.IngestJobEvent.COMPLETED); + // this allows property change events to be fired at a static level but listened to by instances + private static final PropertyChangeSupport propertyChangeSupport = new PropertyChangeSupport(GlobalSettingsPanel.class); + + // tracks the last known instance property change listener so that only one GlobalSettingsPanel is listening for events + private static PropertyChangeListener lastRegistered = null; + private final IngestJobEventPropertyChangeListener ingestJobEventListener; private final ImageIcon goodIcon = new ImageIcon(ImageUtilities.loadImage("org/sleuthkit/autopsy/images/good.png", false)); private final ImageIcon badIcon = new ImageIcon(ImageUtilities.loadImage("org/sleuthkit/autopsy/images/bad.png", false)); + /** * Creates new form EamOptionsPanel */ public GlobalSettingsPanel() { ingestJobEventListener = new IngestJobEventPropertyChangeListener(); - - // listen for change events in currently saved choice - CentralRepoDbManager.addPropertyChangeListener((PropertyChangeEvent evt) -> { - //ingestStateUpdated(Case.isCaseOpen()); - - load(); // reload db settings content and update buttons - firePropertyChange(OptionsPanelController.PROP_CHANGED, null, null); - clearStatus(); - }); - initComponents(); customizeComponents(); + setupSettingsChangeListeners(); addIngestJobEventsListener(); Case.addEventTypeSubscriber(EnumSet.of(Case.Events.CURRENT_CASE), (PropertyChangeEvent evt) -> { //disable when case is open, enable when case is closed ingestStateUpdated(evt.getNewValue() != null); }); } + + + private void setupSettingsChangeListeners() { + // listen for change events in currently saved choice + if (lastRegistered != null) { + CentralRepoDbManager.removePropertyChangeListener(lastRegistered); + GlobalSettingsPanel.propertyChangeSupport.removePropertyChangeListener(lastRegistered); + } + + lastRegistered = this::onSettingsChange; + CentralRepoDbManager.addPropertyChangeListener(lastRegistered); + GlobalSettingsPanel.propertyChangeSupport.addPropertyChangeListener(lastRegistered); + } + + + private void onSettingsChange(PropertyChangeEvent evt) { + ingestStateUpdated(Case.isCaseOpen()); + clearStatus(); + firePropertyChange(OptionsPanelController.PROP_CHANGED, null, null); + } + private void customizeComponents() { setName(NbBundle.getMessage(GlobalSettingsPanel.class, "GlobalSettingsPanel.pnCorrelationProperties.border.title")); } @@ -164,6 +185,7 @@ public final class GlobalSettingsPanel extends IngestModuleGlobalSettingsPanel i } // changing multi-user settings connection && 'PostgreSQL using multi-user settings' is selected && // central repo either enabled or was disabled due to error else if (muPreviouslySelected && muCurrentlySelected && crEnabled && crMultiUser) { + GlobalSettingsPanel.propertyChangeSupport.firePropertyChange("multiuserSettingsChanged", null, null); checkStatusAndCreateDb(parent); } } @@ -258,7 +280,7 @@ public final class GlobalSettingsPanel extends IngestModuleGlobalSettingsPanel i } private void clearStatus() { - setStatus(null, null); + setStatus(null, " "); } private boolean setStatus(ImageIcon icon, String text) { @@ -350,8 +372,8 @@ public final class GlobalSettingsPanel extends IngestModuleGlobalSettingsPanel i testStatusLabel.setFont(testStatusLabel.getFont().deriveFont(testStatusLabel.getFont().getStyle() & ~java.awt.Font.BOLD, 11)); org.openide.awt.Mnemonics.setLocalizedText(testStatusLabel, org.openide.util.NbBundle.getMessage(GlobalSettingsPanel.class, "GlobalSettingsPanel.testStatusLabel.text")); // NOI18N testStatusLabel.setToolTipText(org.openide.util.NbBundle.getMessage(GlobalSettingsPanel.class, "GlobalSettingsPanel.testStatusLabel.toolTipText")); // NOI18N - testStatusLabel.setMaximumSize(new java.awt.Dimension(387, 40)); - testStatusLabel.setPreferredSize(new java.awt.Dimension(387, 16)); + testStatusLabel.setMaximumSize(new java.awt.Dimension(387, 32)); + testStatusLabel.setPreferredSize(new java.awt.Dimension(387, 32)); javax.swing.GroupLayout pnDatabaseConfigurationLayout = new javax.swing.GroupLayout(pnDatabaseConfiguration); pnDatabaseConfiguration.setLayout(pnDatabaseConfigurationLayout); @@ -374,9 +396,9 @@ public final class GlobalSettingsPanel extends IngestModuleGlobalSettingsPanel i .addComponent(bnDbConfigure) .addGap(18, 18, 18) .addComponent(bnTestConfigure) - .addGap(18, 18, 18) - .addComponent(testStatusLabel, javax.swing.GroupLayout.PREFERRED_SIZE, 805, javax.swing.GroupLayout.PREFERRED_SIZE) - .addContainerGap(19, Short.MAX_VALUE)))) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) + .addComponent(testStatusLabel, javax.swing.GroupLayout.PREFERRED_SIZE, 416, javax.swing.GroupLayout.PREFERRED_SIZE) + .addContainerGap(420, Short.MAX_VALUE)))) ); pnDatabaseConfigurationLayout.setVerticalGroup( pnDatabaseConfigurationLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) @@ -393,11 +415,12 @@ public final class GlobalSettingsPanel extends IngestModuleGlobalSettingsPanel i .addGroup(pnDatabaseConfigurationLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false) .addComponent(lbDbLocationLabel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent(lbDbLocationValue, javax.swing.GroupLayout.PREFERRED_SIZE, 14, javax.swing.GroupLayout.PREFERRED_SIZE)) - .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) - .addGroup(pnDatabaseConfigurationLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) - .addComponent(bnDbConfigure) - .addComponent(bnTestConfigure) - .addComponent(testStatusLabel, javax.swing.GroupLayout.PREFERRED_SIZE, 32, javax.swing.GroupLayout.PREFERRED_SIZE)) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 8, Short.MAX_VALUE) + .addGroup(pnDatabaseConfigurationLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, pnDatabaseConfigurationLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) + .addComponent(bnDbConfigure) + .addComponent(bnTestConfigure)) + .addComponent(testStatusLabel, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.PREFERRED_SIZE, 32, javax.swing.GroupLayout.PREFERRED_SIZE)) .addGap(8, 8, 8)) ); From 92205e1aab326d4201072bc2c104ba9ebcff5e1c Mon Sep 17 00:00:00 2001 From: Greg DiCristofaro Date: Wed, 1 Apr 2020 14:20:54 -0400 Subject: [PATCH 015/137] updated layout --- .../optionspanel/GlobalSettingsPanel.form | 23 ++++++++++--------- .../optionspanel/GlobalSettingsPanel.java | 20 ++++++++-------- 2 files changed, 22 insertions(+), 21 deletions(-) diff --git a/Core/src/org/sleuthkit/autopsy/centralrepository/optionspanel/GlobalSettingsPanel.form b/Core/src/org/sleuthkit/autopsy/centralrepository/optionspanel/GlobalSettingsPanel.form index d9d5b14296..7fafd68c22 100644 --- a/Core/src/org/sleuthkit/autopsy/centralrepository/optionspanel/GlobalSettingsPanel.form +++ b/Core/src/org/sleuthkit/autopsy/centralrepository/optionspanel/GlobalSettingsPanel.form @@ -156,8 +156,8 @@ - - + + @@ -181,13 +181,11 @@ - - - - - - - + + + + + @@ -249,6 +247,9 @@ + + + @@ -256,10 +257,10 @@ - + - + diff --git a/Core/src/org/sleuthkit/autopsy/centralrepository/optionspanel/GlobalSettingsPanel.java b/Core/src/org/sleuthkit/autopsy/centralrepository/optionspanel/GlobalSettingsPanel.java index 2ec00492c7..ee22b5c966 100644 --- a/Core/src/org/sleuthkit/autopsy/centralrepository/optionspanel/GlobalSettingsPanel.java +++ b/Core/src/org/sleuthkit/autopsy/centralrepository/optionspanel/GlobalSettingsPanel.java @@ -370,10 +370,11 @@ public final class GlobalSettingsPanel extends IngestModuleGlobalSettingsPanel i }); testStatusLabel.setFont(testStatusLabel.getFont().deriveFont(testStatusLabel.getFont().getStyle() & ~java.awt.Font.BOLD, 11)); + testStatusLabel.setForeground(new java.awt.Color(255, 0, 0)); org.openide.awt.Mnemonics.setLocalizedText(testStatusLabel, org.openide.util.NbBundle.getMessage(GlobalSettingsPanel.class, "GlobalSettingsPanel.testStatusLabel.text")); // NOI18N testStatusLabel.setToolTipText(org.openide.util.NbBundle.getMessage(GlobalSettingsPanel.class, "GlobalSettingsPanel.testStatusLabel.toolTipText")); // NOI18N - testStatusLabel.setMaximumSize(new java.awt.Dimension(387, 32)); - testStatusLabel.setPreferredSize(new java.awt.Dimension(387, 32)); + testStatusLabel.setMaximumSize(new java.awt.Dimension(387, 16)); + testStatusLabel.setPreferredSize(new java.awt.Dimension(387, 16)); javax.swing.GroupLayout pnDatabaseConfigurationLayout = new javax.swing.GroupLayout(pnDatabaseConfiguration); pnDatabaseConfiguration.setLayout(pnDatabaseConfigurationLayout); @@ -397,8 +398,8 @@ public final class GlobalSettingsPanel extends IngestModuleGlobalSettingsPanel i .addGap(18, 18, 18) .addComponent(bnTestConfigure) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) - .addComponent(testStatusLabel, javax.swing.GroupLayout.PREFERRED_SIZE, 416, javax.swing.GroupLayout.PREFERRED_SIZE) - .addContainerGap(420, Short.MAX_VALUE)))) + .addComponent(testStatusLabel, javax.swing.GroupLayout.PREFERRED_SIZE, 671, javax.swing.GroupLayout.PREFERRED_SIZE) + .addContainerGap(165, Short.MAX_VALUE)))) ); pnDatabaseConfigurationLayout.setVerticalGroup( pnDatabaseConfigurationLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) @@ -415,12 +416,11 @@ public final class GlobalSettingsPanel extends IngestModuleGlobalSettingsPanel i .addGroup(pnDatabaseConfigurationLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false) .addComponent(lbDbLocationLabel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent(lbDbLocationValue, javax.swing.GroupLayout.PREFERRED_SIZE, 14, javax.swing.GroupLayout.PREFERRED_SIZE)) - .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 8, Short.MAX_VALUE) - .addGroup(pnDatabaseConfigurationLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) - .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, pnDatabaseConfigurationLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) - .addComponent(bnDbConfigure) - .addComponent(bnTestConfigure)) - .addComponent(testStatusLabel, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.PREFERRED_SIZE, 32, javax.swing.GroupLayout.PREFERRED_SIZE)) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 10, Short.MAX_VALUE) + .addGroup(pnDatabaseConfigurationLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) + .addComponent(bnDbConfigure) + .addComponent(bnTestConfigure) + .addComponent(testStatusLabel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) .addGap(8, 8, 8)) ); From c7dd2be6e056bfd44f7e257c4bc869d1df114ed5 Mon Sep 17 00:00:00 2001 From: Greg DiCristofaro Date: Wed, 1 Apr 2020 14:22:04 -0400 Subject: [PATCH 016/137] dialog message changes --- .../centralrepository/optionspanel/EamDbSettingsDialog.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Core/src/org/sleuthkit/autopsy/centralrepository/optionspanel/EamDbSettingsDialog.java b/Core/src/org/sleuthkit/autopsy/centralrepository/optionspanel/EamDbSettingsDialog.java index 4851afd2a2..a16b7f5d87 100644 --- a/Core/src/org/sleuthkit/autopsy/centralrepository/optionspanel/EamDbSettingsDialog.java +++ b/Core/src/org/sleuthkit/autopsy/centralrepository/optionspanel/EamDbSettingsDialog.java @@ -158,11 +158,11 @@ public class EamDbSettingsDialog extends JDialog { * @param dialog If non-null value, validates settings and updates 'okay' button enabled state. * @return Whether or not the ultimate status after prompts is okay to continue. */ - @NbBundle.Messages({"EamDbSettingsDialog.okButton.corruptDatabaseExists.title=Error Loading Database", + @NbBundle.Messages({"EamDbSettingsDialog.okButton.corruptDatabaseExists.title=Error Loading Central Repository Database", "EamDbSettingsDialog.okButton.corruptDatabaseExists.message=Database exists but is not the right format. Manually delete it or choose a different path (if applicable).", - "EamDbSettingsDialog.okButton.createDbDialog.title=Database Does Not Exist", + "EamDbSettingsDialog.okButton.createDbDialog.title=Central Repository Database Does Not Exist", "EamDbSettingsDialog.okButton.createDbDialog.message=Database does not exist, would you like to create it?", - "EamDbSettingsDialog.okButton.databaseConnectionFailed.title=Database Connection Failed", + "EamDbSettingsDialog.okButton.databaseConnectionFailed.title=Central Repository Database Connection Failed", "EamDbSettingsDialog.okButton.databaseConnectionFailed.message=Unable to connect to database. Please check your settings and try again.", "EamDbSettingsDialog.okButton.createSQLiteDbError.message=Unable to create SQLite Database, please ensure location exists and you have write permissions and try again.", "EamDbSettingsDialog.okButton.createPostgresDbError.message=Unable to create Postgres Database, please ensure address, port, and login credentials are correct for Postgres server and try again.", From 244b996cdc2ffe71f71e34edae03b736487a38b3 Mon Sep 17 00:00:00 2001 From: Greg DiCristofaro Date: Wed, 1 Apr 2020 15:58:20 -0400 Subject: [PATCH 017/137] fix to deal with merge conflict --- .../casemodule/Bundle.properties-MERGED | 2 +- .../optionspanel/Bundle.properties-MERGED | 13 ++++++++++--- .../optionspanel/GlobalSettingsPanel.form | 17 ++++++++++------- .../optionspanel/GlobalSettingsPanel.java | 14 ++++++++------ .../autopsy/core/Bundle.properties-MERGED | 8 +++++++- .../autopsy/coreutils/Bundle.properties-MERGED | 4 +++- .../directorytree/Bundle.properties-MERGED | 6 +++--- .../filesearch/Bundle.properties-MERGED | 10 +++++----- .../autopsy/ingest/Bundle.properties-MERGED | 2 +- .../livetriage/Bundle.properties-MERGED | 4 ++-- .../Bundle.properties-MERGED | 4 ++-- .../Bundle.properties-MERGED | 8 ++++++-- .../modules/exif/Bundle.properties-MERGED | 4 +++- .../fileextmismatch/Bundle.properties-MERGED | 18 +++++++++--------- .../filetypeid/Bundle.properties-MERGED | 6 +++--- .../hashdatabase/Bundle.properties-MERGED | 14 ++++++++------ .../interestingitems/Bundle.properties-MERGED | 18 +++++++++--------- .../photoreccarver/Bundle.properties-MERGED | 2 +- .../modules/html/Bundle.properties-MERGED | 6 +++--- .../keywordsearch/Bundle.properties-MERGED | 2 +- .../recentactivity/Bundle.properties-MERGED | 11 +++-------- .../netbeans/core/startup/Bundle.properties | 4 ++-- .../core/windows/view/ui/Bundle.properties | 6 +++--- 23 files changed, 103 insertions(+), 80 deletions(-) diff --git a/Core/src/org/sleuthkit/autopsy/casemodule/Bundle.properties-MERGED b/Core/src/org/sleuthkit/autopsy/casemodule/Bundle.properties-MERGED index b56e46b377..b062dffebd 100755 --- a/Core/src/org/sleuthkit/autopsy/casemodule/Bundle.properties-MERGED +++ b/Core/src/org/sleuthkit/autopsy/casemodule/Bundle.properties-MERGED @@ -186,7 +186,6 @@ NewCaseVisualPanel1.caseNameLabel.text_1=Case Name: NewCaseVisualPanel1.caseDirLabel.text=Base Directory: NewCaseVisualPanel1.caseDirBrowseButton.text=Browse NewCaseVisualPanel1.caseNameTextField.text_1= -NewCaseVisualPanel1.jLabel2.text_1=Case data will be stored in the following directory: NewCaseVisualPanel1.caseParentDirTextField.text= NewCaseVisualPanel1.caseDirTextField.text_1= CueBannerPanel.autopsyLogo.text= @@ -467,3 +466,4 @@ UnpackagePortableCaseProgressDialog.okButton.text=OK UnpackagePortableCaseProgressDialog.resultLabel.text=resultLabel UnpackagePortableCaseDialog.extractLabel.text=Folder to extract to: UnpackagePortableCaseDialog.caseLabel.text=Portable Case: +NewCaseVisualPanel1.caseDataStoredLabel.text_1=Case data will be stored in the following directory: 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 395330b4db..b9d0716154 100755 --- a/Core/src/org/sleuthkit/autopsy/centralrepository/optionspanel/Bundle.properties-MERGED +++ b/Core/src/org/sleuthkit/autopsy/centralrepository/optionspanel/Bundle.properties-MERGED @@ -13,14 +13,14 @@ EamDbSettingsDialog.lbDatabaseType.text=Database Type : EamDbSettingsDialog.lbSingleUserSqLite.text=SQLite should only be used by one examiner at a time. EamDbSettingsDialog.okButton.connectionErrorMsg.text=Failed to connect to central repository database. EamDbSettingsDialog.okButton.corruptDatabaseExists.message=Database exists but is not the right format. Manually delete it or choose a different path (if applicable). -EamDbSettingsDialog.okButton.corruptDatabaseExists.title=Error Loading Database +EamDbSettingsDialog.okButton.corruptDatabaseExists.title=Error Loading Central Repository Database EamDbSettingsDialog.okButton.createDbDialog.message=Database does not exist, would you like to create it? -EamDbSettingsDialog.okButton.createDbDialog.title=Database Does Not Exist +EamDbSettingsDialog.okButton.createDbDialog.title=Central Repository Database Does Not Exist EamDbSettingsDialog.okButton.createDbError.title=Unable to Create Database EamDbSettingsDialog.okButton.createPostgresDbError.message=Unable to create Postgres Database, please ensure address, port, and login credentials are correct for Postgres server and try again. EamDbSettingsDialog.okButton.createSQLiteDbError.message=Unable to create SQLite Database, please ensure location exists and you have write permissions and try again. EamDbSettingsDialog.okButton.databaseConnectionFailed.message=Unable to connect to database. Please check your settings and try again. -EamDbSettingsDialog.okButton.databaseConnectionFailed.title=Database Connection Failed +EamDbSettingsDialog.okButton.databaseConnectionFailed.title=Central Repository Database Connection Failed EamDbSettingsDialog.okButton.errorMsg.text=Please restart Autopsy to begin using the new database platform. EamDbSettingsDialog.okButton.errorTitle.text=Restart Required. EamDbSettingsDialog.textPrompt.dbName=Database Name @@ -33,12 +33,16 @@ EamDbSettingsDialog.validation.finished=Click OK to save your database settings EamDbSettingsDialog.validation.incompleteFields=Fill in all values for the selected database. EamOptionsController.moduleErr=Error processing value changes. EamOptionsController.moduleErr.msg=Value change processing failed. +GlobalSettingsPanel.askForCentralRepoDbChoice.customPostgrestChoice.text=Configure PostgreSQL +GlobalSettingsPanel.askForCentralRepoDbChoice.disableChoice.text=Disable Central Repository +GlobalSettingsPanel.askForCentralRepoDbChoice.sqliteChoice.text=Use SQLite GlobalSettingsPanel.onMultiUserChange.disabledMu.description=The Central Repository will be reconfigured to use a local SQLite database. GlobalSettingsPanel.onMultiUserChange.disabledMu.description2=Press Configure PostgreSQL to change to a PostgreSQL database. GlobalSettingsPanel.onMultiUserChange.disabledMu.title=Central Repository Change Necessary GlobalSettingsPanel.onMultiUserChange.enable.description=Do you want to update the Central Repository to use this PostgreSQL database? GlobalSettingsPanel.onMultiUserChange.enable.description2=The Central Repository stores hash values and accounts from past cases. GlobalSettingsPanel.onMultiUserChange.enable.title=Use with Central Repository? +GlobalSettingsPanel.testCurrentConfiguration.dbDoesNotExist.message=Database does not exist. GlobalSettingsPanel.validationErrMsg.ingestRunning=You cannot change settings while ingest is running. GlobalSettingsPanel.validationerrMsg.mustConfigure=Configure the database to enable this module. ManageCasesDialog.title.text=Manage Cases @@ -147,3 +151,6 @@ ManageCasesDialog.closeButton.text=Close ManageCasesDialog.notesLabel.text=Notes: ManageCasesDialog.dataSourcesLabel.text=Data Sources: ManageCasesDialog.caseInfoLabel.text=Case Info: +GlobalSettingsPanel.bnTestConfigure.text=Test +GlobalSettingsPanel.testStatusLabel.toolTipText= +GlobalSettingsPanel.testStatusLabel.text= diff --git a/Core/src/org/sleuthkit/autopsy/centralrepository/optionspanel/GlobalSettingsPanel.form b/Core/src/org/sleuthkit/autopsy/centralrepository/optionspanel/GlobalSettingsPanel.form index f526ad1a3c..c7fd365389 100644 --- a/Core/src/org/sleuthkit/autopsy/centralrepository/optionspanel/GlobalSettingsPanel.form +++ b/Core/src/org/sleuthkit/autopsy/centralrepository/optionspanel/GlobalSettingsPanel.form @@ -61,7 +61,7 @@ - + @@ -147,7 +147,10 @@ - + + + + @@ -155,8 +158,8 @@ - - + + @@ -180,11 +183,11 @@ - + - + @@ -298,7 +301,7 @@ - + diff --git a/Core/src/org/sleuthkit/autopsy/centralrepository/optionspanel/GlobalSettingsPanel.java b/Core/src/org/sleuthkit/autopsy/centralrepository/optionspanel/GlobalSettingsPanel.java index bb0912d190..baa24c787b 100644 --- a/Core/src/org/sleuthkit/autopsy/centralrepository/optionspanel/GlobalSettingsPanel.java +++ b/Core/src/org/sleuthkit/autopsy/centralrepository/optionspanel/GlobalSettingsPanel.java @@ -392,14 +392,16 @@ public final class GlobalSettingsPanel extends IngestModuleGlobalSettingsPanel i .addGroup(pnDatabaseConfigurationLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING) .addComponent(lbDbNameValue, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent(lbDbPlatformValue, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) - .addComponent(lbDbLocationValue, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))) + .addGroup(javax.swing.GroupLayout.Alignment.LEADING, pnDatabaseConfigurationLayout.createSequentialGroup() + .addComponent(lbDbLocationValue, javax.swing.GroupLayout.DEFAULT_SIZE, 255, Short.MAX_VALUE) + .addGap(681, 681, 681)))) .addGroup(pnDatabaseConfigurationLayout.createSequentialGroup() .addComponent(bnDbConfigure) .addGap(18, 18, 18) .addComponent(bnTestConfigure) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) - .addComponent(testStatusLabel, javax.swing.GroupLayout.PREFERRED_SIZE, 671, javax.swing.GroupLayout.PREFERRED_SIZE) - .addContainerGap(165, Short.MAX_VALUE)))) + .addComponent(testStatusLabel, javax.swing.GroupLayout.PREFERRED_SIZE, 675, javax.swing.GroupLayout.PREFERRED_SIZE) + .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)))) ); pnDatabaseConfigurationLayout.setVerticalGroup( pnDatabaseConfigurationLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) @@ -416,11 +418,11 @@ public final class GlobalSettingsPanel extends IngestModuleGlobalSettingsPanel i .addGroup(pnDatabaseConfigurationLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false) .addComponent(lbDbLocationLabel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent(lbDbLocationValue, javax.swing.GroupLayout.PREFERRED_SIZE, 14, javax.swing.GroupLayout.PREFERRED_SIZE)) - .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 10, Short.MAX_VALUE) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addGroup(pnDatabaseConfigurationLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(bnDbConfigure) .addComponent(bnTestConfigure) - .addComponent(testStatusLabel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) + .addComponent(testStatusLabel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) .addGap(8, 8, 8)) ); @@ -464,7 +466,7 @@ public final class GlobalSettingsPanel extends IngestModuleGlobalSettingsPanel i pnCorrelationPropertiesLayout.setVerticalGroup( pnCorrelationPropertiesLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, pnCorrelationPropertiesLayout.createSequentialGroup() - .addComponent(correlationPropertiesScrollPane, javax.swing.GroupLayout.DEFAULT_SIZE, 25, Short.MAX_VALUE) + .addComponent(correlationPropertiesScrollPane, javax.swing.GroupLayout.DEFAULT_SIZE, 24, Short.MAX_VALUE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(bnManageTypes) .addGap(8, 8, 8)) diff --git a/Core/src/org/sleuthkit/autopsy/core/Bundle.properties-MERGED b/Core/src/org/sleuthkit/autopsy/core/Bundle.properties-MERGED index c84f1f1b86..0b16a9701f 100755 --- a/Core/src/org/sleuthkit/autopsy/core/Bundle.properties-MERGED +++ b/Core/src/org/sleuthkit/autopsy/core/Bundle.properties-MERGED @@ -3,7 +3,13 @@ Installer.closing.confirmationDialog.title=Ingest is Running # {0} - exception message Installer.closing.messageBox.caseCloseExceptionMessage=Error closing case: {0} OpenIDE-Module-Display-Category=Infrastructure -OpenIDE-Module-Long-Description=This is the core Autopsy module.\n\nThe module contains the core components needed for the bare application to run; the RCP platform, windowing GUI, sleuthkit bindings, datamodel / storage, explorer, result viewers, content viewers, ingest framework, reporting, and core tools, such as the file search.\n\nThe framework included in the module contains APIs for developing modules for ingest, viewers and reporting. The modules can be deployed as Plugins using the Autopsy plugin installer.\nThis module should not be uninstalled - without it, Autopsy will not run.\n\nFor more information, see http://www.sleuthkit.org/autopsy/ +OpenIDE-Module-Long-Description=\ + This is the core Autopsy module.\n\n\ + The module contains the core components needed for the bare application to run; the RCP platform, windowing GUI, sleuthkit bindings, datamodel / storage, explorer, result viewers, content viewers, ingest framework, reporting, and core tools, such as the file search.\n\n\ + The framework included in the module contains APIs for developing modules for ingest, viewers and reporting. \ + The modules can be deployed as Plugins using the Autopsy plugin installer.\n\ + This module should not be uninstalled - without it, Autopsy will not run.\n\n\ + For more information, see http://www.sleuthkit.org/autopsy/ OpenIDE-Module-Name=Autopsy-Core OpenIDE-Module-Short-Description=Autopsy Core Module org_sleuthkit_autopsy_core_update_center=http://sleuthkit.org/autopsy/updates.xml diff --git a/Core/src/org/sleuthkit/autopsy/coreutils/Bundle.properties-MERGED b/Core/src/org/sleuthkit/autopsy/coreutils/Bundle.properties-MERGED index 18e279dd2c..a0d535f8e6 100755 --- a/Core/src/org/sleuthkit/autopsy/coreutils/Bundle.properties-MERGED +++ b/Core/src/org/sleuthkit/autopsy/coreutils/Bundle.properties-MERGED @@ -30,7 +30,9 @@ PlatformUtil.getProcVmUsed.sigarNotInit.msg=Cannot get virt mem used, sigar not PlatformUtil.getProcVmUsed.gen.msg=Cannot get virt mem used, {0} PlatformUtil.getJvmMemInfo.usageText=JVM heap usage: {0}, JVM non-heap usage: {1} PlatformUtil.getPhysicalMemInfo.usageText=Physical memory usage (max, total, free): {0}, {1}, {2} -PlatformUtil.getAllMemUsageInfo.usageText={0}\n{1}\nProcess Virtual Memory: {2} +PlatformUtil.getAllMemUsageInfo.usageText={0}\n\ +{1}\n\ +Process Virtual Memory: {2} # {0} - file name ReadImageTask.mesageText=Reading image: {0} StringExtract.illegalStateException.cannotInit.msg=Unicode table not properly initialized, cannot instantiate StringExtract diff --git a/Core/src/org/sleuthkit/autopsy/directorytree/Bundle.properties-MERGED b/Core/src/org/sleuthkit/autopsy/directorytree/Bundle.properties-MERGED index 63b416b176..7e96d8fdaa 100755 --- a/Core/src/org/sleuthkit/autopsy/directorytree/Bundle.properties-MERGED +++ b/Core/src/org/sleuthkit/autopsy/directorytree/Bundle.properties-MERGED @@ -38,8 +38,6 @@ HINT_DirectoryTreeTopComponent=This is a DirectoryTree window OpenIDE-Module-Name=DirectoryTree FileSystemDetailsPanel.imgOffsetLabel.text=Image Offset: FileSystemDetailsPanel.fsTypeLabel.text=FileSystem Type: -FileSystemDetailsPanel.jLabel2.text=bytes -FileSystemDetailsPanel.jLabel3.text=bytes FileSystemDetailsPanel.fsTypeValue.text=... FileSystemDetailsPanel.imgOffsetValue.text=... FileSystemDetailsPanel.volumeIDValue.text=... @@ -71,7 +69,6 @@ VolumeDetailsPanel.startLabel.text=Starting Sector: VolumeDetailsPanel.lengthLabel.text=Length in Sectors: VolumeDetailsPanel.descLabel.text=Description: VolumeDetailsPanel.flagsLabel.text=Flags: -VolumeDetailsPanel.jLabel1.text=General Volume Information VolumeDetailsPanel.OKButton.text=OK ImageDetailsPanel.imageInfoLabel.text=Image Information ImageDetailsPanel.imgNameLabel.text=Name: @@ -160,3 +157,6 @@ ExternalViewerGlobalSettingsPanel.jButton2.text=jButton2 ExternalViewerGlobalSettingsPanel.browseHxDDirectory.text=Browse ExternalViewerGlobalSettingsPanel.HxDLabel.text=HxD Editor Path: ExternalViewerGlobalSettingsPanel.ContentViewerExtensionLabel.text=Add content viewer extensions: +FileSystemDetailsPanel.bytesLabel1.text=bytes +FileSystemDetailsPanel.bytesLabel2.text=bytes +VolumeDetailsPanel.generalVolumeLabel.text=General Volume Information diff --git a/Core/src/org/sleuthkit/autopsy/filesearch/Bundle.properties-MERGED b/Core/src/org/sleuthkit/autopsy/filesearch/Bundle.properties-MERGED index c585d0edf5..b304bc1342 100755 --- a/Core/src/org/sleuthkit/autopsy/filesearch/Bundle.properties-MERGED +++ b/Core/src/org/sleuthkit/autopsy/filesearch/Bundle.properties-MERGED @@ -14,11 +14,9 @@ KnownStatusSearchPanel.knownCheckBox.text=Known Status: KnownStatusSearchPanel.knownBadOptionCheckBox.text=Notable KnownStatusSearchPanel.knownOptionCheckBox.text=Known (NSRL or other) KnownStatusSearchPanel.unknownOptionCheckBox.text=Unknown -DateSearchFilter.noneSelectedMsg.text=At least one date type must be selected! +DateSearchFilter.noneSelectedMsg.text=At least one date type must be selected\! DateSearchPanel.dateCheckBox.text=Date: DateSearchPanel.jLabel4.text=Timezone: -DateSearchPanel.jLabel3.text=*The date format is mm/dd/yyyy -DateSearchPanel.jLabel2.text=*Empty fields mean "No Limit" DateSearchPanel.createdCheckBox.text=Created DateSearchPanel.accessedCheckBox.text=Accessed DateSearchPanel.changedCheckBox.text=Changed @@ -57,12 +55,11 @@ FileSearchPanel.search.results.details=Large number of matches may impact perfor FileSearchPanel.search.exception.noFilterSelected.msg=At least one filter must be selected. FileSearchPanel.search.validationErr.msg=Validation Error: {0} FileSearchPanel.emptyWhereClause.text=Invalid options, nothing to show. -KnownStatusSearchFilter.noneSelectedMsg.text=At least one known status must be selected! +KnownStatusSearchFilter.noneSelectedMsg.text=At least one known status must be selected\! NameSearchFilter.emptyNameMsg.text=Must enter something for name search. SizeSearchPanel.sizeCompareComboBox.equalTo=equal to SizeSearchPanel.sizeCompareComboBox.greaterThan=greater than SizeSearchPanel.sizeCompareComboBox.lessThan=less than -MimeTypePanel.jLabel1.text=*Note: Multiple MIME types can be selected FileSearchPanel.searchButton.text=Search MimeTypePanel.mimeTypeCheckBox.text=MIME Type: HashSearchPanel.md5CheckBox.text=MD5: @@ -72,3 +69,6 @@ DataSourcePanel.dataSourceCheckBox.label=Data Source: DataSourcePanel.dataSourceCheckBox.actionCommand=Data Source: DataSourcePanel.dataSourceCheckBox.text=Data Source: DataSourcePanel.dataSourceNoteLabel.text=*Note: Multiple data sources can be selected +DateSearchPanel.noLimitLabel.text=*Empty fields mean "No Limit" +DateSearchPanel.dateFormatLabel.text=*The date format is mm/dd/yyyy +MimeTypePanel.noteLabel.text=*Note: Multiple MIME types can be selected diff --git a/Core/src/org/sleuthkit/autopsy/ingest/Bundle.properties-MERGED b/Core/src/org/sleuthkit/autopsy/ingest/Bundle.properties-MERGED index 6be3e48e71..9e4f612b6b 100755 --- a/Core/src/org/sleuthkit/autopsy/ingest/Bundle.properties-MERGED +++ b/Core/src/org/sleuthkit/autopsy/ingest/Bundle.properties-MERGED @@ -140,7 +140,7 @@ IngestJob.cancelReason.outOfDiskSpace.text=Out of disk space IngestJob.cancelReason.servicesDown.text=Services Down IngestJob.cancelReason.caseClosed.text=Case closed IngestJobSettingsPanel.globalSettingsButton.text=Global Settings -gest= +gest IngestJobSettingsPanel.globalSettingsButton.actionCommand=Advanced IngestJobSettingsPanel.globalSettingsButton.text=Global Settings IngestJobSettingsPanel.pastJobsButton.text=History diff --git a/Core/src/org/sleuthkit/autopsy/livetriage/Bundle.properties-MERGED b/Core/src/org/sleuthkit/autopsy/livetriage/Bundle.properties-MERGED index e0a2ab0413..309a07d3da 100755 --- a/Core/src/org/sleuthkit/autopsy/livetriage/Bundle.properties-MERGED +++ b/Core/src/org/sleuthkit/autopsy/livetriage/Bundle.properties-MERGED @@ -18,10 +18,10 @@ SelectDriveDialog.diskTable.column2.title=Disk Size SelectDriveDialog.errLabel.disksNotDetected.text=Disks were not detected. On some systems it requires admin privileges SelectDriveDialog.errLabel.disksNotDetected.toolTipText=Disks were not detected. SelectDriveDialog.lbSelectDrive.text=Select the drive to copy the application and script to: -SelectDriveDialog.jLabel1.text=Select drive to use for live triage (may take time to load): SelectDriveDialog.errorLabel.text=jLabel2 SelectDriveDialog.bnCancel.text=Cancel -SelectDriveDialog.jTextArea1.text=This feature copies the application and a batch file to a removable drive,\nallowing systems to be analyzed without installing the software or\nimaging the drives.\n\nTo analyze a system, insert the drive and run "RunFromUSB.bat" as\nadministrator, then select the "Local Disk" option on the Add Data Source\npanel. +SelectDriveDialog.descriptionTextArea.text=This feature copies the application and a batch file to a removable drive,\nallowing systems to be analyzed without installing the software or\nimaging the drives.\n\nTo analyze a system, insert the drive and run "RunFromUSB.bat" as\nadministrator, then select the "Local Disk" option on the Add Data Source\npanel. SelectDriveDialog.localDiskModel.loading.msg= SelectDriveDialog.localDiskModel.nodrives.msg=Executable could not be found +SelectDriveDialog.selectDriveLabel.text=Select drive to use for live triage (may take time to load): SelectDriveDialog.title=Create Live Triage Drive diff --git a/Core/src/org/sleuthkit/autopsy/modules/dataSourceIntegrity/Bundle.properties-MERGED b/Core/src/org/sleuthkit/autopsy/modules/dataSourceIntegrity/Bundle.properties-MERGED index b006deb22d..e69126f939 100755 --- a/Core/src/org/sleuthkit/autopsy/modules/dataSourceIntegrity/Bundle.properties-MERGED +++ b/Core/src/org/sleuthkit/autopsy/modules/dataSourceIntegrity/Bundle.properties-MERGED @@ -45,6 +45,6 @@ DataSourceIntegrityIngestModule.shutDown.resultLi=

  • Result:{0}
  • DataSourceIntegrityIngestModule.shutDown.calcHashLi=
  • Calculated hash: {0}
  • DataSourceIntegrityIngestModule.shutDown.storedHashLi=
  • Stored hash: {0}
  • DataSourceIntegrityIngestSettingsPanel.computeHashesCheckbox.text=Calculate data source hashes if none are present -DataSourceIntegrityIngestSettingsPanel.jLabel1.text=Note that this module will not run on logical files -DataSourceIntegrityIngestSettingsPanel.jLabel3.text=Ingest Settings DataSourceIntegrityIngestSettingsPanel.verifyHashesCheckbox.text=Verify existing data source hashes +DataSourceIntegrityIngestSettingsPanel.ingestSettingsLabel.text=Ingest Settings +DataSourceIntegrityIngestSettingsPanel.noteLabel.text=Note that this module will not run on logical files diff --git a/Core/src/org/sleuthkit/autopsy/modules/embeddedfileextractor/Bundle.properties-MERGED b/Core/src/org/sleuthkit/autopsy/modules/embeddedfileextractor/Bundle.properties-MERGED index 4729293fb9..4585d86449 100755 --- a/Core/src/org/sleuthkit/autopsy/modules/embeddedfileextractor/Bundle.properties-MERGED +++ b/Core/src/org/sleuthkit/autopsy/modules/embeddedfileextractor/Bundle.properties-MERGED @@ -11,7 +11,12 @@ ExtractArchiveWithPasswordAction.progress.text=Unpacking contents of archive: {0 ExtractArchiveWithPasswordAction.prompt.text=Enter Password ExtractArchiveWithPasswordAction.prompt.title=Enter Password OpenIDE-Module-Display-Category=Ingest Module -OpenIDE-Module-Long-Description=Embedded File Extraction Ingest Module\n\nThe Embedded File Extraction Ingest Module processes document files (such as doc, docx, ppt, pptx, xls, xlsx) and archive files (such as zip and others archive types supported by the 7zip extractor).\nContents of these files are extracted and the derived files are added back to the current ingest to be processed by the configured ingest modules.\nIf the derived file happens to be an archive file, it will be re-processed by the 7zip extractor - the extractor will process archive files N-levels deep.\n\nThe extracted files are navigable in the directory tree.\n\nThe module is supported on Windows, Linux and Mac operating systems. +OpenIDE-Module-Long-Description=\ + Embedded File Extraction Ingest Module\n\nThe Embedded File Extraction Ingest Module processes document files (such as doc, docx, ppt, pptx, xls, xlsx) and archive files (such as zip and others archive types supported by the 7zip extractor).\n\ + Contents of these files are extracted and the derived files are added back to the current ingest to be processed by the configured ingest modules.\n\ + If the derived file happens to be an archive file, it will be re-processed by the 7zip extractor - the extractor will process archive files N-levels deep.\n\n\ + The extracted files are navigable in the directory tree.\n\n\ + The module is supported on Windows, Linux and Mac operating systems. OpenIDE-Module-Name=Embedded File Extraction OpenIDE-Module-Short-Description=Embedded File Extraction Ingest Module EmbeddedFileExtractorIngestModule.SevenZipContentReadStream.seek.exception.invalidOrigin=Invalid seek origin: {0} @@ -23,7 +28,6 @@ EmbeddedFileExtractorIngestModule.ArchiveExtractor.isZipBombCheck.warnMsg=Possib EmbeddedFileExtractorIngestModule.ArchiveExtractor.isZipBombCheck.warnDetails=Compression ratio is {0}, skipping items in {1}. EmbeddedFileExtractorIngestModule.ArchiveExtractor.unpack.warnMsg.zipBomb=Possible ZIP bomb detected: {0} EmbeddedFileExtractorIngestModule.ArchiveExtractor.unpack.warnDetails.zipBomb=The archive is {0} levels deep, skipping processing of {1} -EmbeddedFileExtractorIngestModule.ArchiveExtractor.unpack.unknownPath.msg=Unknown item path in archive: {0}, will use: {1} EmbeddedFileExtractorIngestModule.ArchiveExtractor.unpack.notEnoughDiskSpace.msg=Not enough disk space to unpack archive item: {0}, {1} EmbeddedFileExtractorIngestModule.ArchiveExtractor.unpack.notEnoughDiskSpace.details=The archive item is too large to unpack, skipping unpacking this item. EmbeddedFileExtractorIngestModule.ArchiveExtractor.unpack.errUnpacking.msg=Error unpacking {0} diff --git a/Core/src/org/sleuthkit/autopsy/modules/exif/Bundle.properties-MERGED b/Core/src/org/sleuthkit/autopsy/modules/exif/Bundle.properties-MERGED index 4915d5a124..f9a5a88b1b 100755 --- a/Core/src/org/sleuthkit/autopsy/modules/exif/Bundle.properties-MERGED +++ b/Core/src/org/sleuthkit/autopsy/modules/exif/Bundle.properties-MERGED @@ -2,7 +2,9 @@ CannotRunFileTypeDetection=Cannot run file type detection. ExifParserFileIngestModule.indexError.message=Failed to post EXIF Metadata artifact(s). ExifParserFileIngestModule.userContent.description=EXIF metadata exists for this file. OpenIDE-Module-Display-Category=Ingest Module -OpenIDE-Module-Long-Description=Exif metadata ingest module. \n\nThe ingest module analyzes image files, extracts Exif information and posts the Exif data as results. +OpenIDE-Module-Long-Description=\ + Exif metadata ingest module. \n\n\ + The ingest module analyzes image files, extracts Exif information and posts the Exif data as results. OpenIDE-Module-Name=ExifParser OpenIDE-Module-Short-Description=Exif metadata ingest module ExifParserFileIngestModule.moduleName.text=Exif Parser diff --git a/Core/src/org/sleuthkit/autopsy/modules/fileextmismatch/Bundle.properties-MERGED b/Core/src/org/sleuthkit/autopsy/modules/fileextmismatch/Bundle.properties-MERGED index 5063bd55fa..cfaadf1635 100755 --- a/Core/src/org/sleuthkit/autopsy/modules/fileextmismatch/Bundle.properties-MERGED +++ b/Core/src/org/sleuthkit/autopsy/modules/fileextmismatch/Bundle.properties-MERGED @@ -36,27 +36,27 @@ FileExtMismatchSettingsPanel.jLabel1.text=File Types: FileExtMismatchSettingsPanel.newExtButton.text=New Extension FileExtMismatchSettingsPanel.newMimePrompt.message=Add a new MIME file type: FileExtMismatchSettingsPanel.newMimePrompt.title=New MIME -FileExtMismatchSettingsPanel.newMimePrompt.emptyMime.message=MIME type text is empty! +FileExtMismatchSettingsPanel.newMimePrompt.emptyMime.message=MIME type text is empty\! FileExtMismatchSettingsPanel.newMimePrompt.emptyMime.title=Empty type -FileExtMismatchSettingsPanel.newMimePrompt.mimeTypeNotSupported.message=MIME type not supported! +FileExtMismatchSettingsPanel.newMimePrompt.mimeTypeNotSupported.message=MIME type not supported\! FileExtMismatchSettingsPanel.newMimePrompt.mimeTypeNotSupported.title=Type not supported -FileExtMismatchSettingsPanel.newMimePrompt.mimeTypeExists.message=MIME type already exists! +FileExtMismatchSettingsPanel.newMimePrompt.mimeTypeExists.message=MIME type already exists\! FileExtMismatchSettingsPanel.newMimePrompt.mimeTypeExists.title=Type already exists FileExtMismatchSettingsPanel.newMimePrompt.mimeTypeNotDetectable.message=MIME type is not detectable by this module. FileExtMismatchSettingsPanel.newMimePrompt.mimeTypeNotDetectable.title=Type not detectable -FileExtMismatchSettingsPanel.removeTypeButton.noneSelected.message=No MIME type selected! +FileExtMismatchSettingsPanel.removeTypeButton.noneSelected.message=No MIME type selected\! FileExtMismatchSettingsPanel.removeTypeButton.noneSelected.title=No type selected FileExtMismatchSettingsPanel.newExtPrompt.message=Add an allowed extension: FileExtMismatchSettingsPanel.newExtPrompt.title=New allowed extension -FileExtMismatchSettingsPanel.newExtPrompt.empty.message=Extension text is empty! +FileExtMismatchSettingsPanel.newExtPrompt.empty.message=Extension text is empty\! FileExtMismatchSettingsPanel.newExtPrompt.empty.title=Extension text empty -FileExtMismatchSettingsPanel.newExtPrompt.noMimeType.message=No MIME type selected! +FileExtMismatchSettingsPanel.newExtPrompt.noMimeType.message=No MIME type selected\! FileExtMismatchSettingsPanel.newExtPrompt.noMimeType.title=No MIME type selected -FileExtMismatchSettingsPanel.newExtPrompt.extExists.message=Extension already exists! +FileExtMismatchSettingsPanel.newExtPrompt.extExists.message=Extension already exists\! FileExtMismatchSettingsPanel.newExtPrompt.extExists.title=Extension already exists -FileExtMismatchSettingsPanel.removeExtButton.noneSelected.message=No extension selected! +FileExtMismatchSettingsPanel.removeExtButton.noneSelected.message=No extension selected\! FileExtMismatchSettingsPanel.removeExtButton.noneSelected.title=No extension selected -FileExtMismatchSettingsPanel.removeExtButton.noMimeTypeSelected.message=No MIME type selected! +FileExtMismatchSettingsPanel.removeExtButton.noMimeTypeSelected.message=No MIME type selected\! FileExtMismatchSettingsPanel.removeExtButton.noMimeTypeSelected.title=No MIME type selected FileExtMismatchSettingsPanel.removeTypeButton.toolTipText= FileExtMismatchModuleSettingsPanel.checkAllRadioButton.text=Check all file types diff --git a/Core/src/org/sleuthkit/autopsy/modules/filetypeid/Bundle.properties-MERGED b/Core/src/org/sleuthkit/autopsy/modules/filetypeid/Bundle.properties-MERGED index ccc55e18b0..ca866a4a13 100755 --- a/Core/src/org/sleuthkit/autopsy/modules/filetypeid/Bundle.properties-MERGED +++ b/Core/src/org/sleuthkit/autopsy/modules/filetypeid/Bundle.properties-MERGED @@ -51,7 +51,6 @@ FileTypeIdGlobalSettingsPanel.JOptionPane.loadFailed.title=Load Failed FileTypeIdGlobalSettingsPanel.loadFileTypes.errorMessage=Failed to load existing file type definitions. FileTypeIdGlobalSettingsPanel.saveFileTypes.errorMessage=Failed to save file type definitions. FileTypeIdGlobalSettingsPanel.newTypeButton.text=New Type -FileTypeIdGlobalSettingsPanel.jLabel2.text=Custom MIME Types: FileTypeIdGlobalSettingsPanel.startUp.fileTypeDetectorInitializationException.msg=Error initializing the file type detector. AddFileTypeSignaturePanel.offsetLabel.text=Byte Offset AddFileTypeSignaturePanel.signatureTextField.text= @@ -60,7 +59,6 @@ AddFileTypeSignaturePanel.signatureLabel.text=Signature AddFileTypeSignaturePanel.hexPrefixLabel.text=0x AddFileTypeSignaturePanel.offsetRelativeToLabel.text=Offset is relative to AddFileTypeSignaturePanel.offsetTextField.text= -FileTypeIdGlobalSettingsPanel.jLabel1.text=Signatures FileTypeIdGlobalSettingsPanel.editTypeButton.text=Edit Type AddFileTypePanel.mimeTypeTextField.text= AddFileTypePanel.mimeTypeLabel.text=MIME Type @@ -72,4 +70,6 @@ AddFileTypePanel.postHitCheckBox.text=Alert as an "Interesting File" when found AddFileTypePanel.setNameLabel.text=Set Name AddFileTypePanel.setNameTextField.text= FileTypeIdGlobalSettingsPanel.ingestRunningWarningLabel.text=Cannot make changes to file type definitions when ingest is running! -FileTypeIdGlobalSettingsPanel.jLabel3.text=Autopsy can automatically detect many file types. Add your custom file types here. +FileTypeIdGlobalSettingsPanel.descriptionLabel.text=Autopsy can automatically detect many file types. Add your custom file types here. +FileTypeIdGlobalSettingsPanel.customTypesLabel.text=Custom MIME Types: +FileTypeIdGlobalSettingsPanel.signaturesLabel.text=Signatures diff --git a/Core/src/org/sleuthkit/autopsy/modules/hashdatabase/Bundle.properties-MERGED b/Core/src/org/sleuthkit/autopsy/modules/hashdatabase/Bundle.properties-MERGED index 44057d0016..0f4db124af 100755 --- a/Core/src/org/sleuthkit/autopsy/modules/hashdatabase/Bundle.properties-MERGED +++ b/Core/src/org/sleuthkit/autopsy/modules/hashdatabase/Bundle.properties-MERGED @@ -49,7 +49,10 @@ ImportCentralRepoDbProgressDialog.errorParsingFile.message=Error parsing hash se ImportCentralRepoDbProgressDialog.linesProcessed.message=\ hashes processed ImportCentralRepoDbProgressDialog.title.text=Central Repository Import Progress OpenIDE-Module-Display-Category=Ingest Module -OpenIDE-Module-Long-Description=Hash Set ingest module. \n\nThe ingest module analyzes files in the disk image and marks them as "known" (based on NSRL hashset lookup for "known" files) and "bad / interesting" (based on one or more hash sets supplied by the user).\n\nThe module also contains additional non-ingest tools that are integrated in the GUI, such as file lookup by hash and hash set configuration. +OpenIDE-Module-Long-Description=\ + Hash Set ingest module. \n\n\ + The ingest module analyzes files in the disk image and marks them as "known" (based on NSRL hashset lookup for "known" files) and "bad / interesting" (based on one or more hash sets supplied by the user).\n\n\ + The module also contains additional non-ingest tools that are integrated in the GUI, such as file lookup by hash and hash set configuration. OpenIDE-Module-Name=HashDatabases OptionsCategory_Name_HashDatabase=Hash Sets OptionsCategory_Keywords_HashDatabase=Hash Sets @@ -178,7 +181,10 @@ HashDbSearchThread.name.searching=Searching HashDbSearchThread.noMoreFilesWithMD5Msg=No other files with the same MD5 hash were found. ModalNoButtons.indexingDbsTitle=Indexing hash sets ModalNoButtons.indexingDbTitle=Indexing hash set -ModalNoButtons.exitHashDbIndexingMsg=You are about to exit out of indexing your hash sets. \nThe generated index will be left unusable. If you choose to continue,\nplease delete the corresponding -md5.idx file in the hash folder.\nExit indexing? +ModalNoButtons.exitHashDbIndexingMsg=You are about to exit out of indexing your hash sets. \n\ +The generated index will be left unusable. If you choose to continue,\n\ + please delete the corresponding -md5.idx file in the hash folder.\n\ + Exit indexing? ModalNoButtons.dlgTitle.unfinishedIndexing=Unfinished Indexing ModalNoButtons.indexThis.currentlyIndexing1Db=Currently indexing 1 hash set ModalNoButtons.indexThese.currentlyIndexing1OfNDbs=Currently indexing 1 of {0} @@ -205,10 +211,6 @@ AddContentToHashDbAction.singleSelectionNameEmpty=Add File to Hash Set (Empty Fi AddContentToHashDbAction.multipleSelectionNameEmpty=Add Files to Hash Set (Empty File) HashDbManager.ingestRunningExceptionMsg=Ingest is ongoing; this service will be unavailable until it finishes. HashDbManager.saveErrorExceptionMsg=Error saving hash configuration -HashLookupSettingsPanel.jButton3.text=Import Hash Set -HashLookupSettingsPanel.jLabel6.text=Type: -HashLookupSettingsPanel.jLabel4.text=Location: -HashLookupSettingsPanel.jLabel2.text=Name: HashLookupModuleSettingsPanel.alwaysCalcHashesCheckbox.text=Calculate MD5 even if no hash set is selected HashLookupModuleSettingsPanel.knownHashDbsLabel.text=Select known hash sets to use: HashLookupModuleSettingsPanel.knownBadHashDbsLabel.text=Select notable hash sets to use: diff --git a/Core/src/org/sleuthkit/autopsy/modules/interestingitems/Bundle.properties-MERGED b/Core/src/org/sleuthkit/autopsy/modules/interestingitems/Bundle.properties-MERGED index 31a0690b82..3c275ee9cb 100755 --- a/Core/src/org/sleuthkit/autopsy/modules/interestingitems/Bundle.properties-MERGED +++ b/Core/src/org/sleuthkit/autopsy/modules/interestingitems/Bundle.properties-MERGED @@ -83,8 +83,8 @@ FilesSetRulePanel.nameTextField.text= FilesSetRulePanel.ruleNameLabel.text=Rule Name (Optional): FilesSetRulePanel.messages.emptyNameCondition=You must specify a name pattern for this rule. FilesSetRulePanel.messages.invalidNameRegex=The name regular expression is not valid:\n\n{0} -FilesSetRulePanel.messages.invalidCharInName=The name cannot contain \\, /, :, *, ?, ", <, or > unless it is a regular expression. -FilesSetRulePanel.messages.invalidCharInPath=The path cannot contain \\, :, *, ?, ", <, or > unless it is a regular expression. +FilesSetRulePanel.messages.invalidCharInName=The name cannot contain \\, /, :, *, ?, \", <, or > unless it is a regular expression. +FilesSetRulePanel.messages.invalidCharInPath=The path cannot contain \\, :, *, ?, \", <, or > unless it is a regular expression. FilesSetRulePanel.messages.invalidPathRegex=The path regular expression is not valid:\n\n{0} FilesSetDefsPanel.doFileSetsDialog.duplicateRuleSet.text=Rule set with name {0} already exists. FilesSetRulePanel.pathSeparatorInfoLabel.text=Folder must be in parent path. Use '/' to give consecutive names @@ -109,21 +109,14 @@ FilesSetDefsPanel.ingest.deleteSetButton.text=Delete Filter FilesSetDefsPanel.interesting.jLabel6.text=Set Details FilesSetDefsPanel.ingest.jLabel6.text=Filter Details FilesSetDefsPanel.newRuleButton.text=New Rule -FilesSetDefsPanel.jLabel8.text=File Size: -FilesSetDefsPanel.jLabel7.text=MIME Type: FilesSetDefsPanel.rulePathConditionRegexCheckBox.text=Regex -FilesSetDefsPanel.jLabel4.text=Path Substring: -FilesSetDefsPanel.jLabel1.text=Rule Details FilesSetDefsPanel.dirsRadioButton.text=Directories -FilesSetDefsPanel.jLabel2.text=File Type: FilesSetDefsPanel.deleteRuleButton.text=Delete Rule FilesSetDefsPanel.fileNameRegexCheckbox.text=Substring / Regex FilesSetDefsPanel.ignoreKnownFilesCheckbox.text=Ignore Known Files FilesSetDefsPanel.rulePathConditionTextField.text= FilesSetDefsPanel.fileNameRadioButton.text=Full Name -FilesSetDefsPanel.jLabel5.text=Description: FilesSetDefsPanel.fileNameTextField.text= -FilesSetDefsPanel.jLabel3.text=Name: FilesSetDefsPanel.fileNameExtensionRadioButton.text=Extension Only FilesSetDefsPanel.rulesListLabel.text=Rules: FilesSetDefsPanel.editRuleButton.text=Edit Rule @@ -140,3 +133,10 @@ FilesSetDefsPanel.modifiedDateLabel.text=Modified Within: FilesSetDefsPanel.daysIncludedTextField.text= FilesSetDefsPanel.daysIncludedLabel.text=day(s) FilesSetRulePanel.daysIncludedLabel.text=day(s) +FilesSetDefsPanel.nameLabel.text=Name: +FilesSetDefsPanel.descriptionLabel.text=Description: +FilesSetDefsPanel.fileTypeLabel.text=File Type: +FilesSetDefsPanel.ruleLabel.text=Rule Details +FilesSetDefsPanel.pathLabel.text=Path Substring: +FilesSetDefsPanel.mimeTypeLabel.text=MIME Type: +FilesSetDefsPanel.fileSizeLabel.text=File Size: diff --git a/Core/src/org/sleuthkit/autopsy/modules/photoreccarver/Bundle.properties-MERGED b/Core/src/org/sleuthkit/autopsy/modules/photoreccarver/Bundle.properties-MERGED index 2dc971a40d..87dacfc16c 100755 --- a/Core/src/org/sleuthkit/autopsy/modules/photoreccarver/Bundle.properties-MERGED +++ b/Core/src/org/sleuthkit/autopsy/modules/photoreccarver/Bundle.properties-MERGED @@ -21,7 +21,7 @@ PhotoRecIngestModule.complete.totalParsetime=Total Parsing Time: PhotoRecIngestModule.complete.photoRecResults=PhotoRec Results PhotoRecIngestModule.NotEnoughDiskSpace.detail.msg=PhotoRec error processing {0} with {1} Not enough space on primary disk to save unallocated space. PhotoRecIngestModule.cancelledByUser=PhotoRec cancelled by user. -PhotoRecIngestModule.error.exitValue=PhotoRec carver returned error exit value = {0} when scanning {1} +PhotoRecIngestModule.error.exitValue=PhotoRec carver returned error exit value \= {0} when scanning {1} PhotoRecIngestModule.error.msg=Error processing {0} with PhotoRec carver. PhotoRecIngestModule.complete.numberOfErrors=Number of Errors while Carving: PhotoRecCarverIngestJobSettingsPanel.detectionSettingsLabel.text=PhotoRec Settings diff --git a/Core/src/org/sleuthkit/autopsy/report/modules/html/Bundle.properties-MERGED b/Core/src/org/sleuthkit/autopsy/report/modules/html/Bundle.properties-MERGED index 0be7595111..32f6867f0c 100755 --- a/Core/src/org/sleuthkit/autopsy/report/modules/html/Bundle.properties-MERGED +++ b/Core/src/org/sleuthkit/autopsy/report/modules/html/Bundle.properties-MERGED @@ -5,8 +5,8 @@ ReportHTML.getName.text=HTML Report ReportHTML.getDesc.text=A report about results and tagged items in HTML format. ReportHTML.writeIndex.title=for case {0} ReportHTML.writeIndex.noFrames.msg=Your browser is not compatible with our frame setup. -ReportHTML.writeIndex.noFrames.seeNav=Please see the navigation page for artifact links, -ReportHTML.writeIndex.seeSum=and the summary page for a case summary. +ReportHTML.writeIndex.noFrames.seeNav=Please see the navigation page for artifact links, +ReportHTML.writeIndex.seeSum=and the summary page for a case summary. ReportHTML.writeNav.title=Report Navigation ReportHTML.writeNav.h1=Report Navigation ReportHTML.writeNav.summary=Case Summary @@ -16,7 +16,7 @@ ReportHTML.writeSum.caseNumber=Case Number: ReportHTML.writeSum.caseNumImages=Number of Images: ReportHTML.writeSum.examiner=Examiner: ReportHTML.writeSum.title=Case Summary -ReportHTML.writeSum.warningMsg=Warning, this report was run before ingest services completed! +ReportHTML.writeSum.warningMsg=Warning, this report was run before ingest services completed\! # # autopsy/test/scripts/regression.py._html_report_diff() uses reportGenOn.text, caseName, caseNum, # examiner as a regex signature to skip report.html and summary.html diff --git a/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/Bundle.properties-MERGED b/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/Bundle.properties-MERGED index 9aeeabc046..92c55b614f 100755 --- a/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/Bundle.properties-MERGED +++ b/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/Bundle.properties-MERGED @@ -36,7 +36,7 @@ KeywordSearchResultFactory.createNodeForKey.noResultsFound.text=No results found KeywordSearchResultFactory.query.exception.msg=Could not perform the query OpenIDE-Module-Display-Category=Ingest Module -OpenIDE-Module-Long-Description=Keyword Search ingest module.\n\nThe module indexes files found in the disk image at ingest time.\nIt then periodically runs the search on the indexed files using one or more keyword lists (containing pure words and/or regular expressions) and posts results.\n\nThe module also contains additional tools integrated in the main GUI, such as keyword list configuration, keyword search bar in the top-right corner, extracted text viewer and search results viewer showing highlighted keywords found. +OpenIDE-Module-Long-Description=Keyword Search ingest module.\n\nThe module indexes files found in the disk image at ingest time.\nIt then periodically runs the search on the indexed files using one or more keyword lists (containing pure words and/or regular expressions) and posts results.\n\n\The module also contains additional tools integrated in the main GUI, such as keyword list configuration, keyword search bar in the top-right corner, extracted text viewer and search results viewer showing highlighted keywords found. OpenIDE-Module-Name=KeywordSearch OptionsCategory_Name_KeywordSearchOptions=Keyword Search OptionsCategory_Keywords_KeywordSearchOptions=Keyword Search diff --git a/RecentActivity/src/org/sleuthkit/autopsy/recentactivity/Bundle.properties-MERGED b/RecentActivity/src/org/sleuthkit/autopsy/recentactivity/Bundle.properties-MERGED index 18deff87f4..ebdce8a327 100755 --- a/RecentActivity/src/org/sleuthkit/autopsy/recentactivity/Bundle.properties-MERGED +++ b/RecentActivity/src/org/sleuthkit/autopsy/recentactivity/Bundle.properties-MERGED @@ -1,7 +1,6 @@ cannotBuildXmlParser=Unable to build XML parser: cannotLoadSEUQA=Unable to load Search Engine URL Query Analyzer settings file, SEUQAMappings.xml: cannotParseXml=Unable to parse XML file: -Chrome.getBookmark.errMsg.errAnalyzeFile={0}: Error while trying to analyze file: {1} ChromeCacheExtract_adding_artifacts_msg=Chrome Cache: Adding %d artifacts for analysis. ChromeCacheExtract_adding_extracted_files_msg=Chrome Cache: Adding %d extracted files for analysis. ChromeCacheExtract_loading_files_msg=Chrome Cache: Loading files from %s. @@ -14,9 +13,9 @@ ChromeCacheExtractor.progressMsg={0}: Extracting cache entry {1} of {2} entries DataSourceUsage_AndroidMedia=Android Media Card DataSourceUsage_DJU_Drone_DAT=DJI Internal SD Card DataSourceUsage_FlashDrive=Flash Drive +# {0} - OS name DataSourceUsageAnalyzer.customVolume.label=OS Drive ({0}) DataSourceUsageAnalyzer.parentModuleName=Recent Activity -Extract.dbConn.errMsg.failedToQueryDb={0}: Failed to query database. Extract.indexError.message=Failed to index artifact for keyword search. Extract.noOpenCase.errMsg=No open case available. ExtractEdge_getHistory_containerFileNotFound=Error while trying to analyze Edge history @@ -25,11 +24,6 @@ ExtractEdge_process_errMsg_errGettingWebCacheFiles=Error trying to retrieving Ed ExtractEdge_process_errMsg_spartanFail=Failure processing Microsoft Edge spartan.edb file ExtractEdge_process_errMsg_unableFindESEViewer=Unable to find ESEDatabaseViewer ExtractEdge_process_errMsg_webcacheFail=Failure processing Microsoft Edge WebCacheV01.dat file -ExtractIE.getBookmark.ere.noSpace=RecentActivity -ExtractIE.getBookmark.errMsg.errPostingBookmarks=Error posting Internet Explorer Bookmark artifacts. -ExtractIE.getCookie.errMsg.errPostingCookies=Error posting Internet Explorer Cookie artifacts. -ExtractIE.getHistory.errMsg.errPostingHistory=Error posting Internet Explorer History artifacts. -Extractor.errPostingArtifacts=Error posting {0} artifacts to the blackboard. ExtractOs.androidOs.label=Android ExtractOs.androidVolume.label=OS Drive (Android) ExtractOs.debianLinuxOs.label=Linux (Debian) @@ -96,7 +90,7 @@ Chrome.getLogin.errMsg.errAnalyzingFiles={0}: Error while trying to analyze file Chrome.getAutofill.errMsg.errGettingFiles=Error when trying to get Chrome Web Data files. Chrome.getAutofill.errMsg.errAnalyzingFiles={0}: Error while trying to analyze file:{1} ExtractIE.moduleName.text=Internet Explorer -ExtractIE.getBookmark.errMsg.errGettingBookmarks=Error getting Internet Explorer Bookmarks. +ExtractIE.getBookmark.errMsg.errGettingBookmarks={0}: Error getting Internet Explorer Bookmarks. ExtractIE.parentModuleName.noSpace=RecentActivity ExtractIE.parentModuleName=Recent Activity ExtractIE.getURLFromIEBmkFile.errMsg={0}: Error parsing IE bookmark File {1} @@ -198,6 +192,7 @@ RecentDocumentsByLnk.parentModuleName.noSpace=RecentActivity RecentDocumentsByLnk.parentModuleName=Recent Activity RegRipperFullNotFound=Full version RegRipper executable not found. RegRipperNotFound=Autopsy RegRipper executable not found. +# {0} - file name SearchEngineURLQueryAnalyzer.init.exception.msg=Unable to find {0}. SearchEngineURLQueryAnalyzer.moduleName.text=Search Engine SearchEngineURLQueryAnalyzer.engineName.none=NONE diff --git a/branding/core/core.jar/org/netbeans/core/startup/Bundle.properties b/branding/core/core.jar/org/netbeans/core/startup/Bundle.properties index b20ccf5912..199e018ea8 100644 --- a/branding/core/core.jar/org/netbeans/core/startup/Bundle.properties +++ b/branding/core/core.jar/org/netbeans/core/startup/Bundle.properties @@ -1,5 +1,5 @@ #Updated by build script -#Tue, 12 Nov 2019 17:21:46 -0500 +#Wed, 01 Apr 2020 15:51:37 -0400 LBL_splash_window_title=Starting Autopsy SPLASH_HEIGHT=314 SPLASH_WIDTH=538 @@ -8,4 +8,4 @@ SplashRunningTextBounds=0,289,538,18 SplashRunningTextColor=0x0 SplashRunningTextFontSize=19 -currentVersion=Autopsy 4.13.0 +currentVersion=Autopsy 4.14.0 diff --git a/branding/modules/org-netbeans-core-windows.jar/org/netbeans/core/windows/view/ui/Bundle.properties b/branding/modules/org-netbeans-core-windows.jar/org/netbeans/core/windows/view/ui/Bundle.properties index 998d3f715c..9368d6b951 100644 --- a/branding/modules/org-netbeans-core-windows.jar/org/netbeans/core/windows/view/ui/Bundle.properties +++ b/branding/modules/org-netbeans-core-windows.jar/org/netbeans/core/windows/view/ui/Bundle.properties @@ -1,4 +1,4 @@ #Updated by build script -#Tue, 12 Nov 2019 17:21:46 -0500 -CTL_MainWindow_Title=Autopsy 4.13.0 -CTL_MainWindow_Title_No_Project=Autopsy 4.13.0 +#Wed, 01 Apr 2020 15:51:37 -0400 +CTL_MainWindow_Title=Autopsy 4.14.0 +CTL_MainWindow_Title_No_Project=Autopsy 4.14.0 From 46f77cf8ba2a250475548da0917e12e131477304 Mon Sep 17 00:00:00 2001 From: Greg DiCristofaro Date: Wed, 1 Apr 2020 16:00:52 -0400 Subject: [PATCH 018/137] bundle fixes --- .../casemodule/Bundle.properties-MERGED | 2 +- .../autopsy/core/Bundle.properties-MERGED | 8 +------- .../corecomponents/Bundle.properties-MERGED | 12 ++++++------ .../autopsy/coreutils/Bundle.properties-MERGED | 4 +--- .../directorytree/Bundle.properties-MERGED | 6 +++--- .../filesearch/Bundle.properties-MERGED | 10 +++++----- .../autopsy/ingest/Bundle.properties-MERGED | 2 +- .../livetriage/Bundle.properties-MERGED | 4 ++-- .../Bundle.properties-MERGED | 4 ++-- .../Bundle.properties-MERGED | 8 ++------ .../modules/exif/Bundle.properties-MERGED | 4 +--- .../fileextmismatch/Bundle.properties-MERGED | 18 +++++++++--------- .../filetypeid/Bundle.properties-MERGED | 6 +++--- .../hashdatabase/Bundle.properties-MERGED | 14 ++++++-------- .../interestingitems/Bundle.properties-MERGED | 18 +++++++++--------- .../photoreccarver/Bundle.properties-MERGED | 2 +- .../modules/html/Bundle.properties-MERGED | 6 +++--- .../keywordsearch/Bundle.properties-MERGED | 2 +- .../recentactivity/Bundle.properties-MERGED | 11 ++++++++--- .../netbeans/core/startup/Bundle.properties | 4 ++-- .../core/windows/view/ui/Bundle.properties | 6 +++--- 21 files changed, 70 insertions(+), 81 deletions(-) diff --git a/Core/src/org/sleuthkit/autopsy/casemodule/Bundle.properties-MERGED b/Core/src/org/sleuthkit/autopsy/casemodule/Bundle.properties-MERGED index b062dffebd..b56e46b377 100755 --- a/Core/src/org/sleuthkit/autopsy/casemodule/Bundle.properties-MERGED +++ b/Core/src/org/sleuthkit/autopsy/casemodule/Bundle.properties-MERGED @@ -186,6 +186,7 @@ NewCaseVisualPanel1.caseNameLabel.text_1=Case Name: NewCaseVisualPanel1.caseDirLabel.text=Base Directory: NewCaseVisualPanel1.caseDirBrowseButton.text=Browse NewCaseVisualPanel1.caseNameTextField.text_1= +NewCaseVisualPanel1.jLabel2.text_1=Case data will be stored in the following directory: NewCaseVisualPanel1.caseParentDirTextField.text= NewCaseVisualPanel1.caseDirTextField.text_1= CueBannerPanel.autopsyLogo.text= @@ -466,4 +467,3 @@ UnpackagePortableCaseProgressDialog.okButton.text=OK UnpackagePortableCaseProgressDialog.resultLabel.text=resultLabel UnpackagePortableCaseDialog.extractLabel.text=Folder to extract to: UnpackagePortableCaseDialog.caseLabel.text=Portable Case: -NewCaseVisualPanel1.caseDataStoredLabel.text_1=Case data will be stored in the following directory: diff --git a/Core/src/org/sleuthkit/autopsy/core/Bundle.properties-MERGED b/Core/src/org/sleuthkit/autopsy/core/Bundle.properties-MERGED index 0b16a9701f..c84f1f1b86 100755 --- a/Core/src/org/sleuthkit/autopsy/core/Bundle.properties-MERGED +++ b/Core/src/org/sleuthkit/autopsy/core/Bundle.properties-MERGED @@ -3,13 +3,7 @@ Installer.closing.confirmationDialog.title=Ingest is Running # {0} - exception message Installer.closing.messageBox.caseCloseExceptionMessage=Error closing case: {0} OpenIDE-Module-Display-Category=Infrastructure -OpenIDE-Module-Long-Description=\ - This is the core Autopsy module.\n\n\ - The module contains the core components needed for the bare application to run; the RCP platform, windowing GUI, sleuthkit bindings, datamodel / storage, explorer, result viewers, content viewers, ingest framework, reporting, and core tools, such as the file search.\n\n\ - The framework included in the module contains APIs for developing modules for ingest, viewers and reporting. \ - The modules can be deployed as Plugins using the Autopsy plugin installer.\n\ - This module should not be uninstalled - without it, Autopsy will not run.\n\n\ - For more information, see http://www.sleuthkit.org/autopsy/ +OpenIDE-Module-Long-Description=This is the core Autopsy module.\n\nThe module contains the core components needed for the bare application to run; the RCP platform, windowing GUI, sleuthkit bindings, datamodel / storage, explorer, result viewers, content viewers, ingest framework, reporting, and core tools, such as the file search.\n\nThe framework included in the module contains APIs for developing modules for ingest, viewers and reporting. The modules can be deployed as Plugins using the Autopsy plugin installer.\nThis module should not be uninstalled - without it, Autopsy will not run.\n\nFor more information, see http://www.sleuthkit.org/autopsy/ OpenIDE-Module-Name=Autopsy-Core OpenIDE-Module-Short-Description=Autopsy Core Module org_sleuthkit_autopsy_core_update_center=http://sleuthkit.org/autopsy/updates.xml diff --git a/Core/src/org/sleuthkit/autopsy/corecomponents/Bundle.properties-MERGED b/Core/src/org/sleuthkit/autopsy/corecomponents/Bundle.properties-MERGED index 544cfa63c0..f252420726 100755 --- a/Core/src/org/sleuthkit/autopsy/corecomponents/Bundle.properties-MERGED +++ b/Core/src/org/sleuthkit/autopsy/corecomponents/Bundle.properties-MERGED @@ -63,9 +63,9 @@ DataContentViewerHex.totalPageLabel.text_1=100 DataContentViewerHex.pageLabel2.text=Page # Product Information panel -LBL_Description=
    \n Product Version: {0} ({9})
    Sleuth Kit Version: {7}
    Netbeans RCP Build: {8}
    Java: {1}; {2}
    System: {3}; {4}; {5}
    Userdir: {6}
    +LBL_Description=
    \n Product Version: {0} ({9})
    Sleuth Kit Version: {7}
    Netbeans RCP Build: {8}
    Java: {1}; {2}
    System: {3}; {4}; {5}
    Userdir: {6}
    Format_OperatingSystem_Value={0} version {1} running on {2} -LBL_Copyright=
    Autopsy™ is a digital forensics platform based on The Sleuth Kit™ and other tools.
    Copyright © 2003-2018.
    +LBL_Copyright=
    Autopsy™ is a digital forensics platform based on The Sleuth Kit™ and other tools.
    Copyright © 2003-2018.
    SortChooser.dialogTitle=Choose Sort Criteria ThumbnailViewChildren.progress.cancelling=(Cancelling) # {0} - file name @@ -95,7 +95,7 @@ DataResultViewerThumbnail.pageNextButton.text= DataResultViewerThumbnail.imagesLabel.text=Images: DataResultViewerThumbnail.imagesRangeLabel.text=- DataResultViewerThumbnail.pageNumLabel.text=- -DataResultViewerThumbnail.filePathLabel.text=\ \ \ +DataResultViewerThumbnail.filePathLabel.text=\ DataResultViewerThumbnail.goToPageLabel.text=Go to Page: DataResultViewerThumbnail.goToPageField.text= AdvancedConfigurationDialog.cancelButton.text=Cancel @@ -129,9 +129,9 @@ DataResultViewerThumbnail.switchPage.done.errMsg=Error making thumbnails: {0} AboutWindowPanel.actVerboseLogging.text=Activate verbose logging OptionsCategory_Name_Multi_User_Settings=Multi-User OptionsCategory_Keywords_Multi_User_Options=Multi-User Settings -MultiUserSettingsPanel.lbSolrSettings.text=Solr Server Settings +MultiUserSettingsPanel.lbSolrSettings.text=Solr Settings MultiUserSettingsPanel.cbEnableMultiUser.text=Enable multi-user cases -MultiUserSettingsPanel.lbDatabaseSettings.text=Database Server Settings +MultiUserSettingsPanel.lbDatabaseSettings.text=Database Settings MultiUserSettingsPanel.validationErrMsg.incomplete=Fill in all values MultiUserSettingsPanel.nonWindowsOs.msg=Multi-user cases are only available on Windows platforms MultiUserSettingsPanel.validationErrMsg.invalidDatabasePort=Invalid database port number @@ -159,7 +159,7 @@ MultiUserSettingsPanel.tbSolrHostname.toolTipText=Hostname or IP Address MultiUserSettingsPanel.tbSolrPort.toolTipText=Port Number MultiUserSettingsPanel.lbTestMessageService.text= MultiUserSettingsPanel.bnTestMessageService.text=Test -MultiUserSettingsPanel.lbMessageServiceSettings.text=ActiveMQ Message Server Settings +MultiUserSettingsPanel.lbMessageServiceSettings.text=ActiveMQ Message Service Settings MultiUserSettingsPanel.tbMsgPort.toolTipText=Port Number MultiUserSettingsPanel.tbMsgPort.text= MultiUserSettingsPanel.tbMsgUsername.toolTipText=User Name (optional) diff --git a/Core/src/org/sleuthkit/autopsy/coreutils/Bundle.properties-MERGED b/Core/src/org/sleuthkit/autopsy/coreutils/Bundle.properties-MERGED index a0d535f8e6..18e279dd2c 100755 --- a/Core/src/org/sleuthkit/autopsy/coreutils/Bundle.properties-MERGED +++ b/Core/src/org/sleuthkit/autopsy/coreutils/Bundle.properties-MERGED @@ -30,9 +30,7 @@ PlatformUtil.getProcVmUsed.sigarNotInit.msg=Cannot get virt mem used, sigar not PlatformUtil.getProcVmUsed.gen.msg=Cannot get virt mem used, {0} PlatformUtil.getJvmMemInfo.usageText=JVM heap usage: {0}, JVM non-heap usage: {1} PlatformUtil.getPhysicalMemInfo.usageText=Physical memory usage (max, total, free): {0}, {1}, {2} -PlatformUtil.getAllMemUsageInfo.usageText={0}\n\ -{1}\n\ -Process Virtual Memory: {2} +PlatformUtil.getAllMemUsageInfo.usageText={0}\n{1}\nProcess Virtual Memory: {2} # {0} - file name ReadImageTask.mesageText=Reading image: {0} StringExtract.illegalStateException.cannotInit.msg=Unicode table not properly initialized, cannot instantiate StringExtract diff --git a/Core/src/org/sleuthkit/autopsy/directorytree/Bundle.properties-MERGED b/Core/src/org/sleuthkit/autopsy/directorytree/Bundle.properties-MERGED index 7e96d8fdaa..63b416b176 100755 --- a/Core/src/org/sleuthkit/autopsy/directorytree/Bundle.properties-MERGED +++ b/Core/src/org/sleuthkit/autopsy/directorytree/Bundle.properties-MERGED @@ -38,6 +38,8 @@ HINT_DirectoryTreeTopComponent=This is a DirectoryTree window OpenIDE-Module-Name=DirectoryTree FileSystemDetailsPanel.imgOffsetLabel.text=Image Offset: FileSystemDetailsPanel.fsTypeLabel.text=FileSystem Type: +FileSystemDetailsPanel.jLabel2.text=bytes +FileSystemDetailsPanel.jLabel3.text=bytes FileSystemDetailsPanel.fsTypeValue.text=... FileSystemDetailsPanel.imgOffsetValue.text=... FileSystemDetailsPanel.volumeIDValue.text=... @@ -69,6 +71,7 @@ VolumeDetailsPanel.startLabel.text=Starting Sector: VolumeDetailsPanel.lengthLabel.text=Length in Sectors: VolumeDetailsPanel.descLabel.text=Description: VolumeDetailsPanel.flagsLabel.text=Flags: +VolumeDetailsPanel.jLabel1.text=General Volume Information VolumeDetailsPanel.OKButton.text=OK ImageDetailsPanel.imageInfoLabel.text=Image Information ImageDetailsPanel.imgNameLabel.text=Name: @@ -157,6 +160,3 @@ ExternalViewerGlobalSettingsPanel.jButton2.text=jButton2 ExternalViewerGlobalSettingsPanel.browseHxDDirectory.text=Browse ExternalViewerGlobalSettingsPanel.HxDLabel.text=HxD Editor Path: ExternalViewerGlobalSettingsPanel.ContentViewerExtensionLabel.text=Add content viewer extensions: -FileSystemDetailsPanel.bytesLabel1.text=bytes -FileSystemDetailsPanel.bytesLabel2.text=bytes -VolumeDetailsPanel.generalVolumeLabel.text=General Volume Information diff --git a/Core/src/org/sleuthkit/autopsy/filesearch/Bundle.properties-MERGED b/Core/src/org/sleuthkit/autopsy/filesearch/Bundle.properties-MERGED index b304bc1342..c585d0edf5 100755 --- a/Core/src/org/sleuthkit/autopsy/filesearch/Bundle.properties-MERGED +++ b/Core/src/org/sleuthkit/autopsy/filesearch/Bundle.properties-MERGED @@ -14,9 +14,11 @@ KnownStatusSearchPanel.knownCheckBox.text=Known Status: KnownStatusSearchPanel.knownBadOptionCheckBox.text=Notable KnownStatusSearchPanel.knownOptionCheckBox.text=Known (NSRL or other) KnownStatusSearchPanel.unknownOptionCheckBox.text=Unknown -DateSearchFilter.noneSelectedMsg.text=At least one date type must be selected\! +DateSearchFilter.noneSelectedMsg.text=At least one date type must be selected! DateSearchPanel.dateCheckBox.text=Date: DateSearchPanel.jLabel4.text=Timezone: +DateSearchPanel.jLabel3.text=*The date format is mm/dd/yyyy +DateSearchPanel.jLabel2.text=*Empty fields mean "No Limit" DateSearchPanel.createdCheckBox.text=Created DateSearchPanel.accessedCheckBox.text=Accessed DateSearchPanel.changedCheckBox.text=Changed @@ -55,11 +57,12 @@ FileSearchPanel.search.results.details=Large number of matches may impact perfor FileSearchPanel.search.exception.noFilterSelected.msg=At least one filter must be selected. FileSearchPanel.search.validationErr.msg=Validation Error: {0} FileSearchPanel.emptyWhereClause.text=Invalid options, nothing to show. -KnownStatusSearchFilter.noneSelectedMsg.text=At least one known status must be selected\! +KnownStatusSearchFilter.noneSelectedMsg.text=At least one known status must be selected! NameSearchFilter.emptyNameMsg.text=Must enter something for name search. SizeSearchPanel.sizeCompareComboBox.equalTo=equal to SizeSearchPanel.sizeCompareComboBox.greaterThan=greater than SizeSearchPanel.sizeCompareComboBox.lessThan=less than +MimeTypePanel.jLabel1.text=*Note: Multiple MIME types can be selected FileSearchPanel.searchButton.text=Search MimeTypePanel.mimeTypeCheckBox.text=MIME Type: HashSearchPanel.md5CheckBox.text=MD5: @@ -69,6 +72,3 @@ DataSourcePanel.dataSourceCheckBox.label=Data Source: DataSourcePanel.dataSourceCheckBox.actionCommand=Data Source: DataSourcePanel.dataSourceCheckBox.text=Data Source: DataSourcePanel.dataSourceNoteLabel.text=*Note: Multiple data sources can be selected -DateSearchPanel.noLimitLabel.text=*Empty fields mean "No Limit" -DateSearchPanel.dateFormatLabel.text=*The date format is mm/dd/yyyy -MimeTypePanel.noteLabel.text=*Note: Multiple MIME types can be selected diff --git a/Core/src/org/sleuthkit/autopsy/ingest/Bundle.properties-MERGED b/Core/src/org/sleuthkit/autopsy/ingest/Bundle.properties-MERGED index 9e4f612b6b..6be3e48e71 100755 --- a/Core/src/org/sleuthkit/autopsy/ingest/Bundle.properties-MERGED +++ b/Core/src/org/sleuthkit/autopsy/ingest/Bundle.properties-MERGED @@ -140,7 +140,7 @@ IngestJob.cancelReason.outOfDiskSpace.text=Out of disk space IngestJob.cancelReason.servicesDown.text=Services Down IngestJob.cancelReason.caseClosed.text=Case closed IngestJobSettingsPanel.globalSettingsButton.text=Global Settings -gest +gest= IngestJobSettingsPanel.globalSettingsButton.actionCommand=Advanced IngestJobSettingsPanel.globalSettingsButton.text=Global Settings IngestJobSettingsPanel.pastJobsButton.text=History diff --git a/Core/src/org/sleuthkit/autopsy/livetriage/Bundle.properties-MERGED b/Core/src/org/sleuthkit/autopsy/livetriage/Bundle.properties-MERGED index 309a07d3da..e0a2ab0413 100755 --- a/Core/src/org/sleuthkit/autopsy/livetriage/Bundle.properties-MERGED +++ b/Core/src/org/sleuthkit/autopsy/livetriage/Bundle.properties-MERGED @@ -18,10 +18,10 @@ SelectDriveDialog.diskTable.column2.title=Disk Size SelectDriveDialog.errLabel.disksNotDetected.text=Disks were not detected. On some systems it requires admin privileges SelectDriveDialog.errLabel.disksNotDetected.toolTipText=Disks were not detected. SelectDriveDialog.lbSelectDrive.text=Select the drive to copy the application and script to: +SelectDriveDialog.jLabel1.text=Select drive to use for live triage (may take time to load): SelectDriveDialog.errorLabel.text=jLabel2 SelectDriveDialog.bnCancel.text=Cancel -SelectDriveDialog.descriptionTextArea.text=This feature copies the application and a batch file to a removable drive,\nallowing systems to be analyzed without installing the software or\nimaging the drives.\n\nTo analyze a system, insert the drive and run "RunFromUSB.bat" as\nadministrator, then select the "Local Disk" option on the Add Data Source\npanel. +SelectDriveDialog.jTextArea1.text=This feature copies the application and a batch file to a removable drive,\nallowing systems to be analyzed without installing the software or\nimaging the drives.\n\nTo analyze a system, insert the drive and run "RunFromUSB.bat" as\nadministrator, then select the "Local Disk" option on the Add Data Source\npanel. SelectDriveDialog.localDiskModel.loading.msg= SelectDriveDialog.localDiskModel.nodrives.msg=Executable could not be found -SelectDriveDialog.selectDriveLabel.text=Select drive to use for live triage (may take time to load): SelectDriveDialog.title=Create Live Triage Drive diff --git a/Core/src/org/sleuthkit/autopsy/modules/dataSourceIntegrity/Bundle.properties-MERGED b/Core/src/org/sleuthkit/autopsy/modules/dataSourceIntegrity/Bundle.properties-MERGED index e69126f939..b006deb22d 100755 --- a/Core/src/org/sleuthkit/autopsy/modules/dataSourceIntegrity/Bundle.properties-MERGED +++ b/Core/src/org/sleuthkit/autopsy/modules/dataSourceIntegrity/Bundle.properties-MERGED @@ -45,6 +45,6 @@ DataSourceIntegrityIngestModule.shutDown.resultLi=
  • Result:{0}
  • DataSourceIntegrityIngestModule.shutDown.calcHashLi=
  • Calculated hash: {0}
  • DataSourceIntegrityIngestModule.shutDown.storedHashLi=
  • Stored hash: {0}
  • DataSourceIntegrityIngestSettingsPanel.computeHashesCheckbox.text=Calculate data source hashes if none are present +DataSourceIntegrityIngestSettingsPanel.jLabel1.text=Note that this module will not run on logical files +DataSourceIntegrityIngestSettingsPanel.jLabel3.text=Ingest Settings DataSourceIntegrityIngestSettingsPanel.verifyHashesCheckbox.text=Verify existing data source hashes -DataSourceIntegrityIngestSettingsPanel.ingestSettingsLabel.text=Ingest Settings -DataSourceIntegrityIngestSettingsPanel.noteLabel.text=Note that this module will not run on logical files diff --git a/Core/src/org/sleuthkit/autopsy/modules/embeddedfileextractor/Bundle.properties-MERGED b/Core/src/org/sleuthkit/autopsy/modules/embeddedfileextractor/Bundle.properties-MERGED index 4585d86449..4729293fb9 100755 --- a/Core/src/org/sleuthkit/autopsy/modules/embeddedfileextractor/Bundle.properties-MERGED +++ b/Core/src/org/sleuthkit/autopsy/modules/embeddedfileextractor/Bundle.properties-MERGED @@ -11,12 +11,7 @@ ExtractArchiveWithPasswordAction.progress.text=Unpacking contents of archive: {0 ExtractArchiveWithPasswordAction.prompt.text=Enter Password ExtractArchiveWithPasswordAction.prompt.title=Enter Password OpenIDE-Module-Display-Category=Ingest Module -OpenIDE-Module-Long-Description=\ - Embedded File Extraction Ingest Module\n\nThe Embedded File Extraction Ingest Module processes document files (such as doc, docx, ppt, pptx, xls, xlsx) and archive files (such as zip and others archive types supported by the 7zip extractor).\n\ - Contents of these files are extracted and the derived files are added back to the current ingest to be processed by the configured ingest modules.\n\ - If the derived file happens to be an archive file, it will be re-processed by the 7zip extractor - the extractor will process archive files N-levels deep.\n\n\ - The extracted files are navigable in the directory tree.\n\n\ - The module is supported on Windows, Linux and Mac operating systems. +OpenIDE-Module-Long-Description=Embedded File Extraction Ingest Module\n\nThe Embedded File Extraction Ingest Module processes document files (such as doc, docx, ppt, pptx, xls, xlsx) and archive files (such as zip and others archive types supported by the 7zip extractor).\nContents of these files are extracted and the derived files are added back to the current ingest to be processed by the configured ingest modules.\nIf the derived file happens to be an archive file, it will be re-processed by the 7zip extractor - the extractor will process archive files N-levels deep.\n\nThe extracted files are navigable in the directory tree.\n\nThe module is supported on Windows, Linux and Mac operating systems. OpenIDE-Module-Name=Embedded File Extraction OpenIDE-Module-Short-Description=Embedded File Extraction Ingest Module EmbeddedFileExtractorIngestModule.SevenZipContentReadStream.seek.exception.invalidOrigin=Invalid seek origin: {0} @@ -28,6 +23,7 @@ EmbeddedFileExtractorIngestModule.ArchiveExtractor.isZipBombCheck.warnMsg=Possib EmbeddedFileExtractorIngestModule.ArchiveExtractor.isZipBombCheck.warnDetails=Compression ratio is {0}, skipping items in {1}. EmbeddedFileExtractorIngestModule.ArchiveExtractor.unpack.warnMsg.zipBomb=Possible ZIP bomb detected: {0} EmbeddedFileExtractorIngestModule.ArchiveExtractor.unpack.warnDetails.zipBomb=The archive is {0} levels deep, skipping processing of {1} +EmbeddedFileExtractorIngestModule.ArchiveExtractor.unpack.unknownPath.msg=Unknown item path in archive: {0}, will use: {1} EmbeddedFileExtractorIngestModule.ArchiveExtractor.unpack.notEnoughDiskSpace.msg=Not enough disk space to unpack archive item: {0}, {1} EmbeddedFileExtractorIngestModule.ArchiveExtractor.unpack.notEnoughDiskSpace.details=The archive item is too large to unpack, skipping unpacking this item. EmbeddedFileExtractorIngestModule.ArchiveExtractor.unpack.errUnpacking.msg=Error unpacking {0} diff --git a/Core/src/org/sleuthkit/autopsy/modules/exif/Bundle.properties-MERGED b/Core/src/org/sleuthkit/autopsy/modules/exif/Bundle.properties-MERGED index f9a5a88b1b..4915d5a124 100755 --- a/Core/src/org/sleuthkit/autopsy/modules/exif/Bundle.properties-MERGED +++ b/Core/src/org/sleuthkit/autopsy/modules/exif/Bundle.properties-MERGED @@ -2,9 +2,7 @@ CannotRunFileTypeDetection=Cannot run file type detection. ExifParserFileIngestModule.indexError.message=Failed to post EXIF Metadata artifact(s). ExifParserFileIngestModule.userContent.description=EXIF metadata exists for this file. OpenIDE-Module-Display-Category=Ingest Module -OpenIDE-Module-Long-Description=\ - Exif metadata ingest module. \n\n\ - The ingest module analyzes image files, extracts Exif information and posts the Exif data as results. +OpenIDE-Module-Long-Description=Exif metadata ingest module. \n\nThe ingest module analyzes image files, extracts Exif information and posts the Exif data as results. OpenIDE-Module-Name=ExifParser OpenIDE-Module-Short-Description=Exif metadata ingest module ExifParserFileIngestModule.moduleName.text=Exif Parser diff --git a/Core/src/org/sleuthkit/autopsy/modules/fileextmismatch/Bundle.properties-MERGED b/Core/src/org/sleuthkit/autopsy/modules/fileextmismatch/Bundle.properties-MERGED index cfaadf1635..5063bd55fa 100755 --- a/Core/src/org/sleuthkit/autopsy/modules/fileextmismatch/Bundle.properties-MERGED +++ b/Core/src/org/sleuthkit/autopsy/modules/fileextmismatch/Bundle.properties-MERGED @@ -36,27 +36,27 @@ FileExtMismatchSettingsPanel.jLabel1.text=File Types: FileExtMismatchSettingsPanel.newExtButton.text=New Extension FileExtMismatchSettingsPanel.newMimePrompt.message=Add a new MIME file type: FileExtMismatchSettingsPanel.newMimePrompt.title=New MIME -FileExtMismatchSettingsPanel.newMimePrompt.emptyMime.message=MIME type text is empty\! +FileExtMismatchSettingsPanel.newMimePrompt.emptyMime.message=MIME type text is empty! FileExtMismatchSettingsPanel.newMimePrompt.emptyMime.title=Empty type -FileExtMismatchSettingsPanel.newMimePrompt.mimeTypeNotSupported.message=MIME type not supported\! +FileExtMismatchSettingsPanel.newMimePrompt.mimeTypeNotSupported.message=MIME type not supported! FileExtMismatchSettingsPanel.newMimePrompt.mimeTypeNotSupported.title=Type not supported -FileExtMismatchSettingsPanel.newMimePrompt.mimeTypeExists.message=MIME type already exists\! +FileExtMismatchSettingsPanel.newMimePrompt.mimeTypeExists.message=MIME type already exists! FileExtMismatchSettingsPanel.newMimePrompt.mimeTypeExists.title=Type already exists FileExtMismatchSettingsPanel.newMimePrompt.mimeTypeNotDetectable.message=MIME type is not detectable by this module. FileExtMismatchSettingsPanel.newMimePrompt.mimeTypeNotDetectable.title=Type not detectable -FileExtMismatchSettingsPanel.removeTypeButton.noneSelected.message=No MIME type selected\! +FileExtMismatchSettingsPanel.removeTypeButton.noneSelected.message=No MIME type selected! FileExtMismatchSettingsPanel.removeTypeButton.noneSelected.title=No type selected FileExtMismatchSettingsPanel.newExtPrompt.message=Add an allowed extension: FileExtMismatchSettingsPanel.newExtPrompt.title=New allowed extension -FileExtMismatchSettingsPanel.newExtPrompt.empty.message=Extension text is empty\! +FileExtMismatchSettingsPanel.newExtPrompt.empty.message=Extension text is empty! FileExtMismatchSettingsPanel.newExtPrompt.empty.title=Extension text empty -FileExtMismatchSettingsPanel.newExtPrompt.noMimeType.message=No MIME type selected\! +FileExtMismatchSettingsPanel.newExtPrompt.noMimeType.message=No MIME type selected! FileExtMismatchSettingsPanel.newExtPrompt.noMimeType.title=No MIME type selected -FileExtMismatchSettingsPanel.newExtPrompt.extExists.message=Extension already exists\! +FileExtMismatchSettingsPanel.newExtPrompt.extExists.message=Extension already exists! FileExtMismatchSettingsPanel.newExtPrompt.extExists.title=Extension already exists -FileExtMismatchSettingsPanel.removeExtButton.noneSelected.message=No extension selected\! +FileExtMismatchSettingsPanel.removeExtButton.noneSelected.message=No extension selected! FileExtMismatchSettingsPanel.removeExtButton.noneSelected.title=No extension selected -FileExtMismatchSettingsPanel.removeExtButton.noMimeTypeSelected.message=No MIME type selected\! +FileExtMismatchSettingsPanel.removeExtButton.noMimeTypeSelected.message=No MIME type selected! FileExtMismatchSettingsPanel.removeExtButton.noMimeTypeSelected.title=No MIME type selected FileExtMismatchSettingsPanel.removeTypeButton.toolTipText= FileExtMismatchModuleSettingsPanel.checkAllRadioButton.text=Check all file types diff --git a/Core/src/org/sleuthkit/autopsy/modules/filetypeid/Bundle.properties-MERGED b/Core/src/org/sleuthkit/autopsy/modules/filetypeid/Bundle.properties-MERGED index ca866a4a13..ccc55e18b0 100755 --- a/Core/src/org/sleuthkit/autopsy/modules/filetypeid/Bundle.properties-MERGED +++ b/Core/src/org/sleuthkit/autopsy/modules/filetypeid/Bundle.properties-MERGED @@ -51,6 +51,7 @@ FileTypeIdGlobalSettingsPanel.JOptionPane.loadFailed.title=Load Failed FileTypeIdGlobalSettingsPanel.loadFileTypes.errorMessage=Failed to load existing file type definitions. FileTypeIdGlobalSettingsPanel.saveFileTypes.errorMessage=Failed to save file type definitions. FileTypeIdGlobalSettingsPanel.newTypeButton.text=New Type +FileTypeIdGlobalSettingsPanel.jLabel2.text=Custom MIME Types: FileTypeIdGlobalSettingsPanel.startUp.fileTypeDetectorInitializationException.msg=Error initializing the file type detector. AddFileTypeSignaturePanel.offsetLabel.text=Byte Offset AddFileTypeSignaturePanel.signatureTextField.text= @@ -59,6 +60,7 @@ AddFileTypeSignaturePanel.signatureLabel.text=Signature AddFileTypeSignaturePanel.hexPrefixLabel.text=0x AddFileTypeSignaturePanel.offsetRelativeToLabel.text=Offset is relative to AddFileTypeSignaturePanel.offsetTextField.text= +FileTypeIdGlobalSettingsPanel.jLabel1.text=Signatures FileTypeIdGlobalSettingsPanel.editTypeButton.text=Edit Type AddFileTypePanel.mimeTypeTextField.text= AddFileTypePanel.mimeTypeLabel.text=MIME Type @@ -70,6 +72,4 @@ AddFileTypePanel.postHitCheckBox.text=Alert as an "Interesting File" when found AddFileTypePanel.setNameLabel.text=Set Name AddFileTypePanel.setNameTextField.text= FileTypeIdGlobalSettingsPanel.ingestRunningWarningLabel.text=Cannot make changes to file type definitions when ingest is running! -FileTypeIdGlobalSettingsPanel.descriptionLabel.text=Autopsy can automatically detect many file types. Add your custom file types here. -FileTypeIdGlobalSettingsPanel.customTypesLabel.text=Custom MIME Types: -FileTypeIdGlobalSettingsPanel.signaturesLabel.text=Signatures +FileTypeIdGlobalSettingsPanel.jLabel3.text=Autopsy can automatically detect many file types. Add your custom file types here. diff --git a/Core/src/org/sleuthkit/autopsy/modules/hashdatabase/Bundle.properties-MERGED b/Core/src/org/sleuthkit/autopsy/modules/hashdatabase/Bundle.properties-MERGED index 0f4db124af..44057d0016 100755 --- a/Core/src/org/sleuthkit/autopsy/modules/hashdatabase/Bundle.properties-MERGED +++ b/Core/src/org/sleuthkit/autopsy/modules/hashdatabase/Bundle.properties-MERGED @@ -49,10 +49,7 @@ ImportCentralRepoDbProgressDialog.errorParsingFile.message=Error parsing hash se ImportCentralRepoDbProgressDialog.linesProcessed.message=\ hashes processed ImportCentralRepoDbProgressDialog.title.text=Central Repository Import Progress OpenIDE-Module-Display-Category=Ingest Module -OpenIDE-Module-Long-Description=\ - Hash Set ingest module. \n\n\ - The ingest module analyzes files in the disk image and marks them as "known" (based on NSRL hashset lookup for "known" files) and "bad / interesting" (based on one or more hash sets supplied by the user).\n\n\ - The module also contains additional non-ingest tools that are integrated in the GUI, such as file lookup by hash and hash set configuration. +OpenIDE-Module-Long-Description=Hash Set ingest module. \n\nThe ingest module analyzes files in the disk image and marks them as "known" (based on NSRL hashset lookup for "known" files) and "bad / interesting" (based on one or more hash sets supplied by the user).\n\nThe module also contains additional non-ingest tools that are integrated in the GUI, such as file lookup by hash and hash set configuration. OpenIDE-Module-Name=HashDatabases OptionsCategory_Name_HashDatabase=Hash Sets OptionsCategory_Keywords_HashDatabase=Hash Sets @@ -181,10 +178,7 @@ HashDbSearchThread.name.searching=Searching HashDbSearchThread.noMoreFilesWithMD5Msg=No other files with the same MD5 hash were found. ModalNoButtons.indexingDbsTitle=Indexing hash sets ModalNoButtons.indexingDbTitle=Indexing hash set -ModalNoButtons.exitHashDbIndexingMsg=You are about to exit out of indexing your hash sets. \n\ -The generated index will be left unusable. If you choose to continue,\n\ - please delete the corresponding -md5.idx file in the hash folder.\n\ - Exit indexing? +ModalNoButtons.exitHashDbIndexingMsg=You are about to exit out of indexing your hash sets. \nThe generated index will be left unusable. If you choose to continue,\nplease delete the corresponding -md5.idx file in the hash folder.\nExit indexing? ModalNoButtons.dlgTitle.unfinishedIndexing=Unfinished Indexing ModalNoButtons.indexThis.currentlyIndexing1Db=Currently indexing 1 hash set ModalNoButtons.indexThese.currentlyIndexing1OfNDbs=Currently indexing 1 of {0} @@ -211,6 +205,10 @@ AddContentToHashDbAction.singleSelectionNameEmpty=Add File to Hash Set (Empty Fi AddContentToHashDbAction.multipleSelectionNameEmpty=Add Files to Hash Set (Empty File) HashDbManager.ingestRunningExceptionMsg=Ingest is ongoing; this service will be unavailable until it finishes. HashDbManager.saveErrorExceptionMsg=Error saving hash configuration +HashLookupSettingsPanel.jButton3.text=Import Hash Set +HashLookupSettingsPanel.jLabel6.text=Type: +HashLookupSettingsPanel.jLabel4.text=Location: +HashLookupSettingsPanel.jLabel2.text=Name: HashLookupModuleSettingsPanel.alwaysCalcHashesCheckbox.text=Calculate MD5 even if no hash set is selected HashLookupModuleSettingsPanel.knownHashDbsLabel.text=Select known hash sets to use: HashLookupModuleSettingsPanel.knownBadHashDbsLabel.text=Select notable hash sets to use: diff --git a/Core/src/org/sleuthkit/autopsy/modules/interestingitems/Bundle.properties-MERGED b/Core/src/org/sleuthkit/autopsy/modules/interestingitems/Bundle.properties-MERGED index 3c275ee9cb..31a0690b82 100755 --- a/Core/src/org/sleuthkit/autopsy/modules/interestingitems/Bundle.properties-MERGED +++ b/Core/src/org/sleuthkit/autopsy/modules/interestingitems/Bundle.properties-MERGED @@ -83,8 +83,8 @@ FilesSetRulePanel.nameTextField.text= FilesSetRulePanel.ruleNameLabel.text=Rule Name (Optional): FilesSetRulePanel.messages.emptyNameCondition=You must specify a name pattern for this rule. FilesSetRulePanel.messages.invalidNameRegex=The name regular expression is not valid:\n\n{0} -FilesSetRulePanel.messages.invalidCharInName=The name cannot contain \\, /, :, *, ?, \", <, or > unless it is a regular expression. -FilesSetRulePanel.messages.invalidCharInPath=The path cannot contain \\, :, *, ?, \", <, or > unless it is a regular expression. +FilesSetRulePanel.messages.invalidCharInName=The name cannot contain \\, /, :, *, ?, ", <, or > unless it is a regular expression. +FilesSetRulePanel.messages.invalidCharInPath=The path cannot contain \\, :, *, ?, ", <, or > unless it is a regular expression. FilesSetRulePanel.messages.invalidPathRegex=The path regular expression is not valid:\n\n{0} FilesSetDefsPanel.doFileSetsDialog.duplicateRuleSet.text=Rule set with name {0} already exists. FilesSetRulePanel.pathSeparatorInfoLabel.text=Folder must be in parent path. Use '/' to give consecutive names @@ -109,14 +109,21 @@ FilesSetDefsPanel.ingest.deleteSetButton.text=Delete Filter FilesSetDefsPanel.interesting.jLabel6.text=Set Details FilesSetDefsPanel.ingest.jLabel6.text=Filter Details FilesSetDefsPanel.newRuleButton.text=New Rule +FilesSetDefsPanel.jLabel8.text=File Size: +FilesSetDefsPanel.jLabel7.text=MIME Type: FilesSetDefsPanel.rulePathConditionRegexCheckBox.text=Regex +FilesSetDefsPanel.jLabel4.text=Path Substring: +FilesSetDefsPanel.jLabel1.text=Rule Details FilesSetDefsPanel.dirsRadioButton.text=Directories +FilesSetDefsPanel.jLabel2.text=File Type: FilesSetDefsPanel.deleteRuleButton.text=Delete Rule FilesSetDefsPanel.fileNameRegexCheckbox.text=Substring / Regex FilesSetDefsPanel.ignoreKnownFilesCheckbox.text=Ignore Known Files FilesSetDefsPanel.rulePathConditionTextField.text= FilesSetDefsPanel.fileNameRadioButton.text=Full Name +FilesSetDefsPanel.jLabel5.text=Description: FilesSetDefsPanel.fileNameTextField.text= +FilesSetDefsPanel.jLabel3.text=Name: FilesSetDefsPanel.fileNameExtensionRadioButton.text=Extension Only FilesSetDefsPanel.rulesListLabel.text=Rules: FilesSetDefsPanel.editRuleButton.text=Edit Rule @@ -133,10 +140,3 @@ FilesSetDefsPanel.modifiedDateLabel.text=Modified Within: FilesSetDefsPanel.daysIncludedTextField.text= FilesSetDefsPanel.daysIncludedLabel.text=day(s) FilesSetRulePanel.daysIncludedLabel.text=day(s) -FilesSetDefsPanel.nameLabel.text=Name: -FilesSetDefsPanel.descriptionLabel.text=Description: -FilesSetDefsPanel.fileTypeLabel.text=File Type: -FilesSetDefsPanel.ruleLabel.text=Rule Details -FilesSetDefsPanel.pathLabel.text=Path Substring: -FilesSetDefsPanel.mimeTypeLabel.text=MIME Type: -FilesSetDefsPanel.fileSizeLabel.text=File Size: diff --git a/Core/src/org/sleuthkit/autopsy/modules/photoreccarver/Bundle.properties-MERGED b/Core/src/org/sleuthkit/autopsy/modules/photoreccarver/Bundle.properties-MERGED index 87dacfc16c..2dc971a40d 100755 --- a/Core/src/org/sleuthkit/autopsy/modules/photoreccarver/Bundle.properties-MERGED +++ b/Core/src/org/sleuthkit/autopsy/modules/photoreccarver/Bundle.properties-MERGED @@ -21,7 +21,7 @@ PhotoRecIngestModule.complete.totalParsetime=Total Parsing Time: PhotoRecIngestModule.complete.photoRecResults=PhotoRec Results PhotoRecIngestModule.NotEnoughDiskSpace.detail.msg=PhotoRec error processing {0} with {1} Not enough space on primary disk to save unallocated space. PhotoRecIngestModule.cancelledByUser=PhotoRec cancelled by user. -PhotoRecIngestModule.error.exitValue=PhotoRec carver returned error exit value \= {0} when scanning {1} +PhotoRecIngestModule.error.exitValue=PhotoRec carver returned error exit value = {0} when scanning {1} PhotoRecIngestModule.error.msg=Error processing {0} with PhotoRec carver. PhotoRecIngestModule.complete.numberOfErrors=Number of Errors while Carving: PhotoRecCarverIngestJobSettingsPanel.detectionSettingsLabel.text=PhotoRec Settings diff --git a/Core/src/org/sleuthkit/autopsy/report/modules/html/Bundle.properties-MERGED b/Core/src/org/sleuthkit/autopsy/report/modules/html/Bundle.properties-MERGED index 32f6867f0c..0be7595111 100755 --- a/Core/src/org/sleuthkit/autopsy/report/modules/html/Bundle.properties-MERGED +++ b/Core/src/org/sleuthkit/autopsy/report/modules/html/Bundle.properties-MERGED @@ -5,8 +5,8 @@ ReportHTML.getName.text=HTML Report ReportHTML.getDesc.text=A report about results and tagged items in HTML format. ReportHTML.writeIndex.title=for case {0} ReportHTML.writeIndex.noFrames.msg=Your browser is not compatible with our frame setup. -ReportHTML.writeIndex.noFrames.seeNav=Please see the navigation page for artifact links, -ReportHTML.writeIndex.seeSum=and the summary page for a case summary. +ReportHTML.writeIndex.noFrames.seeNav=Please see the navigation page for artifact links, +ReportHTML.writeIndex.seeSum=and the summary page for a case summary. ReportHTML.writeNav.title=Report Navigation ReportHTML.writeNav.h1=Report Navigation ReportHTML.writeNav.summary=Case Summary @@ -16,7 +16,7 @@ ReportHTML.writeSum.caseNumber=Case Number: ReportHTML.writeSum.caseNumImages=Number of Images: ReportHTML.writeSum.examiner=Examiner: ReportHTML.writeSum.title=Case Summary -ReportHTML.writeSum.warningMsg=Warning, this report was run before ingest services completed\! +ReportHTML.writeSum.warningMsg=Warning, this report was run before ingest services completed! # # autopsy/test/scripts/regression.py._html_report_diff() uses reportGenOn.text, caseName, caseNum, # examiner as a regex signature to skip report.html and summary.html diff --git a/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/Bundle.properties-MERGED b/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/Bundle.properties-MERGED index 92c55b614f..9aeeabc046 100755 --- a/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/Bundle.properties-MERGED +++ b/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/Bundle.properties-MERGED @@ -36,7 +36,7 @@ KeywordSearchResultFactory.createNodeForKey.noResultsFound.text=No results found KeywordSearchResultFactory.query.exception.msg=Could not perform the query OpenIDE-Module-Display-Category=Ingest Module -OpenIDE-Module-Long-Description=Keyword Search ingest module.\n\nThe module indexes files found in the disk image at ingest time.\nIt then periodically runs the search on the indexed files using one or more keyword lists (containing pure words and/or regular expressions) and posts results.\n\n\The module also contains additional tools integrated in the main GUI, such as keyword list configuration, keyword search bar in the top-right corner, extracted text viewer and search results viewer showing highlighted keywords found. +OpenIDE-Module-Long-Description=Keyword Search ingest module.\n\nThe module indexes files found in the disk image at ingest time.\nIt then periodically runs the search on the indexed files using one or more keyword lists (containing pure words and/or regular expressions) and posts results.\n\nThe module also contains additional tools integrated in the main GUI, such as keyword list configuration, keyword search bar in the top-right corner, extracted text viewer and search results viewer showing highlighted keywords found. OpenIDE-Module-Name=KeywordSearch OptionsCategory_Name_KeywordSearchOptions=Keyword Search OptionsCategory_Keywords_KeywordSearchOptions=Keyword Search diff --git a/RecentActivity/src/org/sleuthkit/autopsy/recentactivity/Bundle.properties-MERGED b/RecentActivity/src/org/sleuthkit/autopsy/recentactivity/Bundle.properties-MERGED index ebdce8a327..18deff87f4 100755 --- a/RecentActivity/src/org/sleuthkit/autopsy/recentactivity/Bundle.properties-MERGED +++ b/RecentActivity/src/org/sleuthkit/autopsy/recentactivity/Bundle.properties-MERGED @@ -1,6 +1,7 @@ cannotBuildXmlParser=Unable to build XML parser: cannotLoadSEUQA=Unable to load Search Engine URL Query Analyzer settings file, SEUQAMappings.xml: cannotParseXml=Unable to parse XML file: +Chrome.getBookmark.errMsg.errAnalyzeFile={0}: Error while trying to analyze file: {1} ChromeCacheExtract_adding_artifacts_msg=Chrome Cache: Adding %d artifacts for analysis. ChromeCacheExtract_adding_extracted_files_msg=Chrome Cache: Adding %d extracted files for analysis. ChromeCacheExtract_loading_files_msg=Chrome Cache: Loading files from %s. @@ -13,9 +14,9 @@ ChromeCacheExtractor.progressMsg={0}: Extracting cache entry {1} of {2} entries DataSourceUsage_AndroidMedia=Android Media Card DataSourceUsage_DJU_Drone_DAT=DJI Internal SD Card DataSourceUsage_FlashDrive=Flash Drive -# {0} - OS name DataSourceUsageAnalyzer.customVolume.label=OS Drive ({0}) DataSourceUsageAnalyzer.parentModuleName=Recent Activity +Extract.dbConn.errMsg.failedToQueryDb={0}: Failed to query database. Extract.indexError.message=Failed to index artifact for keyword search. Extract.noOpenCase.errMsg=No open case available. ExtractEdge_getHistory_containerFileNotFound=Error while trying to analyze Edge history @@ -24,6 +25,11 @@ ExtractEdge_process_errMsg_errGettingWebCacheFiles=Error trying to retrieving Ed ExtractEdge_process_errMsg_spartanFail=Failure processing Microsoft Edge spartan.edb file ExtractEdge_process_errMsg_unableFindESEViewer=Unable to find ESEDatabaseViewer ExtractEdge_process_errMsg_webcacheFail=Failure processing Microsoft Edge WebCacheV01.dat file +ExtractIE.getBookmark.ere.noSpace=RecentActivity +ExtractIE.getBookmark.errMsg.errPostingBookmarks=Error posting Internet Explorer Bookmark artifacts. +ExtractIE.getCookie.errMsg.errPostingCookies=Error posting Internet Explorer Cookie artifacts. +ExtractIE.getHistory.errMsg.errPostingHistory=Error posting Internet Explorer History artifacts. +Extractor.errPostingArtifacts=Error posting {0} artifacts to the blackboard. ExtractOs.androidOs.label=Android ExtractOs.androidVolume.label=OS Drive (Android) ExtractOs.debianLinuxOs.label=Linux (Debian) @@ -90,7 +96,7 @@ Chrome.getLogin.errMsg.errAnalyzingFiles={0}: Error while trying to analyze file Chrome.getAutofill.errMsg.errGettingFiles=Error when trying to get Chrome Web Data files. Chrome.getAutofill.errMsg.errAnalyzingFiles={0}: Error while trying to analyze file:{1} ExtractIE.moduleName.text=Internet Explorer -ExtractIE.getBookmark.errMsg.errGettingBookmarks={0}: Error getting Internet Explorer Bookmarks. +ExtractIE.getBookmark.errMsg.errGettingBookmarks=Error getting Internet Explorer Bookmarks. ExtractIE.parentModuleName.noSpace=RecentActivity ExtractIE.parentModuleName=Recent Activity ExtractIE.getURLFromIEBmkFile.errMsg={0}: Error parsing IE bookmark File {1} @@ -192,7 +198,6 @@ RecentDocumentsByLnk.parentModuleName.noSpace=RecentActivity RecentDocumentsByLnk.parentModuleName=Recent Activity RegRipperFullNotFound=Full version RegRipper executable not found. RegRipperNotFound=Autopsy RegRipper executable not found. -# {0} - file name SearchEngineURLQueryAnalyzer.init.exception.msg=Unable to find {0}. SearchEngineURLQueryAnalyzer.moduleName.text=Search Engine SearchEngineURLQueryAnalyzer.engineName.none=NONE diff --git a/branding/core/core.jar/org/netbeans/core/startup/Bundle.properties b/branding/core/core.jar/org/netbeans/core/startup/Bundle.properties index 199e018ea8..b20ccf5912 100644 --- a/branding/core/core.jar/org/netbeans/core/startup/Bundle.properties +++ b/branding/core/core.jar/org/netbeans/core/startup/Bundle.properties @@ -1,5 +1,5 @@ #Updated by build script -#Wed, 01 Apr 2020 15:51:37 -0400 +#Tue, 12 Nov 2019 17:21:46 -0500 LBL_splash_window_title=Starting Autopsy SPLASH_HEIGHT=314 SPLASH_WIDTH=538 @@ -8,4 +8,4 @@ SplashRunningTextBounds=0,289,538,18 SplashRunningTextColor=0x0 SplashRunningTextFontSize=19 -currentVersion=Autopsy 4.14.0 +currentVersion=Autopsy 4.13.0 diff --git a/branding/modules/org-netbeans-core-windows.jar/org/netbeans/core/windows/view/ui/Bundle.properties b/branding/modules/org-netbeans-core-windows.jar/org/netbeans/core/windows/view/ui/Bundle.properties index 9368d6b951..998d3f715c 100644 --- a/branding/modules/org-netbeans-core-windows.jar/org/netbeans/core/windows/view/ui/Bundle.properties +++ b/branding/modules/org-netbeans-core-windows.jar/org/netbeans/core/windows/view/ui/Bundle.properties @@ -1,4 +1,4 @@ #Updated by build script -#Wed, 01 Apr 2020 15:51:37 -0400 -CTL_MainWindow_Title=Autopsy 4.14.0 -CTL_MainWindow_Title_No_Project=Autopsy 4.14.0 +#Tue, 12 Nov 2019 17:21:46 -0500 +CTL_MainWindow_Title=Autopsy 4.13.0 +CTL_MainWindow_Title_No_Project=Autopsy 4.13.0 From 93e7f6be929a29642ad807966c3350c71e1465ca Mon Sep 17 00:00:00 2001 From: Greg DiCristofaro Date: Wed, 1 Apr 2020 16:04:35 -0400 Subject: [PATCH 019/137] package scoping wrap layout --- .../autopsy/keywordsearch/WrapLayout.java | 24 +++++++++---------- 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/WrapLayout.java b/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/WrapLayout.java index c64a7eca18..ac9e7e4afb 100644 --- a/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/WrapLayout.java +++ b/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/WrapLayout.java @@ -40,7 +40,7 @@ import javax.swing.SwingUtilities; * Originally written by Rob Camick * https://tips4java.wordpress.com/2008/11/06/wrap-layout/ */ -public class WrapLayout implements LayoutManager, java.io.Serializable { +class WrapLayout implements LayoutManager, java.io.Serializable { private static final long serialVersionUID = 1L; @@ -56,7 +56,7 @@ public class WrapLayout implements LayoutManager, java.io.Serializable { * @see #getHgap() * @see #setHgap(int) */ - int hgap; + private int hgap; /** * The flow layout manager allows a seperation of @@ -68,7 +68,7 @@ public class WrapLayout implements LayoutManager, java.io.Serializable { * @see #getHgap() * @see #setHgap(int) */ - int vgap; + private int vgap; /** * If true, components will be aligned on their baseline. @@ -85,19 +85,19 @@ public class WrapLayout implements LayoutManager, java.io.Serializable { * Constructs a new WrapLayout with a left alignment and a * default 5-unit horizontal and vertical gap. */ - public WrapLayout() { + WrapLayout() { super(); } - public void setOppositeAligned(Collection rightAlignedComponents) { + void setOppositeAligned(Collection rightAlignedComponents) { synchronized (this.oppositeAlignedItems) { this.oppositeAlignedItems.clear(); this.oppositeAlignedItems.addAll(rightAlignedComponents); } } - public Set getOppositeAlignedItems() { + Set getOppositeAlignedItems() { return oppositeAlignedItems; } @@ -113,7 +113,7 @@ public class WrapLayout implements LayoutManager, java.io.Serializable { * @see java.awt.FlowLayout#setHgap * @since JDK1.1 */ - public int getHgap() { + int getHgap() { return hgap; } @@ -128,7 +128,7 @@ public class WrapLayout implements LayoutManager, java.io.Serializable { * @see java.awt.FlowLayout#getHgap * @since JDK1.1 */ - public void setHgap(int hgap) { + void setHgap(int hgap) { this.hgap = hgap; } @@ -143,7 +143,7 @@ public class WrapLayout implements LayoutManager, java.io.Serializable { * @see java.awt.FlowLayout#setVgap * @since JDK1.1 */ - public int getVgap() { + int getVgap() { return vgap; } @@ -157,7 +157,7 @@ public class WrapLayout implements LayoutManager, java.io.Serializable { * @see java.awt.FlowLayout#getVgap * @since JDK1.1 */ - public void setVgap(int vgap) { + void setVgap(int vgap) { this.vgap = vgap; } @@ -170,7 +170,7 @@ public class WrapLayout implements LayoutManager, java.io.Serializable { * vertically aligned on their baseline * @since 1.6 */ - public void setAlignOnBaseline(boolean alignOnBaseline) { + void setAlignOnBaseline(boolean alignOnBaseline) { this.alignOnBaseline = alignOnBaseline; } @@ -182,7 +182,7 @@ public class WrapLayout implements LayoutManager, java.io.Serializable { * their baseline * @since 1.6 */ - public boolean getAlignOnBaseline() { + boolean getAlignOnBaseline() { return alignOnBaseline; } From 2614255fe26391c0908991b26e8185bfa6c5037f Mon Sep 17 00:00:00 2001 From: Greg DiCristofaro Date: Thu, 2 Apr 2020 10:23:59 -0400 Subject: [PATCH 020/137] working through public api wrap layout --- .../StringsContentPanel.form | 426 ++++++++----- .../StringsContentPanel.java | 308 ++++----- .../autopsy/guiutils/WrapLayout.java | 603 ++++++++++++++++++ .../ui/TranslationContentPanel.form | 195 +++--- .../ui/TranslationContentPanel.java | 91 ++- 5 files changed, 1204 insertions(+), 419 deletions(-) create mode 100644 Core/src/org/sleuthkit/autopsy/guiutils/WrapLayout.java diff --git a/Core/src/org/sleuthkit/autopsy/contentviewers/textcontentviewer/StringsContentPanel.form b/Core/src/org/sleuthkit/autopsy/contentviewers/textcontentviewer/StringsContentPanel.form index 492636d4a1..55f37ad358 100644 --- a/Core/src/org/sleuthkit/autopsy/contentviewers/textcontentviewer/StringsContentPanel.form +++ b/Core/src/org/sleuthkit/autopsy/contentviewers/textcontentviewer/StringsContentPanel.form @@ -45,125 +45,54 @@ - - - - - - - - - - - - - - - - - + - - - - - - + + + + + + - + + + + - - - - - - - - - - - - - - - - - - + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + - + - + + + + + + + - + - - + + + + + + @@ -178,46 +107,67 @@
    - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + + + + + + + + + + + + + @@ -231,6 +181,17 @@ + + + + + + + + + + + @@ -247,8 +208,14 @@ + + + + + + - + @@ -258,6 +225,77 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -265,33 +303,56 @@ + + + + + + + + + + + + + + + + + + + + - + - - - - - + + - - - - - + + + + + + + + + + + @@ -302,9 +363,70 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Core/src/org/sleuthkit/autopsy/contentviewers/textcontentviewer/StringsContentPanel.java b/Core/src/org/sleuthkit/autopsy/contentviewers/textcontentviewer/StringsContentPanel.java index 0a8e4cefb1..68fe3a7a6e 100644 --- a/Core/src/org/sleuthkit/autopsy/contentviewers/textcontentviewer/StringsContentPanel.java +++ b/Core/src/org/sleuthkit/autopsy/contentviewers/textcontentviewer/StringsContentPanel.java @@ -105,21 +105,34 @@ public class StringsContentPanel extends javax.swing.JPanel { rightClickMenu = new javax.swing.JPopupMenu(); copyMenuItem = new javax.swing.JMenuItem(); selectAllMenuItem = new javax.swing.JMenuItem(); + controlPanel = new javax.swing.JPanel(); + javax.swing.JPanel panelPageOfCount = new javax.swing.JPanel(); + pageLabel = new javax.swing.JLabel(); + javax.swing.JSeparator jSepMed1 = new javax.swing.JSeparator(); + currentPageLabel = new javax.swing.JLabel(); + javax.swing.JSeparator jSepMed2 = new javax.swing.JSeparator(); + ofLabel = new javax.swing.JLabel(); + javax.swing.JSeparator jSepMed3 = new javax.swing.JSeparator(); + totalPageLabel = new javax.swing.JLabel(); + javax.swing.JSeparator jSepMed4 = new javax.swing.JSeparator(); + javax.swing.JPanel panelPageNextPrevButton = new javax.swing.JPanel(); + pageLabel2 = new javax.swing.JLabel(); + javax.swing.JSeparator jSepMed5 = new javax.swing.JSeparator(); + prevPageButton = new javax.swing.JButton(); + javax.swing.JSeparator jSepXs1 = new javax.swing.JSeparator(); + nextPageButton = new javax.swing.JButton(); + javax.swing.JSeparator jSepMed6 = new javax.swing.JSeparator(); + javax.swing.JPanel panelGoToPage = new javax.swing.JPanel(); + goToPageLabel = new javax.swing.JLabel(); + javax.swing.JSeparator jSepSm1 = new javax.swing.JSeparator(); + goToPageTextField = new javax.swing.JTextField(); + javax.swing.JSeparator jSepMed7 = new javax.swing.JSeparator(); + panelScriptSelect = new javax.swing.JPanel(); + languageLabel = new javax.swing.JLabel(); + javax.swing.JSeparator jSepSm2 = new javax.swing.JSeparator(); + languageCombo = new javax.swing.JComboBox<>(); outputScrollPane = new javax.swing.JScrollPane(); outputViewPane = new javax.swing.JTextPane(); - controlScrollPane = new javax.swing.JScrollPane(); - controlPanel = new javax.swing.JPanel(); - totalPageLabel = new javax.swing.JLabel(); - ofLabel = new javax.swing.JLabel(); - currentPageLabel = new javax.swing.JLabel(); - pageLabel = new javax.swing.JLabel(); - nextPageButton = new javax.swing.JButton(); - pageLabel2 = new javax.swing.JLabel(); - prevPageButton = new javax.swing.JButton(); - goToPageLabel = new javax.swing.JLabel(); - goToPageTextField = new javax.swing.JTextField(); - languageCombo = new javax.swing.JComboBox<>(); - languageLabel = new javax.swing.JLabel(); copyMenuItem.setText(org.openide.util.NbBundle.getMessage(StringsContentPanel.class, "StringsContentPanel.copyMenuItem.text")); // NOI18N rightClickMenu.add(copyMenuItem); @@ -129,6 +142,141 @@ public class StringsContentPanel extends javax.swing.JPanel { setMinimumSize(new java.awt.Dimension(5, 5)); setPreferredSize(new java.awt.Dimension(100, 58)); + setLayout(new java.awt.BorderLayout()); + + controlPanel.setLayout(new java.awt.FlowLayout(java.awt.FlowLayout.LEFT, 5, 0)); + + panelPageOfCount.setLayout(new java.awt.FlowLayout(java.awt.FlowLayout.CENTER, 0, 0)); + + pageLabel.setText(org.openide.util.NbBundle.getMessage(StringsContentPanel.class, "StringsContentPanel.pageLabel.text_1")); // NOI18N + pageLabel.setMaximumSize(new java.awt.Dimension(33, 14)); + pageLabel.setMinimumSize(new java.awt.Dimension(33, 14)); + panelPageOfCount.add(pageLabel); + + jSepMed1.setPreferredSize(new java.awt.Dimension(5, 0)); + panelPageOfCount.add(jSepMed1); + + currentPageLabel.setText(org.openide.util.NbBundle.getMessage(StringsContentPanel.class, "StringsContentPanel.currentPageLabel.text_1")); // NOI18N + currentPageLabel.setMaximumSize(new java.awt.Dimension(18, 14)); + currentPageLabel.setPreferredSize(new java.awt.Dimension(18, 14)); + panelPageOfCount.add(currentPageLabel); + + jSepMed2.setPreferredSize(new java.awt.Dimension(5, 0)); + panelPageOfCount.add(jSepMed2); + + ofLabel.setText(org.openide.util.NbBundle.getMessage(StringsContentPanel.class, "StringsContentPanel.ofLabel.text_1")); // NOI18N + panelPageOfCount.add(ofLabel); + + jSepMed3.setPreferredSize(new java.awt.Dimension(5, 0)); + panelPageOfCount.add(jSepMed3); + + totalPageLabel.setText(org.openide.util.NbBundle.getMessage(StringsContentPanel.class, "StringsContentPanel.totalPageLabel.text_1")); // NOI18N + panelPageOfCount.add(totalPageLabel); + + jSepMed4.setPreferredSize(new java.awt.Dimension(5, 0)); + panelPageOfCount.add(jSepMed4); + + controlPanel.add(panelPageOfCount); + + panelPageNextPrevButton.setLayout(new java.awt.FlowLayout(java.awt.FlowLayout.LEFT, 0, 0)); + + pageLabel2.setText(org.openide.util.NbBundle.getMessage(StringsContentPanel.class, "StringsContentPanel.pageLabel2.text")); // NOI18N + pageLabel2.setMaximumSize(new java.awt.Dimension(29, 14)); + pageLabel2.setMinimumSize(new java.awt.Dimension(29, 14)); + panelPageNextPrevButton.add(pageLabel2); + + jSepMed5.setPreferredSize(new java.awt.Dimension(5, 0)); + panelPageNextPrevButton.add(jSepMed5); + + prevPageButton.setIcon(new javax.swing.ImageIcon(getClass().getResource("/org/sleuthkit/autopsy/corecomponents/btn_step_back.png"))); // NOI18N + prevPageButton.setText(org.openide.util.NbBundle.getMessage(StringsContentPanel.class, "StringsContentPanel.prevPageButton.text")); // NOI18N + prevPageButton.setBorderPainted(false); + prevPageButton.setContentAreaFilled(false); + prevPageButton.setDisabledIcon(new javax.swing.ImageIcon(getClass().getResource("/org/sleuthkit/autopsy/corecomponents/btn_step_back_disabled.png"))); // NOI18N + prevPageButton.setMargin(new java.awt.Insets(2, 0, 2, 0)); + prevPageButton.setMaximumSize(new java.awt.Dimension(20, 20)); + prevPageButton.setMinimumSize(new java.awt.Dimension(20, 20)); + prevPageButton.setPreferredSize(new java.awt.Dimension(20, 20)); + prevPageButton.setRolloverIcon(new javax.swing.ImageIcon(getClass().getResource("/org/sleuthkit/autopsy/corecomponents/btn_step_back_hover.png"))); // NOI18N + prevPageButton.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + prevPageButtonActionPerformed(evt); + } + }); + panelPageNextPrevButton.add(prevPageButton); + + jSepXs1.setMinimumSize(new java.awt.Dimension(1, 0)); + jSepXs1.setPreferredSize(new java.awt.Dimension(1, 0)); + panelPageNextPrevButton.add(jSepXs1); + + nextPageButton.setIcon(new javax.swing.ImageIcon(getClass().getResource("/org/sleuthkit/autopsy/corecomponents/btn_step_forward.png"))); // NOI18N + nextPageButton.setText(org.openide.util.NbBundle.getMessage(StringsContentPanel.class, "StringsContentPanel.nextPageButton.text")); // NOI18N + nextPageButton.setBorderPainted(false); + nextPageButton.setContentAreaFilled(false); + nextPageButton.setDisabledIcon(new javax.swing.ImageIcon(getClass().getResource("/org/sleuthkit/autopsy/corecomponents/btn_step_forward_disabled.png"))); // NOI18N + nextPageButton.setMargin(new java.awt.Insets(2, 0, 2, 0)); + nextPageButton.setMaximumSize(new java.awt.Dimension(20, 20)); + nextPageButton.setMinimumSize(new java.awt.Dimension(20, 20)); + nextPageButton.setPreferredSize(new java.awt.Dimension(20, 20)); + nextPageButton.setRolloverIcon(new javax.swing.ImageIcon(getClass().getResource("/org/sleuthkit/autopsy/corecomponents/btn_step_forward_hover.png"))); // NOI18N + nextPageButton.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + nextPageButtonActionPerformed(evt); + } + }); + panelPageNextPrevButton.add(nextPageButton); + + jSepMed6.setPreferredSize(new java.awt.Dimension(5, 0)); + panelPageNextPrevButton.add(jSepMed6); + + controlPanel.add(panelPageNextPrevButton); + + panelGoToPage.setLayout(new java.awt.FlowLayout(java.awt.FlowLayout.CENTER, 0, 0)); + + goToPageLabel.setText(org.openide.util.NbBundle.getMessage(StringsContentPanel.class, "StringsContentPanel.goToPageLabel.text")); // NOI18N + panelGoToPage.add(goToPageLabel); + + jSepSm1.setPreferredSize(new java.awt.Dimension(2, 0)); + panelGoToPage.add(jSepSm1); + + goToPageTextField.setText(org.openide.util.NbBundle.getMessage(StringsContentPanel.class, "StringsContentPanel.goToPageTextField.text")); // NOI18N + goToPageTextField.setMaximumSize(new java.awt.Dimension(2147483647, 25)); + goToPageTextField.setMinimumSize(new java.awt.Dimension(50, 25)); + goToPageTextField.setPreferredSize(new java.awt.Dimension(100, 25)); + goToPageTextField.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + goToPageTextFieldActionPerformed(evt); + } + }); + panelGoToPage.add(goToPageTextField); + + jSepMed7.setPreferredSize(new java.awt.Dimension(5, 0)); + panelGoToPage.add(jSepMed7); + + controlPanel.add(panelGoToPage); + + panelScriptSelect.setLayout(new java.awt.FlowLayout(java.awt.FlowLayout.CENTER, 0, 0)); + + languageLabel.setText(org.openide.util.NbBundle.getMessage(StringsContentPanel.class, "StringsContentPanel.languageLabel.text")); // NOI18N + languageLabel.setToolTipText(org.openide.util.NbBundle.getMessage(StringsContentPanel.class, "StringsContentPanel.languageLabel.toolTipText")); // NOI18N + panelScriptSelect.add(languageLabel); + + jSepSm2.setPreferredSize(new java.awt.Dimension(2, 0)); + panelScriptSelect.add(jSepSm2); + + languageCombo.setToolTipText(org.openide.util.NbBundle.getMessage(StringsContentPanel.class, "StringsContentPanel.languageCombo.toolTipText")); // NOI18N + languageCombo.setMinimumSize(new java.awt.Dimension(150, 25)); + languageCombo.setPreferredSize(new java.awt.Dimension(150, 25)); + languageCombo.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + languageComboActionPerformed(evt); + } + }); + panelScriptSelect.add(languageCombo); + + controlPanel.add(panelScriptSelect); + + add(controlPanel, java.awt.BorderLayout.NORTH); outputScrollPane.setPreferredSize(new java.awt.Dimension(640, 402)); @@ -137,137 +285,7 @@ public class StringsContentPanel extends javax.swing.JPanel { outputViewPane.setPreferredSize(new java.awt.Dimension(100, 40)); outputScrollPane.setViewportView(outputViewPane); - controlScrollPane.setHorizontalScrollBarPolicy(javax.swing.ScrollPaneConstants.HORIZONTAL_SCROLLBAR_NEVER); - controlScrollPane.setVerticalScrollBarPolicy(javax.swing.ScrollPaneConstants.VERTICAL_SCROLLBAR_NEVER); - - totalPageLabel.setText(org.openide.util.NbBundle.getMessage(StringsContentPanel.class, "StringsContentPanel.totalPageLabel.text_1")); // NOI18N - - ofLabel.setText(org.openide.util.NbBundle.getMessage(StringsContentPanel.class, "StringsContentPanel.ofLabel.text_1")); // NOI18N - - currentPageLabel.setText(org.openide.util.NbBundle.getMessage(StringsContentPanel.class, "StringsContentPanel.currentPageLabel.text_1")); // NOI18N - currentPageLabel.setMaximumSize(new java.awt.Dimension(18, 14)); - currentPageLabel.setPreferredSize(new java.awt.Dimension(18, 14)); - - pageLabel.setText(org.openide.util.NbBundle.getMessage(StringsContentPanel.class, "StringsContentPanel.pageLabel.text_1")); // NOI18N - pageLabel.setMaximumSize(new java.awt.Dimension(33, 14)); - pageLabel.setMinimumSize(new java.awt.Dimension(33, 14)); - - nextPageButton.setIcon(new javax.swing.ImageIcon(getClass().getResource("/org/sleuthkit/autopsy/corecomponents/btn_step_forward.png"))); // NOI18N - nextPageButton.setText(org.openide.util.NbBundle.getMessage(StringsContentPanel.class, "StringsContentPanel.nextPageButton.text")); // NOI18N - nextPageButton.setBorderPainted(false); - nextPageButton.setContentAreaFilled(false); - nextPageButton.setDisabledIcon(new javax.swing.ImageIcon(getClass().getResource("/org/sleuthkit/autopsy/corecomponents/btn_step_forward_disabled.png"))); // NOI18N - nextPageButton.setMargin(new java.awt.Insets(2, 0, 2, 0)); - nextPageButton.setPreferredSize(new java.awt.Dimension(55, 23)); - nextPageButton.setRolloverIcon(new javax.swing.ImageIcon(getClass().getResource("/org/sleuthkit/autopsy/corecomponents/btn_step_forward_hover.png"))); // NOI18N - nextPageButton.addActionListener(new java.awt.event.ActionListener() { - public void actionPerformed(java.awt.event.ActionEvent evt) { - nextPageButtonActionPerformed(evt); - } - }); - - pageLabel2.setText(org.openide.util.NbBundle.getMessage(StringsContentPanel.class, "StringsContentPanel.pageLabel2.text")); // NOI18N - pageLabel2.setMaximumSize(new java.awt.Dimension(29, 14)); - pageLabel2.setMinimumSize(new java.awt.Dimension(29, 14)); - - prevPageButton.setIcon(new javax.swing.ImageIcon(getClass().getResource("/org/sleuthkit/autopsy/corecomponents/btn_step_back.png"))); // NOI18N - prevPageButton.setText(org.openide.util.NbBundle.getMessage(StringsContentPanel.class, "StringsContentPanel.prevPageButton.text")); // NOI18N - prevPageButton.setBorderPainted(false); - prevPageButton.setContentAreaFilled(false); - prevPageButton.setDisabledIcon(new javax.swing.ImageIcon(getClass().getResource("/org/sleuthkit/autopsy/corecomponents/btn_step_back_disabled.png"))); // NOI18N - prevPageButton.setMargin(new java.awt.Insets(2, 0, 2, 0)); - prevPageButton.setPreferredSize(new java.awt.Dimension(55, 23)); - prevPageButton.setRolloverIcon(new javax.swing.ImageIcon(getClass().getResource("/org/sleuthkit/autopsy/corecomponents/btn_step_back_hover.png"))); // NOI18N - prevPageButton.addActionListener(new java.awt.event.ActionListener() { - public void actionPerformed(java.awt.event.ActionEvent evt) { - prevPageButtonActionPerformed(evt); - } - }); - - goToPageLabel.setText(org.openide.util.NbBundle.getMessage(StringsContentPanel.class, "StringsContentPanel.goToPageLabel.text")); // NOI18N - - goToPageTextField.setText(org.openide.util.NbBundle.getMessage(StringsContentPanel.class, "StringsContentPanel.goToPageTextField.text")); // NOI18N - goToPageTextField.addActionListener(new java.awt.event.ActionListener() { - public void actionPerformed(java.awt.event.ActionEvent evt) { - goToPageTextFieldActionPerformed(evt); - } - }); - - languageCombo.setToolTipText(org.openide.util.NbBundle.getMessage(StringsContentPanel.class, "StringsContentPanel.languageCombo.toolTipText")); // NOI18N - languageCombo.addActionListener(new java.awt.event.ActionListener() { - public void actionPerformed(java.awt.event.ActionEvent evt) { - languageComboActionPerformed(evt); - } - }); - - languageLabel.setText(org.openide.util.NbBundle.getMessage(StringsContentPanel.class, "StringsContentPanel.languageLabel.text")); // NOI18N - languageLabel.setToolTipText(org.openide.util.NbBundle.getMessage(StringsContentPanel.class, "StringsContentPanel.languageLabel.toolTipText")); // NOI18N - - javax.swing.GroupLayout controlPanelLayout = new javax.swing.GroupLayout(controlPanel); - controlPanel.setLayout(controlPanelLayout); - controlPanelLayout.setHorizontalGroup( - controlPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) - .addGroup(controlPanelLayout.createSequentialGroup() - .addContainerGap() - .addComponent(pageLabel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) - .addGap(18, 18, 18) - .addComponent(currentPageLabel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) - .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) - .addComponent(ofLabel) - .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) - .addComponent(totalPageLabel) - .addGap(50, 50, 50) - .addComponent(pageLabel2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) - .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) - .addComponent(prevPageButton, javax.swing.GroupLayout.PREFERRED_SIZE, 23, javax.swing.GroupLayout.PREFERRED_SIZE) - .addGap(0, 0, 0) - .addComponent(nextPageButton, javax.swing.GroupLayout.PREFERRED_SIZE, 23, javax.swing.GroupLayout.PREFERRED_SIZE) - .addGap(18, 18, 18) - .addComponent(goToPageLabel) - .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) - .addComponent(goToPageTextField, javax.swing.GroupLayout.PREFERRED_SIZE, 79, javax.swing.GroupLayout.PREFERRED_SIZE) - .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) - .addComponent(languageLabel) - .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) - .addComponent(languageCombo, javax.swing.GroupLayout.PREFERRED_SIZE, 155, javax.swing.GroupLayout.PREFERRED_SIZE) - .addContainerGap()) - ); - controlPanelLayout.setVerticalGroup( - controlPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) - .addGroup(controlPanelLayout.createSequentialGroup() - .addGroup(controlPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) - .addGroup(controlPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) - .addComponent(pageLabel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) - .addComponent(currentPageLabel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) - .addComponent(ofLabel) - .addComponent(totalPageLabel)) - .addComponent(pageLabel2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) - .addComponent(nextPageButton, javax.swing.GroupLayout.PREFERRED_SIZE, 23, javax.swing.GroupLayout.PREFERRED_SIZE) - .addComponent(prevPageButton, javax.swing.GroupLayout.PREFERRED_SIZE, 23, javax.swing.GroupLayout.PREFERRED_SIZE) - .addComponent(goToPageLabel) - .addGroup(controlPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) - .addComponent(goToPageTextField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) - .addComponent(languageCombo, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) - .addComponent(languageLabel))) - .addGap(0, 0, 0)) - ); - - controlScrollPane.setViewportView(controlPanel); - - javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this); - this.setLayout(layout); - layout.setHorizontalGroup( - layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) - .addComponent(outputScrollPane, javax.swing.GroupLayout.PREFERRED_SIZE, 0, Short.MAX_VALUE) - .addComponent(controlScrollPane, javax.swing.GroupLayout.DEFAULT_SIZE, 100, Short.MAX_VALUE) - ); - layout.setVerticalGroup( - layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) - .addGroup(layout.createSequentialGroup() - .addComponent(controlScrollPane, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) - .addGap(7, 7, 7) - .addComponent(outputScrollPane, javax.swing.GroupLayout.DEFAULT_SIZE, 26, Short.MAX_VALUE)) - ); + add(outputScrollPane, java.awt.BorderLayout.CENTER); }// //GEN-END:initComponents private void languageComboActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_languageComboActionPerformed @@ -319,7 +337,6 @@ public class StringsContentPanel extends javax.swing.JPanel { // Variables declaration - do not modify//GEN-BEGIN:variables private javax.swing.JPanel controlPanel; - private javax.swing.JScrollPane controlScrollPane; private javax.swing.JMenuItem copyMenuItem; private javax.swing.JLabel currentPageLabel; private javax.swing.JLabel goToPageLabel; @@ -332,6 +349,7 @@ public class StringsContentPanel extends javax.swing.JPanel { private javax.swing.JTextPane outputViewPane; private javax.swing.JLabel pageLabel; private javax.swing.JLabel pageLabel2; + private javax.swing.JPanel panelScriptSelect; private javax.swing.JButton prevPageButton; private javax.swing.JPopupMenu rightClickMenu; private javax.swing.JMenuItem selectAllMenuItem; diff --git a/Core/src/org/sleuthkit/autopsy/guiutils/WrapLayout.java b/Core/src/org/sleuthkit/autopsy/guiutils/WrapLayout.java new file mode 100644 index 0000000000..cad23fa3e8 --- /dev/null +++ b/Core/src/org/sleuthkit/autopsy/guiutils/WrapLayout.java @@ -0,0 +1,603 @@ +/* + * 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.guiutils; + +import java.awt.Component; +import java.awt.Container; +import java.awt.Dimension; +import java.awt.Insets; +import java.awt.LayoutManager; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.Collection; +import java.util.Collections; +import java.util.HashSet; +import java.util.List; +import java.util.Set; +import java.util.stream.Collectors; +import javax.swing.JScrollPane; +import javax.swing.SwingUtilities; + +/** + * A layout class similar to FlowLayout in that when a component can't fit in a + * row it is moved to the next row. Inspired by WrapLayout, this layout also + * allows for aligning some components in the opposite side. In instances where + * components are laid out left to right, these opposite aligned components will + * be aligned to the right. + * + * Inspired by WrapLayout + * https://tips4java.wordpress.com/2008/11/06/wrap-layout/ and FlowLayout + * https://raw.githubusercontent.com/mynawang/Java8-Source-Code/master/src/main/jdk8/java/awt/FlowLayout.java. + */ +public class WrapLayout implements LayoutManager, java.io.Serializable { + + private static final long serialVersionUID = 1L; + + /** + * The WrapLayout manager allows a seperation of components + * with gaps. The horizontal gap will specify the space between components + * and between the components and the borders of the Container. + * + * @serial + * @see #getHgap() + * @see #setHgap(int) + */ + private int hgap = 0; + + /** + * The WrapLayout manager allows a seperation of components + * with gaps. The vertical gap will specify the space between rows and + * between the the rows and the borders of the Container. + * + * @serial + * @see #getVgap() + * @see #setVgap(int) + */ + private int vgap = 0; + + /** + * If true, components will be aligned on their baseline. + */ + private boolean alignOnBaseline = false; + + /** + * The set of components that will be aligned on the opposite side (if left + * to right, on the right). + */ + private final Set oppositeAlignedItems = new HashSet<>(); + + /** + * Constructs a new WrapLayout with a left alignment and a + * default 5-unit horizontal and vertical gap. + */ + public WrapLayout() { + this(5, 5); + } + + /** + * Constructs a new WrapLayout with a left alignment and a + * default 0-unit horizontal and vertical gap. + */ + public WrapLayout(int vgap, int hgap) { + this.vgap = vgap; + this.hgap = hgap; + } + + /** + * Items in the collection will be aligned opposite to the rest. For + * instance, if items should be displayed left to right based on locale, + * these components will be on the right. + * + * @param oppAlignedComponents The components to display with opposite + * alignment. + */ + public void setOppositeAligned(Collection oppAlignedComponents) { + synchronized (this.oppositeAlignedItems) { + this.oppositeAlignedItems.clear(); + this.oppositeAlignedItems.addAll(oppAlignedComponents); + } + } + + /** + * Items in the collection will be aligned opposite to the rest. For + * instance, if items should be displayed left to right based on locale, + * these components will be on the right. + * + * @return The components to display with opposite alignment. + */ + public Collection getOppositeAlignedItems() { + return oppositeAlignedItems; + } + + /** + * Gets the horizontal gap between components and between the components and + * the borders of the Container + * + * @return The horizontal gap between components and between the components + * and the borders of the Container. + */ + public int getHgap() { + return hgap; + } + + /** + * Sets the horizontal gap between components and between the components and + * the borders of the Container. + * + * @param hgap The horizontal gap between components and between the + * components and the borders of the Container. + */ + public void setHgap(int hgap) { + this.hgap = hgap; + } + + /** + * Gets the vertical gap between components and between the components and + * the borders of the Container. + * + * @return The vertical gap between components and between the components + * and the borders of the Container. + */ + public int getVgap() { + return vgap; + } + + /** + * Sets the vertical gap between components and between the components and + * the borders of the Container. + * + * @param vgap The vertical gap between components and between the + * components and the borders of the Container. + */ + public void setVgap(int vgap) { + this.vgap = vgap; + } + + /** + * Sets whether or not components should be vertically aligned along their + * baseline. Components that do not have a baseline will be centered. The + * default is false. + * + * @param alignOnBaseline Whether or not components should be vertically + * aligned on their baseline. + */ + public void setAlignOnBaseline(boolean alignOnBaseline) { + this.alignOnBaseline = alignOnBaseline; + } + + /** + * Returns true if components are to be vertically aligned along their + * baseline. The default is false. + * + * @return true If components are to be vertically aligned along their + * baseline. + */ + public boolean getAlignOnBaseline() { + return alignOnBaseline; + } + + /** + * Adds the specified component to the layout. Not used by this class. + * + * @param name The name of the component. + * @param comp The component to be added. + */ + @Override + public void addLayoutComponent(String name, Component comp) { + } + + /** + * Removes the specified component from the layout. Not used by this class. + * + * @param comp The component to remove. + */ + @Override + public void removeLayoutComponent(Component comp) { + } + + /** + * Determines the subcomponent's y position. + * + * @param rowY The top y position of the row. + * @param alignBaseline Whether this component should be aligned on the + * baseline. + * @param rowHeight The height of the row. + * @param itemHeight The height of the item. + * + * @return The top y position of the component. + */ + private int getComponentY(int rowY, boolean alignBaseline, int rowHeight, int itemHeight) { + return alignBaseline + ? rowY + rowHeight - itemHeight + : rowY; + } + + /** + * * Determines the subcomponent's x position. + * + * @param leftX The leftmost position a component can be placed. + * @param rightX The rightmost position a component can be placed. + * @param ltr If the components should be laid out left to right. + * @param xPos The x position of the component (if left to right, + * how far from leftX; otherwise how far from rightX). + * @param componentWidth The component's width. + * + * @return The component's left x position. + */ + private int getComponentX(int leftX, int rightX, boolean ltr, int xPos, int componentWidth) { + return ltr ? leftX + xPos : rightX - xPos - componentWidth; + } + + /** + * Sets a subcomponent's size to preferred size and sets the (x,y) position + * for the component. + * + * @param comp The component. + * @param alignBaseline Whether this component should be aligned on the + * baseline. + * @param ltr If the components should be laid out left to right. + * @param rowY The top y position of the row. + * @param rowHeight The height of the row. + * @param leftX The leftmost position a component can be placed. + * @param rightX The rightmost position a component can be placed. + * @param xPos The x position of the component (if left to right, + * how far from leftX; otherwise how far from rightX). + * + * @return The width of the component. + */ + private int setComponentDims(Component comp, boolean alignBaseline, boolean ltr, int rowY, int rowHeight, int leftX, int rightX, int xPos) { + Dimension d = comp.getPreferredSize(); + comp.setSize(d); + + int x = getComponentX(leftX, rightX, ltr, xPos, d.width); + int y = getComponentY(rowY, alignBaseline, rowHeight, d.height); + comp.setLocation(x, y); + + return d.width; + } + + /** + * Lays out the container. This method lets each + * visible component take its preferred size by reshaping the + * components in the target container and creating new rows. + * + * @param target The specified component being laid out. + */ + @Override + public void layoutContainer(Container target) { + synchronized (target.getTreeLock()) { + synchronized (this.oppositeAlignedItems) { + ParentDimensions targetDims = getTargetDimensions(target); + List components = Arrays.asList(target.getComponents()); + List rows = getAllRows(components, true, targetDims.innerWidth); + + boolean ltr = target.getComponentOrientation().isLeftToRight(); + boolean useBaseline = getAlignOnBaseline(); + + int rowY = targetDims.insets.top + getVgap(); + int leftX = targetDims.insets.left + getHgap(); + int rightX = targetDims.outerWidth - targetDims.insets.right - getHgap(); + + for (Row row : rows) { + int rowHeight = row.height; + + int curX = 0; + if (row.components != null) { + for (Component origComp : row.components) { + curX += setComponentDims(origComp, useBaseline, ltr, rowY, rowHeight, leftX, rightX, curX) + getHgap(); + } + } + + if (row.oppositeAligned != null) { + curX = 0; + // reverse opposite aligned for layout purposes since flipping ltr + Collections.reverse(row.oppositeAligned); + for (Component oppAlignedComp : row.oppositeAligned) { + curX += setComponentDims(oppAlignedComp, useBaseline, !ltr, rowY, rowHeight, leftX, rightX, curX) + getHgap(); + } + } + + rowY += rowHeight + getVgap(); + } + } + } + } + + /** + * Returns the preferred dimensions for this layout given the + * visible components in the specified target container. + * + * @param target The component which needs to be laid out. + * + * @return The preferred dimensions to lay out the subcomponents of the + * specified container. + */ + @Override + public Dimension preferredLayoutSize(Container target) { + return layoutSize(target, true); + } + + /** + * Returns the minimum dimensions needed to layout the visible + * components contained in the specified target container. + * + * @param target The component which needs to be laid out. + * + * @return The minimum dimensions to lay out the subcomponents of the + * specified container. + */ + @Override + public Dimension minimumLayoutSize(Container target) { + Dimension minimum = layoutSize(target, false); + minimum.width -= (getHgap() + 1); + return minimum; + } + + /** + * This class provides metrics on the parent container dimensions. + */ + private static class ParentDimensions { + + /** + * The full width that the component can consume. + */ + final int outerWidth; + + /** + * The full width that subcomponent rows can consume. This is the + * outerWidth accounting for left and right insets. + */ + final int innerWidth; + + /** + * The insets of the parent container. + */ + final Insets insets; + + ParentDimensions(int outerWidth, int innerWidth, Insets insets) { + this.outerWidth = outerWidth; + this.innerWidth = innerWidth; + this.insets = insets; + } + } + + /** + * Derives metrics on the space allowed within the parent container for rows + * of components. + * + * @param target The target container. + * + * @return The dimensions for laying out components. + */ + private ParentDimensions getTargetDimensions(Container target) { + // Each row must fit with the width allocated to the containter. + // When the container width = 0, the preferred width of the container + // has not yet been calculated so lets ask for the maximum. + + int targetWidth = target.getSize().width; + Container container = target; + + while (container.getSize().width == 0 && container.getParent() != null) { + container = container.getParent(); + } + + targetWidth = container.getSize().width; + + if (targetWidth == 0) { + targetWidth = Integer.MAX_VALUE; + } + + int hgap = getHgap(); + + Insets insets = target.getInsets(); + int horizontalInsetsAndGap = insets.left + insets.right + (hgap * 2); + int maxWidth = targetWidth - horizontalInsetsAndGap; + + return new ParentDimensions(targetWidth, maxWidth, insets); + } + + /** + * Returns the minimum or preferred dimension needed to layout the target + * container. + * + * @param target Target to get layout size for. + * @param preferred Should preferred size be calculate.d + * + * @return The dimension to layout the target container. + */ + private Dimension layoutSize(Container target, boolean preferred) { + synchronized (target.getTreeLock()) { + synchronized (this.oppositeAlignedItems) { + ParentDimensions targetDims = getTargetDimensions(target); + List components = Arrays.asList(target.getComponents()); + List rows = getAllRows(components, preferred, targetDims.innerWidth); + + Integer containerHeight = rows.stream().map((r) -> r.height).reduce(0, Integer::sum); + // add in vertical gap between rows + if (rows.size() > 1) { + containerHeight += (rows.size() - 1) * getVgap(); + } + + containerHeight += targetDims.insets.top + targetDims.insets.bottom; + + Integer containerWidth = rows.stream().map((r) -> r.width).reduce(0, Math::max); + containerWidth += targetDims.insets.left + targetDims.insets.right + (getHgap() * 2); + + // When using a scroll pane or the DecoratedLookAndFeel we need to + // make sure the preferred size is less than the size of the + // target containter so shrinking the container size works + // correctly. Removing the horizontal gap is an easy way to do this. + Container scrollPane = SwingUtilities.getAncestorOfClass(JScrollPane.class, target); + + if (scrollPane != null && target.isValid()) { + containerWidth -= (getHgap() + 1); + } + + return new Dimension(containerWidth, containerHeight); + } + } + } + + /** + * A row of components in the WrapLayout. + */ + private class Row { + + /** + * The normally aligned components in the order that they will be laid + * out. + */ + final List components; + + /** + * The opposite aligned components in the order that they will be laid + * out. + */ + final List oppositeAligned; + + /** + * The minimum height of the row which is the maximum of the preferred + * heights of the components. + */ + final int height; + + /** + * The minimum width of the row which is the sum of the preferred widths + * of the subcomponents. + */ + final int width; + + public Row(List components, List oppositeAligned, int height, int width) { + this.components = components; + this.oppositeAligned = oppositeAligned; + this.height = height; + this.width = width; + } + } + + /** + * Retrieves the rows of wrap layout components. + * + * @param components The components to be laid out. + * @param preferred Whether or not to use preferred dimensions of + * subcomponents for determining rows. + * @param maxWidth The maximum width that a row can consume. + * + * @return The list of rows ordered from top to bottom. + */ + private List getAllRows(List components, boolean preferred, int maxWidth) { + List originalComp + = components + .stream() + .filter((comp) -> !this.oppositeAlignedItems.contains(comp)) + .collect(Collectors.toList()); + + List originalRowSet = getRowSet(originalComp, preferred, maxWidth); + + List oppositeAlignedComp + = components + .stream() + .filter((comp) -> this.oppositeAlignedItems.contains(comp)) + .collect(Collectors.toList()); + + // go in reverse order and then revert so we can use same getRowSet method + Collections.reverse(oppositeAlignedComp); + List oppositeRowSet = getRowSet(oppositeAlignedComp, preferred, maxWidth) + .stream() + .map((Row row) -> { + Collections.reverse(row.components); + return new Row(null, row.components, row.height, row.width); + }) + .collect(Collectors.toList()); + Collections.reverse(oppositeRowSet); + + List toReturn = new ArrayList<>(); + + // if there is a row of components that will have both normal and opposite aligned + // components, create the corresponding row. + if (originalRowSet.size() > 0 && oppositeRowSet.size() > 0) { + Row lastOrig = originalRowSet.get(originalRowSet.size() - 1); + Row firstOpp = oppositeRowSet.get(0); + + int proposedRowWidth = lastOrig.width + firstOpp.width + getHgap(); + if (proposedRowWidth <= maxWidth) { + Row middleRow = new Row(lastOrig.components, firstOpp.oppositeAligned, + Math.max(lastOrig.height, firstOpp.height), proposedRowWidth); + + toReturn.addAll(originalRowSet.subList(0, originalRowSet.size() - 1)); + toReturn.add(middleRow); + toReturn.addAll(oppositeRowSet.subList(1, oppositeRowSet.size())); + return toReturn; + } + } + + toReturn.addAll(originalRowSet); + toReturn.addAll(oppositeRowSet); + return toReturn; + } + + /** + * Handles determining rows for a single set of similarly aligned + * components. Used once for normal alignment and once for opposite aligned + * components. + * + * @param components The components in the set of similarly aligned items. + * @param preferred Whether or not to use preferred dimensions for + * components. + * @param maxWidth The maximum width components can consume. + * + * @return The list of rows determined. + */ + private List getRowSet(List components, boolean preferred, int maxWidth) { + List rows = new ArrayList<>(); + + List rowComponents = new ArrayList<>(); + int rowWidth = 0; + int rowHeight = 0; + + for (Component m : components) { + if (m.isVisible()) { + Dimension d = preferred ? m.getPreferredSize() : m.getMinimumSize(); + + // Can't add the component to current row. Start a new row. + if (rowWidth + d.width > maxWidth) { + rows.add(new Row(rowComponents, null, rowHeight, rowWidth)); + rowComponents = new ArrayList<>(); + rowWidth = 0; + rowHeight = 0; + } + + // Add a horizontal gap for all components after the first + if (rowWidth != 0) { + rowWidth += getHgap(); + } + + rowComponents.add(m); + rowWidth += d.width; + rowHeight = Math.max(rowHeight, d.height); + } + } + + if (rowComponents.size() > 0) { + rows.add(new Row(rowComponents, null, rowHeight, rowWidth)); + } + + return rows; + } +} diff --git a/Core/src/org/sleuthkit/autopsy/texttranslation/ui/TranslationContentPanel.form b/Core/src/org/sleuthkit/autopsy/texttranslation/ui/TranslationContentPanel.form index 1b66a2ae6b..4a736ef1d2 100644 --- a/Core/src/org/sleuthkit/autopsy/texttranslation/ui/TranslationContentPanel.form +++ b/Core/src/org/sleuthkit/autopsy/texttranslation/ui/TranslationContentPanel.form @@ -24,7 +24,7 @@ - + @@ -37,10 +37,14 @@ - + + + + + - + @@ -49,85 +53,128 @@ - + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -149,4 +196,4 @@ - \ No newline at end of file + diff --git a/Core/src/org/sleuthkit/autopsy/texttranslation/ui/TranslationContentPanel.java b/Core/src/org/sleuthkit/autopsy/texttranslation/ui/TranslationContentPanel.java index 340dc830d8..62f87f0617 100644 --- a/Core/src/org/sleuthkit/autopsy/texttranslation/ui/TranslationContentPanel.java +++ b/Core/src/org/sleuthkit/autopsy/texttranslation/ui/TranslationContentPanel.java @@ -284,14 +284,15 @@ public class TranslationContentPanel extends javax.swing.JPanel { @SuppressWarnings("unchecked") // //GEN-BEGIN:initComponents private void initComponents() { - java.awt.GridBagConstraints gridBagConstraints; jPanel1 = new javax.swing.JPanel(); - displayTextComboBox = new javax.swing.JComboBox<>(); - ocrDropdown = new javax.swing.JComboBox<>(); - ocrLabel = new javax.swing.JLabel(); warningLabel = new javax.swing.JLabel(); + javax.swing.JPanel showPanel = new javax.swing.JPanel(); showLabel = new javax.swing.JLabel(); + displayTextComboBox = new javax.swing.JComboBox<>(); + javax.swing.JPanel ocrPanel = new javax.swing.JPanel(); + ocrLabel = new javax.swing.JLabel(); + ocrDropdown = new javax.swing.JComboBox<>(); textScrollPane = new javax.swing.JScrollPane(); setMaximumSize(new java.awt.Dimension(2000, 2000)); @@ -302,57 +303,51 @@ public class TranslationContentPanel extends javax.swing.JPanel { setLayout(new java.awt.BorderLayout()); jPanel1.setBorder(javax.swing.BorderFactory.createEtchedBorder()); - jPanel1.setMaximumSize(new java.awt.Dimension(182, 24)); - jPanel1.setPreferredSize(new java.awt.Dimension(182, 24)); - jPanel1.setLayout(new java.awt.GridBagLayout()); + jPanel1.setMaximumSize(new java.awt.Dimension(182, 25)); + jPanel1.setMinimumSize(new java.awt.Dimension(254, 25)); + jPanel1.setName(""); // NOI18N + jPanel1.setPreferredSize(new java.awt.Dimension(182, 25)); + jPanel1.setLayout(new java.awt.FlowLayout(java.awt.FlowLayout.LEFT, 5, 0)); - displayTextComboBox.setMinimumSize(new java.awt.Dimension(43, 20)); - displayTextComboBox.setPreferredSize(new java.awt.Dimension(43, 20)); - gridBagConstraints = new java.awt.GridBagConstraints(); - gridBagConstraints.gridx = 3; - gridBagConstraints.gridy = 0; - gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL; - gridBagConstraints.anchor = java.awt.GridBagConstraints.EAST; - gridBagConstraints.weightx = 0.1; - gridBagConstraints.insets = new java.awt.Insets(0, 5, 0, 0); - jPanel1.add(displayTextComboBox, gridBagConstraints); + warningLabel.setIcon(new javax.swing.ImageIcon(getClass().getResource("/org/sleuthkit/autopsy/images/warning16.png"))); // NOI18N + warningLabel.setMaximumSize(new java.awt.Dimension(250, 25)); + warningLabel.setMinimumSize(new java.awt.Dimension(150, 25)); + warningLabel.setPreferredSize(new java.awt.Dimension(250, 25)); + jPanel1.add(warningLabel); - ocrDropdown.setModel(new javax.swing.DefaultComboBoxModel<>(new String[] { "N/A" })); - ocrDropdown.setEnabled(false); - ocrDropdown.setName(""); // NOI18N - gridBagConstraints = new java.awt.GridBagConstraints(); - gridBagConstraints.gridx = 5; - gridBagConstraints.gridy = 0; - gridBagConstraints.gridwidth = 2; - gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL; - gridBagConstraints.anchor = java.awt.GridBagConstraints.EAST; - gridBagConstraints.weightx = 0.1; - gridBagConstraints.insets = new java.awt.Insets(0, 5, 0, 0); - jPanel1.add(ocrDropdown, gridBagConstraints); + showPanel.setLayout(new java.awt.FlowLayout(java.awt.FlowLayout.CENTER, 0, 0)); + + org.openide.awt.Mnemonics.setLocalizedText(showLabel, org.openide.util.NbBundle.getMessage(TranslationContentPanel.class, "TranslationContentPanel.showLabel.text")); // NOI18N + showLabel.setMaximumSize(new java.awt.Dimension(42, 25)); + showLabel.setMinimumSize(new java.awt.Dimension(42, 25)); + showLabel.setPreferredSize(new java.awt.Dimension(42, 25)); + showPanel.add(showLabel); + + displayTextComboBox.setMaximumSize(new java.awt.Dimension(170, 25)); + displayTextComboBox.setMinimumSize(new java.awt.Dimension(170, 25)); + displayTextComboBox.setPreferredSize(new java.awt.Dimension(170, 25)); + showPanel.add(displayTextComboBox); + + jPanel1.add(showPanel); + + ocrPanel.setLayout(new java.awt.FlowLayout(java.awt.FlowLayout.CENTER, 0, 0)); org.openide.awt.Mnemonics.setLocalizedText(ocrLabel, org.openide.util.NbBundle.getMessage(TranslationContentPanel.class, "TranslationContentPanel.ocrLabel.text")); // NOI18N ocrLabel.setEnabled(false); - gridBagConstraints = new java.awt.GridBagConstraints(); - gridBagConstraints.gridx = 4; - gridBagConstraints.gridy = 0; - gridBagConstraints.anchor = java.awt.GridBagConstraints.EAST; - gridBagConstraints.insets = new java.awt.Insets(0, 10, 0, 0); - jPanel1.add(ocrLabel, gridBagConstraints); + ocrLabel.setMaximumSize(new java.awt.Dimension(40, 25)); + ocrLabel.setMinimumSize(new java.awt.Dimension(25, 16)); + ocrLabel.setPreferredSize(new java.awt.Dimension(40, 25)); + ocrPanel.add(ocrLabel); - warningLabel.setIcon(new javax.swing.ImageIcon(getClass().getResource("/org/sleuthkit/autopsy/images/warning16.png"))); // NOI18N - gridBagConstraints = new java.awt.GridBagConstraints(); - gridBagConstraints.gridx = 0; - gridBagConstraints.gridy = 0; - gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL; - gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST; - gridBagConstraints.weightx = 0.25; - jPanel1.add(warningLabel, gridBagConstraints); + ocrDropdown.setModel(new javax.swing.DefaultComboBoxModel<>(new String[] { "N/A" })); + ocrDropdown.setEnabled(false); + ocrDropdown.setMaximumSize(new java.awt.Dimension(170, 25)); + ocrDropdown.setMinimumSize(new java.awt.Dimension(170, 25)); + ocrDropdown.setName(""); // NOI18N + ocrDropdown.setPreferredSize(new java.awt.Dimension(170, 25)); + ocrPanel.add(ocrDropdown); - org.openide.awt.Mnemonics.setLocalizedText(showLabel, org.openide.util.NbBundle.getMessage(TranslationContentPanel.class, "TranslationContentPanel.showLabel.text")); // NOI18N - gridBagConstraints = new java.awt.GridBagConstraints(); - gridBagConstraints.gridx = 2; - gridBagConstraints.gridy = 0; - jPanel1.add(showLabel, gridBagConstraints); + jPanel1.add(ocrPanel); add(jPanel1, java.awt.BorderLayout.NORTH); From 20281bbf0053930285ec55eff45d6b31977787ba Mon Sep 17 00:00:00 2001 From: Greg DiCristofaro Date: Thu, 2 Apr 2020 14:05:23 -0400 Subject: [PATCH 021/137] fine tuning of resizing --- .../StringsContentPanel.form | 79 +-- .../StringsContentPanel.java | 55 +- .../texttranslation/ui/Bundle.properties | 1 + .../ui/TranslationContentPanel.form | 139 +++-- .../ui/TranslationContentPanel.java | 82 ++- .../keywordsearch/ExtractedContentPanel.form | 8 +- .../keywordsearch/ExtractedContentPanel.java | 24 +- .../autopsy/keywordsearch/WrapLayout.java | 495 ------------------ 8 files changed, 260 insertions(+), 623 deletions(-) delete mode 100644 KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/WrapLayout.java diff --git a/Core/src/org/sleuthkit/autopsy/contentviewers/textcontentviewer/StringsContentPanel.form b/Core/src/org/sleuthkit/autopsy/contentviewers/textcontentviewer/StringsContentPanel.form index 55f37ad358..265c1b77de 100644 --- a/Core/src/org/sleuthkit/autopsy/contentviewers/textcontentviewer/StringsContentPanel.form +++ b/Core/src/org/sleuthkit/autopsy/contentviewers/textcontentviewer/StringsContentPanel.form @@ -27,10 +27,10 @@ - + - + @@ -43,6 +43,7 @@ + @@ -76,10 +77,13 @@ - + - + + + + @@ -100,10 +104,13 @@ - + + + + - + @@ -123,6 +130,15 @@ + + + + + + + + + @@ -141,6 +157,15 @@ + + + + + + + + + @@ -174,10 +199,13 @@ - + - + + + + @@ -209,13 +237,13 @@ - + - + - + @@ -225,20 +253,6 @@ - - - - - - - - - - - - - - @@ -256,13 +270,13 @@ - + - + - + @@ -326,7 +340,7 @@ - + @@ -402,11 +416,6 @@ - - - - - @@ -422,7 +431,7 @@ - + diff --git a/Core/src/org/sleuthkit/autopsy/contentviewers/textcontentviewer/StringsContentPanel.java b/Core/src/org/sleuthkit/autopsy/contentviewers/textcontentviewer/StringsContentPanel.java index 68fe3a7a6e..d13a9aea06 100644 --- a/Core/src/org/sleuthkit/autopsy/contentviewers/textcontentviewer/StringsContentPanel.java +++ b/Core/src/org/sleuthkit/autopsy/contentviewers/textcontentviewer/StringsContentPanel.java @@ -21,6 +21,7 @@ package org.sleuthkit.autopsy.contentviewers.textcontentviewer; import java.awt.Cursor; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; +import java.util.Arrays; import java.util.List; import java.util.logging.Level; import org.openide.util.NbBundle; @@ -32,6 +33,7 @@ import org.sleuthkit.autopsy.coreutils.StringExtract; import org.sleuthkit.autopsy.coreutils.StringExtract.StringExtractResult; import org.sleuthkit.autopsy.coreutils.StringExtract.StringExtractUnicodeTable.SCRIPT; import org.sleuthkit.autopsy.datamodel.StringContent; +import org.sleuthkit.autopsy.guiutils.WrapLayout; import org.sleuthkit.datamodel.Content; import org.sleuthkit.datamodel.TskCoreException; @@ -78,6 +80,11 @@ public class StringsContentPanel extends javax.swing.JPanel { languageCombo.addItem(s); }); + // use wrap layout for better component wrapping + WrapLayout layout = new WrapLayout(0,5); + layout.setOppositeAligned(Arrays.asList(panelScriptSelect)); + controlPanel.setLayout(layout); + } final void resetDisplay() { @@ -119,7 +126,6 @@ public class StringsContentPanel extends javax.swing.JPanel { pageLabel2 = new javax.swing.JLabel(); javax.swing.JSeparator jSepMed5 = new javax.swing.JSeparator(); prevPageButton = new javax.swing.JButton(); - javax.swing.JSeparator jSepXs1 = new javax.swing.JSeparator(); nextPageButton = new javax.swing.JButton(); javax.swing.JSeparator jSepMed6 = new javax.swing.JSeparator(); javax.swing.JPanel panelGoToPage = new javax.swing.JPanel(); @@ -140,8 +146,8 @@ public class StringsContentPanel extends javax.swing.JPanel { selectAllMenuItem.setText(org.openide.util.NbBundle.getMessage(StringsContentPanel.class, "StringsContentPanel.selectAllMenuItem.text")); // NOI18N rightClickMenu.add(selectAllMenuItem); - setMinimumSize(new java.awt.Dimension(5, 5)); - setPreferredSize(new java.awt.Dimension(100, 58)); + setMinimumSize(new java.awt.Dimension(250, 5)); + setPreferredSize(new java.awt.Dimension(250, 58)); setLayout(new java.awt.BorderLayout()); controlPanel.setLayout(new java.awt.FlowLayout(java.awt.FlowLayout.LEFT, 5, 0)); @@ -149,28 +155,36 @@ public class StringsContentPanel extends javax.swing.JPanel { panelPageOfCount.setLayout(new java.awt.FlowLayout(java.awt.FlowLayout.CENTER, 0, 0)); pageLabel.setText(org.openide.util.NbBundle.getMessage(StringsContentPanel.class, "StringsContentPanel.pageLabel.text_1")); // NOI18N - pageLabel.setMaximumSize(new java.awt.Dimension(33, 14)); - pageLabel.setMinimumSize(new java.awt.Dimension(33, 14)); + pageLabel.setMaximumSize(new java.awt.Dimension(33, 25)); + pageLabel.setMinimumSize(new java.awt.Dimension(33, 25)); + pageLabel.setPreferredSize(new java.awt.Dimension(32, 25)); panelPageOfCount.add(pageLabel); jSepMed1.setPreferredSize(new java.awt.Dimension(5, 0)); panelPageOfCount.add(jSepMed1); currentPageLabel.setText(org.openide.util.NbBundle.getMessage(StringsContentPanel.class, "StringsContentPanel.currentPageLabel.text_1")); // NOI18N - currentPageLabel.setMaximumSize(new java.awt.Dimension(18, 14)); - currentPageLabel.setPreferredSize(new java.awt.Dimension(18, 14)); + currentPageLabel.setMaximumSize(new java.awt.Dimension(18, 25)); + currentPageLabel.setMinimumSize(new java.awt.Dimension(7, 25)); + currentPageLabel.setPreferredSize(new java.awt.Dimension(18, 25)); panelPageOfCount.add(currentPageLabel); jSepMed2.setPreferredSize(new java.awt.Dimension(5, 0)); panelPageOfCount.add(jSepMed2); ofLabel.setText(org.openide.util.NbBundle.getMessage(StringsContentPanel.class, "StringsContentPanel.ofLabel.text_1")); // NOI18N + ofLabel.setMaximumSize(new java.awt.Dimension(11, 25)); + ofLabel.setMinimumSize(new java.awt.Dimension(11, 25)); + ofLabel.setPreferredSize(new java.awt.Dimension(11, 25)); panelPageOfCount.add(ofLabel); jSepMed3.setPreferredSize(new java.awt.Dimension(5, 0)); panelPageOfCount.add(jSepMed3); totalPageLabel.setText(org.openide.util.NbBundle.getMessage(StringsContentPanel.class, "StringsContentPanel.totalPageLabel.text_1")); // NOI18N + totalPageLabel.setMaximumSize(new java.awt.Dimension(21, 25)); + totalPageLabel.setMinimumSize(new java.awt.Dimension(21, 25)); + totalPageLabel.setPreferredSize(new java.awt.Dimension(21, 25)); panelPageOfCount.add(totalPageLabel); jSepMed4.setPreferredSize(new java.awt.Dimension(5, 0)); @@ -181,8 +195,9 @@ public class StringsContentPanel extends javax.swing.JPanel { panelPageNextPrevButton.setLayout(new java.awt.FlowLayout(java.awt.FlowLayout.LEFT, 0, 0)); pageLabel2.setText(org.openide.util.NbBundle.getMessage(StringsContentPanel.class, "StringsContentPanel.pageLabel2.text")); // NOI18N - pageLabel2.setMaximumSize(new java.awt.Dimension(29, 14)); - pageLabel2.setMinimumSize(new java.awt.Dimension(29, 14)); + pageLabel2.setMaximumSize(new java.awt.Dimension(29, 25)); + pageLabel2.setMinimumSize(new java.awt.Dimension(29, 25)); + pageLabel2.setPreferredSize(new java.awt.Dimension(29, 25)); panelPageNextPrevButton.add(pageLabel2); jSepMed5.setPreferredSize(new java.awt.Dimension(5, 0)); @@ -194,9 +209,9 @@ public class StringsContentPanel extends javax.swing.JPanel { prevPageButton.setContentAreaFilled(false); prevPageButton.setDisabledIcon(new javax.swing.ImageIcon(getClass().getResource("/org/sleuthkit/autopsy/corecomponents/btn_step_back_disabled.png"))); // NOI18N prevPageButton.setMargin(new java.awt.Insets(2, 0, 2, 0)); - prevPageButton.setMaximumSize(new java.awt.Dimension(20, 20)); - prevPageButton.setMinimumSize(new java.awt.Dimension(20, 20)); - prevPageButton.setPreferredSize(new java.awt.Dimension(20, 20)); + prevPageButton.setMaximumSize(new java.awt.Dimension(25, 25)); + prevPageButton.setMinimumSize(new java.awt.Dimension(20, 25)); + prevPageButton.setPreferredSize(new java.awt.Dimension(25, 25)); prevPageButton.setRolloverIcon(new javax.swing.ImageIcon(getClass().getResource("/org/sleuthkit/autopsy/corecomponents/btn_step_back_hover.png"))); // NOI18N prevPageButton.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { @@ -205,19 +220,15 @@ public class StringsContentPanel extends javax.swing.JPanel { }); panelPageNextPrevButton.add(prevPageButton); - jSepXs1.setMinimumSize(new java.awt.Dimension(1, 0)); - jSepXs1.setPreferredSize(new java.awt.Dimension(1, 0)); - panelPageNextPrevButton.add(jSepXs1); - nextPageButton.setIcon(new javax.swing.ImageIcon(getClass().getResource("/org/sleuthkit/autopsy/corecomponents/btn_step_forward.png"))); // NOI18N nextPageButton.setText(org.openide.util.NbBundle.getMessage(StringsContentPanel.class, "StringsContentPanel.nextPageButton.text")); // NOI18N nextPageButton.setBorderPainted(false); nextPageButton.setContentAreaFilled(false); nextPageButton.setDisabledIcon(new javax.swing.ImageIcon(getClass().getResource("/org/sleuthkit/autopsy/corecomponents/btn_step_forward_disabled.png"))); // NOI18N nextPageButton.setMargin(new java.awt.Insets(2, 0, 2, 0)); - nextPageButton.setMaximumSize(new java.awt.Dimension(20, 20)); - nextPageButton.setMinimumSize(new java.awt.Dimension(20, 20)); - nextPageButton.setPreferredSize(new java.awt.Dimension(20, 20)); + nextPageButton.setMaximumSize(new java.awt.Dimension(25, 25)); + nextPageButton.setMinimumSize(new java.awt.Dimension(20, 25)); + nextPageButton.setPreferredSize(new java.awt.Dimension(25, 25)); nextPageButton.setRolloverIcon(new javax.swing.ImageIcon(getClass().getResource("/org/sleuthkit/autopsy/corecomponents/btn_step_forward_hover.png"))); // NOI18N nextPageButton.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { @@ -242,7 +253,7 @@ public class StringsContentPanel extends javax.swing.JPanel { goToPageTextField.setText(org.openide.util.NbBundle.getMessage(StringsContentPanel.class, "StringsContentPanel.goToPageTextField.text")); // NOI18N goToPageTextField.setMaximumSize(new java.awt.Dimension(2147483647, 25)); goToPageTextField.setMinimumSize(new java.awt.Dimension(50, 25)); - goToPageTextField.setPreferredSize(new java.awt.Dimension(100, 25)); + goToPageTextField.setPreferredSize(new java.awt.Dimension(70, 25)); goToPageTextField.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { goToPageTextFieldActionPerformed(evt); @@ -278,11 +289,9 @@ public class StringsContentPanel extends javax.swing.JPanel { add(controlPanel, java.awt.BorderLayout.NORTH); - outputScrollPane.setPreferredSize(new java.awt.Dimension(640, 402)); - outputViewPane.setEditable(false); outputViewPane.setFont(new java.awt.Font("Courier New", 0, 11)); // NOI18N - outputViewPane.setPreferredSize(new java.awt.Dimension(100, 40)); + outputViewPane.setPreferredSize(null); outputScrollPane.setViewportView(outputViewPane); add(outputScrollPane, java.awt.BorderLayout.CENTER); diff --git a/Core/src/org/sleuthkit/autopsy/texttranslation/ui/Bundle.properties b/Core/src/org/sleuthkit/autopsy/texttranslation/ui/Bundle.properties index ac480ca0e1..6ae7ed7d12 100644 --- a/Core/src/org/sleuthkit/autopsy/texttranslation/ui/Bundle.properties +++ b/Core/src/org/sleuthkit/autopsy/texttranslation/ui/Bundle.properties @@ -4,3 +4,4 @@ TranslationContentPanel.ocrLabel.text=OCR: TranslationOptionsPanelController.moduleErr=Module Error TranslationOptionsPanelController.moduleErr.msg=A module caused an error listening to TranslationSettingsPanelController updates. See log to determine which module. Some data could be incomplete. TranslationContentPanel.showLabel.text=Show: +TranslationContentPanel.jSepLarge1.AccessibleContext.accessibleName= diff --git a/Core/src/org/sleuthkit/autopsy/texttranslation/ui/TranslationContentPanel.form b/Core/src/org/sleuthkit/autopsy/texttranslation/ui/TranslationContentPanel.form index 4a736ef1d2..4dabce0985 100644 --- a/Core/src/org/sleuthkit/autopsy/texttranslation/ui/TranslationContentPanel.form +++ b/Core/src/org/sleuthkit/autopsy/texttranslation/ui/TranslationContentPanel.form @@ -6,11 +6,11 @@ - + - + @@ -24,28 +24,20 @@ - + - + - - - - - - + - + - - - @@ -58,28 +50,66 @@ - + - - - - + - - - - + - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -97,10 +127,21 @@ - + + + + + + + + + + + + @@ -123,16 +164,36 @@ - - - - + + + + + + + + + + + + + + + + + + + + + + + + @@ -146,10 +207,21 @@ - + + + + + + + + + + + + @@ -183,8 +255,11 @@ + + + - + diff --git a/Core/src/org/sleuthkit/autopsy/texttranslation/ui/TranslationContentPanel.java b/Core/src/org/sleuthkit/autopsy/texttranslation/ui/TranslationContentPanel.java index 62f87f0617..4f6fbd7271 100644 --- a/Core/src/org/sleuthkit/autopsy/texttranslation/ui/TranslationContentPanel.java +++ b/Core/src/org/sleuthkit/autopsy/texttranslation/ui/TranslationContentPanel.java @@ -25,11 +25,13 @@ import java.awt.Font; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; import java.util.ArrayList; +import java.util.Arrays; import java.util.List; import javax.swing.JComboBox; import org.openide.util.NbBundle; import org.openide.util.NbBundle.Messages; import org.sleuthkit.autopsy.corecomponents.AutoWrappingJTextPane; +import org.sleuthkit.autopsy.guiutils.WrapLayout; /** * A JPanel used by TranslatedContentViewer to display machine translation of @@ -49,6 +51,7 @@ public class TranslationContentPanel extends javax.swing.JPanel { */ public TranslationContentPanel() { initComponents(); + additionalInitComponents(); DISPLAY_PANE = new AutoWrappingJTextPane(); DISPLAY_PANE.setEditable(false); @@ -255,6 +258,13 @@ public class TranslationContentPanel extends javax.swing.JPanel { LANGUAGE_NAMES = createLanguageBiMap(); } + private void additionalInitComponents() { + // use wrap layout for better component wrapping + WrapLayout layout = new WrapLayout(0,5); + layout.setOppositeAligned(Arrays.asList(showPanel, ocrPanel)); + controlPanel.setLayout(layout); + } + /** * Selection choices to be displayed in the combobox dropdown. */ @@ -285,60 +295,88 @@ public class TranslationContentPanel extends javax.swing.JPanel { // //GEN-BEGIN:initComponents private void initComponents() { - jPanel1 = new javax.swing.JPanel(); + controlPanel = new javax.swing.JPanel(); + javax.swing.JPanel warningLabelPanel = new javax.swing.JPanel(); warningLabel = new javax.swing.JLabel(); - javax.swing.JPanel showPanel = new javax.swing.JPanel(); + jSeparator1 = new javax.swing.JSeparator(); + showPanel = new javax.swing.JPanel(); showLabel = new javax.swing.JLabel(); + javax.swing.JSeparator jSepMed1 = new javax.swing.JSeparator(); displayTextComboBox = new javax.swing.JComboBox<>(); - javax.swing.JPanel ocrPanel = new javax.swing.JPanel(); + ocrPanel = new javax.swing.JPanel(); + javax.swing.JSeparator jSepLarge1 = new javax.swing.JSeparator(); ocrLabel = new javax.swing.JLabel(); + javax.swing.JSeparator jSepMed2 = new javax.swing.JSeparator(); ocrDropdown = new javax.swing.JComboBox<>(); textScrollPane = new javax.swing.JScrollPane(); setMaximumSize(new java.awt.Dimension(2000, 2000)); - setMinimumSize(new java.awt.Dimension(2, 2)); + setMinimumSize(new java.awt.Dimension(250, 2)); setName(""); // NOI18N - setPreferredSize(new java.awt.Dimension(100, 58)); + setPreferredSize(new java.awt.Dimension(250, 58)); setVerifyInputWhenFocusTarget(false); setLayout(new java.awt.BorderLayout()); - jPanel1.setBorder(javax.swing.BorderFactory.createEtchedBorder()); - jPanel1.setMaximumSize(new java.awt.Dimension(182, 25)); - jPanel1.setMinimumSize(new java.awt.Dimension(254, 25)); - jPanel1.setName(""); // NOI18N - jPanel1.setPreferredSize(new java.awt.Dimension(182, 25)); - jPanel1.setLayout(new java.awt.FlowLayout(java.awt.FlowLayout.LEFT, 5, 0)); + controlPanel.setMaximumSize(new java.awt.Dimension(20000, 20000)); + controlPanel.setMinimumSize(new java.awt.Dimension(2, 25)); + controlPanel.setName(""); // NOI18N + controlPanel.setLayout(new java.awt.FlowLayout(java.awt.FlowLayout.LEFT, 5, 0)); + + warningLabelPanel.setMaximumSize(new java.awt.Dimension(32767, 25)); + warningLabelPanel.setMinimumSize(new java.awt.Dimension(2, 25)); + warningLabelPanel.setLayout(new java.awt.FlowLayout(java.awt.FlowLayout.CENTER, 0, 0)); warningLabel.setIcon(new javax.swing.ImageIcon(getClass().getResource("/org/sleuthkit/autopsy/images/warning16.png"))); // NOI18N warningLabel.setMaximumSize(new java.awt.Dimension(250, 25)); warningLabel.setMinimumSize(new java.awt.Dimension(150, 25)); - warningLabel.setPreferredSize(new java.awt.Dimension(250, 25)); - jPanel1.add(warningLabel); + warningLabel.setPreferredSize(null); + warningLabelPanel.add(warningLabel); + jSeparator1.setMaximumSize(new java.awt.Dimension(1, 25)); + jSeparator1.setMinimumSize(new java.awt.Dimension(1, 25)); + jSeparator1.setPreferredSize(new java.awt.Dimension(1, 25)); + warningLabelPanel.add(jSeparator1); + + controlPanel.add(warningLabelPanel); + + showPanel.setMaximumSize(new java.awt.Dimension(32767, 25)); + showPanel.setMinimumSize(new java.awt.Dimension(0, 25)); showPanel.setLayout(new java.awt.FlowLayout(java.awt.FlowLayout.CENTER, 0, 0)); org.openide.awt.Mnemonics.setLocalizedText(showLabel, org.openide.util.NbBundle.getMessage(TranslationContentPanel.class, "TranslationContentPanel.showLabel.text")); // NOI18N showLabel.setMaximumSize(new java.awt.Dimension(42, 25)); showLabel.setMinimumSize(new java.awt.Dimension(42, 25)); - showLabel.setPreferredSize(new java.awt.Dimension(42, 25)); + showLabel.setPreferredSize(null); showPanel.add(showLabel); + jSepMed1.setPreferredSize(new java.awt.Dimension(5, 0)); + showPanel.add(jSepMed1); + displayTextComboBox.setMaximumSize(new java.awt.Dimension(170, 25)); displayTextComboBox.setMinimumSize(new java.awt.Dimension(170, 25)); displayTextComboBox.setPreferredSize(new java.awt.Dimension(170, 25)); showPanel.add(displayTextComboBox); - jPanel1.add(showPanel); + controlPanel.add(showPanel); + ocrPanel.setMaximumSize(new java.awt.Dimension(32767, 25)); + ocrPanel.setMinimumSize(new java.awt.Dimension(0, 25)); ocrPanel.setLayout(new java.awt.FlowLayout(java.awt.FlowLayout.CENTER, 0, 0)); + jSepLarge1.setPreferredSize(new java.awt.Dimension(10, 0)); + ocrPanel.add(jSepLarge1); + jSepLarge1.getAccessibleContext().setAccessibleName(org.openide.util.NbBundle.getMessage(TranslationContentPanel.class, "TranslationContentPanel.jSepLarge1.AccessibleContext.accessibleName")); // NOI18N + org.openide.awt.Mnemonics.setLocalizedText(ocrLabel, org.openide.util.NbBundle.getMessage(TranslationContentPanel.class, "TranslationContentPanel.ocrLabel.text")); // NOI18N ocrLabel.setEnabled(false); ocrLabel.setMaximumSize(new java.awt.Dimension(40, 25)); ocrLabel.setMinimumSize(new java.awt.Dimension(25, 16)); - ocrLabel.setPreferredSize(new java.awt.Dimension(40, 25)); + ocrLabel.setPreferredSize(null); ocrPanel.add(ocrLabel); + jSepMed2.setPreferredSize(new java.awt.Dimension(5, 0)); + ocrPanel.add(jSepMed2); + ocrDropdown.setModel(new javax.swing.DefaultComboBoxModel<>(new String[] { "N/A" })); ocrDropdown.setEnabled(false); ocrDropdown.setMaximumSize(new java.awt.Dimension(170, 25)); @@ -347,22 +385,26 @@ public class TranslationContentPanel extends javax.swing.JPanel { ocrDropdown.setPreferredSize(new java.awt.Dimension(170, 25)); ocrPanel.add(ocrDropdown); - jPanel1.add(ocrPanel); + controlPanel.add(ocrPanel); - add(jPanel1, java.awt.BorderLayout.NORTH); + add(controlPanel, java.awt.BorderLayout.NORTH); textScrollPane.setHorizontalScrollBarPolicy(javax.swing.ScrollPaneConstants.HORIZONTAL_SCROLLBAR_NEVER); textScrollPane.setMaximumSize(new java.awt.Dimension(20000, 20000)); - textScrollPane.setPreferredSize(new java.awt.Dimension(640, 250)); + textScrollPane.setMinimumSize(new java.awt.Dimension(20, 20)); + textScrollPane.setPreferredSize(new java.awt.Dimension(20, 20)); add(textScrollPane, java.awt.BorderLayout.CENTER); }// //GEN-END:initComponents // Variables declaration - do not modify//GEN-BEGIN:variables + private javax.swing.JPanel controlPanel; private javax.swing.JComboBox displayTextComboBox; - private javax.swing.JPanel jPanel1; + private javax.swing.JSeparator jSeparator1; private javax.swing.JComboBox ocrDropdown; private javax.swing.JLabel ocrLabel; + private javax.swing.JPanel ocrPanel; private javax.swing.JLabel showLabel; + private javax.swing.JPanel showPanel; private javax.swing.JScrollPane textScrollPane; private javax.swing.JLabel warningLabel; // End of variables declaration//GEN-END:variables diff --git a/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/ExtractedContentPanel.form b/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/ExtractedContentPanel.form index 7add18aa42..13e535f4ed 100644 --- a/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/ExtractedContentPanel.form +++ b/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/ExtractedContentPanel.form @@ -27,10 +27,10 @@ - + - + @@ -571,10 +571,10 @@ - + - + diff --git a/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/ExtractedContentPanel.java b/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/ExtractedContentPanel.java index 11425a2a7d..8ff9c0fdcc 100644 --- a/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/ExtractedContentPanel.java +++ b/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/ExtractedContentPanel.java @@ -47,6 +47,7 @@ import org.openide.util.NbBundle; import org.sleuthkit.autopsy.coreutils.EscapeUtil; import org.sleuthkit.autopsy.coreutils.Logger; import org.sleuthkit.autopsy.coreutils.TextUtil; +import org.sleuthkit.autopsy.guiutils.WrapLayout; /** * Panel displays HTML content sent to ExtractedContentViewer, and provides a @@ -187,8 +188,7 @@ class ExtractedContentPanel extends javax.swing.JPanel implements ResizableTextP private void additionalInit() { // use wrap layout for better component wrapping - WrapLayout layout = new WrapLayout(); - layout.setHgap(5); + WrapLayout layout = new WrapLayout(0,5); layout.setOppositeAligned(Arrays.asList(textSourcePanel)); controlPanel.setLayout(layout); } @@ -209,13 +209,13 @@ class ExtractedContentPanel extends javax.swing.JPanel implements ResizableTextP controlPanel = new javax.swing.JPanel(); javax.swing.JPanel pagePanel = new javax.swing.JPanel(); pagesLabel = new javax.swing.JLabel(); - fillerSmall1 = new javax.swing.Box.Filler(new java.awt.Dimension(5, 0), new java.awt.Dimension(5, 0), new java.awt.Dimension(5, 32767)); + javax.swing.Box.Filler fillerSmall1 = new javax.swing.Box.Filler(new java.awt.Dimension(5, 0), new java.awt.Dimension(5, 0), new java.awt.Dimension(5, 32767)); pageCurLabel = new javax.swing.JLabel(); - fillerSmall2 = new javax.swing.Box.Filler(new java.awt.Dimension(5, 0), new java.awt.Dimension(5, 0), new java.awt.Dimension(5, 32767)); + javax.swing.Box.Filler fillerSmall2 = new javax.swing.Box.Filler(new java.awt.Dimension(5, 0), new java.awt.Dimension(5, 0), new java.awt.Dimension(5, 32767)); pageOfLabel = new javax.swing.JLabel(); - fillerSmall3 = new javax.swing.Box.Filler(new java.awt.Dimension(5, 0), new java.awt.Dimension(5, 0), new java.awt.Dimension(5, 32767)); + javax.swing.Box.Filler fillerSmall3 = new javax.swing.Box.Filler(new java.awt.Dimension(5, 0), new java.awt.Dimension(5, 0), new java.awt.Dimension(5, 32767)); pageTotalLabel = new javax.swing.JLabel(); - fillerSmall4 = new javax.swing.Box.Filler(new java.awt.Dimension(5, 0), new java.awt.Dimension(5, 0), new java.awt.Dimension(5, 32767)); + javax.swing.Box.Filler fillerSmall4 = new javax.swing.Box.Filler(new java.awt.Dimension(5, 0), new java.awt.Dimension(5, 0), new java.awt.Dimension(5, 32767)); pageButtonsLabel = new javax.swing.JLabel(); javax.swing.Box.Filler fillerMed1 = new javax.swing.Box.Filler(new java.awt.Dimension(10, 0), new java.awt.Dimension(10, 0), new java.awt.Dimension(10, 32767)); pagePreviousButton = new javax.swing.JButton(); @@ -250,8 +250,8 @@ class ExtractedContentPanel extends javax.swing.JPanel implements ResizableTextP selectAllMenuItem.setText(org.openide.util.NbBundle.getMessage(ExtractedContentPanel.class, "ExtractedContentPanel.selectAllMenuItem.text")); // NOI18N rightClickMenu.add(selectAllMenuItem); - setMinimumSize(new java.awt.Dimension(100, 0)); - setPreferredSize(new java.awt.Dimension(100, 58)); + setMinimumSize(new java.awt.Dimension(250, 0)); + setPreferredSize(new java.awt.Dimension(250, 58)); setLayout(new java.awt.BorderLayout()); controlPanel.setLayout(new java.awt.FlowLayout(java.awt.FlowLayout.LEFT, 0, 0)); @@ -393,8 +393,8 @@ class ExtractedContentPanel extends javax.swing.JPanel implements ResizableTextP sourceComboBox.setModel(new javax.swing.DefaultComboBoxModel()); sourceComboBox.setMaximumSize(new java.awt.Dimension(150, 32767)); - sourceComboBox.setMinimumSize(new java.awt.Dimension(150, 20)); - sourceComboBox.setPreferredSize(new java.awt.Dimension(150, 20)); + sourceComboBox.setMinimumSize(new java.awt.Dimension(150, 25)); + sourceComboBox.setPreferredSize(new java.awt.Dimension(150, 25)); textSourcePanel.add(sourceComboBox); controlPanel.add(textSourcePanel); @@ -418,10 +418,6 @@ class ExtractedContentPanel extends javax.swing.JPanel implements ResizableTextP private javax.swing.JMenuItem copyMenuItem; private javax.swing.JScrollPane extractedScrollPane; private javax.swing.JTextPane extractedTextPane; - private javax.swing.Box.Filler fillerSmall1; - private javax.swing.Box.Filler fillerSmall2; - private javax.swing.Box.Filler fillerSmall3; - private javax.swing.Box.Filler fillerSmall4; private javax.swing.JLabel hitButtonsLabel; private javax.swing.JLabel hitCountLabel; private javax.swing.JLabel hitLabel; diff --git a/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/WrapLayout.java b/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/WrapLayout.java deleted file mode 100644 index ac9e7e4afb..0000000000 --- a/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/WrapLayout.java +++ /dev/null @@ -1,495 +0,0 @@ -/* - * 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.keywordsearch; - -import java.awt.Component; -import java.awt.Container; -import java.awt.Dimension; -import java.awt.Insets; -import java.awt.LayoutManager; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.Collection; -import java.util.Collections; -import java.util.HashSet; -import java.util.List; -import java.util.Set; -import java.util.stream.Collectors; -import javax.swing.JScrollPane; -import javax.swing.SwingUtilities; - -/** - * FlowLayout subclass that fully supports wrapping of components. - * - * Originally written by Rob Camick - * https://tips4java.wordpress.com/2008/11/06/wrap-layout/ - */ -class WrapLayout implements LayoutManager, java.io.Serializable { - - private static final long serialVersionUID = 1L; - - - /** - * The flow layout manager allows a seperation of - * components with gaps. The horizontal gap will - * specify the space between components and between - * the components and the borders of the - * Container. - * - * @serial - * @see #getHgap() - * @see #setHgap(int) - */ - private int hgap; - - /** - * The flow layout manager allows a seperation of - * components with gaps. The vertical gap will - * specify the space between rows and between the - * the rows and the borders of the Container. - * - * @serial - * @see #getHgap() - * @see #setHgap(int) - */ - private int vgap; - - /** - * If true, components will be aligned on their baseline. - */ - private boolean alignOnBaseline; - - - - - - private final Set oppositeAlignedItems = new HashSet<>(); - - /** - * Constructs a new WrapLayout with a left alignment and a - * default 5-unit horizontal and vertical gap. - */ - WrapLayout() { - super(); - } - - - void setOppositeAligned(Collection rightAlignedComponents) { - synchronized (this.oppositeAlignedItems) { - this.oppositeAlignedItems.clear(); - this.oppositeAlignedItems.addAll(rightAlignedComponents); - } - } - - Set getOppositeAlignedItems() { - return oppositeAlignedItems; - } - - - /** - * Gets the horizontal gap between components - * and between the components and the borders - * of the Container - * - * @return the horizontal gap between components - * and between the components and the borders - * of the Container - * @see java.awt.FlowLayout#setHgap - * @since JDK1.1 - */ - int getHgap() { - return hgap; - } - - /** - * Sets the horizontal gap between components and - * between the components and the borders of the - * Container. - * - * @param hgap the horizontal gap between components - * and between the components and the borders - * of the Container - * @see java.awt.FlowLayout#getHgap - * @since JDK1.1 - */ - void setHgap(int hgap) { - this.hgap = hgap; - } - - /** - * Gets the vertical gap between components and - * between the components and the borders of the - * Container. - * - * @return the vertical gap between components - * and between the components and the borders - * of the Container - * @see java.awt.FlowLayout#setVgap - * @since JDK1.1 - */ - int getVgap() { - return vgap; - } - - /** - * Sets the vertical gap between components and between - * the components and the borders of the Container. - * - * @param vgap the vertical gap between components - * and between the components and the borders - * of the Container - * @see java.awt.FlowLayout#getVgap - * @since JDK1.1 - */ - void setVgap(int vgap) { - this.vgap = vgap; - } - - /** - * Sets whether or not components should be vertically aligned along their - * baseline. Components that do not have a baseline will be centered. - * The default is false. - * - * @param alignOnBaseline whether or not components should be - * vertically aligned on their baseline - * @since 1.6 - */ - void setAlignOnBaseline(boolean alignOnBaseline) { - this.alignOnBaseline = alignOnBaseline; - } - - /** - * Returns true if components are to be vertically aligned along - * their baseline. The default is false. - * - * @return true if components are to be vertically aligned along - * their baseline - * @since 1.6 - */ - boolean getAlignOnBaseline() { - return alignOnBaseline; - } - - /** - * Adds the specified component to the layout. - * Not used by this class. - * @param name the name of the component - * @param comp the component to be added - */ - @Override - public void addLayoutComponent(String name, Component comp) { - } - - /** - * Removes the specified component from the layout. - * Not used by this class. - * @param comp the component to remove - * @see java.awt.Container#removeAll - */ - @Override - public void removeLayoutComponent(Component comp) { - } - - - - private int getComponentY(int rowY, boolean alignBaseline, int rowHeight, int itemHeight) { - return alignBaseline ? - rowY + rowHeight - itemHeight : - rowY; - } - - private int getComponentX(int leftX, int rightX, boolean ltr, int xPos, int componentWidth) { - return ltr ? leftX + xPos : rightX - xPos - componentWidth; - } - - private int setComponentDims(Component comp, boolean alignBaseline, boolean ltr, int rowY, int rowHeight, int leftX, int rightX, int xPos) { - Dimension d = comp.getPreferredSize(); - comp.setSize(d); - - int x = getComponentX(leftX, rightX, ltr, xPos, d.width); - int y = getComponentY(rowY, alignBaseline, rowHeight, d.height); - comp.setLocation(x, y); - - return d.width; - } - - - /** - * Lays out the container. This method lets each - * visible component take its preferred size by reshaping the - * components in the target container in order to satisfy the alignment of - * this FlowLayout object. Taken from - * https://raw.githubusercontent.com/mynawang/Java8-Source-Code/master/src/main/jdk8/java/awt/FlowLayout.java. - * - * @param target the specified component being laid out - * - * @see Container - * @see java.awt.Container#doLayout - */ - @Override - public void layoutContainer(Container target) { - synchronized (target.getTreeLock()) { - synchronized (this.oppositeAlignedItems) { - ParentDimensions targetDims = getTargetDimensions(target); - List components = Arrays.asList(target.getComponents()); - List rows = getAllRows(components, true, targetDims.innerWidth); - - boolean ltr = target.getComponentOrientation().isLeftToRight(); - boolean useBaseline = getAlignOnBaseline(); - - int rowY = targetDims.insets.top + getVgap(); - int leftX = targetDims.insets.left + getHgap(); - int rightX = targetDims.outerWidth - targetDims.insets.right - getHgap(); - - for (Row row : rows) { - int rowHeight = row.height; - - int curX = 0; - if (row.components != null) { - for (Component origComp : row.components) - curX += setComponentDims(origComp, useBaseline, ltr, rowY, rowHeight, leftX, rightX, curX) + getHgap(); - } - - if (row.oppositeAligned != null) { - curX = 0; - // reverse opposite aligned for layout purposes since flipping ltr - Collections.reverse(row.oppositeAligned); - for (Component oppAlignedComp : row.oppositeAligned) - curX += setComponentDims(oppAlignedComp, useBaseline, !ltr, rowY, rowHeight, leftX, rightX, curX) + getHgap(); - } - - rowY += rowHeight + getVgap(); - } - } - } - } - - /** - * Returns the preferred dimensions for this layout given the - * visible components in the specified target container. - * - * @param target the component which needs to be laid out - * - * @return the preferred dimensions to lay out the subcomponents of the - * specified container - */ - @Override - public Dimension preferredLayoutSize(Container target) { - return layoutSize(target, true); - } - - /** - * Returns the minimum dimensions needed to layout the visible - * components contained in the specified target container. - * - * @param target the component which needs to be laid out - * - * @return the minimum dimensions to lay out the subcomponents of the - * specified container - */ - @Override - public Dimension minimumLayoutSize(Container target) { - Dimension minimum = layoutSize(target, false); - minimum.width -= (getHgap() + 1); - return minimum; - } - - private static class ParentDimensions { - - final int outerWidth; - final int innerWidth; - final Insets insets; - - ParentDimensions(int outerWidth, int innerWidth, Insets insets) { - this.outerWidth = outerWidth; - this.innerWidth = innerWidth; - this.insets = insets; - } - } - - private ParentDimensions getTargetDimensions(Container target) { - // Each row must fit with the width allocated to the containter. - // When the container width = 0, the preferred width of the container - // has not yet been calculated so lets ask for the maximum. - - int targetWidth = target.getSize().width; - Container container = target; - - while (container.getSize().width == 0 && container.getParent() != null) { - container = container.getParent(); - } - - targetWidth = container.getSize().width; - - if (targetWidth == 0) { - targetWidth = Integer.MAX_VALUE; - } - - int hgap = getHgap(); - - Insets insets = target.getInsets(); - int horizontalInsetsAndGap = insets.left + insets.right + (hgap * 2); - int maxWidth = targetWidth - horizontalInsetsAndGap; - - return new ParentDimensions(targetWidth, maxWidth, insets); - } - - /** - * Returns the minimum or preferred dimension needed to layout the target - * container. - * - * @param target target to get layout size for - * @param preferred should preferred size be calculated - * - * @return the dimension to layout the target container - */ - private Dimension layoutSize(Container target, boolean preferred) { - synchronized (target.getTreeLock()) { - synchronized (this.oppositeAlignedItems) { - ParentDimensions targetDims = getTargetDimensions(target); - List components = Arrays.asList(target.getComponents()); - List rows = getAllRows(components, preferred, targetDims.innerWidth); - - Integer containerHeight = rows.stream().map((r) -> r.height).reduce(0, Integer::sum); - // add in vertical gap between rows - if (rows.size() > 1) { - containerHeight += (rows.size() - 1) * getVgap(); - } - - containerHeight += targetDims.insets.top + targetDims.insets.bottom; - - Integer containerWidth = rows.stream().map((r) -> r.width).reduce(0, Math::max); - containerWidth += targetDims.insets.left + targetDims.insets.right + (getHgap() * 2); - - // When using a scroll pane or the DecoratedLookAndFeel we need to - // make sure the preferred size is less than the size of the - // target containter so shrinking the container size works - // correctly. Removing the horizontal gap is an easy way to do this. - Container scrollPane = SwingUtilities.getAncestorOfClass(JScrollPane.class, target); - - if (scrollPane != null && target.isValid()) { - containerWidth -= (getHgap() + 1); - } - - return new Dimension(containerWidth, containerHeight); - } - } - } - - private class Row { - - final List components; - final List oppositeAligned; - final int height; - final int width; - - public Row(List components, List oppositeAligned, int height, int width) { - this.components = components; - this.oppositeAligned = oppositeAligned; - this.height = height; - this.width = width; - } - } - - private List getAllRows(List components, boolean preferred, int maxWidth) { - List originalComp - = components - .stream() - .filter((comp) -> !this.oppositeAlignedItems.contains(comp)) - .collect(Collectors.toList()); - - List originalRowSet = getRowSet(originalComp, preferred, maxWidth); - - List oppositeAlignedComp - = components - .stream() - .filter((comp) -> this.oppositeAlignedItems.contains(comp)) - .collect(Collectors.toList()); - - // go in reverse order and then revert so we can use same getRowSet method - Collections.reverse(oppositeAlignedComp); - List oppositeRowSet = getRowSet(oppositeAlignedComp, preferred, maxWidth) - .stream() - .map((Row row) -> { - Collections.reverse(row.components); - return new Row(null, row.components, row.height, row.width); - }) - .collect(Collectors.toList()); - Collections.reverse(oppositeRowSet); - - List toReturn = new ArrayList<>(); - - if (originalRowSet.size() > 0 && oppositeRowSet.size() > 0) { - Row lastOrig = originalRowSet.get(originalRowSet.size() - 1); - Row firstOpp = oppositeRowSet.get(0); - - int proposedRowWidth = lastOrig.width + firstOpp.width + getHgap(); - if (proposedRowWidth <= maxWidth) { - Row middleRow = new Row(lastOrig.components, firstOpp.oppositeAligned, - Math.max(lastOrig.height, firstOpp.height), proposedRowWidth); - - toReturn.addAll(originalRowSet.subList(0, originalRowSet.size() - 1)); - toReturn.add(middleRow); - toReturn.addAll(oppositeRowSet.subList(1, oppositeRowSet.size())); - return toReturn; - } - } - - toReturn.addAll(originalRowSet); - toReturn.addAll(oppositeRowSet); - return toReturn; - } - - private List getRowSet(List components, boolean preferred, int maxWidth) { - List rows = new ArrayList<>(); - - List rowComponents = new ArrayList<>(); - int rowWidth = 0; - int rowHeight = 0; - - for (Component m : components) { - if (m.isVisible()) { - Dimension d = preferred ? m.getPreferredSize() : m.getMinimumSize(); - - // Can't add the component to current row. Start a new row. - if (rowWidth + d.width > maxWidth) { - rows.add(new Row(rowComponents, null, rowHeight, rowWidth)); - rowComponents = new ArrayList<>(); - rowWidth = 0; - rowHeight = 0; - } - - // Add a horizontal gap for all components after the first - if (rowWidth != 0) { - rowWidth += getHgap(); - } - - rowComponents.add(m); - rowWidth += d.width; - rowHeight = Math.max(rowHeight, d.height); - } - } - - if (rowComponents.size() > 0) { - rows.add(new Row(rowComponents, null, rowHeight, rowWidth)); - } - - return rows; - } -} From ecb47c1a9caa3a415e825951a8a61210d4ae626f Mon Sep 17 00:00:00 2001 From: Greg DiCristofaro Date: Thu, 2 Apr 2020 15:33:43 -0400 Subject: [PATCH 022/137] update for disabled edge case --- .../optionspanel/Bundle.properties-MERGED | 12 ++++++------ .../optionspanel/EamDbSettingsDialog.java | 12 ++++++------ .../optionspanel/GlobalSettingsPanel.form | 8 +++++--- .../optionspanel/GlobalSettingsPanel.java | 15 +++++++++++---- 4 files changed, 28 insertions(+), 19 deletions(-) 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 b9d0716154..0fc6762cc3 100755 --- a/Core/src/org/sleuthkit/autopsy/centralrepository/optionspanel/Bundle.properties-MERGED +++ b/Core/src/org/sleuthkit/autopsy/centralrepository/optionspanel/Bundle.properties-MERGED @@ -12,14 +12,14 @@ EamDbSettingsDialog.fcDatabasePath.title=Select location for central_repository. EamDbSettingsDialog.lbDatabaseType.text=Database Type : EamDbSettingsDialog.lbSingleUserSqLite.text=SQLite should only be used by one examiner at a time. EamDbSettingsDialog.okButton.connectionErrorMsg.text=Failed to connect to central repository database. -EamDbSettingsDialog.okButton.corruptDatabaseExists.message=Database exists but is not the right format. Manually delete it or choose a different path (if applicable). +EamDbSettingsDialog.okButton.corruptDatabaseExists.message=Central Repository Database exists but is not the right format. Manually delete it or choose a different path (if applicable). EamDbSettingsDialog.okButton.corruptDatabaseExists.title=Error Loading Central Repository Database -EamDbSettingsDialog.okButton.createDbDialog.message=Database does not exist, would you like to create it? +EamDbSettingsDialog.okButton.createDbDialog.message=Central Repository Database does not exist, would you like to create it? EamDbSettingsDialog.okButton.createDbDialog.title=Central Repository Database Does Not Exist -EamDbSettingsDialog.okButton.createDbError.title=Unable to Create Database -EamDbSettingsDialog.okButton.createPostgresDbError.message=Unable to create Postgres Database, please ensure address, port, and login credentials are correct for Postgres server and try again. -EamDbSettingsDialog.okButton.createSQLiteDbError.message=Unable to create SQLite Database, please ensure location exists and you have write permissions and try again. -EamDbSettingsDialog.okButton.databaseConnectionFailed.message=Unable to connect to database. Please check your settings and try again. +EamDbSettingsDialog.okButton.createDbError.title=Unable to Create Central Repository Database +EamDbSettingsDialog.okButton.createPostgresDbError.message=Unable to create Postgres Central Repository Database, please ensure address, port, and login credentials are correct for Postgres server and try again. +EamDbSettingsDialog.okButton.createSQLiteDbError.message=Unable to create SQLite Central Repository Database, please ensure location exists and you have write permissions and try again. +EamDbSettingsDialog.okButton.databaseConnectionFailed.message=Unable to connect to Central Repository Database. Please check your settings and try again. EamDbSettingsDialog.okButton.databaseConnectionFailed.title=Central Repository Database Connection Failed EamDbSettingsDialog.okButton.errorMsg.text=Please restart Autopsy to begin using the new database platform. EamDbSettingsDialog.okButton.errorTitle.text=Restart Required. diff --git a/Core/src/org/sleuthkit/autopsy/centralrepository/optionspanel/EamDbSettingsDialog.java b/Core/src/org/sleuthkit/autopsy/centralrepository/optionspanel/EamDbSettingsDialog.java index 1e2c8126e0..54ede84070 100644 --- a/Core/src/org/sleuthkit/autopsy/centralrepository/optionspanel/EamDbSettingsDialog.java +++ b/Core/src/org/sleuthkit/autopsy/centralrepository/optionspanel/EamDbSettingsDialog.java @@ -159,14 +159,14 @@ public class EamDbSettingsDialog extends JDialog { * @return Whether or not the ultimate status after prompts is okay to continue. */ @NbBundle.Messages({"EamDbSettingsDialog.okButton.corruptDatabaseExists.title=Error Loading Central Repository Database", - "EamDbSettingsDialog.okButton.corruptDatabaseExists.message=Database exists but is not the right format. Manually delete it or choose a different path (if applicable).", + "EamDbSettingsDialog.okButton.corruptDatabaseExists.message=Central Repository Database exists but is not the right format. Manually delete it or choose a different path (if applicable).", "EamDbSettingsDialog.okButton.createDbDialog.title=Central Repository Database Does Not Exist", - "EamDbSettingsDialog.okButton.createDbDialog.message=Database does not exist, would you like to create it?", + "EamDbSettingsDialog.okButton.createDbDialog.message=Central Repository Database does not exist, would you like to create it?", "EamDbSettingsDialog.okButton.databaseConnectionFailed.title=Central Repository Database Connection Failed", - "EamDbSettingsDialog.okButton.databaseConnectionFailed.message=Unable to connect to database. Please check your settings and try again.", - "EamDbSettingsDialog.okButton.createSQLiteDbError.message=Unable to create SQLite Database, please ensure location exists and you have write permissions and try again.", - "EamDbSettingsDialog.okButton.createPostgresDbError.message=Unable to create Postgres Database, please ensure address, port, and login credentials are correct for Postgres server and try again.", - "EamDbSettingsDialog.okButton.createDbError.title=Unable to Create Database"}) + "EamDbSettingsDialog.okButton.databaseConnectionFailed.message=Unable to connect to Central Repository Database. Please check your settings and try again.", + "EamDbSettingsDialog.okButton.createSQLiteDbError.message=Unable to create SQLite Central Repository Database, please ensure location exists and you have write permissions and try again.", + "EamDbSettingsDialog.okButton.createPostgresDbError.message=Unable to create Postgres Central Repository Database, please ensure address, port, and login credentials are correct for Postgres server and try again.", + "EamDbSettingsDialog.okButton.createDbError.title=Unable to Create Central Repository Database"}) private static boolean promptTestStatusWarnings(CentralRepoDbManager manager, EamDbSettingsDialog dialog) { if (manager.getStatus() == DatabaseTestResult.CONNECTION_FAILED) { JOptionPane.showMessageDialog(WindowManager.getDefault().getMainWindow(), diff --git a/Core/src/org/sleuthkit/autopsy/centralrepository/optionspanel/GlobalSettingsPanel.form b/Core/src/org/sleuthkit/autopsy/centralrepository/optionspanel/GlobalSettingsPanel.form index c7fd365389..942a113ff8 100644 --- a/Core/src/org/sleuthkit/autopsy/centralrepository/optionspanel/GlobalSettingsPanel.form +++ b/Core/src/org/sleuthkit/autopsy/centralrepository/optionspanel/GlobalSettingsPanel.form @@ -184,10 +184,12 @@ - - - + + + + + diff --git a/Core/src/org/sleuthkit/autopsy/centralrepository/optionspanel/GlobalSettingsPanel.java b/Core/src/org/sleuthkit/autopsy/centralrepository/optionspanel/GlobalSettingsPanel.java index baa24c787b..100f63cffb 100644 --- a/Core/src/org/sleuthkit/autopsy/centralrepository/optionspanel/GlobalSettingsPanel.java +++ b/Core/src/org/sleuthkit/autopsy/centralrepository/optionspanel/GlobalSettingsPanel.java @@ -251,8 +251,14 @@ public final class GlobalSettingsPanel extends IngestModuleGlobalSettingsPanel i "GlobalSettingsPanel.testCurrentConfiguration.dbDoesNotExist.message=Database does not exist.", }) private boolean testCurrentConfiguration() { + if (CentralRepoDbManager.getSavedDbChoice() == null || + CentralRepoDbManager.getSavedDbChoice() == CentralRepoDbChoice.DISABLED || + !CentralRepoDbUtil.allowUseOfCentralRepository()) + return false; + CentralRepoDbManager manager = new CentralRepoDbManager(); DatabaseTestResult testResult = manager.testStatus(); + // if database doesn't exist, prompt user to create database if (testResult == DatabaseTestResult.DB_DOES_NOT_EXIST) { boolean success = EamDbSettingsDialog.promptCreateDatabase(manager, null); @@ -419,10 +425,11 @@ public final class GlobalSettingsPanel extends IngestModuleGlobalSettingsPanel i .addComponent(lbDbLocationLabel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent(lbDbLocationValue, javax.swing.GroupLayout.PREFERRED_SIZE, 14, javax.swing.GroupLayout.PREFERRED_SIZE)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) - .addGroup(pnDatabaseConfigurationLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) - .addComponent(bnDbConfigure) - .addComponent(bnTestConfigure) - .addComponent(testStatusLabel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) + .addGroup(pnDatabaseConfigurationLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addComponent(testStatusLabel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) + .addGroup(pnDatabaseConfigurationLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) + .addComponent(bnDbConfigure) + .addComponent(bnTestConfigure))) .addGap(8, 8, 8)) ); From 83f4b5f4e5cff04c00dbccf76822de4e81a6b09e Mon Sep 17 00:00:00 2001 From: Greg DiCristofaro Date: Thu, 2 Apr 2020 15:47:22 -0400 Subject: [PATCH 023/137] remove unused imports --- .../centralrepository/optionspanel/GlobalSettingsPanel.java | 2 -- 1 file changed, 2 deletions(-) diff --git a/Core/src/org/sleuthkit/autopsy/centralrepository/optionspanel/GlobalSettingsPanel.java b/Core/src/org/sleuthkit/autopsy/centralrepository/optionspanel/GlobalSettingsPanel.java index 100f63cffb..84a946db51 100644 --- a/Core/src/org/sleuthkit/autopsy/centralrepository/optionspanel/GlobalSettingsPanel.java +++ b/Core/src/org/sleuthkit/autopsy/centralrepository/optionspanel/GlobalSettingsPanel.java @@ -42,13 +42,11 @@ import org.sleuthkit.autopsy.centralrepository.datamodel.CentralRepoDbUtil; import org.sleuthkit.autopsy.centralrepository.datamodel.PostgresCentralRepoSettings; import org.sleuthkit.autopsy.centralrepository.datamodel.SqliteCentralRepoSettings; import java.awt.Component; -import java.awt.Dimension; import java.beans.PropertyChangeSupport; import java.util.logging.Level; import javax.swing.ImageIcon; import org.openide.util.ImageUtilities; import org.sleuthkit.autopsy.centralrepository.datamodel.DatabaseTestResult; -import org.sleuthkit.autopsy.centralrepository.optionspanel.Bundle; From f54e9dc9ddb64ed980745c7af74ec552a572560f Mon Sep 17 00:00:00 2001 From: Greg DiCristofaro Date: Thu, 2 Apr 2020 16:08:43 -0400 Subject: [PATCH 024/137] update for fonts --- .../textcontentviewer/StringsContentPanel.form | 6 ------ .../textcontentviewer/StringsContentPanel.java | 2 -- 2 files changed, 8 deletions(-) diff --git a/Core/src/org/sleuthkit/autopsy/contentviewers/textcontentviewer/StringsContentPanel.form b/Core/src/org/sleuthkit/autopsy/contentviewers/textcontentviewer/StringsContentPanel.form index 265c1b77de..6253570c82 100644 --- a/Core/src/org/sleuthkit/autopsy/contentviewers/textcontentviewer/StringsContentPanel.form +++ b/Core/src/org/sleuthkit/autopsy/contentviewers/textcontentviewer/StringsContentPanel.form @@ -427,12 +427,6 @@ - - - - - - diff --git a/Core/src/org/sleuthkit/autopsy/contentviewers/textcontentviewer/StringsContentPanel.java b/Core/src/org/sleuthkit/autopsy/contentviewers/textcontentviewer/StringsContentPanel.java index d13a9aea06..95cbee43b7 100644 --- a/Core/src/org/sleuthkit/autopsy/contentviewers/textcontentviewer/StringsContentPanel.java +++ b/Core/src/org/sleuthkit/autopsy/contentviewers/textcontentviewer/StringsContentPanel.java @@ -290,8 +290,6 @@ public class StringsContentPanel extends javax.swing.JPanel { add(controlPanel, java.awt.BorderLayout.NORTH); outputViewPane.setEditable(false); - outputViewPane.setFont(new java.awt.Font("Courier New", 0, 11)); // NOI18N - outputViewPane.setPreferredSize(null); outputScrollPane.setViewportView(outputViewPane); add(outputScrollPane, java.awt.BorderLayout.CENTER); From 70b65b15dabf96b2e49bca2f02ecab2664e6680d Mon Sep 17 00:00:00 2001 From: Raman Arora Date: Fri, 3 Apr 2020 09:45:02 -0400 Subject: [PATCH 025/137] 6219: TskCoreException thrown from normalizePhoneNum Do not attempt to create account when we do not have a valid phone number or email address. --- InternalPythonModules/android/calllog.py | 3 --- InternalPythonModules/android/general.py | 14 +++++--------- InternalPythonModules/android/textnow.py | 2 +- InternalPythonModules/android/whatsapp.py | 2 +- 4 files changed, 7 insertions(+), 14 deletions(-) diff --git a/InternalPythonModules/android/calllog.py b/InternalPythonModules/android/calllog.py index 5b3faf0697..13775e80f7 100644 --- a/InternalPythonModules/android/calllog.py +++ b/InternalPythonModules/android/calllog.py @@ -103,10 +103,7 @@ class CallLogAnalyzer(general.AndroidComponentAnalyzer): calleeId = None timeStamp = resultSet.getLong("date") / 1000 - number = resultSet.getString("number") - if not general.isValidPhoneNumer(number): - number = None duration = resultSet.getLong("duration") # duration of call is in seconds name = resultSet.getString("name") # name of person dialed or called. None if unregistered diff --git a/InternalPythonModules/android/general.py b/InternalPythonModules/android/general.py index daa789a57c..4048c05c0f 100644 --- a/InternalPythonModules/android/general.py +++ b/InternalPythonModules/android/general.py @@ -45,19 +45,15 @@ def appendAttachmentList(msgBody, attachmentsList): """ Checks if the given string might be a phone number. """ -def isValidPhoneNumer(data): - try: - return CommunicationsUtils.normalizePhoneNum(data) is not None - except TskCoreException as ex: - return False +def isValidPhoneNumber(data): + return CommunicationsUtils.isValidPhoneNumber(data) + """ Checks if the given string is a valid email address. """ def isValidEmailAddress(data): - try: - return CommunicationsUtils.normalizeEmailAddress(data) is not None - except TskCoreException as ex: - return False + return CommunicationsUtils.isValidEmailAddress(data) + diff --git a/InternalPythonModules/android/textnow.py b/InternalPythonModules/android/textnow.py index e05763cae9..005e1191dd 100644 --- a/InternalPythonModules/android/textnow.py +++ b/InternalPythonModules/android/textnow.py @@ -286,7 +286,7 @@ class TextNowContactsParser(TskContactsParser): def get_phone(self): number = self.result_set.getString("number") - return (number if general.isValidPhoneNumer(number) else None) + return (number if general.isValidPhoneNumber(number) else None) def get_email(self): # occasionally the 'number' column may have an email address instead diff --git a/InternalPythonModules/android/whatsapp.py b/InternalPythonModules/android/whatsapp.py index 5346545450..c67502d22b 100644 --- a/InternalPythonModules/android/whatsapp.py +++ b/InternalPythonModules/android/whatsapp.py @@ -435,7 +435,7 @@ class WhatsAppContactsParser(TskContactsParser): def get_phone(self): number = self.result_set.getString("number") - return (number if general.isValidPhoneNumer(number) else None) + return (number if general.isValidPhoneNumber(number) else None) def get_email(self): # occasionally the 'number' column may have an email address instead From 5036610b55c9e280fffd3ddb4fbf8547e9636f22 Mon Sep 17 00:00:00 2001 From: Greg DiCristofaro Date: Fri, 3 Apr 2020 10:20:32 -0400 Subject: [PATCH 026/137] addressing some codacy issues --- .../autopsy/guiutils/WrapLayout.java | 40 ++++++++++--------- 1 file changed, 21 insertions(+), 19 deletions(-) diff --git a/Core/src/org/sleuthkit/autopsy/guiutils/WrapLayout.java b/Core/src/org/sleuthkit/autopsy/guiutils/WrapLayout.java index cad23fa3e8..3ced895ce7 100644 --- a/Core/src/org/sleuthkit/autopsy/guiutils/WrapLayout.java +++ b/Core/src/org/sleuthkit/autopsy/guiutils/WrapLayout.java @@ -194,6 +194,7 @@ public class WrapLayout implements LayoutManager, java.io.Serializable { /** * Adds the specified component to the layout. Not used by this class. + * NOTE: This is not used for this layout * * @param name The name of the component. * @param comp The component to be added. @@ -204,6 +205,7 @@ public class WrapLayout implements LayoutManager, java.io.Serializable { /** * Removes the specified component from the layout. Not used by this class. + * NOTE: This is not used for this layout * * @param comp The component to remove. */ @@ -285,7 +287,7 @@ public class WrapLayout implements LayoutManager, java.io.Serializable { synchronized (this.oppositeAlignedItems) { ParentDimensions targetDims = getTargetDimensions(target); List components = Arrays.asList(target.getComponents()); - List rows = getAllRows(components, true, targetDims.innerWidth); + List rows = getAllRows(components, true, targetDims.innerWidth); boolean ltr = target.getComponentOrientation().isLeftToRight(); boolean useBaseline = getAlignOnBaseline(); @@ -294,7 +296,7 @@ public class WrapLayout implements LayoutManager, java.io.Serializable { int leftX = targetDims.insets.left + getHgap(); int rightX = targetDims.outerWidth - targetDims.insets.right - getHgap(); - for (Row row : rows) { + for (WrapLayoutRow row : rows) { int rowHeight = row.height; int curX = 0; @@ -426,7 +428,7 @@ public class WrapLayout implements LayoutManager, java.io.Serializable { synchronized (this.oppositeAlignedItems) { ParentDimensions targetDims = getTargetDimensions(target); List components = Arrays.asList(target.getComponents()); - List rows = getAllRows(components, preferred, targetDims.innerWidth); + List rows = getAllRows(components, preferred, targetDims.innerWidth); Integer containerHeight = rows.stream().map((r) -> r.height).reduce(0, Integer::sum); // add in vertical gap between rows @@ -457,7 +459,7 @@ public class WrapLayout implements LayoutManager, java.io.Serializable { /** * A row of components in the WrapLayout. */ - private class Row { + private class WrapLayoutRow { /** * The normally aligned components in the order that they will be laid @@ -483,7 +485,7 @@ public class WrapLayout implements LayoutManager, java.io.Serializable { */ final int width; - public Row(List components, List oppositeAligned, int height, int width) { + public WrapLayoutRow(List components, List oppositeAligned, int height, int width) { this.components = components; this.oppositeAligned = oppositeAligned; this.height = height; @@ -501,14 +503,14 @@ public class WrapLayout implements LayoutManager, java.io.Serializable { * * @return The list of rows ordered from top to bottom. */ - private List getAllRows(List components, boolean preferred, int maxWidth) { + private List getAllRows(List components, boolean preferred, int maxWidth) { List originalComp = components .stream() .filter((comp) -> !this.oppositeAlignedItems.contains(comp)) .collect(Collectors.toList()); - List originalRowSet = getRowSet(originalComp, preferred, maxWidth); + List originalRowSet = getRowSet(originalComp, preferred, maxWidth); List oppositeAlignedComp = components @@ -518,26 +520,26 @@ public class WrapLayout implements LayoutManager, java.io.Serializable { // go in reverse order and then revert so we can use same getRowSet method Collections.reverse(oppositeAlignedComp); - List oppositeRowSet = getRowSet(oppositeAlignedComp, preferred, maxWidth) + List oppositeRowSet = getRowSet(oppositeAlignedComp, preferred, maxWidth) .stream() - .map((Row row) -> { + .map((WrapLayoutRow row) -> { Collections.reverse(row.components); - return new Row(null, row.components, row.height, row.width); + return new WrapLayoutRow(null, row.components, row.height, row.width); }) .collect(Collectors.toList()); Collections.reverse(oppositeRowSet); - List toReturn = new ArrayList<>(); + List toReturn = new ArrayList<>(); // if there is a row of components that will have both normal and opposite aligned // components, create the corresponding row. - if (originalRowSet.size() > 0 && oppositeRowSet.size() > 0) { - Row lastOrig = originalRowSet.get(originalRowSet.size() - 1); - Row firstOpp = oppositeRowSet.get(0); + if (!originalRowSet.isEmpty() && !oppositeRowSet.isEmpty()) { + WrapLayoutRow lastOrig = originalRowSet.get(originalRowSet.size() - 1); + WrapLayoutRow firstOpp = oppositeRowSet.get(0); int proposedRowWidth = lastOrig.width + firstOpp.width + getHgap(); if (proposedRowWidth <= maxWidth) { - Row middleRow = new Row(lastOrig.components, firstOpp.oppositeAligned, + WrapLayoutRow middleRow = new WrapLayoutRow(lastOrig.components, firstOpp.oppositeAligned, Math.max(lastOrig.height, firstOpp.height), proposedRowWidth); toReturn.addAll(originalRowSet.subList(0, originalRowSet.size() - 1)); @@ -564,8 +566,8 @@ public class WrapLayout implements LayoutManager, java.io.Serializable { * * @return The list of rows determined. */ - private List getRowSet(List components, boolean preferred, int maxWidth) { - List rows = new ArrayList<>(); + private List getRowSet(List components, boolean preferred, int maxWidth) { + List rows = new ArrayList<>(); List rowComponents = new ArrayList<>(); int rowWidth = 0; @@ -577,7 +579,7 @@ public class WrapLayout implements LayoutManager, java.io.Serializable { // Can't add the component to current row. Start a new row. if (rowWidth + d.width > maxWidth) { - rows.add(new Row(rowComponents, null, rowHeight, rowWidth)); + rows.add(new WrapLayoutRow(rowComponents, null, rowHeight, rowWidth)); rowComponents = new ArrayList<>(); rowWidth = 0; rowHeight = 0; @@ -595,7 +597,7 @@ public class WrapLayout implements LayoutManager, java.io.Serializable { } if (rowComponents.size() > 0) { - rows.add(new Row(rowComponents, null, rowHeight, rowWidth)); + rows.add(new WrapLayoutRow(rowComponents, null, rowHeight, rowWidth)); } return rows; From 3c0c42eb65c6e487cfa0bb2a9168c899a8be289c Mon Sep 17 00:00:00 2001 From: Greg DiCristofaro Date: Fri, 3 Apr 2020 10:35:44 -0400 Subject: [PATCH 027/137] addressing some codacy issues --- Core/src/org/sleuthkit/autopsy/guiutils/WrapLayout.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Core/src/org/sleuthkit/autopsy/guiutils/WrapLayout.java b/Core/src/org/sleuthkit/autopsy/guiutils/WrapLayout.java index 3ced895ce7..0101180320 100644 --- a/Core/src/org/sleuthkit/autopsy/guiutils/WrapLayout.java +++ b/Core/src/org/sleuthkit/autopsy/guiutils/WrapLayout.java @@ -596,7 +596,7 @@ public class WrapLayout implements LayoutManager, java.io.Serializable { } } - if (rowComponents.size() > 0) { + if (!rowComponents.isEmpty()) { rows.add(new WrapLayoutRow(rowComponents, null, rowHeight, rowWidth)); } From 1c8aadf9ff1346e665d0b44fedd35a4fe20d5bc1 Mon Sep 17 00:00:00 2001 From: Greg DiCristofaro Date: Fri, 3 Apr 2020 10:46:54 -0400 Subject: [PATCH 028/137] commenting fix --- Core/src/org/sleuthkit/autopsy/guiutils/WrapLayout.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Core/src/org/sleuthkit/autopsy/guiutils/WrapLayout.java b/Core/src/org/sleuthkit/autopsy/guiutils/WrapLayout.java index 0101180320..921aea586d 100644 --- a/Core/src/org/sleuthkit/autopsy/guiutils/WrapLayout.java +++ b/Core/src/org/sleuthkit/autopsy/guiutils/WrapLayout.java @@ -91,8 +91,10 @@ public class WrapLayout implements LayoutManager, java.io.Serializable { } /** - * Constructs a new WrapLayout with a left alignment and a - * default 0-unit horizontal and vertical gap. + * Constructs a new WrapLayout with a left alignment. + * + * @param vgap The vertical gap spacing between rows of components. + * @param hgap The horizontal gap spacing between components. */ public WrapLayout(int vgap, int hgap) { this.vgap = vgap; From b8f2c693fd210a29db866f87f8781583db6d0105 Mon Sep 17 00:00:00 2001 From: Ethan Roseman Date: Fri, 3 Apr 2020 12:40:16 -0400 Subject: [PATCH 029/137] 6161: First steps at implementation --- .../autopsy/geolocation/MapPanel.form | 3 - .../autopsy/geolocation/MapPanel.java | 59 ++++++++++++++++-- .../autopsy/geolocation/MapWaypoint.java | 16 +++++ .../autopsy/images/waypoint_white.png | Bin 0 -> 1243 bytes 4 files changed, 69 insertions(+), 9 deletions(-) create mode 100644 Core/src/org/sleuthkit/autopsy/images/waypoint_white.png diff --git a/Core/src/org/sleuthkit/autopsy/geolocation/MapPanel.form b/Core/src/org/sleuthkit/autopsy/geolocation/MapPanel.form index e915904d42..6a4ab801cd 100755 --- a/Core/src/org/sleuthkit/autopsy/geolocation/MapPanel.form +++ b/Core/src/org/sleuthkit/autopsy/geolocation/MapPanel.form @@ -59,7 +59,6 @@ - @@ -87,7 +86,6 @@ - @@ -116,7 +114,6 @@ - diff --git a/Core/src/org/sleuthkit/autopsy/geolocation/MapPanel.java b/Core/src/org/sleuthkit/autopsy/geolocation/MapPanel.java index 0462e77842..bc27ecafef 100755 --- a/Core/src/org/sleuthkit/autopsy/geolocation/MapPanel.java +++ b/Core/src/org/sleuthkit/autopsy/geolocation/MapPanel.java @@ -18,6 +18,8 @@ */ package org.sleuthkit.autopsy.geolocation; +import java.awt.AlphaComposite; +import java.awt.Color; import java.awt.Dimension; import java.awt.Graphics2D; import java.awt.Point; @@ -34,9 +36,11 @@ import java.io.File; import java.io.IOException; import java.util.ArrayList; import java.util.Collection; +import java.util.HashMap; import java.util.Iterator; import java.util.List; import java.util.Set; +import java.util.function.Function; import java.util.logging.Level; import java.util.prefs.PreferenceChangeEvent; import java.util.prefs.PreferenceChangeListener; @@ -89,7 +93,6 @@ final public class MapPanel extends javax.swing.JPanel { private static final int POPUP_MARGIN = 10; private BufferedImage defaultWaypointImage; - private BufferedImage selectedWaypointImage; private MapWaypoint currentlySelectedWaypoint; @@ -108,8 +111,7 @@ final public class MapPanel extends javax.swing.JPanel { popupFactory = new PopupFactory(); try { - defaultWaypointImage = ImageIO.read(getClass().getResource("/org/sleuthkit/autopsy/images/waypoint_teal.png")); - selectedWaypointImage = ImageIO.read(getClass().getResource("/org/sleuthkit/autopsy/images/waypoint_yellow.png")); + defaultWaypointImage = ImageIO.read(getClass().getResource("/org/sleuthkit/autopsy/images/waypoint_white.png")); } catch (IOException ex) { logger.log(Level.WARNING, "Unable to load geolocation waypoint images", ex); } @@ -685,16 +687,61 @@ final public class MapPanel extends javax.swing.JPanel { * Renderer for the map waypoints. */ private class MapWaypointRenderer implements WaypointRenderer { + private final HashMap imageCache = new HashMap<>(); + + /** + * + * @param waypoint the waypoint for which to get the color + * @param currentlySelectedWaypoint the waypoint that is currently selected + * @return the color that this waypoint should be rendered + */ + private Color getColor(MapWaypoint waypoint, MapWaypoint currentlySelectedWaypoint) { + if (waypoint == currentlySelectedWaypoint) { + return Color.YELLOW; + } + return waypoint.getColor(); + } + + /** + * + * @param baseImg the base image + * @param newColor the color that the resulting image should be changed into + * @return a new waypoint image + */ + private BufferedImage getWaypointImage(BufferedImage baseImg, Color newColor) { + int w = baseImg.getWidth(); + int h = baseImg.getHeight(); + BufferedImage imgOut = new BufferedImage(w, h, BufferedImage.TYPE_INT_ARGB); + BufferedImage imgColor = new BufferedImage(w, h, BufferedImage.TYPE_INT_ARGB); + + Graphics2D g = imgColor.createGraphics(); + g.setColor(newColor); + g.fillRect(0, 0, w + 1, h + 1); + g.dispose(); + + Graphics2D graphics = imgOut.createGraphics(); + graphics.drawImage(baseImg, 0, 0, null); + graphics.setComposite(AlphaComposite.getInstance(AlphaComposite.SRC_IN)); + graphics.drawImage(imgColor, 0, 0, null); + graphics.dispose(); + + return imgOut; + } @Override public void paintWaypoint(Graphics2D gd, JXMapViewer jxmv, MapWaypoint waypoint) { + Color color = getColor(waypoint, currentlySelectedWaypoint); + + // Store computed images in cache for later use + BufferedImage image = imageCache.computeIfAbsent(color, k -> { + return getWaypointImage(defaultWaypointImage, color); + }); + Point2D point = jxmv.getTileFactory().geoToPixel(waypoint.getPosition(), jxmv.getZoom()); int x = (int) point.getX(); int y = (int) point.getY(); - - BufferedImage image = (waypoint == currentlySelectedWaypoint ? selectedWaypointImage : defaultWaypointImage); - + (gd.create()).drawImage(image, x - image.getWidth() / 2, y - image.getHeight(), null); } } diff --git a/Core/src/org/sleuthkit/autopsy/geolocation/MapWaypoint.java b/Core/src/org/sleuthkit/autopsy/geolocation/MapWaypoint.java index b327e1c394..14711ac62f 100755 --- a/Core/src/org/sleuthkit/autopsy/geolocation/MapWaypoint.java +++ b/Core/src/org/sleuthkit/autopsy/geolocation/MapWaypoint.java @@ -18,11 +18,13 @@ */ package org.sleuthkit.autopsy.geolocation; +import java.awt.Color; import java.awt.event.ActionEvent; import java.awt.image.BufferedImage; import java.text.SimpleDateFormat; import java.util.ArrayList; import java.util.Arrays; +import java.util.HashMap; import java.util.LinkedHashSet; import java.util.List; import java.util.Locale; @@ -64,6 +66,12 @@ final class MapWaypoint extends KdTree.XYZPoint implements org.jxmapviewer.viewe private static final Logger logger = Logger.getLogger(MapWaypoint.class.getName()); private final static String HTML_PROP_FORMAT = "%s: %s
    "; static private final SimpleDateFormat DATE_FORMAT = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ssX", Locale.US); + + private static final HashMap artifactTypesToColors = new HashMap(); + + static { + artifactTypesToColors.put(BlackboardArtifact.ARTIFACT_TYPE.TSK_GPS_BOOKMARK.getTypeID(), Color.BLUE); + } private final Waypoint dataModelWaypoint; private final GeoPosition position; @@ -326,6 +334,14 @@ final class MapWaypoint extends KdTree.XYZPoint implements org.jxmapviewer.viewe return DATE_FORMAT.format(new java.util.Date(timeStamp * 1000)); } + /** + * + * @return the color that this waypoint should be rendered + */ + Color getColor() { + return artifactTypesToColors.getOrDefault(dataModelWaypoint.getArtifact().getArtifactTypeID(), Color.ORANGE); + } + /** * An action class for Extracting artifact files. */ diff --git a/Core/src/org/sleuthkit/autopsy/images/waypoint_white.png b/Core/src/org/sleuthkit/autopsy/images/waypoint_white.png new file mode 100644 index 0000000000000000000000000000000000000000..b3eb5b204f4fbdd7d6ed8687794d86c076aaa135 GIT binary patch literal 1243 zcmeAS@N?(olHy`uVBq!ia0vp^B0#Lf!3HGbSN+@zq!^2X+?^QKos)S9xV%QuQiw3qT4OY$~jP%-qzHM1_jnoV;SI3R@+x3M(KRB&@Hb z09I0xZL1XF8=&BvUzDm~s%N5Spk&9TprBw=l#*r@P?Wt5Z@Sn2DRmzV36 z8|&p4rRy77T3YHG80i}s=>k>g7FXt#Bv$C=6)QswftllyTAW;zSx}OhpQivaH!&%{ zw8U0P31kr*K-^i9nTD__uNdkrpa=CqGWv#k2KsQbfm&@qqE`MznW;dVLFU^T+JIG} zh(YbK(Fa+Mf4GxB z+3m|Um)e)E8OfvAPRhQL|s>j;)Evou>w0&O9oJ*HAdTt!L zm~hx}h9>K&W#`V`eqa6U{JNs^dpy|pegAXreNFxR>MwVy*LhCdE^YF4$`*%NFK_d$ z{O?ue8}m;cj>%T%gm~)i!0n2lay9pAFnCa-4S|;EweL3(et*_S(zDU z(@bajta@7(9saT;YHQTmhHakTQ?^)}6u$Xd)vmBM%=@ZW_2dKtju)IS|7m=&QRVwv z_n%=|>x-j2e63CmWgg;;PyZL(P1<-T&qV5k<|?l9KhlimPCI}0tmfCMzrvw0vlnrf zeGF5YD8RDVV8%`9{^N#woT85C#!Z@c*?+;i`JOyHF%?s{coytG%w?OmJ$lL~*`o&@ zv}W7L@oVWZSDbrTAfYq;_8dQTwRDD%ikltkxn~$Q1nNy!f6DXfR}XW}DeX(A>TgZ? z9`R86(#c!5q)I1m^-*hfve}cr(P_({FJHE7znRm;_{Pbz+N4wX1_urDa_tZnBX@2M7 zhX*x!j`wT6a9w=ScwxiZb?cbe))s7B<9{$hL!@M3!&EQTw$8f~8n^t6t@^a|fP(_V zgZ$isJ0yreIKb= Date: Fri, 3 Apr 2020 15:04:08 -0400 Subject: [PATCH 030/137] 6229: SEVERE errors from CR failing to handle custom account types --- .../datamodel/CorrelationAttributeUtil.java | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/Core/src/org/sleuthkit/autopsy/centralrepository/datamodel/CorrelationAttributeUtil.java b/Core/src/org/sleuthkit/autopsy/centralrepository/datamodel/CorrelationAttributeUtil.java index 14724fafb7..ea295c35d4 100644 --- a/Core/src/org/sleuthkit/autopsy/centralrepository/datamodel/CorrelationAttributeUtil.java +++ b/Core/src/org/sleuthkit/autopsy/centralrepository/datamodel/CorrelationAttributeUtil.java @@ -215,7 +215,14 @@ public class CorrelationAttributeUtil { if (Account.Type.DEVICE.getTypeName().equalsIgnoreCase(accountTypeStr) == false) { // Get the corresponding CentralRepoAccountType from the database. - CentralRepoAccountType crAccountType = CentralRepository.getInstance().getAccountTypeByName(accountTypeStr); + CentralRepoAccountType crAccountType; + try { + // @@TODO Vik-6136: CR currently does not know of custom account types. + // This try/catch prevents unnecessary exceptions, till CR handles implement custom account types + crAccountType = CentralRepository.getInstance().getAccountTypeByName(accountTypeStr); + } catch (CentralRepoException ex) { + return; + } int corrTypeId = crAccountType.getCorrelationTypeId(); CorrelationAttributeInstance.Type corrType = CentralRepository.getInstance().getCorrelationTypeById(corrTypeId); From 7d3a9d6d023c1400ea03168253251c1f7484a068 Mon Sep 17 00:00:00 2001 From: Greg DiCristofaro Date: Fri, 3 Apr 2020 15:30:51 -0400 Subject: [PATCH 031/137] begin refactoring delete orphan nodes to accomodate changes --- .../autoingest/DeleteOrphanCaseNodesTask.java | 181 ++++++++++++------ 1 file changed, 122 insertions(+), 59 deletions(-) diff --git a/Experimental/src/org/sleuthkit/autopsy/experimental/autoingest/DeleteOrphanCaseNodesTask.java b/Experimental/src/org/sleuthkit/autopsy/experimental/autoingest/DeleteOrphanCaseNodesTask.java index 16f0592548..949bf0e8f2 100755 --- a/Experimental/src/org/sleuthkit/autopsy/experimental/autoingest/DeleteOrphanCaseNodesTask.java +++ b/Experimental/src/org/sleuthkit/autopsy/experimental/autoingest/DeleteOrphanCaseNodesTask.java @@ -21,7 +21,13 @@ package org.sleuthkit.autopsy.experimental.autoingest; import java.io.File; import java.nio.file.Path; import java.nio.file.Paths; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.HashSet; import java.util.List; +import java.util.Map; +import java.util.Map.Entry; +import java.util.Set; import java.util.logging.Level; import org.openide.util.NbBundle; import org.sleuthkit.autopsy.casemodule.multiusercases.CoordinationServiceUtils; @@ -43,6 +49,26 @@ final class DeleteOrphanCaseNodesTask implements Runnable { private int nodesCount; private int casesCount; + + final static class OrphanCaseNodeEntry { + final String caseName; + final String nodePath; + + public OrphanCaseNodeEntry(String caseName, String nodePath) { + this.caseName = caseName; + this.nodePath = nodePath; + } + + public String getCaseName() { + return caseName; + } + + public String getNodePath() { + return nodePath; + } + } + + /** * Constucts an instance of a task for deleting case coordination service * nodes for which there is no longer a corresponding case. @@ -52,7 +78,74 @@ final class DeleteOrphanCaseNodesTask implements Runnable { DeleteOrphanCaseNodesTask(ProgressIndicator progress) { this.progress = progress; } + + + private CoordinationService getCoordinationService() { + progress.progress(Bundle.DeleteOrphanCaseNodesTask_progress_connectingToCoordSvc()); + logger.log(Level.INFO, Bundle.DeleteOrphanCaseNodesTask_progress_connectingToCoordSvc()); + CoordinationService coordinationService = null; + try { + coordinationService = CoordinationService.getInstance(); + } catch (CoordinationService.CoordinationServiceException ex) { + logger.log(Level.SEVERE, "Error connecting to the coordination service", ex); //NON-NLS + } + return coordinationService; + } + + + private List getNodePaths(CoordinationService coordinationService) { + progress.progress(Bundle.DeleteOrphanCaseNodesTask_progress_gettingCaseZnodes()); + logger.log(Level.INFO, Bundle.DeleteOrphanCaseNodesTask_progress_gettingCaseZnodes()); + List nodePaths = null; + try { + nodePaths = coordinationService.getNodeList(CoordinationService.CategoryNode.CASES); + // in the event that getNodeList returns null (but still successful) return empty list + if (nodePaths == null) + return new ArrayList(); + } catch (CoordinationService.CoordinationServiceException ex) { + logger.log(Level.SEVERE, "Error getting case znode list", ex); //NON-NLS + } catch (InterruptedException unused) { + logger.log(Level.WARNING, "Task cancelled while getting case znode list"); //NON-NLS + } + + return nodePaths; + } + + private void addIfExists(List paths, String path) { + if (path != null && !path.isEmpty()) + paths.add(path); + } + + private Map> getOrphanedNodes(List nodePaths) { + progress.progress(Bundle.DeleteOrphanCaseNodesTask_progress_lookingForOrphanedCaseZnodes()); + logger.log(Level.INFO, Bundle.DeleteOrphanCaseNodesTask_progress_lookingForOrphanedCaseZnodes()); + Map> nodePathsToDelete = new HashMap<>(); + for (String caseNodePath : nodePaths) { + if (isCaseNameNodePath(caseNodePath) || isCaseResourcesNodePath(caseNodePath) || isCaseAutoIngestLogNodePath(caseNodePath)) { + continue; + } + + final Path caseDirectoryPath = Paths.get(caseNodePath); + final File caseDirectory = caseDirectoryPath.toFile(); + if (!caseDirectory.exists()) { + String caseName = CoordinationServiceUtils.getCaseNameNodePath(caseDirectoryPath); + List paths = new ArrayList<>(); + + addIfExists(paths, CoordinationServiceUtils.getCaseNameNodePath(caseDirectoryPath)); + addIfExists(paths, CoordinationServiceUtils.getCaseResourcesNodePath(caseDirectoryPath)); + addIfExists(paths, CoordinationServiceUtils.getCaseAutoIngestLogNodePath(caseDirectoryPath)); + addIfExists(paths, CoordinationServiceUtils.getCaseDirectoryNodePath(caseDirectoryPath)); + nodePathsToDelete.put(caseName, paths); + + ++casesCount; + } + } + return nodePathsToDelete; + } + + + @Override @NbBundle.Messages({ "DeleteOrphanCaseNodesTask.progress.startMessage=Starting orphaned case znode cleanup", @@ -63,69 +156,21 @@ final class DeleteOrphanCaseNodesTask implements Runnable { public void run() { progress.start(Bundle.DeleteOrphanCaseNodesTask_progress_startMessage()); try { - progress.progress(Bundle.DeleteOrphanCaseNodesTask_progress_connectingToCoordSvc()); - logger.log(Level.INFO, Bundle.DeleteOrphanCaseNodesTask_progress_connectingToCoordSvc()); - CoordinationService coordinationService; - try { - coordinationService = CoordinationService.getInstance(); - } catch (CoordinationService.CoordinationServiceException ex) { - logger.log(Level.SEVERE, "Error connecting to the coordination service", ex); //NON-NLS + CoordinationService coordinationService = getCoordinationService(); + if (coordinationService == null) return; - } - progress.progress(Bundle.DeleteOrphanCaseNodesTask_progress_gettingCaseZnodes()); - logger.log(Level.INFO, Bundle.DeleteOrphanCaseNodesTask_progress_gettingCaseZnodes()); - List nodePaths; - try { - nodePaths = coordinationService.getNodeList(CoordinationService.CategoryNode.CASES); - } catch (CoordinationService.CoordinationServiceException ex) { - logger.log(Level.SEVERE, "Error getting case znode list", ex); //NON-NLS + List nodePaths = getNodePaths(coordinationService); + if (nodePaths == null) return; - } catch (InterruptedException unused) { - logger.log(Level.WARNING, "Task cancelled while getting case znode list"); //NON-NLS - return; - } - - progress.progress(Bundle.DeleteOrphanCaseNodesTask_progress_lookingForOrphanedCaseZnodes()); - logger.log(Level.INFO, Bundle.DeleteOrphanCaseNodesTask_progress_lookingForOrphanedCaseZnodes()); - for (String caseNodePath : nodePaths) { - if (isCaseNameNodePath(caseNodePath) || isCaseResourcesNodePath(caseNodePath) || isCaseAutoIngestLogNodePath(caseNodePath)) { - continue; - } - - final Path caseDirectoryPath = Paths.get(caseNodePath); - final File caseDirectory = caseDirectoryPath.toFile(); - if (!caseDirectory.exists()) { - String caseName = CoordinationServiceUtils.getCaseNameNodePath(caseDirectoryPath); - String nodePath = ""; // NON-NLS - try { - nodePath = CoordinationServiceUtils.getCaseNameNodePath(caseDirectoryPath); - deleteNode(coordinationService, caseName, nodePath); - - nodePath = CoordinationServiceUtils.getCaseResourcesNodePath(caseDirectoryPath); - deleteNode(coordinationService, caseName, nodePath); - - nodePath = CoordinationServiceUtils.getCaseAutoIngestLogNodePath(caseDirectoryPath); - deleteNode(coordinationService, caseName, nodePath); - - nodePath = CoordinationServiceUtils.getCaseDirectoryNodePath(caseDirectoryPath); - deleteNode(coordinationService, caseName, nodePath); - - ++casesCount; - - /* - * Back to looking for orphans... - */ - progress.progress(Bundle.DeleteOrphanCaseNodesTask_progress_lookingForOrphanedCaseZnodes()); - logger.log(Level.INFO, Bundle.DeleteOrphanCaseNodesTask_progress_lookingForOrphanedCaseZnodes()); - - } catch (InterruptedException unused) { - logger.log(Level.WARNING, String.format("Task cancelled while deleting orphaned znode %s for %s", nodePath, caseName)); //NON-NLS - return; - } - } - } + Map> orphanedNodes = getOrphanedNodes(nodePaths); + + boolean continueDelete = displayToUser(orphanedNodes); + + if (continueDelete) + deleteNodes(coordinationService, orphanedNodes); + } catch (Exception ex) { /* * This is an unexpected runtime exceptions firewall. It is here @@ -141,6 +186,24 @@ final class DeleteOrphanCaseNodesTask implements Runnable { progress.finish(); } } + + + private void deleteNodes(CoordinationService coordinationService, Map> orphanedNodes) { + String caseName = null; + String nodePath = null; + try { + for (Entry> caseNodePaths : orphanedNodes.entrySet()) { + caseName = caseNodePaths.getKey(); + for (String path : caseNodePaths.getValue()) { + nodePath = path; + deleteNode(coordinationService, caseName, nodePath); + } + } + } catch (InterruptedException unused) { + logger.log(Level.WARNING, String.format("Task cancelled while deleting orphaned znode %s for %s", nodePath, caseName)); //NON-NLS + return; + } + } /** * Attempts to delete a case coordination service node. From 73310566332a1394c374cbc29ebe03ec9bc434c0 Mon Sep 17 00:00:00 2001 From: Greg DiCristofaro Date: Fri, 3 Apr 2020 15:33:30 -0400 Subject: [PATCH 032/137] removed unnecessary code --- .../autoingest/DeleteOrphanCaseNodesTask.java | 19 ------------------- 1 file changed, 19 deletions(-) diff --git a/Experimental/src/org/sleuthkit/autopsy/experimental/autoingest/DeleteOrphanCaseNodesTask.java b/Experimental/src/org/sleuthkit/autopsy/experimental/autoingest/DeleteOrphanCaseNodesTask.java index 949bf0e8f2..d13761f9b8 100755 --- a/Experimental/src/org/sleuthkit/autopsy/experimental/autoingest/DeleteOrphanCaseNodesTask.java +++ b/Experimental/src/org/sleuthkit/autopsy/experimental/autoingest/DeleteOrphanCaseNodesTask.java @@ -50,25 +50,6 @@ final class DeleteOrphanCaseNodesTask implements Runnable { private int casesCount; - final static class OrphanCaseNodeEntry { - final String caseName; - final String nodePath; - - public OrphanCaseNodeEntry(String caseName, String nodePath) { - this.caseName = caseName; - this.nodePath = nodePath; - } - - public String getCaseName() { - return caseName; - } - - public String getNodePath() { - return nodePath; - } - } - - /** * Constucts an instance of a task for deleting case coordination service * nodes for which there is no longer a corresponding case. From 5cc63e9eb08237c3adcb69c3718e94cc01dabf56 Mon Sep 17 00:00:00 2001 From: William Schaefer Date: Mon, 6 Apr 2020 07:23:39 -0400 Subject: [PATCH 033/137] 6225 fix for screenshot 1 --- .../optionspanel/GlobalSettingsPanel.form | 8 ++++---- .../optionspanel/GlobalSettingsPanel.java | 6 +++--- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/Core/src/org/sleuthkit/autopsy/centralrepository/optionspanel/GlobalSettingsPanel.form b/Core/src/org/sleuthkit/autopsy/centralrepository/optionspanel/GlobalSettingsPanel.form index c2e0dea60c..e5e9405b8b 100644 --- a/Core/src/org/sleuthkit/autopsy/centralrepository/optionspanel/GlobalSettingsPanel.form +++ b/Core/src/org/sleuthkit/autopsy/centralrepository/optionspanel/GlobalSettingsPanel.form @@ -65,16 +65,16 @@ - - - + + + - + diff --git a/Core/src/org/sleuthkit/autopsy/centralrepository/optionspanel/GlobalSettingsPanel.java b/Core/src/org/sleuthkit/autopsy/centralrepository/optionspanel/GlobalSettingsPanel.java index 7b6d591d95..3dca79e99a 100644 --- a/Core/src/org/sleuthkit/autopsy/centralrepository/optionspanel/GlobalSettingsPanel.java +++ b/Core/src/org/sleuthkit/autopsy/centralrepository/optionspanel/GlobalSettingsPanel.java @@ -476,9 +476,9 @@ public final class GlobalSettingsPanel extends IngestModuleGlobalSettingsPanel i .addComponent(organizationPanel, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent(casesPanel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addGroup(jPanel1Layout.createSequentialGroup() - .addComponent(cbUseCentralRepo, javax.swing.GroupLayout.PREFERRED_SIZE, 162, javax.swing.GroupLayout.PREFERRED_SIZE) - .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) - .addComponent(ingestRunningWarningLabel, javax.swing.GroupLayout.DEFAULT_SIZE, 844, Short.MAX_VALUE)) + .addComponent(cbUseCentralRepo, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) + .addComponent(ingestRunningWarningLabel, javax.swing.GroupLayout.DEFAULT_SIZE, 840, Short.MAX_VALUE)) .addGroup(jPanel1Layout.createSequentialGroup() .addContainerGap() .addComponent(tbOops, javax.swing.GroupLayout.PREFERRED_SIZE, 974, javax.swing.GroupLayout.PREFERRED_SIZE))) From c6a317ece00c0f6f764548cdb368819fa2ba4ed9 Mon Sep 17 00:00:00 2001 From: Greg DiCristofaro Date: Mon, 6 Apr 2020 09:13:39 -0400 Subject: [PATCH 034/137] added dialog for orphaned nodes --- .../experimental/autoingest/Bundle.properties | 4 + .../DeleteOrphanCaseNodesDialog.form | 123 ++++++++++++++ .../DeleteOrphanCaseNodesDialog.java | 156 ++++++++++++++++++ .../autoingest/DeleteOrphanCaseNodesTask.java | 38 ++++- 4 files changed, 317 insertions(+), 4 deletions(-) create mode 100644 Experimental/src/org/sleuthkit/autopsy/experimental/autoingest/DeleteOrphanCaseNodesDialog.form create mode 100644 Experimental/src/org/sleuthkit/autopsy/experimental/autoingest/DeleteOrphanCaseNodesDialog.java diff --git a/Experimental/src/org/sleuthkit/autopsy/experimental/autoingest/Bundle.properties b/Experimental/src/org/sleuthkit/autopsy/experimental/autoingest/Bundle.properties index f3081bef89..4de3b58397 100644 --- a/Experimental/src/org/sleuthkit/autopsy/experimental/autoingest/Bundle.properties +++ b/Experimental/src/org/sleuthkit/autopsy/experimental/autoingest/Bundle.properties @@ -257,3 +257,7 @@ CasesDashboardTopComponent.refreshButton.text=Refresh AutoIngestCasesDeletionDialog.jLabel1.text=Progress CasesDashboardTopComponent.deleteOrphanCaseNodesButton.text=Delete Orphan Case Znodes CasesDashboardTopComponent.deleteOrphanManifestNodesButton.text=Delete Orphan Manifest Znodes +DeleteOrphanCaseNodesDialog.descriptionText.text=The following znodes are no longer have an associated case. Would you like to delete them? +DeleteOrphanCaseNodesDialog.okButton.text=OK +DeleteOrphanCaseNodesDialog.cancelButton.text=Cancel +DeleteOrphanCaseNodesDialog.titleText.text=Delete The Following Znodes? diff --git a/Experimental/src/org/sleuthkit/autopsy/experimental/autoingest/DeleteOrphanCaseNodesDialog.form b/Experimental/src/org/sleuthkit/autopsy/experimental/autoingest/DeleteOrphanCaseNodesDialog.form new file mode 100644 index 0000000000..af67571b2d --- /dev/null +++ b/Experimental/src/org/sleuthkit/autopsy/experimental/autoingest/DeleteOrphanCaseNodesDialog.form @@ -0,0 +1,123 @@ + + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    diff --git a/Experimental/src/org/sleuthkit/autopsy/experimental/autoingest/DeleteOrphanCaseNodesDialog.java b/Experimental/src/org/sleuthkit/autopsy/experimental/autoingest/DeleteOrphanCaseNodesDialog.java new file mode 100644 index 0000000000..76ef98d590 --- /dev/null +++ b/Experimental/src/org/sleuthkit/autopsy/experimental/autoingest/DeleteOrphanCaseNodesDialog.java @@ -0,0 +1,156 @@ +/* + * Autopsy Forensic Browser + * + * Copyright 2020-2020 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.experimental.autoingest; + +import java.util.List; +import java.util.Map; +import java.util.stream.Collectors; +import java.util.stream.Stream; + +/** + * This dialog shows the system administrator the orphaned znodes to be deleted. + * If 'OK' is selected, isOkSelected() will return true. + */ +public class DeleteOrphanCaseNodesDialog extends javax.swing.JDialog { + private static final String NEW_LINE = System.getProperty("line.separator"); + private static final String DEFAULT_INDENT = " "; + private static final String COLON = ":"; + + private boolean okSelected = false; + + /** + * Creates new form DeleteOrphanCaseNodesDialog + */ + public DeleteOrphanCaseNodesDialog(java.awt.Frame parent, boolean modal, Map> znodes) { + super(parent, modal); + initComponents(); + additionalInit(znodes); + } + + private void additionalInit(Map> znodes) { + String textAreaText = ""; + if (znodes != null) { + textAreaText = znodes.entrySet().stream().map((kv) -> { + return Stream.concat( + Stream.of(kv.getKey() + COLON), + kv.getValue().stream().map((node) -> DEFAULT_INDENT + node)) + .collect(Collectors.joining(NEW_LINE)); + }) + .collect(Collectors.joining(NEW_LINE)); + } + + znodesTextArea.setText(textAreaText); + } + + + /** + * 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() { + + javax.swing.JLabel descriptionText = new javax.swing.JLabel(); + javax.swing.JScrollPane jScrollPane = new javax.swing.JScrollPane(); + znodesTextArea = new javax.swing.JTextArea(); + javax.swing.JButton cancelButton = new javax.swing.JButton(); + javax.swing.JButton okButton = new javax.swing.JButton(); + + setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE); + setTitle(org.openide.util.NbBundle.getMessage(DeleteOrphanCaseNodesDialog.class, "DeleteOrphanCaseNodesDialog.titleText.text")); // NOI18N + + org.openide.awt.Mnemonics.setLocalizedText(descriptionText, org.openide.util.NbBundle.getMessage(DeleteOrphanCaseNodesDialog.class, "DeleteOrphanCaseNodesDialog.descriptionText.text")); // NOI18N + descriptionText.setVerticalAlignment(javax.swing.SwingConstants.TOP); + + znodesTextArea.setEditable(false); + znodesTextArea.setColumns(20); + znodesTextArea.setLineWrap(true); + znodesTextArea.setRows(5); + jScrollPane.setViewportView(znodesTextArea); + + org.openide.awt.Mnemonics.setLocalizedText(cancelButton, org.openide.util.NbBundle.getMessage(DeleteOrphanCaseNodesDialog.class, "DeleteOrphanCaseNodesDialog.cancelButton.text")); // NOI18N + cancelButton.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + cancelButtonActionPerformed(evt); + } + }); + + org.openide.awt.Mnemonics.setLocalizedText(okButton, org.openide.util.NbBundle.getMessage(DeleteOrphanCaseNodesDialog.class, "DeleteOrphanCaseNodesDialog.okButton.text")); // NOI18N + okButton.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + okButtonActionPerformed(evt); + } + }); + + javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane()); + getContentPane().setLayout(layout); + layout.setHorizontalGroup( + layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGroup(layout.createSequentialGroup() + .addContainerGap() + .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addComponent(jScrollPane, javax.swing.GroupLayout.Alignment.TRAILING) + .addComponent(descriptionText, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) + .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup() + .addGap(0, 0, Short.MAX_VALUE) + .addComponent(okButton) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) + .addComponent(cancelButton))) + .addContainerGap()) + ); + layout.setVerticalGroup( + layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGroup(layout.createSequentialGroup() + .addContainerGap() + .addComponent(descriptionText) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) + .addComponent(jScrollPane, javax.swing.GroupLayout.DEFAULT_SIZE, 238, Short.MAX_VALUE) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) + .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) + .addComponent(cancelButton) + .addComponent(okButton)) + .addContainerGap()) + ); + + pack(); + }// //GEN-END:initComponents + + private void okButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_okButtonActionPerformed + okSelected = true; + dispose(); + }//GEN-LAST:event_okButtonActionPerformed + + private void cancelButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_cancelButtonActionPerformed + dispose(); + }//GEN-LAST:event_cancelButtonActionPerformed + + /** + * If the system administrator selected OK. + * @return Whether or not 'OK' was selected by the system administrator. + */ + public boolean isOkSelected() { + return okSelected; + } + + // Variables declaration - do not modify//GEN-BEGIN:variables + private javax.swing.JTextArea znodesTextArea; + // End of variables declaration//GEN-END:variables +} diff --git a/Experimental/src/org/sleuthkit/autopsy/experimental/autoingest/DeleteOrphanCaseNodesTask.java b/Experimental/src/org/sleuthkit/autopsy/experimental/autoingest/DeleteOrphanCaseNodesTask.java index d13761f9b8..5521f46943 100755 --- a/Experimental/src/org/sleuthkit/autopsy/experimental/autoingest/DeleteOrphanCaseNodesTask.java +++ b/Experimental/src/org/sleuthkit/autopsy/experimental/autoingest/DeleteOrphanCaseNodesTask.java @@ -1,7 +1,7 @@ /* * Autopsy Forensic Browser * - * Copyright 2019-2019 Basis Technology Corp. + * Copyright 2019-2020 Basis Technology Corp. * Contact: carrier sleuthkit org * * Licensed under the Apache License, Version 2.0 (the "License"); @@ -23,11 +23,9 @@ import java.nio.file.Path; import java.nio.file.Paths; import java.util.ArrayList; import java.util.HashMap; -import java.util.HashSet; import java.util.List; import java.util.Map; import java.util.Map.Entry; -import java.util.Set; import java.util.logging.Level; import org.openide.util.NbBundle; import org.sleuthkit.autopsy.casemodule.multiusercases.CoordinationServiceUtils; @@ -61,6 +59,10 @@ final class DeleteOrphanCaseNodesTask implements Runnable { } + /** + * Retrieves an instance of the coordination service in order to fetch znodes and potentially delete. + * @return The coordination service or null on error. + */ private CoordinationService getCoordinationService() { progress.progress(Bundle.DeleteOrphanCaseNodesTask_progress_connectingToCoordSvc()); logger.log(Level.INFO, Bundle.DeleteOrphanCaseNodesTask_progress_connectingToCoordSvc()); @@ -74,6 +76,11 @@ final class DeleteOrphanCaseNodesTask implements Runnable { } + /** + * Retrieves node paths for cases. + * @param coordinationService The coordination service to use in order to fetch the node paths. + * @return The list of node paths for cases. + */ private List getNodePaths(CoordinationService coordinationService) { progress.progress(Bundle.DeleteOrphanCaseNodesTask_progress_gettingCaseZnodes()); logger.log(Level.INFO, Bundle.DeleteOrphanCaseNodesTask_progress_gettingCaseZnodes()); @@ -98,6 +105,11 @@ final class DeleteOrphanCaseNodesTask implements Runnable { paths.add(path); } + /** + * Determines orphaned znode paths. + * @param nodePaths The list of case node paths. + * @return The list of orphaned node paths. + */ private Map> getOrphanedNodes(List nodePaths) { progress.progress(Bundle.DeleteOrphanCaseNodesTask_progress_lookingForOrphanedCaseZnodes()); logger.log(Level.INFO, Bundle.DeleteOrphanCaseNodesTask_progress_lookingForOrphanedCaseZnodes()); @@ -125,6 +137,16 @@ final class DeleteOrphanCaseNodesTask implements Runnable { return nodePathsToDelete; } + /** + * prompts the user with a list of orphaned znodes. + * @param orphanedNodes The orphaned znodes. + * @return True if the user would like to proceed deleting the znodes. + */ + private boolean promptUser(Map> orphanedNodes) { + DeleteOrphanCaseNodesDialog dialog = new DeleteOrphanCaseNodesDialog(null, true, orphanedNodes); + return dialog.isOkSelected(); + } + @Override @@ -147,7 +169,7 @@ final class DeleteOrphanCaseNodesTask implements Runnable { Map> orphanedNodes = getOrphanedNodes(nodePaths); - boolean continueDelete = displayToUser(orphanedNodes); + boolean continueDelete = promptUser(orphanedNodes); if (continueDelete) deleteNodes(coordinationService, orphanedNodes); @@ -169,6 +191,14 @@ final class DeleteOrphanCaseNodesTask implements Runnable { } + /** + * Deletes the orphaned znodes provided in the 'orphanedNodes' variable. + * @param coordinationService The coordination service to use for deletion. + * @param orphanedNodes A mapping of case to the orphaned znodes. + * + * @throws InterruptedException If the thread executing this task is + * interrupted during the delete operation. + */ private void deleteNodes(CoordinationService coordinationService, Map> orphanedNodes) { String caseName = null; String nodePath = null; From 27cd407d8676a90df77d9b85d5addc7459bc7159 Mon Sep 17 00:00:00 2001 From: Raman Arora Date: Mon, 6 Apr 2020 09:26:28 -0400 Subject: [PATCH 035/137] Search incoming account in the Account.PREDEFINED_ACCOUNT_TYPES list. --- .../datamodel/CorrelationAttributeUtil.java | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/Core/src/org/sleuthkit/autopsy/centralrepository/datamodel/CorrelationAttributeUtil.java b/Core/src/org/sleuthkit/autopsy/centralrepository/datamodel/CorrelationAttributeUtil.java index ea295c35d4..e5b0d7ab50 100644 --- a/Core/src/org/sleuthkit/autopsy/centralrepository/datamodel/CorrelationAttributeUtil.java +++ b/Core/src/org/sleuthkit/autopsy/centralrepository/datamodel/CorrelationAttributeUtil.java @@ -211,18 +211,15 @@ public class CorrelationAttributeUtil { BlackboardAttribute accountTypeAttribute = acctArtifact.getAttribute(new BlackboardAttribute.Type(BlackboardAttribute.ATTRIBUTE_TYPE.TSK_ACCOUNT_TYPE)); String accountTypeStr = accountTypeAttribute.getValueString(); + // @@TODO Vik-6136: CR currently does not know of custom account types. + // Ensure there is a predefined account type for this account. + Account.Type predefinedAccountType = Account.Type.PREDEFINED_ACCOUNT_TYPES.stream().filter(type -> type.getTypeName().equalsIgnoreCase(accountTypeStr)).findAny().orElse(null); + // do not create any correlation attribute instance for a Device account - if (Account.Type.DEVICE.getTypeName().equalsIgnoreCase(accountTypeStr) == false) { + if (Account.Type.DEVICE.getTypeName().equalsIgnoreCase(accountTypeStr) == false && predefinedAccountType != null) { // Get the corresponding CentralRepoAccountType from the database. - CentralRepoAccountType crAccountType; - try { - // @@TODO Vik-6136: CR currently does not know of custom account types. - // This try/catch prevents unnecessary exceptions, till CR handles implement custom account types - crAccountType = CentralRepository.getInstance().getAccountTypeByName(accountTypeStr); - } catch (CentralRepoException ex) { - return; - } + CentralRepoAccountType crAccountType = CentralRepository.getInstance().getAccountTypeByName(accountTypeStr); int corrTypeId = crAccountType.getCorrelationTypeId(); CorrelationAttributeInstance.Type corrType = CentralRepository.getInstance().getCorrelationTypeById(corrTypeId); From e54de87e7ebe51445dfef566245cb185b2f6dc5e Mon Sep 17 00:00:00 2001 From: Greg DiCristofaro Date: Mon, 6 Apr 2020 09:57:25 -0400 Subject: [PATCH 036/137] changed jgraphx dependency and removed jitpack repository as it prompted for username and password --- Core/ivy.xml | 3 +-- Core/ivysettings.xml | 1 - 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/Core/ivy.xml b/Core/ivy.xml index 5185b58c13..63fdd9ed92 100644 --- a/Core/ivy.xml +++ b/Core/ivy.xml @@ -6,8 +6,7 @@ - - + diff --git a/Core/ivysettings.xml b/Core/ivysettings.xml index c27e095ddb..9c3b496314 100644 --- a/Core/ivysettings.xml +++ b/Core/ivysettings.xml @@ -4,7 +4,6 @@ - From f275ddcca25cc01efe456c872fad38900cf86c7b Mon Sep 17 00:00:00 2001 From: William Schaefer Date: Mon, 6 Apr 2020 10:29:39 -0400 Subject: [PATCH 037/137] 6225 fix for screenshot 2 --- .../optionspanel/EamDbSettingsDialog.form | 429 +++++++++-------- .../optionspanel/EamDbSettingsDialog.java | 431 +++++++++++------- 2 files changed, 493 insertions(+), 367 deletions(-) diff --git a/Core/src/org/sleuthkit/autopsy/centralrepository/optionspanel/EamDbSettingsDialog.form b/Core/src/org/sleuthkit/autopsy/centralrepository/optionspanel/EamDbSettingsDialog.form index 812a3984e8..8d074c0ef3 100644 --- a/Core/src/org/sleuthkit/autopsy/centralrepository/optionspanel/EamDbSettingsDialog.form +++ b/Core/src/org/sleuthkit/autopsy/centralrepository/optionspanel/EamDbSettingsDialog.form @@ -31,7 +31,13 @@ - + + + + + + + @@ -44,7 +50,13 @@ - + + + + + + + @@ -56,59 +68,15 @@ - - - - - - - + - - - - - - - - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -119,100 +87,7 @@
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + @@ -223,29 +98,11 @@
    -
    - - - - - - - - - - - - - - - - - - - - - - + + + + + @@ -256,13 +113,23 @@ + + + + + - + + + + + + @@ -273,13 +140,23 @@ + + + + + - + + + + + + @@ -290,13 +167,23 @@ + + + + + - + + + + + + @@ -307,39 +194,23 @@ + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + @@ -356,6 +227,11 @@ + + + + + @@ -366,6 +242,11 @@ + + + + + @@ -376,6 +257,11 @@ + + + + + @@ -386,6 +272,11 @@ + + + + + @@ -402,7 +293,155 @@
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Core/src/org/sleuthkit/autopsy/centralrepository/optionspanel/EamDbSettingsDialog.java b/Core/src/org/sleuthkit/autopsy/centralrepository/optionspanel/EamDbSettingsDialog.java index 40305bbf96..8c3a308e4e 100644 --- a/Core/src/org/sleuthkit/autopsy/centralrepository/optionspanel/EamDbSettingsDialog.java +++ b/Core/src/org/sleuthkit/autopsy/centralrepository/optionspanel/EamDbSettingsDialog.java @@ -239,15 +239,12 @@ public class EamDbSettingsDialog extends JDialog { @SuppressWarnings("unchecked") // //GEN-BEGIN:initComponents private void initComponents() { + java.awt.GridBagConstraints gridBagConstraints; fcDatabasePath = new javax.swing.JFileChooser(); pnButtons = new javax.swing.JPanel(); - bnCancel = new javax.swing.JButton(); - bnOk = new javax.swing.JButton(); pnSQLiteSettings = new javax.swing.JPanel(); lbDatabasePath = new javax.swing.JLabel(); - tfDatabasePath = new javax.swing.JTextField(); - bnDatabasePathFileOpen = new javax.swing.JButton(); lbHostName = new javax.swing.JLabel(); tbDbHostname = new javax.swing.JTextField(); lbPort = new javax.swing.JLabel(); @@ -256,17 +253,257 @@ public class EamDbSettingsDialog extends JDialog { tbDbUsername = new javax.swing.JTextField(); lbUserPassword = new javax.swing.JLabel(); jpDbPassword = new javax.swing.JPasswordField(); - cbDatabaseType = new javax.swing.JComboBox<>(); - lbSingleUserSqLite = new javax.swing.JLabel(); lbDatabaseType = new javax.swing.JLabel(); lbDatabaseDesc = 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(); + pathPanel = new javax.swing.JPanel(); + tfDatabasePath = new javax.swing.JTextField(); + bnDatabasePathFileOpen = new javax.swing.JButton(); + typePanel = new javax.swing.JPanel(); + lbSingleUserSqLite = new javax.swing.JLabel(); + cbDatabaseType = new javax.swing.JComboBox<>(); + bnCancel = new javax.swing.JButton(); + bnOk = new javax.swing.JButton(); setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE); setResizable(false); + javax.swing.GroupLayout pnButtonsLayout = new javax.swing.GroupLayout(pnButtons); + pnButtons.setLayout(pnButtonsLayout); + pnButtonsLayout.setHorizontalGroup( + pnButtonsLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGap(0, 0, Short.MAX_VALUE) + ); + pnButtonsLayout.setVerticalGroup( + pnButtonsLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGap(0, 25, Short.MAX_VALUE) + ); + + pnSQLiteSettings.setBorder(javax.swing.BorderFactory.createEtchedBorder()); + pnSQLiteSettings.setLayout(new java.awt.GridBagLayout()); + + 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)); + gridBagConstraints = new java.awt.GridBagConstraints(); + gridBagConstraints.gridx = 0; + gridBagConstraints.gridy = 1; + gridBagConstraints.gridwidth = 2; + gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL; + gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST; + gridBagConstraints.insets = new java.awt.Insets(7, 14, 0, 0); + pnSQLiteSettings.add(lbDatabasePath, gridBagConstraints); + + 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)); + gridBagConstraints = new java.awt.GridBagConstraints(); + gridBagConstraints.gridx = 0; + gridBagConstraints.gridy = 3; + gridBagConstraints.gridwidth = 2; + gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL; + gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST; + gridBagConstraints.insets = new java.awt.Insets(7, 14, 0, 0); + pnSQLiteSettings.add(lbHostName, gridBagConstraints); + + tbDbHostname.setPreferredSize(new java.awt.Dimension(519, 20)); + gridBagConstraints = new java.awt.GridBagConstraints(); + gridBagConstraints.gridx = 2; + gridBagConstraints.gridy = 3; + gridBagConstraints.gridheight = 2; + gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST; + gridBagConstraints.insets = new java.awt.Insets(7, 10, 0, 6); + pnSQLiteSettings.add(tbDbHostname, gridBagConstraints); + + 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)); + gridBagConstraints = new java.awt.GridBagConstraints(); + gridBagConstraints.gridx = 0; + gridBagConstraints.gridy = 5; + gridBagConstraints.gridwidth = 2; + gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL; + gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST; + gridBagConstraints.insets = new java.awt.Insets(7, 14, 0, 0); + pnSQLiteSettings.add(lbPort, gridBagConstraints); + + tbDbPort.setPreferredSize(new java.awt.Dimension(519, 20)); + gridBagConstraints = new java.awt.GridBagConstraints(); + gridBagConstraints.gridx = 2; + gridBagConstraints.gridy = 5; + gridBagConstraints.gridheight = 2; + gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST; + gridBagConstraints.insets = new java.awt.Insets(7, 10, 0, 6); + pnSQLiteSettings.add(tbDbPort, gridBagConstraints); + + 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)); + gridBagConstraints = new java.awt.GridBagConstraints(); + gridBagConstraints.gridx = 0; + gridBagConstraints.gridy = 7; + gridBagConstraints.gridwidth = 2; + gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL; + gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST; + gridBagConstraints.insets = new java.awt.Insets(7, 14, 0, 0); + pnSQLiteSettings.add(lbUserName, gridBagConstraints); + + tbDbUsername.setPreferredSize(new java.awt.Dimension(519, 20)); + gridBagConstraints = new java.awt.GridBagConstraints(); + gridBagConstraints.gridx = 2; + gridBagConstraints.gridy = 7; + gridBagConstraints.gridheight = 2; + gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST; + gridBagConstraints.insets = new java.awt.Insets(7, 10, 0, 6); + pnSQLiteSettings.add(tbDbUsername, gridBagConstraints); + + 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)); + gridBagConstraints = new java.awt.GridBagConstraints(); + gridBagConstraints.gridx = 0; + gridBagConstraints.gridy = 9; + gridBagConstraints.gridwidth = 2; + gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL; + gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST; + gridBagConstraints.insets = new java.awt.Insets(7, 14, 0, 0); + pnSQLiteSettings.add(lbUserPassword, gridBagConstraints); + + jpDbPassword.setPreferredSize(new java.awt.Dimension(519, 20)); + gridBagConstraints = new java.awt.GridBagConstraints(); + gridBagConstraints.gridx = 2; + gridBagConstraints.gridy = 9; + gridBagConstraints.gridheight = 2; + gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST; + gridBagConstraints.insets = new java.awt.Insets(7, 10, 0, 6); + pnSQLiteSettings.add(jpDbPassword, gridBagConstraints); + + 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)); + gridBagConstraints = new java.awt.GridBagConstraints(); + gridBagConstraints.gridx = 0; + gridBagConstraints.gridy = 0; + gridBagConstraints.gridwidth = 2; + gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL; + gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST; + gridBagConstraints.insets = new java.awt.Insets(12, 14, 0, 0); + pnSQLiteSettings.add(lbDatabaseType, gridBagConstraints); + + 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)); + gridBagConstraints = new java.awt.GridBagConstraints(); + gridBagConstraints.gridx = 0; + gridBagConstraints.gridy = 11; + gridBagConstraints.gridwidth = 2; + gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL; + gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST; + gridBagConstraints.insets = new java.awt.Insets(7, 14, 0, 0); + pnSQLiteSettings.add(lbDatabaseDesc, gridBagConstraints); + gridBagConstraints = new java.awt.GridBagConstraints(); + gridBagConstraints.gridx = 0; + gridBagConstraints.gridy = 12; + gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST; + pnSQLiteSettings.add(filler1, gridBagConstraints); + + dataBaseFileScrollPane.setBorder(null); + + dataBaseFileTextArea.setEditable(false); + dataBaseFileTextArea.setBackground(new java.awt.Color(240, 240, 240)); + dataBaseFileTextArea.setColumns(20); + dataBaseFileTextArea.setLineWrap(true); + dataBaseFileTextArea.setRows(3); + dataBaseFileScrollPane.setViewportView(dataBaseFileTextArea); + + gridBagConstraints = new java.awt.GridBagConstraints(); + gridBagConstraints.gridx = 2; + gridBagConstraints.gridy = 11; + gridBagConstraints.gridheight = 3; + 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(7, 10, 15, 6); + pnSQLiteSettings.add(dataBaseFileScrollPane, gridBagConstraints); + + 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() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + bnDatabasePathFileOpenActionPerformed(evt); + } + }); + + javax.swing.GroupLayout pathPanelLayout = new javax.swing.GroupLayout(pathPanel); + pathPanel.setLayout(pathPanelLayout); + pathPanelLayout.setHorizontalGroup( + pathPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGroup(pathPanelLayout.createSequentialGroup() + .addGap(0, 0, 0) + .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) + .addGap(0, 0, 0)) + ); + pathPanelLayout.setVerticalGroup( + pathPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGroup(pathPanelLayout.createSequentialGroup() + .addGap(0, 0, 0) + .addGroup(pathPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) + .addComponent(tfDatabasePath, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) + .addComponent(bnDatabasePathFileOpen)) + .addGap(0, 0, 0)) + ); + + gridBagConstraints = new java.awt.GridBagConstraints(); + gridBagConstraints.gridx = 2; + gridBagConstraints.gridy = 1; + gridBagConstraints.gridheight = 2; + gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST; + gridBagConstraints.insets = new java.awt.Insets(7, 10, 0, 6); + pnSQLiteSettings.add(pathPanel, gridBagConstraints); + + 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)); + + cbDatabaseType.setModel(new javax.swing.DefaultComboBoxModel<>(org.sleuthkit.autopsy.centralrepository.datamodel.CentralRepoDbChoice.DB_CHOICES)); + 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); + } + }); + + javax.swing.GroupLayout typePanelLayout = new javax.swing.GroupLayout(typePanel); + typePanel.setLayout(typePanelLayout); + typePanelLayout.setHorizontalGroup( + typePanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGroup(typePanelLayout.createSequentialGroup() + .addGap(0, 0, 0) + .addComponent(cbDatabaseType, javax.swing.GroupLayout.PREFERRED_SIZE, 210, javax.swing.GroupLayout.PREFERRED_SIZE) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) + .addComponent(lbSingleUserSqLite, javax.swing.GroupLayout.DEFAULT_SIZE, 318, Short.MAX_VALUE) + .addGap(0, 0, 0)) + ); + typePanelLayout.setVerticalGroup( + typePanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGroup(typePanelLayout.createSequentialGroup() + .addGap(0, 0, 0) + .addGroup(typePanelLayout.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, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) + .addGap(0, 0, 0)) + ); + + gridBagConstraints = new java.awt.GridBagConstraints(); + gridBagConstraints.gridx = 2; + gridBagConstraints.gridy = 0; + gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL; + gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST; + gridBagConstraints.insets = new java.awt.Insets(12, 10, 2, 0); + pnSQLiteSettings.add(typePanel, gridBagConstraints); + 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)); @@ -284,170 +521,6 @@ public class EamDbSettingsDialog extends JDialog { } }); - javax.swing.GroupLayout pnButtonsLayout = new javax.swing.GroupLayout(pnButtons); - pnButtons.setLayout(pnButtonsLayout); - pnButtonsLayout.setHorizontalGroup( - pnButtonsLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) - .addGroup(pnButtonsLayout.createSequentialGroup() - .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) - .addComponent(bnOk) - .addGap(11, 11, 11) - .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, 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() { - public void actionPerformed(java.awt.event.ActionEvent evt) { - bnDatabasePathFileOpenActionPerformed(evt); - } - }); - - 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<>(org.sleuthkit.autopsy.centralrepository.datamodel.CentralRepoDbChoice.DB_CHOICES)); - 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); - } - }); - - 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)); - - dataBaseFileScrollPane.setBorder(null); - - dataBaseFileTextArea.setEditable(false); - dataBaseFileTextArea.setBackground(new java.awt.Color(240, 240, 240)); - dataBaseFileTextArea.setColumns(20); - dataBaseFileTextArea.setLineWrap(true); - dataBaseFileTextArea.setRows(3); - dataBaseFileScrollPane.setViewportView(dataBaseFileTextArea); - - javax.swing.GroupLayout pnSQLiteSettingsLayout = new javax.swing.GroupLayout(pnSQLiteSettings); - pnSQLiteSettings.setLayout(pnSQLiteSettingsLayout); - pnSQLiteSettingsLayout.setHorizontalGroup( - pnSQLiteSettingsLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) - .addGroup(pnSQLiteSettingsLayout.createSequentialGroup() - .addContainerGap() - .addGroup(pnSQLiteSettingsLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) - .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(lbDatabaseDesc, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, 94, 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, false) - .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, 210, javax.swing.GroupLayout.PREFERRED_SIZE) - .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) - .addComponent(lbSingleUserSqLite, javax.swing.GroupLayout.PREFERRED_SIZE, 1, Short.MAX_VALUE)) - .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) - .addGap(0, 0, Short.MAX_VALUE)) - ); - pnSQLiteSettingsLayout.setVerticalGroup( - pnSQLiteSettingsLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) - .addGroup(pnSQLiteSettingsLayout.createSequentialGroup() - .addGap(6, 6, 6) - .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, 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, 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, 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, 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, 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, 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) - .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()) - ); - javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane()); getContentPane().setLayout(layout); layout.setHorizontalGroup( @@ -455,17 +528,29 @@ public class EamDbSettingsDialog extends JDialog { .addGroup(layout.createSequentialGroup() .addContainerGap() .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) - .addComponent(pnButtons, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) + .addGroup(layout.createSequentialGroup() + .addComponent(pnButtons, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) + .addComponent(bnOk) + .addGap(11, 11, 11) + .addComponent(bnCancel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) .addComponent(pnSQLiteSettings, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) .addContainerGap()) ); + + layout.linkSize(javax.swing.SwingConstants.HORIZONTAL, new java.awt.Component[] {bnCancel, bnOk}); + layout.setVerticalGroup( layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createSequentialGroup() .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) + .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addComponent(pnButtons, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) + .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) + .addComponent(bnOk) + .addComponent(bnCancel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))) .addContainerGap()) ); @@ -845,11 +930,13 @@ public class EamDbSettingsDialog extends JDialog { private javax.swing.JLabel lbSingleUserSqLite; private javax.swing.JLabel lbUserName; private javax.swing.JLabel lbUserPassword; + private javax.swing.JPanel pathPanel; private javax.swing.JPanel pnButtons; private javax.swing.JPanel pnSQLiteSettings; private javax.swing.JTextField tbDbHostname; private javax.swing.JTextField tbDbPort; private javax.swing.JTextField tbDbUsername; private javax.swing.JTextField tfDatabasePath; + private javax.swing.JPanel typePanel; // End of variables declaration//GEN-END:variables } From 922805c071812d4779a54983bac0161caacb9de0 Mon Sep 17 00:00:00 2001 From: "U-BASIS\\dsmyda" Date: Mon, 6 Apr 2020 14:57:11 -0400 Subject: [PATCH 038/137] Implemented and tested fixes for the regression --- .../DataContentViewerOtherCases.java | 2 +- .../datamodel/CorrelationAttributeUtil.java | 144 +++++++++++++----- .../eventlisteners/CaseEventListener.java | 4 +- .../eventlisteners/IngestEventsListener.java | 7 +- .../AnnotationsContentViewer.java | 2 +- .../autopsy/datamodel/GetSCOTask.java | 2 +- 6 files changed, 114 insertions(+), 47 deletions(-) diff --git a/Core/src/org/sleuthkit/autopsy/centralrepository/contentviewer/DataContentViewerOtherCases.java b/Core/src/org/sleuthkit/autopsy/centralrepository/contentviewer/DataContentViewerOtherCases.java index 881e60236e..1429a60312 100644 --- a/Core/src/org/sleuthkit/autopsy/centralrepository/contentviewer/DataContentViewerOtherCases.java +++ b/Core/src/org/sleuthkit/autopsy/centralrepository/contentviewer/DataContentViewerOtherCases.java @@ -464,7 +464,7 @@ public class DataContentViewerOtherCases extends JPanel implements DataContentVi // correlate on blackboard artifact attributes if they exist and supported BlackboardArtifact bbArtifact = getBlackboardArtifactFromNode(node); if (bbArtifact != null && CentralRepository.isEnabled()) { - ret.addAll(CorrelationAttributeUtil.makeCorrAttrsFromArtifact(bbArtifact)); + ret.addAll(CorrelationAttributeUtil.makeCorrAttrsForCorrelation(bbArtifact)); } // we can correlate based on the MD5 if it is enabled diff --git a/Core/src/org/sleuthkit/autopsy/centralrepository/datamodel/CorrelationAttributeUtil.java b/Core/src/org/sleuthkit/autopsy/centralrepository/datamodel/CorrelationAttributeUtil.java index 14724fafb7..1b21505560 100644 --- a/Core/src/org/sleuthkit/autopsy/centralrepository/datamodel/CorrelationAttributeUtil.java +++ b/Core/src/org/sleuthkit/autopsy/centralrepository/datamodel/CorrelationAttributeUtil.java @@ -19,6 +19,7 @@ package org.sleuthkit.autopsy.centralrepository.datamodel; import java.util.ArrayList; +import java.util.HashSet; import java.util.List; import java.util.logging.Level; import org.openide.util.NbBundle.Messages; @@ -32,6 +33,7 @@ import org.sleuthkit.datamodel.BlackboardArtifact; import org.sleuthkit.datamodel.BlackboardArtifact.ARTIFACT_TYPE; import org.sleuthkit.datamodel.BlackboardAttribute; import org.sleuthkit.datamodel.BlackboardAttribute.ATTRIBUTE_TYPE; +import org.sleuthkit.datamodel.CommunicationsUtils; import org.sleuthkit.datamodel.HashUtility; import org.sleuthkit.datamodel.TskCoreException; import org.sleuthkit.datamodel.TskData; @@ -59,28 +61,58 @@ public class CorrelationAttributeUtil { return Bundle.CorrelationAttributeUtil_emailaddresses_text(); } + // Defines which artifact types act as the sources for CR data. + // Most notably, does not include KEYWORD HIT, CALLLOGS, MESSAGES, CONTACTS + // TSK_INTERESTING_ARTIFACT_HIT (See JIRA-6129 for more details on the + // interesting artifact hit). + private static final HashSet SOURCE_TYPES_OF_CR_DATA = new HashSet() {{ + add(ARTIFACT_TYPE.TSK_WEB_BOOKMARK.getTypeID()); + add(ARTIFACT_TYPE.TSK_WEB_COOKIE.getTypeID()); + add(ARTIFACT_TYPE.TSK_WEB_DOWNLOAD.getTypeID()); + add(ARTIFACT_TYPE.TSK_WEB_HISTORY.getTypeID()); + add(ARTIFACT_TYPE.TSK_DEVICE_ATTACHED.getTypeID()); + add(ARTIFACT_TYPE.TSK_WIFI_NETWORK.getTypeID()); + add(ARTIFACT_TYPE.TSK_WIFI_NETWORK_ADAPTER.getTypeID()); + add(ARTIFACT_TYPE.TSK_BLUETOOTH_PAIRING.getTypeID()); + add(ARTIFACT_TYPE.TSK_BLUETOOTH_ADAPTER.getTypeID()); + add(ARTIFACT_TYPE.TSK_DEVICE_INFO.getTypeID()); + add(ARTIFACT_TYPE.TSK_SIM_ATTACHED.getTypeID()); + add(ARTIFACT_TYPE.TSK_WEB_FORM_ADDRESS.getTypeID()); + add(ARTIFACT_TYPE.TSK_ACCOUNT.getTypeID()); + }}; + /** * Makes zero to many correlation attribute instances from the attributes of - * an artifact. - * - * IMPORTANT: The correlation attribute instances are NOT added to the - * central repository by this method. - * - * @param artifact An artifact. + * artifacts that have correlatable data. The intention of this method is to + * use the results to save to the CR, not to correlate with them. If you + * want to correlate, please use makeCorrAttrsForCorrelation. An artifact that can + * have correlatable data != An artifact that should be the source of data + * in the CR, so results may be un-necessarily incomplete. + * + * @param artifact An artifact. * * @return A list, possibly empty, of correlation attribute instances for - * the artifact. + * the artifact. */ - public static List makeCorrAttrsFromArtifact(BlackboardArtifact artifact) { - return makeCorrAttrsFromArtifact(artifact, true ); + public static List makeCorrAttrsToSave(BlackboardArtifact artifact) { + if(SOURCE_TYPES_OF_CR_DATA.contains(artifact.getArtifactTypeID())) { + // Restrict the correlation attributes to use for saving. + // The artifacts which are suitable for saving are a subset of the + // artifacts that are suitable for correlating. + return makeCorrAttrsForCorrelation(artifact); + } + // Return an empty collection. + return new ArrayList<>(); } - + /** * Makes zero to many correlation attribute instances from the attributes of - * an artifact. + * artifacts that have correlatable data. The intention of this method is to + * use the results to correlate with, not to save. If you + * want to save, please use makeCorrAttrsToSave. An artifact that can + * have correlatable data != An artifact that should be the source of data + * in the CR, so results may be too lenient. * - * IMPORTANT: The correlation attribute instances are NOT added to the - * central repository by this method. * * TODO (Jira-6088): The methods in this low-level, utility class should * throw exceptions instead of logging them. The reason for this is that the @@ -91,26 +123,22 @@ public class CorrelationAttributeUtil { * checking is easy to forget, while catching exceptions is enforced. * * @param artifact An artifact. - * @param resolveSourceArtifact A flag to indicate whether to resolve the - * source artifact, if the given artifact is - * of type TSK_INTERESTING_ARTIFACT_HIT. * * @return A list, possibly empty, of correlation attribute instances for * the artifact. */ - public static List makeCorrAttrsFromArtifact(BlackboardArtifact artifact, boolean resolveSourceArtifact) { + public static List makeCorrAttrsForCorrelation(BlackboardArtifact artifact) { List correlationAttrs = new ArrayList<>(); - - // If the artifact is of type TSK_INTERESTING_ARTIFACT_HIT, and the caller - // has not indicated to resolve the source artifact, then return an empty list. - if ((artifact.getArtifactTypeID() == ARTIFACT_TYPE.TSK_INTERESTING_ARTIFACT_HIT.getTypeID()) && (resolveSourceArtifact == false) ) { - return correlationAttrs; - } try { BlackboardArtifact sourceArtifact = getCorrAttrSourceArtifact(artifact); if (sourceArtifact != null) { int artifactTypeID = sourceArtifact.getArtifactTypeID(); - if (artifactTypeID == ARTIFACT_TYPE.TSK_WEB_BOOKMARK.getTypeID() + if (artifactTypeID == ARTIFACT_TYPE.TSK_KEYWORD_HIT.getTypeID()) { + BlackboardAttribute setNameAttr = sourceArtifact.getAttribute(new BlackboardAttribute.Type(BlackboardAttribute.ATTRIBUTE_TYPE.TSK_SET_NAME)); + if (setNameAttr != null && CorrelationAttributeUtil.getEmailAddressAttrDisplayName().equals(setNameAttr.getValueString())) { + makeCorrAttrFromArtifactAttr(correlationAttrs, sourceArtifact, BlackboardAttribute.ATTRIBUTE_TYPE.TSK_KEYWORD, CorrelationAttributeInstance.EMAIL_TYPE_ID); + } + } else if (artifactTypeID == ARTIFACT_TYPE.TSK_WEB_BOOKMARK.getTypeID() || artifactTypeID == ARTIFACT_TYPE.TSK_WEB_COOKIE.getTypeID() || artifactTypeID == ARTIFACT_TYPE.TSK_WEB_DOWNLOAD.getTypeID() || artifactTypeID == ARTIFACT_TYPE.TSK_WEB_HISTORY.getTypeID()) { @@ -143,6 +171,11 @@ public class CorrelationAttributeUtil { } else if (artifactTypeID == ARTIFACT_TYPE.TSK_ACCOUNT.getTypeID()) { makeCorrAttrFromAcctArtifact(correlationAttrs, sourceArtifact); + + } else if (artifactTypeID == ARTIFACT_TYPE.TSK_CONTACT.getTypeID() + || artifactTypeID == ARTIFACT_TYPE.TSK_CALLLOG.getTypeID() + || artifactTypeID == ARTIFACT_TYPE.TSK_MESSAGE.getTypeID()) { + makeCorrAttrFromArtifactPhoneAttr(correlationAttrs, sourceArtifact); } } } catch (CentralRepoException ex) { @@ -158,6 +191,51 @@ public class CorrelationAttributeUtil { return correlationAttrs; } + /** + * Makes a correlation attribute instance from a phone number attribute of an + * artifact. + * + * @param artifact An artifact with a phone number attribute. + * + * @return The correlation instance artifact or null, if the phone number is + * not a valid correlation attribute. + * + * @throws TskCoreException If there is an error querying the case + * database. + * @throws CentralRepoException If there is an error querying the central + * repository. + */ + private static void makeCorrAttrFromArtifactPhoneAttr(List corrAttrInstances, BlackboardArtifact artifact) throws TskCoreException, CentralRepoException { + CorrelationAttributeInstance corrAttr = null; + + /* + * Extract the phone number from the artifact attribute. + */ + String value = null; + if (null != artifact.getAttribute(new BlackboardAttribute.Type(BlackboardAttribute.ATTRIBUTE_TYPE.TSK_PHONE_NUMBER))) { + value = artifact.getAttribute(new BlackboardAttribute.Type(BlackboardAttribute.ATTRIBUTE_TYPE.TSK_PHONE_NUMBER)).getValueString(); + } else if (null != artifact.getAttribute(new BlackboardAttribute.Type(BlackboardAttribute.ATTRIBUTE_TYPE.TSK_PHONE_NUMBER_FROM))) { + value = artifact.getAttribute(new BlackboardAttribute.Type(BlackboardAttribute.ATTRIBUTE_TYPE.TSK_PHONE_NUMBER_FROM)).getValueString(); + } else if (null != artifact.getAttribute(new BlackboardAttribute.Type(BlackboardAttribute.ATTRIBUTE_TYPE.TSK_PHONE_NUMBER_TO))) { + value = artifact.getAttribute(new BlackboardAttribute.Type(BlackboardAttribute.ATTRIBUTE_TYPE.TSK_PHONE_NUMBER_TO)).getValueString(); + } + + /* + * Normalize the phone number. + */ + if (value != null) { + try { + value = CommunicationsUtils.normalizePhoneNum(value); + corrAttr = makeCorrAttr(artifact, CentralRepository.getInstance().getCorrelationTypeById(CorrelationAttributeInstance.PHONE_TYPE_ID), value); + if(corrAttr != null) { + corrAttrInstances.add(corrAttr); + } + } catch(TskCoreException ex) { + logger.log(Level.INFO, String.format("Phone number found in artifact %d did not pass validation.", artifact.getId())); + } + } + } + /** * Gets the associated artifact of a "meta-artifact" such as an interesting * artifact hit artifact. @@ -186,31 +264,23 @@ public class CorrelationAttributeUtil { /** * Makes a correlation attribute instance for an account artifact. - * + * * Also creates an account in the CR DB if it doesn't exist. * * IMPORTANT: The correlation attribute instance is NOT added to the central * repository by this method. * - * TODO (Jira-6088): The methods in this low-level, utility class should - * throw exceptions instead of logging them. The reason for this is that the - * clients of the utility class, not the utility class itself, should be in - * charge of error handling policy, per the Autopsy Coding Standard. Note - * that clients of several of these methods currently cannot determine - * whether receiving a null return value is an error or not, plus null - * checking is easy to forget, while catching exceptions is enforced. - * * @param corrAttrInstances A list of correlation attribute instances. * @param acctArtifact An account artifact. * * @return The correlation attribute instance. */ private static void makeCorrAttrFromAcctArtifact(List corrAttrInstances, BlackboardArtifact acctArtifact) throws TskCoreException, CentralRepoException { - + // Get the account type from the artifact BlackboardAttribute accountTypeAttribute = acctArtifact.getAttribute(new BlackboardAttribute.Type(BlackboardAttribute.ATTRIBUTE_TYPE.TSK_ACCOUNT_TYPE)); String accountTypeStr = accountTypeAttribute.getValueString(); - + // do not create any correlation attribute instance for a Device account if (Account.Type.DEVICE.getTypeName().equalsIgnoreCase(accountTypeStr) == false) { @@ -441,10 +511,10 @@ public class CorrelationAttributeUtil { file.getId()); } catch (TskCoreException ex) { - logger.log(Level.SEVERE, String.format("Error querying case database (%s)", file), ex); // NON-NLS + logger.log(Level.SEVERE, String.format("Error querying case database (%s)", file), ex); // NON-NLS return null; } catch (CentralRepoException ex) { - logger.log(Level.SEVERE, String.format("Error querying central repository (%s)", file), ex); // NON-NLS + logger.log(Level.SEVERE, String.format("Error querying central repository (%s)", file), ex); // NON-NLS return null; } catch (CorrelationAttributeNormalizationException ex) { logger.log(Level.WARNING, String.format("Error creating correlation attribute instance (%s)", file), ex); // NON-NLS diff --git a/Core/src/org/sleuthkit/autopsy/centralrepository/eventlisteners/CaseEventListener.java b/Core/src/org/sleuthkit/autopsy/centralrepository/eventlisteners/CaseEventListener.java index 1df0e10dc6..8f648a9945 100644 --- a/Core/src/org/sleuthkit/autopsy/centralrepository/eventlisteners/CaseEventListener.java +++ b/Core/src/org/sleuthkit/autopsy/centralrepository/eventlisteners/CaseEventListener.java @@ -296,7 +296,7 @@ final class CaseEventListener implements PropertyChangeListener { return; } - List convertedArtifacts = CorrelationAttributeUtil.makeCorrAttrsFromArtifact(bbArtifact); + List convertedArtifacts = CorrelationAttributeUtil.makeCorrAttrsForCorrelation(bbArtifact); for (CorrelationAttributeInstance eamArtifact : convertedArtifacts) { eamArtifact.setComment(comment); try { @@ -369,7 +369,7 @@ final class CaseEventListener implements PropertyChangeListener { if (!hasTagWithConflictingKnownStatus) { //Get the correlation atttributes that correspond to the current BlackboardArtifactTag if their status should be changed //with the initial set of correlation attributes this should be a single correlation attribute - List convertedArtifacts = CorrelationAttributeUtil.makeCorrAttrsFromArtifact(bbTag.getArtifact()); + List convertedArtifacts = CorrelationAttributeUtil.makeCorrAttrsForCorrelation(bbTag.getArtifact()); for (CorrelationAttributeInstance eamArtifact : convertedArtifacts) { CentralRepository.getInstance().setAttributeInstanceKnownStatus(eamArtifact, tagName.getKnownStatus()); } diff --git a/Core/src/org/sleuthkit/autopsy/centralrepository/eventlisteners/IngestEventsListener.java b/Core/src/org/sleuthkit/autopsy/centralrepository/eventlisteners/IngestEventsListener.java index b2bff50c98..bf347de026 100644 --- a/Core/src/org/sleuthkit/autopsy/centralrepository/eventlisteners/IngestEventsListener.java +++ b/Core/src/org/sleuthkit/autopsy/centralrepository/eventlisteners/IngestEventsListener.java @@ -455,11 +455,8 @@ public class IngestEventsListener { List eamArtifacts = new ArrayList<>(); for (BlackboardArtifact bbArtifact : bbArtifacts) { - // If the incoming artifact is of type TSK_INTERESTING_ARTIFACT_HIT, - // do not resolve to the source artifact, as correlation attributes - // for the source artifact would have already been created, - // when the event for that source artifact was received. - List convertedArtifacts = CorrelationAttributeUtil.makeCorrAttrsFromArtifact(bbArtifact, false); + // makeCorrAttrToSave will filter out artifacts which should not be soruces of CR data. + List convertedArtifacts = CorrelationAttributeUtil.makeCorrAttrsToSave(bbArtifact); for (CorrelationAttributeInstance eamArtifact : convertedArtifacts) { try { // Only do something with this artifact if it's unique within the job diff --git a/Core/src/org/sleuthkit/autopsy/contentviewers/AnnotationsContentViewer.java b/Core/src/org/sleuthkit/autopsy/contentviewers/AnnotationsContentViewer.java index 3c967db3fd..c5c92b11c0 100755 --- a/Core/src/org/sleuthkit/autopsy/contentviewers/AnnotationsContentViewer.java +++ b/Core/src/org/sleuthkit/autopsy/contentviewers/AnnotationsContentViewer.java @@ -198,7 +198,7 @@ public class AnnotationsContentViewer extends javax.swing.JPanel implements Data startSection(html, "Central Repository Comments"); List instancesList = new ArrayList<>(); if (artifact != null) { - instancesList.addAll(CorrelationAttributeUtil.makeCorrAttrsFromArtifact(artifact)); + instancesList.addAll(CorrelationAttributeUtil.makeCorrAttrsForCorrelation(artifact)); } try { List artifactTypes = CentralRepository.getInstance().getDefinedCorrelationTypes(); diff --git a/Core/src/org/sleuthkit/autopsy/datamodel/GetSCOTask.java b/Core/src/org/sleuthkit/autopsy/datamodel/GetSCOTask.java index 864f04f28a..5671ca6051 100644 --- a/Core/src/org/sleuthkit/autopsy/datamodel/GetSCOTask.java +++ b/Core/src/org/sleuthkit/autopsy/datamodel/GetSCOTask.java @@ -97,7 +97,7 @@ class GetSCOTask implements Runnable { logger.log(Level.WARNING, "Unable to get correlation type or value to determine value for O column for artifact", ex); } } else { - List listOfPossibleAttributes = CorrelationAttributeUtil.makeCorrAttrsFromArtifact(bbArtifact); + List listOfPossibleAttributes = CorrelationAttributeUtil.makeCorrAttrsForCorrelation(bbArtifact); if (listOfPossibleAttributes.size() > 1) { //Don't display anything if there is more than 1 correlation property for an artifact but let the user know description = Bundle.GetSCOTask_occurrences_multipleProperties(); From bdcbb85f6002f6509fddb563d326cc02f44cb1c6 Mon Sep 17 00:00:00 2001 From: "U-BASIS\\dsmyda" Date: Mon, 6 Apr 2020 15:13:12 -0400 Subject: [PATCH 039/137] codacy --- .../centralrepository/datamodel/CorrelationAttributeUtil.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Core/src/org/sleuthkit/autopsy/centralrepository/datamodel/CorrelationAttributeUtil.java b/Core/src/org/sleuthkit/autopsy/centralrepository/datamodel/CorrelationAttributeUtil.java index 1b21505560..6fa9e0d133 100644 --- a/Core/src/org/sleuthkit/autopsy/centralrepository/datamodel/CorrelationAttributeUtil.java +++ b/Core/src/org/sleuthkit/autopsy/centralrepository/datamodel/CorrelationAttributeUtil.java @@ -65,7 +65,7 @@ public class CorrelationAttributeUtil { // Most notably, does not include KEYWORD HIT, CALLLOGS, MESSAGES, CONTACTS // TSK_INTERESTING_ARTIFACT_HIT (See JIRA-6129 for more details on the // interesting artifact hit). - private static final HashSet SOURCE_TYPES_OF_CR_DATA = new HashSet() {{ + private static final Set SOURCE_TYPES_OF_CR_DATA = new HashSet() {{ add(ARTIFACT_TYPE.TSK_WEB_BOOKMARK.getTypeID()); add(ARTIFACT_TYPE.TSK_WEB_COOKIE.getTypeID()); add(ARTIFACT_TYPE.TSK_WEB_DOWNLOAD.getTypeID()); From 72f8aafbbab03ee1365a3e637cd8fca794132483 Mon Sep 17 00:00:00 2001 From: "U-BASIS\\dsmyda" Date: Mon, 6 Apr 2020 15:14:35 -0400 Subject: [PATCH 040/137] codacy --- .../centralrepository/datamodel/CorrelationAttributeUtil.java | 1 + 1 file changed, 1 insertion(+) diff --git a/Core/src/org/sleuthkit/autopsy/centralrepository/datamodel/CorrelationAttributeUtil.java b/Core/src/org/sleuthkit/autopsy/centralrepository/datamodel/CorrelationAttributeUtil.java index 6fa9e0d133..289b13b62a 100644 --- a/Core/src/org/sleuthkit/autopsy/centralrepository/datamodel/CorrelationAttributeUtil.java +++ b/Core/src/org/sleuthkit/autopsy/centralrepository/datamodel/CorrelationAttributeUtil.java @@ -21,6 +21,7 @@ package org.sleuthkit.autopsy.centralrepository.datamodel; import java.util.ArrayList; import java.util.HashSet; import java.util.List; +import java.util.Set; import java.util.logging.Level; import org.openide.util.NbBundle.Messages; import org.sleuthkit.autopsy.casemodule.Case; From 18359fc2e6fcf661d03a934e0de8bb3838c3f3a3 Mon Sep 17 00:00:00 2001 From: "U-BASIS\\dsmyda" Date: Mon, 6 Apr 2020 15:15:37 -0400 Subject: [PATCH 041/137] Codacy and renamed variable --- .../centralrepository/datamodel/CorrelationAttributeUtil.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Core/src/org/sleuthkit/autopsy/centralrepository/datamodel/CorrelationAttributeUtil.java b/Core/src/org/sleuthkit/autopsy/centralrepository/datamodel/CorrelationAttributeUtil.java index 289b13b62a..15c796f858 100644 --- a/Core/src/org/sleuthkit/autopsy/centralrepository/datamodel/CorrelationAttributeUtil.java +++ b/Core/src/org/sleuthkit/autopsy/centralrepository/datamodel/CorrelationAttributeUtil.java @@ -66,7 +66,7 @@ public class CorrelationAttributeUtil { // Most notably, does not include KEYWORD HIT, CALLLOGS, MESSAGES, CONTACTS // TSK_INTERESTING_ARTIFACT_HIT (See JIRA-6129 for more details on the // interesting artifact hit). - private static final Set SOURCE_TYPES_OF_CR_DATA = new HashSet() {{ + private static final Set SOURCE_TYPES_FOR_CR_INSERT = new HashSet() {{ add(ARTIFACT_TYPE.TSK_WEB_BOOKMARK.getTypeID()); add(ARTIFACT_TYPE.TSK_WEB_COOKIE.getTypeID()); add(ARTIFACT_TYPE.TSK_WEB_DOWNLOAD.getTypeID()); @@ -96,7 +96,7 @@ public class CorrelationAttributeUtil { * the artifact. */ public static List makeCorrAttrsToSave(BlackboardArtifact artifact) { - if(SOURCE_TYPES_OF_CR_DATA.contains(artifact.getArtifactTypeID())) { + if(SOURCE_TYPES_FOR_CR_INSERT.contains(artifact.getArtifactTypeID())) { // Restrict the correlation attributes to use for saving. // The artifacts which are suitable for saving are a subset of the // artifacts that are suitable for correlating. From 664997021661cf2040ef62f1b234aeddf130bd3e Mon Sep 17 00:00:00 2001 From: Greg DiCristofaro Date: Mon, 6 Apr 2020 16:21:27 -0400 Subject: [PATCH 042/137] updated dialog --- .../DeleteOrphanCaseNodesDialog.form | 5 +++- .../DeleteOrphanCaseNodesDialog.java | 27 ++++++++++++++----- .../autoingest/DeleteOrphanCaseNodesTask.java | 8 +++--- 3 files changed, 29 insertions(+), 11 deletions(-) diff --git a/Experimental/src/org/sleuthkit/autopsy/experimental/autoingest/DeleteOrphanCaseNodesDialog.form b/Experimental/src/org/sleuthkit/autopsy/experimental/autoingest/DeleteOrphanCaseNodesDialog.form index af67571b2d..dd37628a82 100644 --- a/Experimental/src/org/sleuthkit/autopsy/experimental/autoingest/DeleteOrphanCaseNodesDialog.form +++ b/Experimental/src/org/sleuthkit/autopsy/experimental/autoingest/DeleteOrphanCaseNodesDialog.form @@ -6,6 +6,9 @@ + + + @@ -48,7 +51,7 @@ - + diff --git a/Experimental/src/org/sleuthkit/autopsy/experimental/autoingest/DeleteOrphanCaseNodesDialog.java b/Experimental/src/org/sleuthkit/autopsy/experimental/autoingest/DeleteOrphanCaseNodesDialog.java index 76ef98d590..451caecd86 100644 --- a/Experimental/src/org/sleuthkit/autopsy/experimental/autoingest/DeleteOrphanCaseNodesDialog.java +++ b/Experimental/src/org/sleuthkit/autopsy/experimental/autoingest/DeleteOrphanCaseNodesDialog.java @@ -22,14 +22,17 @@ import java.util.List; import java.util.Map; import java.util.stream.Collectors; import java.util.stream.Stream; +import javax.swing.JFrame; +import org.openide.windows.WindowManager; /** * This dialog shows the system administrator the orphaned znodes to be deleted. * If 'OK' is selected, isOkSelected() will return true. */ -public class DeleteOrphanCaseNodesDialog extends javax.swing.JDialog { +class DeleteOrphanCaseNodesDialog extends javax.swing.JDialog { private static final String NEW_LINE = System.getProperty("line.separator"); - private static final String DEFAULT_INDENT = " "; + private static final String CASE_SPACING = NEW_LINE + NEW_LINE; + private static final String DEFAULT_INDENT = " "; private static final String COLON = ":"; private boolean okSelected = false; @@ -37,12 +40,21 @@ public class DeleteOrphanCaseNodesDialog extends javax.swing.JDialog { /** * Creates new form DeleteOrphanCaseNodesDialog */ - public DeleteOrphanCaseNodesDialog(java.awt.Frame parent, boolean modal, Map> znodes) { - super(parent, modal); + DeleteOrphanCaseNodesDialog(Map> znodes) { + super((JFrame) WindowManager.getDefault().getMainWindow(), null, true); initComponents(); additionalInit(znodes); } + /** + * displays this dialog as child of main window. + */ + void display() { + this.setLocationRelativeTo(WindowManager.getDefault().getMainWindow()); + setVisible(true); + } + + private void additionalInit(Map> znodes) { String textAreaText = ""; if (znodes != null) { @@ -52,7 +64,7 @@ public class DeleteOrphanCaseNodesDialog extends javax.swing.JDialog { kv.getValue().stream().map((node) -> DEFAULT_INDENT + node)) .collect(Collectors.joining(NEW_LINE)); }) - .collect(Collectors.joining(NEW_LINE)); + .collect(Collectors.joining(CASE_SPACING)); } znodesTextArea.setText(textAreaText); @@ -76,6 +88,7 @@ public class DeleteOrphanCaseNodesDialog extends javax.swing.JDialog { setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE); setTitle(org.openide.util.NbBundle.getMessage(DeleteOrphanCaseNodesDialog.class, "DeleteOrphanCaseNodesDialog.titleText.text")); // NOI18N + setMinimumSize(new java.awt.Dimension(535, 226)); org.openide.awt.Mnemonics.setLocalizedText(descriptionText, org.openide.util.NbBundle.getMessage(DeleteOrphanCaseNodesDialog.class, "DeleteOrphanCaseNodesDialog.descriptionText.text")); // NOI18N descriptionText.setVerticalAlignment(javax.swing.SwingConstants.TOP); @@ -122,7 +135,7 @@ public class DeleteOrphanCaseNodesDialog extends javax.swing.JDialog { .addContainerGap() .addComponent(descriptionText) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) - .addComponent(jScrollPane, javax.swing.GroupLayout.DEFAULT_SIZE, 238, Short.MAX_VALUE) + .addComponent(jScrollPane, javax.swing.GroupLayout.DEFAULT_SIZE, 252, Short.MAX_VALUE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(cancelButton) @@ -146,7 +159,7 @@ public class DeleteOrphanCaseNodesDialog extends javax.swing.JDialog { * If the system administrator selected OK. * @return Whether or not 'OK' was selected by the system administrator. */ - public boolean isOkSelected() { + boolean isOkSelected() { return okSelected; } diff --git a/Experimental/src/org/sleuthkit/autopsy/experimental/autoingest/DeleteOrphanCaseNodesTask.java b/Experimental/src/org/sleuthkit/autopsy/experimental/autoingest/DeleteOrphanCaseNodesTask.java index 5521f46943..5facd5d6ff 100755 --- a/Experimental/src/org/sleuthkit/autopsy/experimental/autoingest/DeleteOrphanCaseNodesTask.java +++ b/Experimental/src/org/sleuthkit/autopsy/experimental/autoingest/DeleteOrphanCaseNodesTask.java @@ -130,8 +130,6 @@ final class DeleteOrphanCaseNodesTask implements Runnable { addIfExists(paths, CoordinationServiceUtils.getCaseAutoIngestLogNodePath(caseDirectoryPath)); addIfExists(paths, CoordinationServiceUtils.getCaseDirectoryNodePath(caseDirectoryPath)); nodePathsToDelete.put(caseName, paths); - - ++casesCount; } } return nodePathsToDelete; @@ -143,7 +141,8 @@ final class DeleteOrphanCaseNodesTask implements Runnable { * @return True if the user would like to proceed deleting the znodes. */ private boolean promptUser(Map> orphanedNodes) { - DeleteOrphanCaseNodesDialog dialog = new DeleteOrphanCaseNodesDialog(null, true, orphanedNodes); + DeleteOrphanCaseNodesDialog dialog = new DeleteOrphanCaseNodesDialog(orphanedNodes); + dialog.display(); return dialog.isOkSelected(); } @@ -168,6 +167,8 @@ final class DeleteOrphanCaseNodesTask implements Runnable { return; Map> orphanedNodes = getOrphanedNodes(nodePaths); + if (orphanedNodes == null || orphanedNodes.isEmpty()) + return; boolean continueDelete = promptUser(orphanedNodes); @@ -209,6 +210,7 @@ final class DeleteOrphanCaseNodesTask implements Runnable { nodePath = path; deleteNode(coordinationService, caseName, nodePath); } + ++casesCount; } } catch (InterruptedException unused) { logger.log(Level.WARNING, String.format("Task cancelled while deleting orphaned znode %s for %s", nodePath, caseName)); //NON-NLS From 15d6ef1bc7061a089e3580fda0a6ec6336ee27c6 Mon Sep 17 00:00:00 2001 From: Greg DiCristofaro Date: Tue, 7 Apr 2020 09:13:01 -0400 Subject: [PATCH 043/137] updates for not exiting EamDbSettingsDialog on error and not re-enabling Apply button --- .../optionspanel/EamDbSettingsDialog.java | 7 ++----- .../optionspanel/GlobalSettingsPanel.java | 6 +++--- 2 files changed, 5 insertions(+), 8 deletions(-) diff --git a/Core/src/org/sleuthkit/autopsy/centralrepository/optionspanel/EamDbSettingsDialog.java b/Core/src/org/sleuthkit/autopsy/centralrepository/optionspanel/EamDbSettingsDialog.java index 54ede84070..b9aadfdeee 100644 --- a/Core/src/org/sleuthkit/autopsy/centralrepository/optionspanel/EamDbSettingsDialog.java +++ b/Core/src/org/sleuthkit/autopsy/centralrepository/optionspanel/EamDbSettingsDialog.java @@ -530,8 +530,8 @@ public class EamDbSettingsDialog extends JDialog { "EamDbSettingsDialog.okButton.errorMsg.text=Please restart Autopsy to begin using the new database platform.", "EamDbSettingsDialog.okButton.connectionErrorMsg.text=Failed to connect to central repository database."}) private void bnOkActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_bnOkActionPerformed - testStatusAndCreate(this, manager, this); - dispose(); + if (testStatusAndCreate(this, manager, this)) + dispose(); }//GEN-LAST:event_bnOkActionPerformed @@ -814,7 +814,6 @@ public class EamDbSettingsDialog extends JDialog { @Override public void changedUpdate(DocumentEvent e) { - firePropertyChange(OptionsPanelController.PROP_CHANGED, null, null); manager.clearStatus(); updateFullDbPath(); valid(); @@ -822,7 +821,6 @@ public class EamDbSettingsDialog extends JDialog { @Override public void insertUpdate(DocumentEvent e) { - firePropertyChange(OptionsPanelController.PROP_CHANGED, null, null); manager.clearStatus(); updateFullDbPath(); valid(); @@ -830,7 +828,6 @@ public class EamDbSettingsDialog extends JDialog { @Override public void removeUpdate(DocumentEvent e) { - firePropertyChange(OptionsPanelController.PROP_CHANGED, null, null); manager.clearStatus(); updateFullDbPath(); valid(); diff --git a/Core/src/org/sleuthkit/autopsy/centralrepository/optionspanel/GlobalSettingsPanel.java b/Core/src/org/sleuthkit/autopsy/centralrepository/optionspanel/GlobalSettingsPanel.java index 84a946db51..f668e2f6d0 100644 --- a/Core/src/org/sleuthkit/autopsy/centralrepository/optionspanel/GlobalSettingsPanel.java +++ b/Core/src/org/sleuthkit/autopsy/centralrepository/optionspanel/GlobalSettingsPanel.java @@ -88,6 +88,9 @@ public final class GlobalSettingsPanel extends IngestModuleGlobalSettingsPanel i } + /** + * Sets up this instance's listener for the GlobalSettingsPanel's changes. + */ private void setupSettingsChangeListeners() { // listen for change events in currently saved choice if (lastRegistered != null) { @@ -104,7 +107,6 @@ public final class GlobalSettingsPanel extends IngestModuleGlobalSettingsPanel i private void onSettingsChange(PropertyChangeEvent evt) { ingestStateUpdated(Case.isCaseOpen()); clearStatus(); - firePropertyChange(OptionsPanelController.PROP_CHANGED, null, null); } @@ -644,7 +646,6 @@ public final class GlobalSettingsPanel extends IngestModuleGlobalSettingsPanel i boolean changed = invokeCrChoice(this, null); if (changed) { load(); // reload db settings content and update buttons - firePropertyChange(OptionsPanelController.PROP_CHANGED, null, null); } }//GEN-LAST:event_bnDbConfigureActionPerformed @@ -663,7 +664,6 @@ public final class GlobalSettingsPanel extends IngestModuleGlobalSettingsPanel i store(); load(); this.ingestStateUpdated(Case.isCaseOpen()); - firePropertyChange(OptionsPanelController.PROP_CHANGED, null, null); }//GEN-LAST:event_cbUseCentralRepoActionPerformed private void bnTestConfigureActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_bnTestConfigureActionPerformed From 618d2520a52d8a2432c81ccfd5989b1f8d80382b Mon Sep 17 00:00:00 2001 From: Kelly Kelly Date: Tue, 7 Apr 2020 11:09:29 -0400 Subject: [PATCH 044/137] Fixed CVT unthreaded selection issue --- .../autopsy/communications/relationships/MessageViewer.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Core/src/org/sleuthkit/autopsy/communications/relationships/MessageViewer.java b/Core/src/org/sleuthkit/autopsy/communications/relationships/MessageViewer.java index 5e90d83c98..38e245aec3 100755 --- a/Core/src/org/sleuthkit/autopsy/communications/relationships/MessageViewer.java +++ b/Core/src/org/sleuthkit/autopsy/communications/relationships/MessageViewer.java @@ -247,6 +247,8 @@ public class MessageViewer extends JPanel implements RelationshipsViewer { */ private void showMessagesPane() { switchCard("messages"); + Outline outline = rootTablePane.getOutlineView().getOutline(); + outline.clearSelection(); } /** From 95611cf4e301464d1e9746d7d075d411741cdd4a Mon Sep 17 00:00:00 2001 From: Ethan Roseman Date: Tue, 7 Apr 2020 12:34:44 -0400 Subject: [PATCH 045/137] 6161 Give different colors to different waypoint types --- .../autopsy/geolocation/MapPanel.java | 80 ++++++++++++------ .../autopsy/geolocation/MapWaypoint.java | 8 +- .../autopsy/images/waypoint_teal.png | Bin 912 -> 0 bytes .../autopsy/images/waypoint_transparent.png | Bin 0 -> 8794 bytes .../autopsy/images/waypoint_white.png | Bin 1243 -> 3435 bytes .../autopsy/images/waypoint_yellow.png | Bin 891 -> 0 bytes 6 files changed, 59 insertions(+), 29 deletions(-) delete mode 100755 Core/src/org/sleuthkit/autopsy/images/waypoint_teal.png create mode 100644 Core/src/org/sleuthkit/autopsy/images/waypoint_transparent.png delete mode 100755 Core/src/org/sleuthkit/autopsy/images/waypoint_yellow.png diff --git a/Core/src/org/sleuthkit/autopsy/geolocation/MapPanel.java b/Core/src/org/sleuthkit/autopsy/geolocation/MapPanel.java index bc27ecafef..f3ca41c0be 100755 --- a/Core/src/org/sleuthkit/autopsy/geolocation/MapPanel.java +++ b/Core/src/org/sleuthkit/autopsy/geolocation/MapPanel.java @@ -40,7 +40,6 @@ import java.util.HashMap; import java.util.Iterator; import java.util.List; import java.util.Set; -import java.util.function.Function; import java.util.logging.Level; import java.util.prefs.PreferenceChangeEvent; import java.util.prefs.PreferenceChangeListener; @@ -92,7 +91,8 @@ final public class MapPanel extends javax.swing.JPanel { private static final int POPUP_HEIGHT = 200; private static final int POPUP_MARGIN = 10; - private BufferedImage defaultWaypointImage; + private BufferedImage whiteWaypointImage; + private BufferedImage transparentWaypointImage; private MapWaypoint currentlySelectedWaypoint; @@ -111,7 +111,8 @@ final public class MapPanel extends javax.swing.JPanel { popupFactory = new PopupFactory(); try { - defaultWaypointImage = ImageIO.read(getClass().getResource("/org/sleuthkit/autopsy/images/waypoint_white.png")); + whiteWaypointImage = ImageIO.read(getClass().getResource("/org/sleuthkit/autopsy/images/waypoint_white.png")); + transparentWaypointImage = ImageIO.read(getClass().getResource("/org/sleuthkit/autopsy/images/waypoint_transparent.png")); } catch (IOException ex) { logger.log(Level.WARNING, "Unable to load geolocation waypoint images", ex); } @@ -465,7 +466,7 @@ final public class MapPanel extends javax.swing.JPanel { MapWaypoint nextWaypoint = iterator.next(); Point2D point = mapViewer.convertGeoPositionToPoint(nextWaypoint.getPosition()); - Rectangle rect = new Rectangle((int) point.getX() - (defaultWaypointImage.getWidth() / 2), (int) point.getY() - defaultWaypointImage.getHeight(), defaultWaypointImage.getWidth(), defaultWaypointImage.getHeight()); + Rectangle rect = new Rectangle((int) point.getX() - (whiteWaypointImage.getWidth() / 2), (int) point.getY() - whiteWaypointImage.getHeight(), whiteWaypointImage.getWidth(), whiteWaypointImage.getHeight()); if (rect.contains(clickPoint)) { closestPoints.add(nextWaypoint); @@ -689,6 +690,28 @@ final public class MapPanel extends javax.swing.JPanel { private class MapWaypointRenderer implements WaypointRenderer { private final HashMap imageCache = new HashMap<>(); + /** + * + * @param from the color to start with + * @param to the color to blend into + * @param amount the amount by which to blend + * @return a blended color + */ + private Color blend(Color from, Color to, float amount) { + float inverse = 1.0f - amount; + + float fromC[] = new float[3]; + from.getColorComponents(fromC); + float toC[] = new float[3]; + to.getColorComponents(toC); + float afResult[] = new float[3]; + afResult[0] = fromC[0] * inverse + toC[0] * amount; + afResult[1] = fromC[1] * inverse + toC[1] * amount; + afResult[2] = fromC[2] * inverse + toC[2] * amount; + + return new Color (afResult[0], afResult[1], afResult[2]); + } + /** * * @param waypoint the waypoint for which to get the color @@ -696,36 +719,35 @@ final public class MapPanel extends javax.swing.JPanel { * @return the color that this waypoint should be rendered */ private Color getColor(MapWaypoint waypoint, MapWaypoint currentlySelectedWaypoint) { + Color baseColor = waypoint.getColor(); if (waypoint == currentlySelectedWaypoint) { - return Color.YELLOW; + // Highlight this waypoint since it is selected + return blend(baseColor, Color.WHITE, 0.5f); + } else { + return baseColor; } - return waypoint.getColor(); } /** - * - * @param baseImg the base image - * @param newColor the color that the resulting image should be changed into - * @return a new waypoint image + * Creates a waypoint image with the specified color + * @param color the color of the new waypoint image + * @return the new waypoint image */ - private BufferedImage getWaypointImage(BufferedImage baseImg, Color newColor) { - int w = baseImg.getWidth(); - int h = baseImg.getHeight(); - BufferedImage imgOut = new BufferedImage(w, h, BufferedImage.TYPE_INT_ARGB); - BufferedImage imgColor = new BufferedImage(w, h, BufferedImage.TYPE_INT_ARGB); + private BufferedImage createWaypointImage(Color color) { + int w = whiteWaypointImage.getWidth(); + int h = whiteWaypointImage.getHeight(); - Graphics2D g = imgColor.createGraphics(); - g.setColor(newColor); - g.fillRect(0, 0, w + 1, h + 1); + BufferedImage ret = new BufferedImage(w, h, BufferedImage.TYPE_INT_ARGB); + + Graphics2D g = ret.createGraphics(); + g.drawImage(whiteWaypointImage, 0,0, null); + g.setComposite(AlphaComposite.SrcIn); + g.setColor(color); + g.fillRect(0,0,w,h); + g.setComposite(AlphaComposite.SrcAtop); + g.drawImage(transparentWaypointImage, 0, 0, null); g.dispose(); - - Graphics2D graphics = imgOut.createGraphics(); - graphics.drawImage(baseImg, 0, 0, null); - graphics.setComposite(AlphaComposite.getInstance(AlphaComposite.SRC_IN)); - graphics.drawImage(imgColor, 0, 0, null); - graphics.dispose(); - - return imgOut; + return ret; } @Override @@ -734,7 +756,7 @@ final public class MapPanel extends javax.swing.JPanel { // Store computed images in cache for later use BufferedImage image = imageCache.computeIfAbsent(color, k -> { - return getWaypointImage(defaultWaypointImage, color); + return createWaypointImage(color); }); Point2D point = jxmv.getTileFactory().geoToPixel(waypoint.getPosition(), jxmv.getZoom()); @@ -742,7 +764,9 @@ final public class MapPanel extends javax.swing.JPanel { int x = (int) point.getX(); int y = (int) point.getY(); - (gd.create()).drawImage(image, x - image.getWidth() / 2, y - image.getHeight(), null); + gd = (Graphics2D)gd.create(); + gd.drawImage(image, x - image.getWidth() / 2, y - image.getHeight(), null); + gd.dispose(); } } } diff --git a/Core/src/org/sleuthkit/autopsy/geolocation/MapWaypoint.java b/Core/src/org/sleuthkit/autopsy/geolocation/MapWaypoint.java index 14711ac62f..f53f74af02 100755 --- a/Core/src/org/sleuthkit/autopsy/geolocation/MapWaypoint.java +++ b/Core/src/org/sleuthkit/autopsy/geolocation/MapWaypoint.java @@ -71,6 +71,12 @@ final class MapWaypoint extends KdTree.XYZPoint implements org.jxmapviewer.viewe static { artifactTypesToColors.put(BlackboardArtifact.ARTIFACT_TYPE.TSK_GPS_BOOKMARK.getTypeID(), Color.BLUE); + artifactTypesToColors.put(BlackboardArtifact.ARTIFACT_TYPE.TSK_GPS_LAST_KNOWN_LOCATION.getTypeID(), Color.RED); + artifactTypesToColors.put(BlackboardArtifact.ARTIFACT_TYPE.TSK_GPS_ROUTE.getTypeID(), Color.YELLOW); + artifactTypesToColors.put(BlackboardArtifact.ARTIFACT_TYPE.TSK_GPS_SEARCH.getTypeID(), Color.GREEN); + artifactTypesToColors.put(BlackboardArtifact.ARTIFACT_TYPE.TSK_GPS_TRACK.getTypeID(), Color.ORANGE); + artifactTypesToColors.put(BlackboardArtifact.ARTIFACT_TYPE.TSK_GPS_TRACKPOINT.getTypeID(), Color.ORANGE); + artifactTypesToColors.put(BlackboardArtifact.ARTIFACT_TYPE.TSK_METADATA_EXIF.getTypeID(), Color.CYAN); } private final Waypoint dataModelWaypoint; @@ -339,7 +345,7 @@ final class MapWaypoint extends KdTree.XYZPoint implements org.jxmapviewer.viewe * @return the color that this waypoint should be rendered */ Color getColor() { - return artifactTypesToColors.getOrDefault(dataModelWaypoint.getArtifact().getArtifactTypeID(), Color.ORANGE); + return artifactTypesToColors.getOrDefault(dataModelWaypoint.getArtifact().getArtifactTypeID(), Color.GRAY); } /** diff --git a/Core/src/org/sleuthkit/autopsy/images/waypoint_teal.png b/Core/src/org/sleuthkit/autopsy/images/waypoint_teal.png deleted file mode 100755 index 3860d1973cc4d86c5a8392953b1699753325a4ea..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 912 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 QT>?N+R#gW6&N%4*0Tsvvm;e9( literal 0 HcmV?d00001 diff --git a/Core/src/org/sleuthkit/autopsy/images/waypoint_white.png b/Core/src/org/sleuthkit/autopsy/images/waypoint_white.png index b3eb5b204f4fbdd7d6ed8687794d86c076aaa135..b3aedebc0642be31f9c1c38615d4cda68bd492b1 100644 GIT binary patch delta 3432 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 Date: Tue, 7 Apr 2020 13:39:08 -0400 Subject: [PATCH 046/137] updated jdialog format --- .../experimental/autoingest/Bundle.properties | 3 +- .../autoingest/Bundle.properties-MERGED | 21 ++- .../DeleteOrphanCaseNodesDialog.form | 11 +- .../DeleteOrphanCaseNodesDialog.java | 69 ++++++---- .../autoingest/DeleteOrphanCaseNodesTask.java | 124 +++++++++++------- 5 files changed, 141 insertions(+), 87 deletions(-) diff --git a/Experimental/src/org/sleuthkit/autopsy/experimental/autoingest/Bundle.properties b/Experimental/src/org/sleuthkit/autopsy/experimental/autoingest/Bundle.properties index 4de3b58397..2b25c96245 100644 --- a/Experimental/src/org/sleuthkit/autopsy/experimental/autoingest/Bundle.properties +++ b/Experimental/src/org/sleuthkit/autopsy/experimental/autoingest/Bundle.properties @@ -257,7 +257,8 @@ CasesDashboardTopComponent.refreshButton.text=Refresh AutoIngestCasesDeletionDialog.jLabel1.text=Progress CasesDashboardTopComponent.deleteOrphanCaseNodesButton.text=Delete Orphan Case Znodes CasesDashboardTopComponent.deleteOrphanManifestNodesButton.text=Delete Orphan Manifest Znodes -DeleteOrphanCaseNodesDialog.descriptionText.text=The following znodes are no longer have an associated case. Would you like to delete them? +DeleteOrphanCaseNodesDialog.descriptionText.text=The following cases have orphaned znodes. Would you like to delete them? DeleteOrphanCaseNodesDialog.okButton.text=OK DeleteOrphanCaseNodesDialog.cancelButton.text=Cancel DeleteOrphanCaseNodesDialog.titleText.text=Delete The Following Znodes? +DeleteOrphanCaseNodesDialog.lblNodeCount.text= diff --git a/Experimental/src/org/sleuthkit/autopsy/experimental/autoingest/Bundle.properties-MERGED b/Experimental/src/org/sleuthkit/autopsy/experimental/autoingest/Bundle.properties-MERGED index 46c6d587fc..adb7693b48 100755 --- a/Experimental/src/org/sleuthkit/autopsy/experimental/autoingest/Bundle.properties-MERGED +++ b/Experimental/src/org/sleuthkit/autopsy/experimental/autoingest/Bundle.properties-MERGED @@ -89,10 +89,6 @@ AutoIngestControlPanel.runningTable.toolTipText=The Running table displays the c AutoIngestControlPanel.SharedConfigurationDisabled=Shared configuration disabled AutoIngestControlPanel.ShowLogFailed.Message=Case log file does not exist AutoIngestControlPanel.ShowLogFailed.Title=Unable to display case log -# {0} - case db status -# {1} - search svc Status -# {2} - coord svc Status -# {3} - msg broker status AutoIngestControlPanel.tbServicesStatusMessage.Message=Case databases {0}, keyword search {1}, coordination {2}, messaging {3} AutoIngestControlPanel.tbServicesStatusMessage.Message.Down=down AutoIngestControlPanel.tbServicesStatusMessage.Message.Unknown=unknown @@ -186,25 +182,23 @@ DeleteCaseTask.progress.acquiringManifestLocks=Acquiring exclusive manifest file DeleteCaseTask.progress.connectingToCoordSvc=Connecting to the coordination service... DeleteCaseTask.progress.deletingCaseDirCoordSvcNode=Deleting case directory znode... DeleteCaseTask.progress.deletingCaseNameCoordSvcNode=Deleting case name znode... -# {0} - data source path DeleteCaseTask.progress.deletingDataSource=Deleting data source {0}... DeleteCaseTask.progress.deletingJobLogLockNode=Deleting case auto ingest log znode... -# {0} - manifest file path DeleteCaseTask.progress.deletingManifest=Deleting manifest file {0}... -# {0} - manifest file path DeleteCaseTask.progress.deletingManifestFileNode=Deleting the manifest file znode for {0}... DeleteCaseTask.progress.deletingResourcesLockNode=Deleting case resources znode... DeleteCaseTask.progress.gettingManifestPaths=Getting manifest file paths... -# {0} - manifest file path DeleteCaseTask.progress.lockingManifest=Locking manifest file {0}... DeleteCaseTask.progress.openingCaseDatabase=Opening the case database... DeleteCaseTask.progress.openingCaseMetadataFile=Opening case metadata file... -# {0} - manifest file path DeleteCaseTask.progress.parsingManifest=Parsing manifest file {0}... -# {0} - manifest file path DeleteCaseTask.progress.releasingManifestLock=Releasing lock on the manifest file {0}... DeleteCaseTask.progress.startMessage=Starting deletion... DeleteOrphanCaseNodesAction.progressDisplayName=Cleanup Case Znodes +# {0} - item count +DeleteOrphanCaseNodesDialog.additionalInit.lblNodeCount.text=Znodes found: {0} +# {0} - item count +DeleteOrphanCaseNodesDialog.additionalInit.znodesTextArea.countMessage=ZNODES FOUND: {0} DeleteOrphanCaseNodesTask.progress.connectingToCoordSvc=Connecting to the coordination service # {0} - node path DeleteOrphanCaseNodesTask.progress.deletingOrphanedCaseNode=Deleting orphaned case znode {0} @@ -213,7 +207,6 @@ DeleteOrphanCaseNodesTask.progress.lookingForOrphanedCaseZnodes=Looking for orph DeleteOrphanCaseNodesTask.progress.startMessage=Starting orphaned case znode cleanup DeleteOrphanManifestNodesAction.progressDisplayName=Cleanup Manifest File Znodes DeleteOrphanManifestNodesTask.progress.connectingToCoordSvc=Connecting to the coordination service -# {0} - node path DeleteOrphanManifestNodesTask.progress.deletingOrphanedManifestNode=Deleting orphaned manifest file znode {0} DeleteOrphanManifestNodesTask.progress.gettingManifestNodes=Querying the coordination service for manifest file znodes DeleteOrphanManifestNodesTask.progress.lookingForOrphanedManifestFileZnodes=Looking for orphaned manifest file znodes @@ -222,7 +215,6 @@ HINT_CasesDashboardTopComponent=This is an adminstrative dashboard for multi-use OpenAutoIngestLogAction.deletedLogErrorMsg=The case auto ingest log has been deleted. OpenAutoIngestLogAction.logOpenFailedErrorMsg=Failed to open case auto ingest log. See application log for details. OpenAutoIngestLogAction.menuItemText=Open Auto Ingest Log File -# {0} - caseErrorMessage OpenCaseAction.errorMsg=Failed to open case: {0} OpenCaseAction.menuItemText=Open OpenIDE-Module-Long-Description=This module contains features that are being developed by Basis Technology and are not part of the default Autopsy distribution. You can enable this module to use the new features. The features should be stable, but their exact behavior and API are subject to change.\n\nWe make no guarantee that the API of this module will not change, so developers should be careful when relying on it. @@ -456,3 +448,8 @@ CasesDashboardTopComponent.refreshButton.text=Refresh AutoIngestCasesDeletionDialog.jLabel1.text=Progress CasesDashboardTopComponent.deleteOrphanCaseNodesButton.text=Delete Orphan Case Znodes CasesDashboardTopComponent.deleteOrphanManifestNodesButton.text=Delete Orphan Manifest Znodes +DeleteOrphanCaseNodesDialog.descriptionText.text=The following cases have orphaned znodes. Would you like to delete them? +DeleteOrphanCaseNodesDialog.okButton.text=OK +DeleteOrphanCaseNodesDialog.cancelButton.text=Cancel +DeleteOrphanCaseNodesDialog.titleText.text=Delete The Following Znodes? +DeleteOrphanCaseNodesDialog.lblNodeCount.text= diff --git a/Experimental/src/org/sleuthkit/autopsy/experimental/autoingest/DeleteOrphanCaseNodesDialog.form b/Experimental/src/org/sleuthkit/autopsy/experimental/autoingest/DeleteOrphanCaseNodesDialog.form index dd37628a82..8b314a48d7 100644 --- a/Experimental/src/org/sleuthkit/autopsy/experimental/autoingest/DeleteOrphanCaseNodesDialog.form +++ b/Experimental/src/org/sleuthkit/autopsy/experimental/autoingest/DeleteOrphanCaseNodesDialog.form @@ -35,7 +35,8 @@ - + + @@ -56,6 +57,7 @@ + @@ -122,5 +124,12 @@
    + + + + + + + diff --git a/Experimental/src/org/sleuthkit/autopsy/experimental/autoingest/DeleteOrphanCaseNodesDialog.java b/Experimental/src/org/sleuthkit/autopsy/experimental/autoingest/DeleteOrphanCaseNodesDialog.java index 451caecd86..72ecfe5b46 100644 --- a/Experimental/src/org/sleuthkit/autopsy/experimental/autoingest/DeleteOrphanCaseNodesDialog.java +++ b/Experimental/src/org/sleuthkit/autopsy/experimental/autoingest/DeleteOrphanCaseNodesDialog.java @@ -18,34 +18,35 @@ */ package org.sleuthkit.autopsy.experimental.autoingest; +import java.util.ArrayList; +import java.util.Collection; +import java.util.Comparator; import java.util.List; -import java.util.Map; -import java.util.stream.Collectors; -import java.util.stream.Stream; import javax.swing.JFrame; import org.openide.windows.WindowManager; +import org.openide.util.NbBundle.Messages; /** * This dialog shows the system administrator the orphaned znodes to be deleted. * If 'OK' is selected, isOkSelected() will return true. */ class DeleteOrphanCaseNodesDialog extends javax.swing.JDialog { + private static final String NEW_LINE = System.getProperty("line.separator"); - private static final String CASE_SPACING = NEW_LINE + NEW_LINE; - private static final String DEFAULT_INDENT = " "; - private static final String COLON = ":"; - + private boolean okSelected = false; /** * Creates new form DeleteOrphanCaseNodesDialog + * + * @param zNodeCases The list of cases with nodes to be deleted */ - DeleteOrphanCaseNodesDialog(Map> znodes) { + DeleteOrphanCaseNodesDialog(Collection zNodeCases) { super((JFrame) WindowManager.getDefault().getMainWindow(), null, true); initComponents(); - additionalInit(znodes); + additionalInit(zNodeCases); } - + /** * displays this dialog as child of main window. */ @@ -53,23 +54,26 @@ class DeleteOrphanCaseNodesDialog extends javax.swing.JDialog { this.setLocationRelativeTo(WindowManager.getDefault().getMainWindow()); setVisible(true); } - - - private void additionalInit(Map> znodes) { - String textAreaText = ""; - if (znodes != null) { - textAreaText = znodes.entrySet().stream().map((kv) -> { - return Stream.concat( - Stream.of(kv.getKey() + COLON), - kv.getValue().stream().map((node) -> DEFAULT_INDENT + node)) - .collect(Collectors.joining(NEW_LINE)); - }) - .collect(Collectors.joining(CASE_SPACING)); - } - + + @Messages({ + "# {0} - item count", + "DeleteOrphanCaseNodesDialog.additionalInit.lblNodeCount.text=Znodes found: {0}", + "# {0} - item count", + "DeleteOrphanCaseNodesDialog.additionalInit.znodesTextArea.countMessage=ZNODES FOUND: {0}" + }) + private void additionalInit(Collection zNodeCases) { + List casesList = (zNodeCases == null) ? new ArrayList<>() : new ArrayList<>(zNodeCases); + int count = casesList.size(); + casesList.sort(Comparator.comparing(String::toString)); + String textAreaText = Bundle.DeleteOrphanCaseNodesDialog_additionalInit_znodesTextArea_countMessage(count) + + NEW_LINE + + NEW_LINE + + String.join(NEW_LINE, casesList); + znodesTextArea.setText(textAreaText); + + lblNodeCount.setText(Bundle.DeleteOrphanCaseNodesDialog_additionalInit_lblNodeCount_text(count)); } - /** * This method is called from within the constructor to initialize the form. @@ -85,6 +89,7 @@ class DeleteOrphanCaseNodesDialog extends javax.swing.JDialog { znodesTextArea = new javax.swing.JTextArea(); javax.swing.JButton cancelButton = new javax.swing.JButton(); javax.swing.JButton okButton = new javax.swing.JButton(); + lblNodeCount = new javax.swing.JLabel(); setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE); setTitle(org.openide.util.NbBundle.getMessage(DeleteOrphanCaseNodesDialog.class, "DeleteOrphanCaseNodesDialog.titleText.text")); // NOI18N @@ -113,6 +118,8 @@ class DeleteOrphanCaseNodesDialog extends javax.swing.JDialog { } }); + org.openide.awt.Mnemonics.setLocalizedText(lblNodeCount, org.openide.util.NbBundle.getMessage(DeleteOrphanCaseNodesDialog.class, "DeleteOrphanCaseNodesDialog.lblNodeCount.text")); // NOI18N + javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane()); getContentPane().setLayout(layout); layout.setHorizontalGroup( @@ -123,7 +130,8 @@ class DeleteOrphanCaseNodesDialog extends javax.swing.JDialog { .addComponent(jScrollPane, javax.swing.GroupLayout.Alignment.TRAILING) .addComponent(descriptionText, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup() - .addGap(0, 0, Short.MAX_VALUE) + .addComponent(lblNodeCount, javax.swing.GroupLayout.PREFERRED_SIZE, 310, javax.swing.GroupLayout.PREFERRED_SIZE) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent(okButton) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(cancelButton))) @@ -139,7 +147,8 @@ class DeleteOrphanCaseNodesDialog extends javax.swing.JDialog { .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(cancelButton) - .addComponent(okButton)) + .addComponent(okButton) + .addComponent(lblNodeCount)) .addContainerGap()) ); @@ -157,13 +166,15 @@ class DeleteOrphanCaseNodesDialog extends javax.swing.JDialog { /** * If the system administrator selected OK. - * @return Whether or not 'OK' was selected by the system administrator. + * + * @return Whether or not 'OK' was selected by the system administrator. */ boolean isOkSelected() { return okSelected; } - + // Variables declaration - do not modify//GEN-BEGIN:variables + private javax.swing.JLabel lblNodeCount; private javax.swing.JTextArea znodesTextArea; // End of variables declaration//GEN-END:variables } diff --git a/Experimental/src/org/sleuthkit/autopsy/experimental/autoingest/DeleteOrphanCaseNodesTask.java b/Experimental/src/org/sleuthkit/autopsy/experimental/autoingest/DeleteOrphanCaseNodesTask.java index 5facd5d6ff..14e7cbe10e 100755 --- a/Experimental/src/org/sleuthkit/autopsy/experimental/autoingest/DeleteOrphanCaseNodesTask.java +++ b/Experimental/src/org/sleuthkit/autopsy/experimental/autoingest/DeleteOrphanCaseNodesTask.java @@ -19,14 +19,17 @@ package org.sleuthkit.autopsy.experimental.autoingest; import java.io.File; +import java.lang.reflect.InvocationTargetException; import java.nio.file.Path; import java.nio.file.Paths; import java.util.ArrayList; +import java.util.Collection; import java.util.HashMap; import java.util.List; import java.util.Map; import java.util.Map.Entry; import java.util.logging.Level; +import javax.swing.SwingUtilities; import org.openide.util.NbBundle; import org.sleuthkit.autopsy.casemodule.multiusercases.CoordinationServiceUtils; import static org.sleuthkit.autopsy.casemodule.multiusercases.CoordinationServiceUtils.isCaseAutoIngestLogNodePath; @@ -44,10 +47,9 @@ final class DeleteOrphanCaseNodesTask implements Runnable { private static final Logger logger = AutoIngestDashboardLogger.getLogger(); private final ProgressIndicator progress; - private int nodesCount; - private int casesCount; + private int nodesCount = 0; + private int casesCount = 0; - /** * Constucts an instance of a task for deleting case coordination service * nodes for which there is no longer a corresponding case. @@ -57,11 +59,12 @@ final class DeleteOrphanCaseNodesTask implements Runnable { DeleteOrphanCaseNodesTask(ProgressIndicator progress) { this.progress = progress; } - - + /** - * Retrieves an instance of the coordination service in order to fetch znodes and potentially delete. - * @return The coordination service or null on error. + * Retrieves an instance of the coordination service in order to fetch + * znodes and potentially delete. + * + * @return The coordination service or null on error. */ private CoordinationService getCoordinationService() { progress.progress(Bundle.DeleteOrphanCaseNodesTask_progress_connectingToCoordSvc()); @@ -74,12 +77,14 @@ final class DeleteOrphanCaseNodesTask implements Runnable { } return coordinationService; } - - + /** * Retrieves node paths for cases. - * @param coordinationService The coordination service to use in order to fetch the node paths. - * @return The list of node paths for cases. + * + * @param coordinationService The coordination service to use in order to + * fetch the node paths. + * + * @return The list of node paths for cases. */ private List getNodePaths(CoordinationService coordinationService) { progress.progress(Bundle.DeleteOrphanCaseNodesTask_progress_gettingCaseZnodes()); @@ -88,27 +93,30 @@ final class DeleteOrphanCaseNodesTask implements Runnable { try { nodePaths = coordinationService.getNodeList(CoordinationService.CategoryNode.CASES); // in the event that getNodeList returns null (but still successful) return empty list - if (nodePaths == null) + if (nodePaths == null) { return new ArrayList(); + } } catch (CoordinationService.CoordinationServiceException ex) { logger.log(Level.SEVERE, "Error getting case znode list", ex); //NON-NLS } catch (InterruptedException unused) { logger.log(Level.WARNING, "Task cancelled while getting case znode list"); //NON-NLS } - + return nodePaths; } - private void addIfExists(List paths, String path) { - if (path != null && !path.isEmpty()) + if (path != null && !path.isEmpty()) { paths.add(path); + } } - + /** * Determines orphaned znode paths. - * @param nodePaths The list of case node paths. - * @return The list of orphaned node paths. + * + * @param nodePaths The list of case node paths. + * + * @return The list of orphaned node paths. */ private Map> getOrphanedNodes(List nodePaths) { progress.progress(Bundle.DeleteOrphanCaseNodesTask_progress_lookingForOrphanedCaseZnodes()); @@ -124,7 +132,7 @@ final class DeleteOrphanCaseNodesTask implements Runnable { if (!caseDirectory.exists()) { String caseName = CoordinationServiceUtils.getCaseNameNodePath(caseDirectoryPath); List paths = new ArrayList<>(); - + addIfExists(paths, CoordinationServiceUtils.getCaseNameNodePath(caseDirectoryPath)); addIfExists(paths, CoordinationServiceUtils.getCaseResourcesNodePath(caseDirectoryPath)); addIfExists(paths, CoordinationServiceUtils.getCaseAutoIngestLogNodePath(caseDirectoryPath)); @@ -134,20 +142,49 @@ final class DeleteOrphanCaseNodesTask implements Runnable { } return nodePathsToDelete; } - + + /** + * Boxed boolean so that promptUser method can set a value on a final object + * from custom jdialog message. + */ + private class PromptResult { + + private boolean value = false; + + boolean getValue() { + return value; + } + + void setValue(boolean value) { + this.value = value; + } + + } + /** * prompts the user with a list of orphaned znodes. - * @param orphanedNodes The orphaned znodes. - * @return True if the user would like to proceed deleting the znodes. + * + * @param orphanedNodes The orphaned znode cases. + * + * @return True if the user would like to proceed deleting the znodes. */ - private boolean promptUser(Map> orphanedNodes) { - DeleteOrphanCaseNodesDialog dialog = new DeleteOrphanCaseNodesDialog(orphanedNodes); - dialog.display(); - return dialog.isOkSelected(); + private boolean promptUser(Collection orphanedNodes) { + final PromptResult dialogResult = new PromptResult(); + ; + try { + SwingUtilities.invokeAndWait(() -> { + DeleteOrphanCaseNodesDialog dialog = new DeleteOrphanCaseNodesDialog(orphanedNodes); + dialog.display(); + dialogResult.setValue(dialog.isOkSelected()); + }); + + return dialogResult.getValue(); + } catch (InterruptedException | InvocationTargetException e) { + logger.log(Level.WARNING, "Task cancelled while confirmingg case znodes to delete"); //NON-NLS + return false; + } } - - - + @Override @NbBundle.Messages({ "DeleteOrphanCaseNodesTask.progress.startMessage=Starting orphaned case znode cleanup", @@ -159,22 +196,22 @@ final class DeleteOrphanCaseNodesTask implements Runnable { progress.start(Bundle.DeleteOrphanCaseNodesTask_progress_startMessage()); try { CoordinationService coordinationService = getCoordinationService(); - if (coordinationService == null) + if (coordinationService == null) { return; + } List nodePaths = getNodePaths(coordinationService); - if (nodePaths == null) + if (nodePaths == null) { return; + } Map> orphanedNodes = getOrphanedNodes(nodePaths); - if (orphanedNodes == null || orphanedNodes.isEmpty()) - return; - - boolean continueDelete = promptUser(orphanedNodes); - - if (continueDelete) + boolean continueDelete = promptUser(orphanedNodes.keySet()); + + if (continueDelete) { deleteNodes(coordinationService, orphanedNodes); - + } + } catch (Exception ex) { /* * This is an unexpected runtime exceptions firewall. It is here @@ -190,13 +227,13 @@ final class DeleteOrphanCaseNodesTask implements Runnable { progress.finish(); } } - - + /** * Deletes the orphaned znodes provided in the 'orphanedNodes' variable. - * @param coordinationService The coordination service to use for deletion. - * @param orphanedNodes A mapping of case to the orphaned znodes. - * + * + * @param coordinationService The coordination service to use for deletion. + * @param orphanedNodes A mapping of case to the orphaned znodes. + * * @throws InterruptedException If the thread executing this task is * interrupted during the delete operation. */ @@ -214,7 +251,6 @@ final class DeleteOrphanCaseNodesTask implements Runnable { } } catch (InterruptedException unused) { logger.log(Level.WARNING, String.format("Task cancelled while deleting orphaned znode %s for %s", nodePath, caseName)); //NON-NLS - return; } } From bf18ee70cb7cb66f110c716f45ead0af08782333 Mon Sep 17 00:00:00 2001 From: Greg DiCristofaro Date: Tue, 7 Apr 2020 13:48:07 -0400 Subject: [PATCH 047/137] address codacy review --- .../experimental/autoingest/DeleteOrphanCaseNodesDialog.java | 1 + .../experimental/autoingest/DeleteOrphanCaseNodesTask.java | 3 +-- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Experimental/src/org/sleuthkit/autopsy/experimental/autoingest/DeleteOrphanCaseNodesDialog.java b/Experimental/src/org/sleuthkit/autopsy/experimental/autoingest/DeleteOrphanCaseNodesDialog.java index 72ecfe5b46..3c8aacb86e 100644 --- a/Experimental/src/org/sleuthkit/autopsy/experimental/autoingest/DeleteOrphanCaseNodesDialog.java +++ b/Experimental/src/org/sleuthkit/autopsy/experimental/autoingest/DeleteOrphanCaseNodesDialog.java @@ -31,6 +31,7 @@ import org.openide.util.NbBundle.Messages; * If 'OK' is selected, isOkSelected() will return true. */ class DeleteOrphanCaseNodesDialog extends javax.swing.JDialog { + private static final long serialVersionUID = 1L; private static final String NEW_LINE = System.getProperty("line.separator"); diff --git a/Experimental/src/org/sleuthkit/autopsy/experimental/autoingest/DeleteOrphanCaseNodesTask.java b/Experimental/src/org/sleuthkit/autopsy/experimental/autoingest/DeleteOrphanCaseNodesTask.java index 14e7cbe10e..58ff05e00d 100755 --- a/Experimental/src/org/sleuthkit/autopsy/experimental/autoingest/DeleteOrphanCaseNodesTask.java +++ b/Experimental/src/org/sleuthkit/autopsy/experimental/autoingest/DeleteOrphanCaseNodesTask.java @@ -155,7 +155,7 @@ final class DeleteOrphanCaseNodesTask implements Runnable { return value; } - void setValue(boolean value) { + void isValue(boolean value) { this.value = value; } @@ -170,7 +170,6 @@ final class DeleteOrphanCaseNodesTask implements Runnable { */ private boolean promptUser(Collection orphanedNodes) { final PromptResult dialogResult = new PromptResult(); - ; try { SwingUtilities.invokeAndWait(() -> { DeleteOrphanCaseNodesDialog dialog = new DeleteOrphanCaseNodesDialog(orphanedNodes); From bd06d740140a2ef3119321c319a3933b1e542536 Mon Sep 17 00:00:00 2001 From: Greg DiCristofaro Date: Tue, 7 Apr 2020 14:02:24 -0400 Subject: [PATCH 048/137] fix typo --- .../experimental/autoingest/DeleteOrphanCaseNodesTask.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Experimental/src/org/sleuthkit/autopsy/experimental/autoingest/DeleteOrphanCaseNodesTask.java b/Experimental/src/org/sleuthkit/autopsy/experimental/autoingest/DeleteOrphanCaseNodesTask.java index 58ff05e00d..bc2371104d 100755 --- a/Experimental/src/org/sleuthkit/autopsy/experimental/autoingest/DeleteOrphanCaseNodesTask.java +++ b/Experimental/src/org/sleuthkit/autopsy/experimental/autoingest/DeleteOrphanCaseNodesTask.java @@ -151,11 +151,11 @@ final class DeleteOrphanCaseNodesTask implements Runnable { private boolean value = false; - boolean getValue() { + boolean isValue() { return value; } - void isValue(boolean value) { + void setValue(boolean value) { this.value = value; } @@ -177,7 +177,7 @@ final class DeleteOrphanCaseNodesTask implements Runnable { dialogResult.setValue(dialog.isOkSelected()); }); - return dialogResult.getValue(); + return dialogResult.isValue(); } catch (InterruptedException | InvocationTargetException e) { logger.log(Level.WARNING, "Task cancelled while confirmingg case znodes to delete"); //NON-NLS return false; From fa1b9ff93037947b43e8805e2351559e777639e9 Mon Sep 17 00:00:00 2001 From: Ethan Roseman Date: Tue, 7 Apr 2020 14:06:26 -0400 Subject: [PATCH 049/137] 6161: Making codacy happy --- Core/src/org/sleuthkit/autopsy/geolocation/MapPanel.java | 5 +++-- Core/src/org/sleuthkit/autopsy/geolocation/MapWaypoint.java | 3 ++- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/Core/src/org/sleuthkit/autopsy/geolocation/MapPanel.java b/Core/src/org/sleuthkit/autopsy/geolocation/MapPanel.java index f3ca41c0be..19ae2af47a 100755 --- a/Core/src/org/sleuthkit/autopsy/geolocation/MapPanel.java +++ b/Core/src/org/sleuthkit/autopsy/geolocation/MapPanel.java @@ -39,6 +39,7 @@ import java.util.Collection; import java.util.HashMap; import java.util.Iterator; import java.util.List; +import java.util.Map; import java.util.Set; import java.util.logging.Level; import java.util.prefs.PreferenceChangeEvent; @@ -688,7 +689,7 @@ final public class MapPanel extends javax.swing.JPanel { * Renderer for the map waypoints. */ private class MapWaypointRenderer implements WaypointRenderer { - private final HashMap imageCache = new HashMap<>(); + private final Map imageCache = new HashMap<>(); /** * @@ -720,7 +721,7 @@ final public class MapPanel extends javax.swing.JPanel { */ private Color getColor(MapWaypoint waypoint, MapWaypoint currentlySelectedWaypoint) { Color baseColor = waypoint.getColor(); - if (waypoint == currentlySelectedWaypoint) { + if (waypoint.equals(currentlySelectedWaypoint)) { // Highlight this waypoint since it is selected return blend(baseColor, Color.WHITE, 0.5f); } else { diff --git a/Core/src/org/sleuthkit/autopsy/geolocation/MapWaypoint.java b/Core/src/org/sleuthkit/autopsy/geolocation/MapWaypoint.java index f53f74af02..a7590eea11 100755 --- a/Core/src/org/sleuthkit/autopsy/geolocation/MapWaypoint.java +++ b/Core/src/org/sleuthkit/autopsy/geolocation/MapWaypoint.java @@ -28,6 +28,7 @@ import java.util.HashMap; import java.util.LinkedHashSet; import java.util.List; import java.util.Locale; +import java.util.Map; import java.util.Set; import java.util.logging.Level; import javax.swing.AbstractAction; @@ -67,7 +68,7 @@ final class MapWaypoint extends KdTree.XYZPoint implements org.jxmapviewer.viewe private final static String HTML_PROP_FORMAT = "%s: %s
    "; static private final SimpleDateFormat DATE_FORMAT = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ssX", Locale.US); - private static final HashMap artifactTypesToColors = new HashMap(); + private static final Map artifactTypesToColors = new HashMap(); static { artifactTypesToColors.put(BlackboardArtifact.ARTIFACT_TYPE.TSK_GPS_BOOKMARK.getTypeID(), Color.BLUE); From 5937c8a8366a03aed83fc9c6f5656a4ba382b539 Mon Sep 17 00:00:00 2001 From: Ethan Roseman Date: Tue, 7 Apr 2020 14:17:35 -0400 Subject: [PATCH 050/137] 6248: Fixed the geoloc zoom slider snap bug --- Core/src/org/sleuthkit/autopsy/geolocation/MapPanel.form | 4 +--- Core/src/org/sleuthkit/autopsy/geolocation/MapPanel.java | 6 ++---- 2 files changed, 3 insertions(+), 7 deletions(-) diff --git a/Core/src/org/sleuthkit/autopsy/geolocation/MapPanel.form b/Core/src/org/sleuthkit/autopsy/geolocation/MapPanel.form index e915904d42..31527a830c 100755 --- a/Core/src/org/sleuthkit/autopsy/geolocation/MapPanel.form +++ b/Core/src/org/sleuthkit/autopsy/geolocation/MapPanel.form @@ -56,10 +56,10 @@ + - @@ -87,7 +87,6 @@ - @@ -116,7 +115,6 @@ - diff --git a/Core/src/org/sleuthkit/autopsy/geolocation/MapPanel.java b/Core/src/org/sleuthkit/autopsy/geolocation/MapPanel.java index 0462e77842..eefa0d5aae 100755 --- a/Core/src/org/sleuthkit/autopsy/geolocation/MapPanel.java +++ b/Core/src/org/sleuthkit/autopsy/geolocation/MapPanel.java @@ -310,7 +310,7 @@ final public class MapPanel extends javax.swing.JPanel { void setZoom(int zoom) { zoomChanging = true; mapViewer.setZoom(zoom); - zoomSlider.setValue((zoomSlider.getMaximum() + zoomSlider.getMinimum()) - zoom); + zoomSlider.setValue(zoom); zoomChanging = false; } @@ -572,8 +572,8 @@ final public class MapPanel extends javax.swing.JPanel { zoomSlider.setOrientation(javax.swing.JSlider.VERTICAL); zoomSlider.setPaintTicks(true); zoomSlider.setSnapToTicks(true); + zoomSlider.setInverted(true); zoomSlider.setMinimumSize(new java.awt.Dimension(35, 100)); - zoomSlider.setOpaque(false); zoomSlider.setPreferredSize(new java.awt.Dimension(35, 190)); zoomSlider.addChangeListener(new javax.swing.event.ChangeListener() { public void stateChanged(javax.swing.event.ChangeEvent evt) { @@ -591,7 +591,6 @@ final public class MapPanel extends javax.swing.JPanel { zoomInBtn.setBorderPainted(false); zoomInBtn.setFocusPainted(false); zoomInBtn.setRequestFocusEnabled(false); - zoomInBtn.setRolloverEnabled(false); zoomInBtn.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { zoomInBtnActionPerformed(evt); @@ -608,7 +607,6 @@ final public class MapPanel extends javax.swing.JPanel { zoomOutBtn.setBorderPainted(false); zoomOutBtn.setFocusPainted(false); zoomOutBtn.setRequestFocusEnabled(false); - zoomOutBtn.setRolloverEnabled(false); zoomOutBtn.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { zoomOutBtnActionPerformed(evt); From 9842156733379fa1d944d0b1094dc3ff70a60a6a Mon Sep 17 00:00:00 2001 From: "U-BASIS\\dsmyda" Date: Tue, 7 Apr 2020 14:21:01 -0400 Subject: [PATCH 051/137] Addressed review feedback --- .../datamodel/CorrelationAttributeUtil.java | 74 ++++++++++--------- .../eventlisteners/IngestEventsListener.java | 2 +- 2 files changed, 42 insertions(+), 34 deletions(-) diff --git a/Core/src/org/sleuthkit/autopsy/centralrepository/datamodel/CorrelationAttributeUtil.java b/Core/src/org/sleuthkit/autopsy/centralrepository/datamodel/CorrelationAttributeUtil.java index 15c796f858..f1d68b7db1 100644 --- a/Core/src/org/sleuthkit/autopsy/centralrepository/datamodel/CorrelationAttributeUtil.java +++ b/Core/src/org/sleuthkit/autopsy/centralrepository/datamodel/CorrelationAttributeUtil.java @@ -66,6 +66,9 @@ public class CorrelationAttributeUtil { // Most notably, does not include KEYWORD HIT, CALLLOGS, MESSAGES, CONTACTS // TSK_INTERESTING_ARTIFACT_HIT (See JIRA-6129 for more details on the // interesting artifact hit). + + // IMPORTANT: This set should be updated for new artifacts types that need to + // be inserted into the CR. private static final Set SOURCE_TYPES_FOR_CR_INSERT = new HashSet() {{ add(ARTIFACT_TYPE.TSK_WEB_BOOKMARK.getTypeID()); add(ARTIFACT_TYPE.TSK_WEB_COOKIE.getTypeID()); @@ -114,6 +117,8 @@ public class CorrelationAttributeUtil { * have correlatable data != An artifact that should be the source of data * in the CR, so results may be too lenient. * + * IMPORTANT: The correlation attribute instances are NOT added to the + * central repository by this method. * * TODO (Jira-6088): The methods in this low-level, utility class should * throw exceptions instead of logging them. The reason for this is that the @@ -176,7 +181,7 @@ public class CorrelationAttributeUtil { } else if (artifactTypeID == ARTIFACT_TYPE.TSK_CONTACT.getTypeID() || artifactTypeID == ARTIFACT_TYPE.TSK_CALLLOG.getTypeID() || artifactTypeID == ARTIFACT_TYPE.TSK_MESSAGE.getTypeID()) { - makeCorrAttrFromArtifactPhoneAttr(correlationAttrs, sourceArtifact); + makeCorrAttrsFromCommunicationArtifacts(correlationAttrs, sourceArtifact); } } } catch (CentralRepoException ex) { @@ -193,46 +198,49 @@ public class CorrelationAttributeUtil { } /** - * Makes a correlation attribute instance from a phone number attribute of an - * artifact. + * Makes correlation attribute instances from phone or email attributes + * found on communication-type artifacts. * - * @param artifact An artifact with a phone number attribute. - * - * @return The correlation instance artifact or null, if the phone number is - * not a valid correlation attribute. + * @param artifact A communication-type artifact * * @throws TskCoreException If there is an error querying the case * database. * @throws CentralRepoException If there is an error querying the central * repository. */ - private static void makeCorrAttrFromArtifactPhoneAttr(List corrAttrInstances, BlackboardArtifact artifact) throws TskCoreException, CentralRepoException { - CorrelationAttributeInstance corrAttr = null; - - /* - * Extract the phone number from the artifact attribute. - */ - String value = null; - if (null != artifact.getAttribute(new BlackboardAttribute.Type(BlackboardAttribute.ATTRIBUTE_TYPE.TSK_PHONE_NUMBER))) { - value = artifact.getAttribute(new BlackboardAttribute.Type(BlackboardAttribute.ATTRIBUTE_TYPE.TSK_PHONE_NUMBER)).getValueString(); - } else if (null != artifact.getAttribute(new BlackboardAttribute.Type(BlackboardAttribute.ATTRIBUTE_TYPE.TSK_PHONE_NUMBER_FROM))) { - value = artifact.getAttribute(new BlackboardAttribute.Type(BlackboardAttribute.ATTRIBUTE_TYPE.TSK_PHONE_NUMBER_FROM)).getValueString(); - } else if (null != artifact.getAttribute(new BlackboardAttribute.Type(BlackboardAttribute.ATTRIBUTE_TYPE.TSK_PHONE_NUMBER_TO))) { - value = artifact.getAttribute(new BlackboardAttribute.Type(BlackboardAttribute.ATTRIBUTE_TYPE.TSK_PHONE_NUMBER_TO)).getValueString(); - } - - /* - * Normalize the phone number. - */ - if (value != null) { - try { - value = CommunicationsUtils.normalizePhoneNum(value); - corrAttr = makeCorrAttr(artifact, CentralRepository.getInstance().getCorrelationTypeById(CorrelationAttributeInstance.PHONE_TYPE_ID), value); - if(corrAttr != null) { - corrAttrInstances.add(corrAttr); + private static void makeCorrAttrsFromCommunicationArtifacts(List corrAttrInstances, BlackboardArtifact artifact) throws TskCoreException, CentralRepoException { + for(BlackboardAttribute attribute : artifact.getAttributes()) { + BlackboardAttribute.Type attributeType = attribute.getAttributeType(); + if(attributeType.equals(new BlackboardAttribute.Type(BlackboardAttribute.ATTRIBUTE_TYPE.TSK_PHONE_NUMBER)) + || attributeType.equals(new BlackboardAttribute.Type(BlackboardAttribute.ATTRIBUTE_TYPE.TSK_PHONE_NUMBER_TO)) + || attributeType.equals(new BlackboardAttribute.Type(BlackboardAttribute.ATTRIBUTE_TYPE.TSK_PHONE_NUMBER_FROM)) + || attributeType.equals(new BlackboardAttribute.Type(BlackboardAttribute.ATTRIBUTE_TYPE.TSK_PHONE_NUMBER_HOME)) + || attributeType.equals(new BlackboardAttribute.Type(BlackboardAttribute.ATTRIBUTE_TYPE.TSK_PHONE_NUMBER_OFFICE)) + || attributeType.equals(new BlackboardAttribute.Type(BlackboardAttribute.ATTRIBUTE_TYPE.TSK_PHONE_NUMBER_MOBILE))) { + String phoneNumber = attribute.getValueString(); + if(CommunicationsUtils.isValidPhoneNumber(phoneNumber)) { + String phoneNumberNorm = CommunicationsUtils.normalizePhoneNum(phoneNumber); + CorrelationAttributeInstance corrAttr = makeCorrAttr(artifact, CentralRepository.getInstance().getCorrelationTypeById(CorrelationAttributeInstance.PHONE_TYPE_ID), phoneNumberNorm); + if(corrAttr != null) { + corrAttrInstances.add(corrAttr); + } + } + } else if (attributeType.equals(new BlackboardAttribute.Type(BlackboardAttribute.ATTRIBUTE_TYPE.TSK_EMAIL)) + || attributeType.equals(new BlackboardAttribute.Type(BlackboardAttribute.ATTRIBUTE_TYPE.TSK_EMAIL_FROM)) + || attributeType.equals(new BlackboardAttribute.Type(BlackboardAttribute.ATTRIBUTE_TYPE.TSK_EMAIL_TO)) + || attributeType.equals(new BlackboardAttribute.Type(BlackboardAttribute.ATTRIBUTE_TYPE.TSK_EMAIL_HOME)) + || attributeType.equals(new BlackboardAttribute.Type(BlackboardAttribute.ATTRIBUTE_TYPE.TSK_EMAIL_OFFICE)) + || attributeType.equals(new BlackboardAttribute.Type(BlackboardAttribute.ATTRIBUTE_TYPE.TSK_EMAIL_REPLYTO)) + || attributeType.equals(new BlackboardAttribute.Type(BlackboardAttribute.ATTRIBUTE_TYPE.TSK_EMAIL_BCC)) + || attributeType.equals(new BlackboardAttribute.Type(BlackboardAttribute.ATTRIBUTE_TYPE.TSK_EMAIL_CC))) { + String emailAddress = attribute.getValueString(); + if(CommunicationsUtils.isValidEmailAddress(emailAddress)) { + String emailAddressNorm = CommunicationsUtils.normalizeEmailAddress(emailAddress); + CorrelationAttributeInstance corrAttr = makeCorrAttr(artifact, CentralRepository.getInstance().getCorrelationTypeById(CorrelationAttributeInstance.EMAIL_TYPE_ID), emailAddressNorm); + if(corrAttr != null) { + corrAttrInstances.add(corrAttr); + } } - } catch(TskCoreException ex) { - logger.log(Level.INFO, String.format("Phone number found in artifact %d did not pass validation.", artifact.getId())); } } } diff --git a/Core/src/org/sleuthkit/autopsy/centralrepository/eventlisteners/IngestEventsListener.java b/Core/src/org/sleuthkit/autopsy/centralrepository/eventlisteners/IngestEventsListener.java index bf347de026..843e476499 100644 --- a/Core/src/org/sleuthkit/autopsy/centralrepository/eventlisteners/IngestEventsListener.java +++ b/Core/src/org/sleuthkit/autopsy/centralrepository/eventlisteners/IngestEventsListener.java @@ -455,7 +455,7 @@ public class IngestEventsListener { List eamArtifacts = new ArrayList<>(); for (BlackboardArtifact bbArtifact : bbArtifacts) { - // makeCorrAttrToSave will filter out artifacts which should not be soruces of CR data. + // makeCorrAttrToSave will filter out artifacts which should not be sources of CR data. List convertedArtifacts = CorrelationAttributeUtil.makeCorrAttrsToSave(bbArtifact); for (CorrelationAttributeInstance eamArtifact : convertedArtifacts) { try { From 290a0fccea9f41a4d0900f24321ecc1ffec56f52 Mon Sep 17 00:00:00 2001 From: Ethan Roseman Date: Tue, 7 Apr 2020 14:26:03 -0400 Subject: [PATCH 052/137] 6249: Swapped toolbar button positions --- Core/src/org/sleuthkit/autopsy/casemodule/CaseCloseAction.java | 2 +- .../autopsy/report/infrastructure/ReportWizardAction.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Core/src/org/sleuthkit/autopsy/casemodule/CaseCloseAction.java b/Core/src/org/sleuthkit/autopsy/casemodule/CaseCloseAction.java index 3d610890da..a64809a07d 100644 --- a/Core/src/org/sleuthkit/autopsy/casemodule/CaseCloseAction.java +++ b/Core/src/org/sleuthkit/autopsy/casemodule/CaseCloseAction.java @@ -50,7 +50,7 @@ import org.sleuthkit.autopsy.coreutils.MessageNotifyUtil; @ActionID(category = "Tools", id = "org.sleuthkit.autopsy.casemodule.CaseCloseAction") @ActionRegistration(displayName = "#CTL_CaseCloseAct", lazy = false) @ActionReferences(value = { - @ActionReference(path = "Toolbars/Case", position = 106)}) + @ActionReference(path = "Toolbars/Case", position = 107)}) public final class CaseCloseAction extends CallableSystemAction implements Presenter.Toolbar { private static final long serialVersionUID = 1L; diff --git a/Core/src/org/sleuthkit/autopsy/report/infrastructure/ReportWizardAction.java b/Core/src/org/sleuthkit/autopsy/report/infrastructure/ReportWizardAction.java index 5b3d661665..236263200a 100644 --- a/Core/src/org/sleuthkit/autopsy/report/infrastructure/ReportWizardAction.java +++ b/Core/src/org/sleuthkit/autopsy/report/infrastructure/ReportWizardAction.java @@ -59,7 +59,7 @@ import org.sleuthkit.autopsy.report.ReportModule; @ActionReferences(value = { @ActionReference(path = "Menu/Tools", position = 301, separatorAfter = 399) , - @ActionReference(path = "Toolbars/Case", position = 107)}) + @ActionReference(path = "Toolbars/Case", position = 106)}) public final class ReportWizardAction extends CallableSystemAction implements Presenter.Toolbar, ActionListener { private static final Logger logger = Logger.getLogger(ReportWizardAction.class.getName()); From 87e3ba759c8a16e0b5c567c77a6013a7d481d4d8 Mon Sep 17 00:00:00 2001 From: Eugene Livis Date: Tue, 7 Apr 2020 14:36:40 -0400 Subject: [PATCH 053/137] Setting MIME type before indexing test file --- .../configuration/MultiUserTestTool.java | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/Experimental/src/org/sleuthkit/autopsy/experimental/configuration/MultiUserTestTool.java b/Experimental/src/org/sleuthkit/autopsy/experimental/configuration/MultiUserTestTool.java index 8504bfd7c0..8148c23faa 100755 --- a/Experimental/src/org/sleuthkit/autopsy/experimental/configuration/MultiUserTestTool.java +++ b/Experimental/src/org/sleuthkit/autopsy/experimental/configuration/MultiUserTestTool.java @@ -57,6 +57,8 @@ import org.sleuthkit.autopsy.ingest.IngestJobStartResult; import org.sleuthkit.autopsy.ingest.IngestManager; import org.sleuthkit.autopsy.ingest.IngestModuleError; import org.sleuthkit.autopsy.keywordsearchservice.KeywordSearchService; +import org.sleuthkit.autopsy.modules.filetypeid.FileTypeDetector; +import org.sleuthkit.autopsy.textextractors.TextExtractor; import org.sleuthkit.datamodel.AbstractFile; /** @@ -83,6 +85,7 @@ class MultiUserTestTool { "MultiUserTestTool.unableCreatFile=Unable to create a file in case output directory", "MultiUserTestTool.unableAddFileAsDataSource=Unable to add test file as data source to case", "MultiUserTestTool.unableToReadTestFileFromDatabase=Unable to read test file info from case database", + "MultiUserTestTool.unableToInitializeFilTypeDetector=Unable to initialize File Type Detector", "MultiUserTestTool.unableToUpdateKWSIndex=Unable to write to Keyword Search index", "MultiUserTestTool.unableToRunIngest=Unable to run ingest on test data source", "MultiUserTestTool.unexpectedError=Unexpected error while performing Multi User test", @@ -187,6 +190,16 @@ class MultiUserTestTool { } AbstractFile file = listOfFiles.get(0); + + // Set MIME type of the test file (required to test indexing) + FileTypeDetector fileTypeDetector = null; + try { + fileTypeDetector = new FileTypeDetector(); + } catch (FileTypeDetector.FileTypeDetectorInitException ex) { + return Bundle.MultiUserTestTool_unableToInitializeFilTypeDetector() + ". " + ex.getMessage(); + } + String mimeType = fileTypeDetector.getMIMEType(file); + file.setMIMEType(mimeType); // write to KWS index KeywordSearchService kwsService = Lookup.getDefault().lookup(KeywordSearchService.class); From e853e3aab9a699dfe3ffd1935ce9936f39caadfa Mon Sep 17 00:00:00 2001 From: Eugene Livis Date: Tue, 7 Apr 2020 14:48:45 -0400 Subject: [PATCH 054/137] Setting MIME type before indexing test file --- .../autopsy/experimental/configuration/MultiUserTestTool.java | 1 - 1 file changed, 1 deletion(-) diff --git a/Experimental/src/org/sleuthkit/autopsy/experimental/configuration/MultiUserTestTool.java b/Experimental/src/org/sleuthkit/autopsy/experimental/configuration/MultiUserTestTool.java index 8148c23faa..c622d452b5 100755 --- a/Experimental/src/org/sleuthkit/autopsy/experimental/configuration/MultiUserTestTool.java +++ b/Experimental/src/org/sleuthkit/autopsy/experimental/configuration/MultiUserTestTool.java @@ -58,7 +58,6 @@ import org.sleuthkit.autopsy.ingest.IngestManager; import org.sleuthkit.autopsy.ingest.IngestModuleError; import org.sleuthkit.autopsy.keywordsearchservice.KeywordSearchService; import org.sleuthkit.autopsy.modules.filetypeid.FileTypeDetector; -import org.sleuthkit.autopsy.textextractors.TextExtractor; import org.sleuthkit.datamodel.AbstractFile; /** From cbc8da324f8ce750675042a10a44e629ba5e759e Mon Sep 17 00:00:00 2001 From: Ethan Roseman Date: Tue, 7 Apr 2020 15:37:48 -0400 Subject: [PATCH 055/137] 6161 Restoring form --- Core/src/org/sleuthkit/autopsy/geolocation/MapPanel.form | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/Core/src/org/sleuthkit/autopsy/geolocation/MapPanel.form b/Core/src/org/sleuthkit/autopsy/geolocation/MapPanel.form index 6a4ab801cd..3ea3acf6dd 100755 --- a/Core/src/org/sleuthkit/autopsy/geolocation/MapPanel.form +++ b/Core/src/org/sleuthkit/autopsy/geolocation/MapPanel.form @@ -59,6 +59,9 @@ + + + @@ -86,6 +89,9 @@ + + + @@ -114,6 +120,9 @@ + + + From 0a5e98aa30f7bcfaf014ea97b6309931575b0bd3 Mon Sep 17 00:00:00 2001 From: Ethan Roseman Date: Tue, 7 Apr 2020 15:38:57 -0400 Subject: [PATCH 056/137] 6248: Restoring ui settings --- Core/src/org/sleuthkit/autopsy/geolocation/MapPanel.form | 9 +++++++++ Core/src/org/sleuthkit/autopsy/geolocation/MapPanel.java | 3 +++ 2 files changed, 12 insertions(+) diff --git a/Core/src/org/sleuthkit/autopsy/geolocation/MapPanel.form b/Core/src/org/sleuthkit/autopsy/geolocation/MapPanel.form index 31527a830c..1287c964c1 100755 --- a/Core/src/org/sleuthkit/autopsy/geolocation/MapPanel.form +++ b/Core/src/org/sleuthkit/autopsy/geolocation/MapPanel.form @@ -60,6 +60,9 @@ + + + @@ -87,6 +90,9 @@ + + + @@ -115,6 +121,9 @@ + + + diff --git a/Core/src/org/sleuthkit/autopsy/geolocation/MapPanel.java b/Core/src/org/sleuthkit/autopsy/geolocation/MapPanel.java index eefa0d5aae..00ef520934 100755 --- a/Core/src/org/sleuthkit/autopsy/geolocation/MapPanel.java +++ b/Core/src/org/sleuthkit/autopsy/geolocation/MapPanel.java @@ -574,6 +574,7 @@ final public class MapPanel extends javax.swing.JPanel { zoomSlider.setSnapToTicks(true); zoomSlider.setInverted(true); zoomSlider.setMinimumSize(new java.awt.Dimension(35, 100)); + zoomSlider.setOpaque(false); zoomSlider.setPreferredSize(new java.awt.Dimension(35, 190)); zoomSlider.addChangeListener(new javax.swing.event.ChangeListener() { public void stateChanged(javax.swing.event.ChangeEvent evt) { @@ -591,6 +592,7 @@ final public class MapPanel extends javax.swing.JPanel { zoomInBtn.setBorderPainted(false); zoomInBtn.setFocusPainted(false); zoomInBtn.setRequestFocusEnabled(false); + zoomInBtn.setRolloverEnabled(false); zoomInBtn.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { zoomInBtnActionPerformed(evt); @@ -607,6 +609,7 @@ final public class MapPanel extends javax.swing.JPanel { zoomOutBtn.setBorderPainted(false); zoomOutBtn.setFocusPainted(false); zoomOutBtn.setRequestFocusEnabled(false); + zoomOutBtn.setRolloverEnabled(false); zoomOutBtn.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { zoomOutBtnActionPerformed(evt); From 76d7292ea2cf9272254f8be236b0ed873398f52a Mon Sep 17 00:00:00 2001 From: Greg DiCristofaro Date: Tue, 7 Apr 2020 16:13:02 -0400 Subject: [PATCH 057/137] initial implementation --- .../textextractors/TextFileExtractor.java | 27 ++++++++++++++++++- 1 file changed, 26 insertions(+), 1 deletion(-) diff --git a/Core/src/org/sleuthkit/autopsy/textextractors/TextFileExtractor.java b/Core/src/org/sleuthkit/autopsy/textextractors/TextFileExtractor.java index 4a89b74d3c..710a7d3508 100644 --- a/Core/src/org/sleuthkit/autopsy/textextractors/TextFileExtractor.java +++ b/Core/src/org/sleuthkit/autopsy/textextractors/TextFileExtractor.java @@ -25,8 +25,10 @@ import java.io.Reader; import java.nio.charset.Charset; import java.nio.charset.StandardCharsets; import java.util.logging.Level; +import org.apache.commons.lang.StringUtils; import org.sleuthkit.autopsy.coreutils.Logger; import org.sleuthkit.autopsy.coreutils.textutils.EncodingUtils; +import org.sleuthkit.autopsy.modules.filetypeid.FileTypeDetector; import org.sleuthkit.datamodel.AbstractFile; import org.sleuthkit.datamodel.ReadContentInputStream; import org.sleuthkit.datamodel.TskCoreException; @@ -38,6 +40,7 @@ public final class TextFileExtractor implements TextExtractor { private static final Logger logger = Logger.getLogger(TextFileExtractor.class.getName()); private final AbstractFile file; + private static final String PLAIN_TEXT_MIME_TYPE = "text/plain"; private Charset encoding = null; @@ -74,6 +77,28 @@ public final class TextFileExtractor implements TextExtractor { @Override public boolean isSupported() { - return file.getMIMEType().equals("text/plain"); + // if file is null, it is not supported + if (file == null) + return false; + + // get the MIME type + String mimeType = file.getMIMEType(); + + // if it is not present, attempt to use the FileTypeDetector to determine + if (StringUtils.isEmpty(mimeType)) { + FileTypeDetector fileTypeDetector = null; + try { + fileTypeDetector = new FileTypeDetector(); + } catch (FileTypeDetector.FileTypeDetectorInitException ex) { + logger.log(Level.WARNING, "Unable to create file type detector for determining MIME type."); + } + mimeType = fileTypeDetector.getMIMEType(file); + + // if able to determine mime type, + if (!StringUtils.isEmpty(mimeType)) + file.setMIMEType(mimeType); + } + + return (StringUtils.isEmpty(mimeType)) ? false : mimeType.equals(PLAIN_TEXT_MIME_TYPE); } } From 3c47c8b5f69448f29f231b7370358c90e9eb0069 Mon Sep 17 00:00:00 2001 From: Greg DiCristofaro Date: Tue, 7 Apr 2020 16:13:20 -0400 Subject: [PATCH 058/137] initial implementation --- .../textextractors/TextFileExtractorTest.java | 23 +++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 Core/test/unit/src/org/sleuthkit/autopsy/textextractors/TextFileExtractorTest.java diff --git a/Core/test/unit/src/org/sleuthkit/autopsy/textextractors/TextFileExtractorTest.java b/Core/test/unit/src/org/sleuthkit/autopsy/textextractors/TextFileExtractorTest.java new file mode 100644 index 0000000000..9f9dc8493c --- /dev/null +++ b/Core/test/unit/src/org/sleuthkit/autopsy/textextractors/TextFileExtractorTest.java @@ -0,0 +1,23 @@ +/* + * To change this license header, choose License Headers in Project Properties. + * To change this template file, choose Tools | Templates + * and open the template in the editor. + */ +package org.sleuthkit.autopsy.textextractors; + +import junit.framework.Assert; +import org.junit.Test; + + +/** + * Tests methods present in the TextFileExtractor + */ +public class TextFileExtractorTest { + + @Test + public void testIsSupported() { + Assert.assertFalse(new TextFileExtractor(null).isSupported()); + } + + +} From 5c3443cdec5066b2dc57d5a09348570ebc8cf01f Mon Sep 17 00:00:00 2001 From: Ethan Roseman Date: Tue, 7 Apr 2020 16:30:38 -0400 Subject: [PATCH 059/137] 6161 Restored form, boosted selection brightness for now --- .../org/sleuthkit/autopsy/geolocation/MapPanel.form | 12 +++--------- .../org/sleuthkit/autopsy/geolocation/MapPanel.java | 2 +- 2 files changed, 4 insertions(+), 10 deletions(-) mode change 100755 => 100644 Core/src/org/sleuthkit/autopsy/geolocation/MapPanel.form diff --git a/Core/src/org/sleuthkit/autopsy/geolocation/MapPanel.form b/Core/src/org/sleuthkit/autopsy/geolocation/MapPanel.form old mode 100755 new mode 100644 index 3ea3acf6dd..e915904d42 --- a/Core/src/org/sleuthkit/autopsy/geolocation/MapPanel.form +++ b/Core/src/org/sleuthkit/autopsy/geolocation/MapPanel.form @@ -59,9 +59,7 @@ - - - + @@ -89,9 +87,7 @@ - - - + @@ -120,9 +116,7 @@ - - - + diff --git a/Core/src/org/sleuthkit/autopsy/geolocation/MapPanel.java b/Core/src/org/sleuthkit/autopsy/geolocation/MapPanel.java index 19ae2af47a..de16a04623 100755 --- a/Core/src/org/sleuthkit/autopsy/geolocation/MapPanel.java +++ b/Core/src/org/sleuthkit/autopsy/geolocation/MapPanel.java @@ -723,7 +723,7 @@ final public class MapPanel extends javax.swing.JPanel { Color baseColor = waypoint.getColor(); if (waypoint.equals(currentlySelectedWaypoint)) { // Highlight this waypoint since it is selected - return blend(baseColor, Color.WHITE, 0.5f); + return blend(baseColor, Color.WHITE, 0.8f); } else { return baseColor; } From b9660f974784881f3e15924e927eb88f09250135 Mon Sep 17 00:00:00 2001 From: "U-BASIS\\dsmyda" Date: Tue, 7 Apr 2020 16:50:18 -0400 Subject: [PATCH 060/137] Reverted attribute util changes --- .../datamodel/CorrelationAttributeUtil.java | 63 +++++++++---------- 1 file changed, 29 insertions(+), 34 deletions(-) mode change 100644 => 100755 Core/src/org/sleuthkit/autopsy/centralrepository/datamodel/CorrelationAttributeUtil.java diff --git a/Core/src/org/sleuthkit/autopsy/centralrepository/datamodel/CorrelationAttributeUtil.java b/Core/src/org/sleuthkit/autopsy/centralrepository/datamodel/CorrelationAttributeUtil.java old mode 100644 new mode 100755 index f1d68b7db1..ee49b19c61 --- a/Core/src/org/sleuthkit/autopsy/centralrepository/datamodel/CorrelationAttributeUtil.java +++ b/Core/src/org/sleuthkit/autopsy/centralrepository/datamodel/CorrelationAttributeUtil.java @@ -198,10 +198,13 @@ public class CorrelationAttributeUtil { } /** - * Makes correlation attribute instances from phone or email attributes - * found on communication-type artifacts. + * Makes a correlation attribute instance from a phone number attribute of an + * artifact. * - * @param artifact A communication-type artifact + * @param artifact An artifact with a phone number attribute. + * + * @return The correlation instance artifact or null, if the phone number is + * not a valid correlation attribute. * * @throws TskCoreException If there is an error querying the case * database. @@ -209,37 +212,29 @@ public class CorrelationAttributeUtil { * repository. */ private static void makeCorrAttrsFromCommunicationArtifacts(List corrAttrInstances, BlackboardArtifact artifact) throws TskCoreException, CentralRepoException { - for(BlackboardAttribute attribute : artifact.getAttributes()) { - BlackboardAttribute.Type attributeType = attribute.getAttributeType(); - if(attributeType.equals(new BlackboardAttribute.Type(BlackboardAttribute.ATTRIBUTE_TYPE.TSK_PHONE_NUMBER)) - || attributeType.equals(new BlackboardAttribute.Type(BlackboardAttribute.ATTRIBUTE_TYPE.TSK_PHONE_NUMBER_TO)) - || attributeType.equals(new BlackboardAttribute.Type(BlackboardAttribute.ATTRIBUTE_TYPE.TSK_PHONE_NUMBER_FROM)) - || attributeType.equals(new BlackboardAttribute.Type(BlackboardAttribute.ATTRIBUTE_TYPE.TSK_PHONE_NUMBER_HOME)) - || attributeType.equals(new BlackboardAttribute.Type(BlackboardAttribute.ATTRIBUTE_TYPE.TSK_PHONE_NUMBER_OFFICE)) - || attributeType.equals(new BlackboardAttribute.Type(BlackboardAttribute.ATTRIBUTE_TYPE.TSK_PHONE_NUMBER_MOBILE))) { - String phoneNumber = attribute.getValueString(); - if(CommunicationsUtils.isValidPhoneNumber(phoneNumber)) { - String phoneNumberNorm = CommunicationsUtils.normalizePhoneNum(phoneNumber); - CorrelationAttributeInstance corrAttr = makeCorrAttr(artifact, CentralRepository.getInstance().getCorrelationTypeById(CorrelationAttributeInstance.PHONE_TYPE_ID), phoneNumberNorm); - if(corrAttr != null) { - corrAttrInstances.add(corrAttr); - } - } - } else if (attributeType.equals(new BlackboardAttribute.Type(BlackboardAttribute.ATTRIBUTE_TYPE.TSK_EMAIL)) - || attributeType.equals(new BlackboardAttribute.Type(BlackboardAttribute.ATTRIBUTE_TYPE.TSK_EMAIL_FROM)) - || attributeType.equals(new BlackboardAttribute.Type(BlackboardAttribute.ATTRIBUTE_TYPE.TSK_EMAIL_TO)) - || attributeType.equals(new BlackboardAttribute.Type(BlackboardAttribute.ATTRIBUTE_TYPE.TSK_EMAIL_HOME)) - || attributeType.equals(new BlackboardAttribute.Type(BlackboardAttribute.ATTRIBUTE_TYPE.TSK_EMAIL_OFFICE)) - || attributeType.equals(new BlackboardAttribute.Type(BlackboardAttribute.ATTRIBUTE_TYPE.TSK_EMAIL_REPLYTO)) - || attributeType.equals(new BlackboardAttribute.Type(BlackboardAttribute.ATTRIBUTE_TYPE.TSK_EMAIL_BCC)) - || attributeType.equals(new BlackboardAttribute.Type(BlackboardAttribute.ATTRIBUTE_TYPE.TSK_EMAIL_CC))) { - String emailAddress = attribute.getValueString(); - if(CommunicationsUtils.isValidEmailAddress(emailAddress)) { - String emailAddressNorm = CommunicationsUtils.normalizeEmailAddress(emailAddress); - CorrelationAttributeInstance corrAttr = makeCorrAttr(artifact, CentralRepository.getInstance().getCorrelationTypeById(CorrelationAttributeInstance.EMAIL_TYPE_ID), emailAddressNorm); - if(corrAttr != null) { - corrAttrInstances.add(corrAttr); - } + CorrelationAttributeInstance corrAttr = null; + + /* + * Extract the phone number from the artifact attribute. + */ + String value = null; + if (null != artifact.getAttribute(new BlackboardAttribute.Type(BlackboardAttribute.ATTRIBUTE_TYPE.TSK_PHONE_NUMBER))) { + value = artifact.getAttribute(new BlackboardAttribute.Type(BlackboardAttribute.ATTRIBUTE_TYPE.TSK_PHONE_NUMBER)).getValueString(); + } else if (null != artifact.getAttribute(new BlackboardAttribute.Type(BlackboardAttribute.ATTRIBUTE_TYPE.TSK_PHONE_NUMBER_FROM))) { + value = artifact.getAttribute(new BlackboardAttribute.Type(BlackboardAttribute.ATTRIBUTE_TYPE.TSK_PHONE_NUMBER_FROM)).getValueString(); + } else if (null != artifact.getAttribute(new BlackboardAttribute.Type(BlackboardAttribute.ATTRIBUTE_TYPE.TSK_PHONE_NUMBER_TO))) { + value = artifact.getAttribute(new BlackboardAttribute.Type(BlackboardAttribute.ATTRIBUTE_TYPE.TSK_PHONE_NUMBER_TO)).getValueString(); + } + + /* + * Normalize the phone number. + */ + if (value != null) { + if(CommunicationsUtils.isValidPhoneNumber(value)) { + value = CommunicationsUtils.normalizePhoneNum(value); + corrAttr = makeCorrAttr(artifact, CentralRepository.getInstance().getCorrelationTypeById(CorrelationAttributeInstance.PHONE_TYPE_ID), value); + if(corrAttr != null) { + corrAttrInstances.add(corrAttr); } } } From 6ef470b2aefe276225841f8c55824f7da2b3a1c3 Mon Sep 17 00:00:00 2001 From: Ethan Roseman Date: Tue, 7 Apr 2020 17:10:39 -0400 Subject: [PATCH 061/137] 6161: Addressing PR comments --- Core/src/org/sleuthkit/autopsy/geolocation/MapPanel.form | 0 Core/src/org/sleuthkit/autopsy/geolocation/MapWaypoint.java | 3 ++- 2 files changed, 2 insertions(+), 1 deletion(-) mode change 100644 => 100755 Core/src/org/sleuthkit/autopsy/geolocation/MapPanel.form diff --git a/Core/src/org/sleuthkit/autopsy/geolocation/MapPanel.form b/Core/src/org/sleuthkit/autopsy/geolocation/MapPanel.form old mode 100644 new mode 100755 diff --git a/Core/src/org/sleuthkit/autopsy/geolocation/MapWaypoint.java b/Core/src/org/sleuthkit/autopsy/geolocation/MapWaypoint.java index a7590eea11..ecde4250fb 100755 --- a/Core/src/org/sleuthkit/autopsy/geolocation/MapWaypoint.java +++ b/Core/src/org/sleuthkit/autopsy/geolocation/MapWaypoint.java @@ -68,8 +68,9 @@ final class MapWaypoint extends KdTree.XYZPoint implements org.jxmapviewer.viewe private final static String HTML_PROP_FORMAT = "%s: %s
    "; static private final SimpleDateFormat DATE_FORMAT = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ssX", Locale.US); - private static final Map artifactTypesToColors = new HashMap(); + private static final Map artifactTypesToColors = new HashMap<>(); + @SuppressWarnings("deprecation") static { artifactTypesToColors.put(BlackboardArtifact.ARTIFACT_TYPE.TSK_GPS_BOOKMARK.getTypeID(), Color.BLUE); artifactTypesToColors.put(BlackboardArtifact.ARTIFACT_TYPE.TSK_GPS_LAST_KNOWN_LOCATION.getTypeID(), Color.RED); From 0335b5a84410bf742daf38dd590a4c89e1d2da6f Mon Sep 17 00:00:00 2001 From: Ethan Roseman Date: Tue, 7 Apr 2020 17:11:59 -0400 Subject: [PATCH 062/137] 6161: Formatted files --- .../autopsy/geolocation/MapPanel.java | 21 +++++++++++-------- .../autopsy/geolocation/MapWaypoint.java | 20 ++++++++++-------- 2 files changed, 23 insertions(+), 18 deletions(-) diff --git a/Core/src/org/sleuthkit/autopsy/geolocation/MapPanel.java b/Core/src/org/sleuthkit/autopsy/geolocation/MapPanel.java index de16a04623..b2b8589583 100755 --- a/Core/src/org/sleuthkit/autopsy/geolocation/MapPanel.java +++ b/Core/src/org/sleuthkit/autopsy/geolocation/MapPanel.java @@ -362,7 +362,7 @@ final public class MapPanel extends javax.swing.JPanel { * Show the popup menu for the given waypoint and location. * * @param waypoint Selected waypoint - * @param point Current mouse click location + * @param point Current mouse click location */ private void showPopupMenu(MapWaypoint waypoint, Point point) throws TskCoreException { if (waypoint == null) { @@ -441,7 +441,7 @@ final public class MapPanel extends javax.swing.JPanel { * @param clickPoint The mouse click point * * @return A waypoint that is within 10 pixels of the given point, or null - * if none was found. + * if none was found. */ private List findClosestWaypoint(Point clickPoint) { if (waypointTree == null) { @@ -689,6 +689,7 @@ final public class MapPanel extends javax.swing.JPanel { * Renderer for the map waypoints. */ private class MapWaypointRenderer implements WaypointRenderer { + private final Map imageCache = new HashMap<>(); /** @@ -710,13 +711,14 @@ final public class MapPanel extends javax.swing.JPanel { afResult[1] = fromC[1] * inverse + toC[1] * amount; afResult[2] = fromC[2] * inverse + toC[2] * amount; - return new Color (afResult[0], afResult[1], afResult[2]); + return new Color(afResult[0], afResult[1], afResult[2]); } /** - * + * * @param waypoint the waypoint for which to get the color - * @param currentlySelectedWaypoint the waypoint that is currently selected + * @param currentlySelectedWaypoint the waypoint that is currently + * selected * @return the color that this waypoint should be rendered */ private Color getColor(MapWaypoint waypoint, MapWaypoint currentlySelectedWaypoint) { @@ -731,6 +733,7 @@ final public class MapPanel extends javax.swing.JPanel { /** * Creates a waypoint image with the specified color + * * @param color the color of the new waypoint image * @return the new waypoint image */ @@ -741,10 +744,10 @@ final public class MapPanel extends javax.swing.JPanel { BufferedImage ret = new BufferedImage(w, h, BufferedImage.TYPE_INT_ARGB); Graphics2D g = ret.createGraphics(); - g.drawImage(whiteWaypointImage, 0,0, null); + g.drawImage(whiteWaypointImage, 0, 0, null); g.setComposite(AlphaComposite.SrcIn); g.setColor(color); - g.fillRect(0,0,w,h); + g.fillRect(0, 0, w, h); g.setComposite(AlphaComposite.SrcAtop); g.drawImage(transparentWaypointImage, 0, 0, null); g.dispose(); @@ -764,8 +767,8 @@ final public class MapPanel extends javax.swing.JPanel { int x = (int) point.getX(); int y = (int) point.getY(); - - gd = (Graphics2D)gd.create(); + + gd = (Graphics2D) gd.create(); gd.drawImage(image, x - image.getWidth() / 2, y - image.getHeight(), null); gd.dispose(); } diff --git a/Core/src/org/sleuthkit/autopsy/geolocation/MapWaypoint.java b/Core/src/org/sleuthkit/autopsy/geolocation/MapWaypoint.java index ecde4250fb..07131d5c00 100755 --- a/Core/src/org/sleuthkit/autopsy/geolocation/MapWaypoint.java +++ b/Core/src/org/sleuthkit/autopsy/geolocation/MapWaypoint.java @@ -67,11 +67,13 @@ final class MapWaypoint extends KdTree.XYZPoint implements org.jxmapviewer.viewe private static final Logger logger = Logger.getLogger(MapWaypoint.class.getName()); private final static String HTML_PROP_FORMAT = "%s: %s
    "; static private final SimpleDateFormat DATE_FORMAT = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ssX", Locale.US); - + private static final Map artifactTypesToColors = new HashMap<>(); - + @SuppressWarnings("deprecation") - static { + static + + { artifactTypesToColors.put(BlackboardArtifact.ARTIFACT_TYPE.TSK_GPS_BOOKMARK.getTypeID(), Color.BLUE); artifactTypesToColors.put(BlackboardArtifact.ARTIFACT_TYPE.TSK_GPS_LAST_KNOWN_LOCATION.getTypeID(), Color.RED); artifactTypesToColors.put(BlackboardArtifact.ARTIFACT_TYPE.TSK_GPS_ROUTE.getTypeID(), Color.YELLOW); @@ -91,7 +93,7 @@ final class MapWaypoint extends KdTree.XYZPoint implements org.jxmapviewer.viewe * @param dmWaypoints * * @return List of MapWaypoint objects. List will be empty if dmWaypoints - * was empty or null. + * was empty or null. */ static Set getWaypoints(List dmWaypoints) { Set mapPoints = new LinkedHashSet<>(); @@ -113,7 +115,7 @@ final class MapWaypoint extends KdTree.XYZPoint implements org.jxmapviewer.viewe * @param mapWaypoints * * @return A list of Waypoint objects, or empty list if mapWaypoints was - * null or empty. + * null or empty. */ static List getDataModelWaypoints(List mapWaypoints) { List waypoints = new ArrayList<>(); @@ -199,7 +201,7 @@ final class MapWaypoint extends KdTree.XYZPoint implements org.jxmapviewer.viewe String getHTMLFormattedWaypointDetails() { return getFormattedDetails(dataModelWaypoint); } - + /** * Returns a list of JMenuItems for the waypoint. The list list may contain * nulls which should be removed or replaced with JSeparators. @@ -248,7 +250,7 @@ final class MapWaypoint extends KdTree.XYZPoint implements org.jxmapviewer.viewe * menu items can be put in a consistent order with other parts of the UI. * * @param artifact Artifact for the selected waypoint - * @param content Artifact content + * @param content Artifact content * * @return List of JMenuItems for the DataModelActionFactory actions */ @@ -284,7 +286,7 @@ final class MapWaypoint extends KdTree.XYZPoint implements org.jxmapviewer.viewe /** * Get the nicely formatted details for the given waypoint. * - * @param point Waypoint object + * @param point Waypoint object * @param header String details header * * @return HTML formatted String of details for given waypoint @@ -343,7 +345,7 @@ final class MapWaypoint extends KdTree.XYZPoint implements org.jxmapviewer.viewe } /** - * + * * @return the color that this waypoint should be rendered */ Color getColor() { From 36a70a5e0c1cbedf0e66d9fdbc0926c07e411eb2 Mon Sep 17 00:00:00 2001 From: apriestman Date: Wed, 8 Apr 2020 07:45:43 -0400 Subject: [PATCH 063/137] Report doc fixes --- docs/doxygen/modReport.dox | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/doxygen/modReport.dox b/docs/doxygen/modReport.dox index 563a151c43..50c7215198 100644 --- a/docs/doxygen/modReport.dox +++ b/docs/doxygen/modReport.dox @@ -5,7 +5,7 @@ Report modules allow Autopsy users to create different report types. Autopsy co All custom report modules will be general report modules. General report modules have a single method to generate the report. This method gives the module freedom to find and process any data it so chooses. General modules also have the ability to provide a configuration panel, allowing the user to choose from various displayed settings. The report module may then use the user's selection to generate a more specific report. -General modules are also given the responsibility of updating their report's progress bar and processing label in the UI. A progress panel is given to every general report module. It contains basic API to start, stop, and add to the progress bar, as well as update the processing label. The module is also expected to check the progress bar's status occasionally to see if the user has manually canceled the report. +General modules are also given the responsibility of updating their report's progress bar and processing label in the UI. A progress panel is given to every general report module. It defines a basic API to start, stop, and increment the progress bar and to update the processing label. The module is also expected to check the progress bar's status occasionally to see if the user has manually canceled the report. \section report_create_module Creating a Report Module To create a report module, start off by creating a new Java or Python (Jython) class and implementing (Java) or inheriting (Jython) from org.sleuthkit.autopsy.report.GeneralReportModule. You'll need to override multiple methods including the following: @@ -17,11 +17,11 @@ To create a report module, start off by creating a new Java or Python (Jython) c If your report module requires configuration, you'll need to override: - org.sleuthkit.autopsy.report.GeneralReportModule.getConfigurationPanel() -For general report modules, Autopsy will simply call the generateReport(String reportPath, ReportProgressPanel progressPanel) method and leave it up to the module to aquire and report data in its desired format. The only requirements are that the module saves to the given report path and updates the org.sleuthkit.autopsy.report.ReportProgressPanel as the report progresses. +For general report modules, Autopsy will simply call the generateReport(String reportPath, ReportProgressPanel progressPanel) method and leave it up to the module to acquire and report data in its desired format. The only requirements are that the module saves to the given report path and updates the org.sleuthkit.autopsy.report.ReportProgressPanel as the report progresses. When updating the progress panel, it is recommended to update it as infrequently as possible, while still keeping the user informed. If your report processes 100,000 files and you chose to update the UI each time a file is reviewed, the UI would freeze when trying to process all your requests. This would cause problems to not only your reporting module, but to other modules running in parallel. A safer approach would be to update the UI every 1,000 files, or when a certain "category" of the files being processed has changed. For example, the HTML report module increments the progress bar and changes the processing label every time a new Blackboard Artifact Type is being processed. -Autopsy will also display the panel returned by getConfigurationPanel() in the generate report wizard. This panel can be used to allow the user custom controls over the report. To make this panel, use NetBeans to make a new JPanel class and use its layout interface to put the UI widgets in the places that you want them. Then, your getConfigurationPanel() method should create an instance of that class and return it. +Autopsy will also display the panel returned by getConfigurationPanel() in the generate report wizard. This panel can be used to allow the user to customize the report. To make this panel, use NetBeans to make a new JPanel class and use its layout interface to put the UI widgets in the places that you want them. Then, your getConfigurationPanel() method should create an instance of that class and return it. Typically a general report module should interact with both the Blackboard API in the org.sleuthkit.datamodel.SleuthkitCase class, in addition to an API (possibly external/thirdparty) to convert Blackboard Artifacts to the desired reporting format. @@ -32,7 +32,7 @@ You should call org.sleuthkit.autopsy.casemodule.Case.addReport() with the path \subsection report_create_module_indexing Indexing Reports -After you have called org.sleuthkit.autopsy.casemodule.Case.addReport() and created a report, you can pass it to org.sleuthkit.autopsy.keywordsearchservice.KeywordSearchService.index() so that it is indexed and can then be found by a user. This is most commonly used when an Ingest Module runs a 3rd party tool and the output of that tool is added back into Autopsy as a report. Here is some example code: +After you have called org.sleuthkit.autopsy.casemodule.Case.addReport() and created a report, you can pass it to org.sleuthkit.autopsy.keywordsearchservice.KeywordSearchService.index() so that it is indexed and can then be found by a user running a keyword search. This is most commonly used when an Ingest Module runs a 3rd party tool and the output of that tool is added back into Autopsy as a report. Here is some example code: \code{.java} KeywordSearchService searchService = Lookup.getDefault().lookup(KeywordSearchService.class); From c0904d9fa24cfac8739a52d24c5793e50e004a43 Mon Sep 17 00:00:00 2001 From: Greg DiCristofaro Date: Wed, 8 Apr 2020 08:21:42 -0400 Subject: [PATCH 064/137] updated formatting --- .../autopsy/guiutils/WrapLayout.java | 192 ++++++++++++------ 1 file changed, 125 insertions(+), 67 deletions(-) diff --git a/Core/src/org/sleuthkit/autopsy/guiutils/WrapLayout.java b/Core/src/org/sleuthkit/autopsy/guiutils/WrapLayout.java index 921aea586d..6062470587 100644 --- a/Core/src/org/sleuthkit/autopsy/guiutils/WrapLayout.java +++ b/Core/src/org/sleuthkit/autopsy/guiutils/WrapLayout.java @@ -1,7 +1,7 @@ /* * Autopsy Forensic Browser * - * Copyright 2019 Basis Technology Corp. + * Copyright 2019-2020 Basis Technology Corp. * Contact: carrier sleuthkit org * * Licensed under the Apache License, Version 2.0 (the "License"); @@ -50,7 +50,7 @@ public class WrapLayout implements LayoutManager, java.io.Serializable { private static final long serialVersionUID = 1L; /** - * The WrapLayout manager allows a seperation of components + * The WrapLayout manager allows a separation of components * with gaps. The horizontal gap will specify the space between components * and between the components and the borders of the Container. * @@ -61,7 +61,7 @@ public class WrapLayout implements LayoutManager, java.io.Serializable { private int hgap = 0; /** - * The WrapLayout manager allows a seperation of components + * The WrapLayout manager allows a separation of components * with gaps. The vertical gap will specify the space between rows and * between the the rows and the borders of the Container. * @@ -92,9 +92,9 @@ public class WrapLayout implements LayoutManager, java.io.Serializable { /** * Constructs a new WrapLayout with a left alignment. - * - * @param vgap The vertical gap spacing between rows of components. - * @param hgap The horizontal gap spacing between components. + * + * @param vgap The vertical gap spacing between rows of components. + * @param hgap The horizontal gap spacing between components. */ public WrapLayout(int vgap, int hgap) { this.vgap = vgap; @@ -195,8 +195,8 @@ public class WrapLayout implements LayoutManager, java.io.Serializable { } /** - * Adds the specified component to the layout. Not used by this class. - * NOTE: This is not used for this layout + * Adds the specified component to the layout. Not used by this class. NOTE: + * This is not used for this layout * * @param name The name of the component. * @param comp The component to be added. @@ -289,30 +289,30 @@ public class WrapLayout implements LayoutManager, java.io.Serializable { synchronized (this.oppositeAlignedItems) { ParentDimensions targetDims = getTargetDimensions(target); List components = Arrays.asList(target.getComponents()); - List rows = getAllRows(components, true, targetDims.innerWidth); + List rows = getAllRows(components, true, targetDims.getInnerWidth()); boolean ltr = target.getComponentOrientation().isLeftToRight(); boolean useBaseline = getAlignOnBaseline(); - int rowY = targetDims.insets.top + getVgap(); - int leftX = targetDims.insets.left + getHgap(); - int rightX = targetDims.outerWidth - targetDims.insets.right - getHgap(); + int rowY = targetDims.getInsets().top + getVgap(); + int leftX = targetDims.getInsets().left + getHgap(); + int rightX = targetDims.getOuterWidth() - targetDims.getInsets().right - getHgap(); for (WrapLayoutRow row : rows) { - int rowHeight = row.height; + int rowHeight = row.getHeight(); int curX = 0; - if (row.components != null) { - for (Component origComp : row.components) { + if (row.getComponents() != null) { + for (Component origComp : row.getComponents()) { curX += setComponentDims(origComp, useBaseline, ltr, rowY, rowHeight, leftX, rightX, curX) + getHgap(); } } - if (row.oppositeAligned != null) { + if (row.getOppositeAligned() != null) { curX = 0; // reverse opposite aligned for layout purposes since flipping ltr - Collections.reverse(row.oppositeAligned); - for (Component oppAlignedComp : row.oppositeAligned) { + Collections.reverse(row.getOppositeAligned()); + for (Component oppAlignedComp : row.getOppositeAligned()) { curX += setComponentDims(oppAlignedComp, useBaseline, !ltr, rowY, rowHeight, leftX, rightX, curX) + getHgap(); } } @@ -358,27 +358,50 @@ public class WrapLayout implements LayoutManager, java.io.Serializable { */ private static class ParentDimensions { - /** - * The full width that the component can consume. - */ - final int outerWidth; + private final int outerWidth; + private final int innerWidth; + private final Insets insets; /** - * The full width that subcomponent rows can consume. This is the - * outerWidth accounting for left and right insets. + * Main constructor for ParentDimensions class. + * + * @param outerWidth The full width that the component can consume. + * @param innerWidth The full width that subcomponent rows can consume. + * @param insets The insets of the parent container. */ - final int innerWidth; - - /** - * The insets of the parent container. - */ - final Insets insets; - ParentDimensions(int outerWidth, int innerWidth, Insets insets) { this.outerWidth = outerWidth; this.innerWidth = innerWidth; this.insets = insets; } + + /** + * Gets the full width that the component can consume. + * + * @return The full width that the component can consume. + */ + int getOuterWidth() { + return outerWidth; + } + + /** + * Gets the full width that subcomponent rows can consume. This is the + * outerWidth accounting for left and right insets. + * + * @return The full width that subcomponent rows can consume. + */ + int getInnerWidth() { + return innerWidth; + } + + /** + * Gets the insets of the parent container. + * + * @return The insets of the parent container. + */ + Insets getInsets() { + return insets; + } } /** @@ -407,10 +430,8 @@ public class WrapLayout implements LayoutManager, java.io.Serializable { targetWidth = Integer.MAX_VALUE; } - int hgap = getHgap(); - Insets insets = target.getInsets(); - int horizontalInsetsAndGap = insets.left + insets.right + (hgap * 2); + int horizontalInsetsAndGap = insets.left + insets.right + (getHgap() * 2); int maxWidth = targetWidth - horizontalInsetsAndGap; return new ParentDimensions(targetWidth, maxWidth, insets); @@ -421,7 +442,7 @@ public class WrapLayout implements LayoutManager, java.io.Serializable { * container. * * @param target Target to get layout size for. - * @param preferred Should preferred size be calculate.d + * @param preferred Should preferred size be calculated. * * @return The dimension to layout the target container. */ @@ -430,18 +451,18 @@ public class WrapLayout implements LayoutManager, java.io.Serializable { synchronized (this.oppositeAlignedItems) { ParentDimensions targetDims = getTargetDimensions(target); List components = Arrays.asList(target.getComponents()); - List rows = getAllRows(components, preferred, targetDims.innerWidth); + List rows = getAllRows(components, preferred, targetDims.getInnerWidth()); - Integer containerHeight = rows.stream().map((r) -> r.height).reduce(0, Integer::sum); + Integer containerHeight = rows.stream().map((r) -> r.getHeight()).reduce(0, Integer::sum); // add in vertical gap between rows if (rows.size() > 1) { containerHeight += (rows.size() - 1) * getVgap(); } - containerHeight += targetDims.insets.top + targetDims.insets.bottom; + containerHeight += targetDims.getInsets().top + targetDims.getInsets().bottom; - Integer containerWidth = rows.stream().map((r) -> r.width).reduce(0, Math::max); - containerWidth += targetDims.insets.left + targetDims.insets.right + (getHgap() * 2); + Integer containerWidth = rows.stream().map((r) -> r.getWidth()).reduce(0, Math::max); + containerWidth += targetDims.getInsets().left + targetDims.getInsets().right + (getHgap() * 2); // When using a scroll pane or the DecoratedLookAndFeel we need to // make sure the preferred size is less than the size of the @@ -463,36 +484,73 @@ public class WrapLayout implements LayoutManager, java.io.Serializable { */ private class WrapLayoutRow { - /** - * The normally aligned components in the order that they will be laid - * out. - */ - final List components; + private final List components; + private final List oppositeAligned; + private final int height; + private final int width; /** - * The opposite aligned components in the order that they will be laid - * out. + * This is the main constructor for a row of components in the + * WrapLayout. + * + * @param components The components that should be normally aligned + * in the row. + * @param oppositeAligned The components that should be oppositely + * aligned in the row. + * @param height The maximum height of the row. + * @param width The total width of the row. */ - final List oppositeAligned; - - /** - * The minimum height of the row which is the maximum of the preferred - * heights of the components. - */ - final int height; - - /** - * The minimum width of the row which is the sum of the preferred widths - * of the subcomponents. - */ - final int width; - - public WrapLayoutRow(List components, List oppositeAligned, int height, int width) { + WrapLayoutRow(List components, List oppositeAligned, int height, int width) { this.components = components; this.oppositeAligned = oppositeAligned; this.height = height; this.width = width; } + + /** + * Gets the normally aligned components in the order that they will be + * laid out. + * + * @return The normally aligned components in the order that they will + * be laid out. + */ + List getComponents() { + return components; + } + + /** + * Gets the opposite aligned components in the order that they will be + * laid out. + * + * @return The opposite aligned components in the order that they will + * be laid out. + */ + List getOppositeAligned() { + return oppositeAligned; + } + + /** + * Gets the minimum height of the row which is the maximum of the + * preferred heights of the components. + * + * @return The minimum height of the row which is the maximum of the + * preferred heights of the components. + */ + int getHeight() { + return height; + } + + /** + * Gets the minimum width of the row which is the sum of the preferred + * widths of the subcomponents. + * + * @return The minimum width of the row which is the sum of the + * preferred widths of the subcomponents. + */ + int getWidth() { + return width; + } + } /** @@ -525,8 +583,8 @@ public class WrapLayout implements LayoutManager, java.io.Serializable { List oppositeRowSet = getRowSet(oppositeAlignedComp, preferred, maxWidth) .stream() .map((WrapLayoutRow row) -> { - Collections.reverse(row.components); - return new WrapLayoutRow(null, row.components, row.height, row.width); + Collections.reverse(row.getComponents()); + return new WrapLayoutRow(null, row.getComponents(), row.getHeight(), row.getWidth()); }) .collect(Collectors.toList()); Collections.reverse(oppositeRowSet); @@ -539,10 +597,10 @@ public class WrapLayout implements LayoutManager, java.io.Serializable { WrapLayoutRow lastOrig = originalRowSet.get(originalRowSet.size() - 1); WrapLayoutRow firstOpp = oppositeRowSet.get(0); - int proposedRowWidth = lastOrig.width + firstOpp.width + getHgap(); + int proposedRowWidth = lastOrig.getWidth() + firstOpp.getWidth() + getHgap(); if (proposedRowWidth <= maxWidth) { - WrapLayoutRow middleRow = new WrapLayoutRow(lastOrig.components, firstOpp.oppositeAligned, - Math.max(lastOrig.height, firstOpp.height), proposedRowWidth); + WrapLayoutRow middleRow = new WrapLayoutRow(lastOrig.getComponents(), firstOpp.getOppositeAligned(), + Math.max(lastOrig.getHeight(), firstOpp.getHeight()), proposedRowWidth); toReturn.addAll(originalRowSet.subList(0, originalRowSet.size() - 1)); toReturn.add(middleRow); From 876a9870b2d65cf59abc0f4ff9dac1792437ad4d Mon Sep 17 00:00:00 2001 From: Greg DiCristofaro Date: Wed, 8 Apr 2020 08:59:53 -0400 Subject: [PATCH 065/137] fix for assigned value never used --- .../sleuthkit/autopsy/guiutils/WrapLayout.java | 15 ++++----------- 1 file changed, 4 insertions(+), 11 deletions(-) diff --git a/Core/src/org/sleuthkit/autopsy/guiutils/WrapLayout.java b/Core/src/org/sleuthkit/autopsy/guiutils/WrapLayout.java index 6062470587..d1f4b4d323 100644 --- a/Core/src/org/sleuthkit/autopsy/guiutils/WrapLayout.java +++ b/Core/src/org/sleuthkit/autopsy/guiutils/WrapLayout.java @@ -413,18 +413,11 @@ public class WrapLayout implements LayoutManager, java.io.Serializable { * @return The dimensions for laying out components. */ private ParentDimensions getTargetDimensions(Container target) { - // Each row must fit with the width allocated to the containter. - // When the container width = 0, the preferred width of the container - // has not yet been calculated so lets ask for the maximum. - - int targetWidth = target.getSize().width; - Container container = target; - - while (container.getSize().width == 0 && container.getParent() != null) { - container = container.getParent(); + while (target.getSize().width == 0 && target.getParent() != null) { + target = target.getParent(); } - targetWidth = container.getSize().width; + int targetWidth = target.getSize().width; if (targetWidth == 0) { targetWidth = Integer.MAX_VALUE; @@ -464,7 +457,7 @@ public class WrapLayout implements LayoutManager, java.io.Serializable { Integer containerWidth = rows.stream().map((r) -> r.getWidth()).reduce(0, Math::max); containerWidth += targetDims.getInsets().left + targetDims.getInsets().right + (getHgap() * 2); - // When using a scroll pane or the DecoratedLookAndFeel we need to + // When using a scroll pane or the DecoratedLookAndFeel we need to // make sure the preferred size is less than the size of the // target containter so shrinking the container size works // correctly. Removing the horizontal gap is an easy way to do this. From 5a89c431a6ec1905fe20b359edc04edf8ddeca91 Mon Sep 17 00:00:00 2001 From: Greg DiCristofaro Date: Wed, 8 Apr 2020 09:13:02 -0400 Subject: [PATCH 066/137] updates to TextFileExtractor --- .../autopsy/textextractors/TextFileExtractor.java | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/Core/src/org/sleuthkit/autopsy/textextractors/TextFileExtractor.java b/Core/src/org/sleuthkit/autopsy/textextractors/TextFileExtractor.java index 710a7d3508..33c7c04a4e 100644 --- a/Core/src/org/sleuthkit/autopsy/textextractors/TextFileExtractor.java +++ b/Core/src/org/sleuthkit/autopsy/textextractors/TextFileExtractor.java @@ -76,11 +76,7 @@ public final class TextFileExtractor implements TextExtractor { } @Override - public boolean isSupported() { - // if file is null, it is not supported - if (file == null) - return false; - + public boolean isSupported() { // get the MIME type String mimeType = file.getMIMEType(); @@ -91,6 +87,7 @@ public final class TextFileExtractor implements TextExtractor { fileTypeDetector = new FileTypeDetector(); } catch (FileTypeDetector.FileTypeDetectorInitException ex) { logger.log(Level.WARNING, "Unable to create file type detector for determining MIME type."); + return false; } mimeType = fileTypeDetector.getMIMEType(file); @@ -99,6 +96,6 @@ public final class TextFileExtractor implements TextExtractor { file.setMIMEType(mimeType); } - return (StringUtils.isEmpty(mimeType)) ? false : mimeType.equals(PLAIN_TEXT_MIME_TYPE); + return PLAIN_TEXT_MIME_TYPE.equals(mimeType); } } From 32c67382cca734993cddfc1d05ea410eea600db7 Mon Sep 17 00:00:00 2001 From: Ethan Roseman Date: Wed, 8 Apr 2020 10:31:57 -0400 Subject: [PATCH 067/137] 6161: Fixing build --- .../org/sleuthkit/autopsy/geolocation/MapPanel.java | 10 +++++----- .../org/sleuthkit/autopsy/geolocation/MapWaypoint.java | 5 +---- 2 files changed, 6 insertions(+), 9 deletions(-) diff --git a/Core/src/org/sleuthkit/autopsy/geolocation/MapPanel.java b/Core/src/org/sleuthkit/autopsy/geolocation/MapPanel.java index b2b8589583..26caf30654 100755 --- a/Core/src/org/sleuthkit/autopsy/geolocation/MapPanel.java +++ b/Core/src/org/sleuthkit/autopsy/geolocation/MapPanel.java @@ -706,12 +706,12 @@ final public class MapPanel extends javax.swing.JPanel { from.getColorComponents(fromC); float toC[] = new float[3]; to.getColorComponents(toC); - float afResult[] = new float[3]; - afResult[0] = fromC[0] * inverse + toC[0] * amount; - afResult[1] = fromC[1] * inverse + toC[1] * amount; - afResult[2] = fromC[2] * inverse + toC[2] * amount; + float result[] = new float[3]; + result[0] = fromC[0] * inverse + toC[0] * amount; + result[1] = fromC[1] * inverse + toC[1] * amount; + result[2] = fromC[2] * inverse + toC[2] * amount; - return new Color(afResult[0], afResult[1], afResult[2]); + return new Color(result[0], result[1], result[2]); } /** diff --git a/Core/src/org/sleuthkit/autopsy/geolocation/MapWaypoint.java b/Core/src/org/sleuthkit/autopsy/geolocation/MapWaypoint.java index 07131d5c00..48a0593a95 100755 --- a/Core/src/org/sleuthkit/autopsy/geolocation/MapWaypoint.java +++ b/Core/src/org/sleuthkit/autopsy/geolocation/MapWaypoint.java @@ -70,10 +70,7 @@ final class MapWaypoint extends KdTree.XYZPoint implements org.jxmapviewer.viewe private static final Map artifactTypesToColors = new HashMap<>(); - @SuppressWarnings("deprecation") - static - - { + static { artifactTypesToColors.put(BlackboardArtifact.ARTIFACT_TYPE.TSK_GPS_BOOKMARK.getTypeID(), Color.BLUE); artifactTypesToColors.put(BlackboardArtifact.ARTIFACT_TYPE.TSK_GPS_LAST_KNOWN_LOCATION.getTypeID(), Color.RED); artifactTypesToColors.put(BlackboardArtifact.ARTIFACT_TYPE.TSK_GPS_ROUTE.getTypeID(), Color.YELLOW); From 7290c20d8551536bf82536d32a3aa26fbabb3d17 Mon Sep 17 00:00:00 2001 From: Ethan Roseman Date: Wed, 8 Apr 2020 10:39:53 -0400 Subject: [PATCH 068/137] 6248: Restoring form --- .../org/sleuthkit/autopsy/geolocation/MapPanel.form | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) diff --git a/Core/src/org/sleuthkit/autopsy/geolocation/MapPanel.form b/Core/src/org/sleuthkit/autopsy/geolocation/MapPanel.form index 1287c964c1..e915904d42 100755 --- a/Core/src/org/sleuthkit/autopsy/geolocation/MapPanel.form +++ b/Core/src/org/sleuthkit/autopsy/geolocation/MapPanel.form @@ -56,13 +56,10 @@ - - - - + @@ -90,9 +87,7 @@ - - - + @@ -121,9 +116,7 @@ - - - + From 56cd8fcff69f1832d71456a7f1cb9a7a26a6e421 Mon Sep 17 00:00:00 2001 From: Greg DiCristofaro Date: Wed, 8 Apr 2020 10:58:24 -0400 Subject: [PATCH 069/137] address codacy items --- Core/src/org/sleuthkit/autopsy/guiutils/WrapLayout.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Core/src/org/sleuthkit/autopsy/guiutils/WrapLayout.java b/Core/src/org/sleuthkit/autopsy/guiutils/WrapLayout.java index d1f4b4d323..2c5f666af6 100644 --- a/Core/src/org/sleuthkit/autopsy/guiutils/WrapLayout.java +++ b/Core/src/org/sleuthkit/autopsy/guiutils/WrapLayout.java @@ -124,7 +124,7 @@ public class WrapLayout implements LayoutManager, java.io.Serializable { * @return The components to display with opposite alignment. */ public Collection getOppositeAlignedItems() { - return oppositeAlignedItems; + return Collections.unmodifiableCollection(oppositeAlignedItems); } /** @@ -203,6 +203,7 @@ public class WrapLayout implements LayoutManager, java.io.Serializable { */ @Override public void addLayoutComponent(String name, Component comp) { + //Empty } /** @@ -213,6 +214,7 @@ public class WrapLayout implements LayoutManager, java.io.Serializable { */ @Override public void removeLayoutComponent(Component comp) { + //Empty } /** From 98933985031dc8ad8759959b716fbb91f48bb76a Mon Sep 17 00:00:00 2001 From: Greg DiCristofaro Date: Wed, 8 Apr 2020 11:02:29 -0400 Subject: [PATCH 070/137] cleanup --- .../textextractors/TextFileExtractorTest.java | 23 ------------------- 1 file changed, 23 deletions(-) delete mode 100644 Core/test/unit/src/org/sleuthkit/autopsy/textextractors/TextFileExtractorTest.java diff --git a/Core/test/unit/src/org/sleuthkit/autopsy/textextractors/TextFileExtractorTest.java b/Core/test/unit/src/org/sleuthkit/autopsy/textextractors/TextFileExtractorTest.java deleted file mode 100644 index 9f9dc8493c..0000000000 --- a/Core/test/unit/src/org/sleuthkit/autopsy/textextractors/TextFileExtractorTest.java +++ /dev/null @@ -1,23 +0,0 @@ -/* - * To change this license header, choose License Headers in Project Properties. - * To change this template file, choose Tools | Templates - * and open the template in the editor. - */ -package org.sleuthkit.autopsy.textextractors; - -import junit.framework.Assert; -import org.junit.Test; - - -/** - * Tests methods present in the TextFileExtractor - */ -public class TextFileExtractorTest { - - @Test - public void testIsSupported() { - Assert.assertFalse(new TextFileExtractor(null).isSupported()); - } - - -} From 532f3063c7f72c45dda006a6d34ac27014eabc63 Mon Sep 17 00:00:00 2001 From: apriestman Date: Wed, 8 Apr 2020 11:23:56 -0400 Subject: [PATCH 071/137] Update to openjdk in docs --- docs/doxygen-user/images/serviceinstall.PNG | Bin 20955 -> 31708 bytes docs/doxygen-user/images/wherejava.PNG | Bin 1017 -> 9711 bytes .../multi-user/installActiveMQ.dox | 4 ++-- docs/doxygen-user/multi-user/installSolr.dox | 10 +++++++--- 4 files changed, 9 insertions(+), 5 deletions(-) diff --git a/docs/doxygen-user/images/serviceinstall.PNG b/docs/doxygen-user/images/serviceinstall.PNG index 3a5ea81b47a43f409df7b3b3410e481d932c18c8..b20f07d9c8b25329b3e384956eb61af3af5dbf0b 100644 GIT binary patch literal 31708 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 QQe@G;VRF4#+cE6_05c+Pn*aa+ literal 20955 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 literal 1017 zcmeAS@N?(olHy`uVBq!ia0y~yUl}w0VAYX5{?}w0$<9pMbGwb~;L?@wFzD*JBq$(VIjJL<~k z+O^en_tLj6t38|HZydOOQSt8YKla%EzO^dvnNNM`wbj2u{eNev7SEi^dTZsojq}96 zny%h^GBW$y8p*}B_22AkmnB!OKjpgD`O5WM?{=Ot0T=;W$T_=G4+hzHgpq zo1NSGZ1c@`_g3Vail)}+ZZe8a-J`QUJ^ph|d~x7;7s=I;wpC$uap`3*?!2>|_PzLD zWvF@aw)zuBQSoP8w`x2t{p%h3v3|j-Szk@pzsk=4KIiJDxKfZyH_v)s6u5u($FNPa zD!)eh{<`XO^>bLU*YmRX8~@C-=DU05=DyCNsBWXk*zCZxrRCkpjdJ|I4qohz@O>?K zwzN1jz8V;8aaX=?T@ya{umAj)Yo6_n0eRcSPS%$Md7VmqPX!asM{SmE z%+>P|$DY5vdCpGy;?EazuFgB8f8qbsf1l#Moj&6I=ga>6wfB8Yn!EQLX0rXz|1ACS v`~K+_(}9WG|2WR%PDGBtP~u}__n%3p?OnHCoLCt!yE1sX`njxgN@xNAh6?w< diff --git a/docs/doxygen-user/multi-user/installActiveMQ.dox b/docs/doxygen-user/multi-user/installActiveMQ.dox index 4d7ab37fe5..475e558a08 100644 --- a/docs/doxygen-user/multi-user/installActiveMQ.dox +++ b/docs/doxygen-user/multi-user/installActiveMQ.dox @@ -8,14 +8,14 @@ ActiveMQ is a messaging service that allows the Autopsy clients to communicate w \section install_activemq_prereq Prerequisites You will need: -- 64-bit version of the Java Runtime Environment (JRE) from http://www.oracle.com/technetwork/java/javase/downloads/jre8-downloads-2133155.html. +- 64-bit version of the Java Runtime Environment (JRE) from https://github.com/ojdkbuild/ojdkbuild. - Download ActiveMQ from: http://activemq.apache.org/download.html . Autopsy has been tested with ActiveMQ version 5.14.0. \section install_activemq_install Installation \subsection install_activemq_install_java JRE Installation -Install the Java JRE if needed. You can test this by running _where java_ from the command line. If you see output like the yellow results below, you have a JRE. +Install the Java JRE if needed. You can test this by running _where java_ from the command line. If you see output similar to the results below, you have a JRE.

    \image html wherejava.PNG

    diff --git a/docs/doxygen-user/multi-user/installSolr.dox b/docs/doxygen-user/multi-user/installSolr.dox index 3d55f29efc..f49c2e4b39 100644 --- a/docs/doxygen-user/multi-user/installSolr.dox +++ b/docs/doxygen-user/multi-user/installSolr.dox @@ -13,7 +13,7 @@ Solr's embedded ZooKeeper is also used as a coordination service for Autopsy. We use Bitnami Solr, which packages Solr as a Windows service. You will need: -- A 64-bit version of the Java Runtime Environment (JRE) from http://www.oracle.com/technetwork/java/javase/downloads/jre8-downloads-2133155.html. +- A 64-bit version of the Java Runtime Environment (JRE) from https://github.com/ojdkbuild/ojdkbuild. - The Apache Solr 4.10.3-0 installation package. This is no longer available from its original source, but you can find it on our site: https://sourceforge.net/projects/autopsy/files/CollaborativeServices/Solr. -- NOTE: We tested Solr 6 at one point, but ran into stability problems when loading and unloading cores. For now, you need to use Solr 4. - An installed version of Autopsy so that you can copy files from it. You can install Autopsy on one of the planned client systems. You do not need to install it on the Solr server. @@ -24,7 +24,11 @@ You will need: \section install_solr_install Installation \subsection install_solr_install_java JRE Installation -1. JREs are normally installed under "C:\Program Files\Java\jre(version)", so check there to see if you have one installed already. If not, get the installer as listed in the above Prerequisites section and install it with the default settings. +1. Install the Java JRE if needed. You can test this by running _where java_ from the command line. If you see output similar to the results below, you have a JRE. +

    +\image html wherejava.PNG +

    +If you need the JRE, install it with the default settings. \subsection install_solr_install_solr Solr Installation @@ -52,7 +56,7 @@ The following steps will configure Solr to run using an account that will have a + ++JvmOptions=-Dbootstrap_confdir="C:\Bitnami\solr-4.10.3-0\apache-solr\solr\configsets\AutopsyConfig\conf" + ++JvmOptions=-DzkRun
    - - Replace the path to JavaHome with the path to your 64-bit version of the JRE. If you do not know the path, the correct JavaHome path can be obtained by running the command "where java" from the Windows command line. An example is shown below. The text in yellow is what we are interested in. Do not include the "bin" folder in the path you place into the JavaHome variable. A correct example of the final result will look something like this: –-JavaHome="C:\Program Files\Java\jre1.8.0_111" + - Replace the path to JavaHome with the path to your 64-bit version of the JRE. If you do not know the path, the correct JavaHome path can be obtained by running the command "where java" from the Windows command line. An example is shown below. The text in yellow is what we are interested in. Do not include the "bin" folder in the path you place into the JavaHome variable. A correct example of the final result will look something like this: –-JavaHome="C:\Program Files\ojdkbuild\java-1.8.0-openjdk-1.8.0.222-1"

    A portion of an updated _serviceinstall.bat_ is shown below, with the changes marked in yellow.

    From 0f778596c0ac7532330fccc6c0218ceebc255c90 Mon Sep 17 00:00:00 2001 From: apriestman Date: Wed, 8 Apr 2020 11:33:34 -0400 Subject: [PATCH 072/137] Review update --- docs/doxygen/modReport.dox | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/doxygen/modReport.dox b/docs/doxygen/modReport.dox index 50c7215198..90e40fb552 100644 --- a/docs/doxygen/modReport.dox +++ b/docs/doxygen/modReport.dox @@ -32,7 +32,7 @@ You should call org.sleuthkit.autopsy.casemodule.Case.addReport() with the path \subsection report_create_module_indexing Indexing Reports -After you have called org.sleuthkit.autopsy.casemodule.Case.addReport() and created a report, you can pass it to org.sleuthkit.autopsy.keywordsearchservice.KeywordSearchService.index() so that it is indexed and can then be found by a user running a keyword search. This is most commonly used when an Ingest Module runs a 3rd party tool and the output of that tool is added back into Autopsy as a report. Here is some example code: +After you have called org.sleuthkit.autopsy.casemodule.Case.addReport() and created a report, you can pass it to org.sleuthkit.autopsy.keywordsearchservice.KeywordSearchService.index() so that the report text is indexed for keyword search. This is most commonly used when an Ingest Module runs a 3rd party tool and the output of that tool is added back into Autopsy as a report. Here is some example code: \code{.java} KeywordSearchService searchService = Lookup.getDefault().lookup(KeywordSearchService.class); From 1b238183046b0f25e83d7f4322e314076d59e4a8 Mon Sep 17 00:00:00 2001 From: Greg DiCristofaro Date: Wed, 8 Apr 2020 13:51:25 -0400 Subject: [PATCH 073/137] update log entry to severe --- .../org/sleuthkit/autopsy/textextractors/TextFileExtractor.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Core/src/org/sleuthkit/autopsy/textextractors/TextFileExtractor.java b/Core/src/org/sleuthkit/autopsy/textextractors/TextFileExtractor.java index 33c7c04a4e..dda59cdcfd 100644 --- a/Core/src/org/sleuthkit/autopsy/textextractors/TextFileExtractor.java +++ b/Core/src/org/sleuthkit/autopsy/textextractors/TextFileExtractor.java @@ -86,7 +86,7 @@ public final class TextFileExtractor implements TextExtractor { try { fileTypeDetector = new FileTypeDetector(); } catch (FileTypeDetector.FileTypeDetectorInitException ex) { - logger.log(Level.WARNING, "Unable to create file type detector for determining MIME type."); + logger.log(Level.SEVERE, "Unable to create file type detector for determining MIME type."); return false; } mimeType = fileTypeDetector.getMIMEType(file); From b7b6d95636bb17bbf8f2ac4b51a178f392613730 Mon Sep 17 00:00:00 2001 From: apriestman Date: Wed, 8 Apr 2020 14:23:51 -0400 Subject: [PATCH 074/137] Updated release notes for 4.15 --- NEWS.txt | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) diff --git a/NEWS.txt b/NEWS.txt index ee294d7fea..068408b413 100644 --- a/NEWS.txt +++ b/NEWS.txt @@ -1,3 +1,32 @@ +---------------- VERSION 4.15.0 -------------- +New UI Features: +- Added Document view to File Discovery. +- Expanded Context Content Viewer to show if an app accessed a file. +- Added translation feature to Message Content Viewer. +- Added waypoint type filter to the Geolocation viewer. +- Added zoom feature to Indexed Text Content Viewer. + +New Ingest Modules Features: +- New GPX ingest module. +- New Drone ingest module for DJI drones based on DatCon. +- Create artifacts for files opened by Adobe Reader, Windows Media Player, Office Docs (Most Recently Used (MRU) and TrustRecords), 7Zip MRU, WinRAR MRU, Applets, Microsoft Management Console (MMC) via RegRipper. + +New Central Repository Features: +- Central Repository stores account IDs that were previously seen. +- Central Repository is enabled by default to store past hashes. Feature to flag previously seen files is disabled by default. + +Other New Features: +- Multi-user cases can be created via command line + +Bug fixes: +- Prevent entire application from crashing when gstreamer crashes on videos. +- Improve Geolocation viewer with large data sets. +- Fix error with non-sector aligned reads on local disks. +- Times from Recycle Bin files are now in timeline. +- Validate timeline events and ignore events too far in the future. +- Moved some database queries off of UI thread. +- Remove hard coded sizes from UI that cause issues with other languages. + ---------------- VERSION 4.14.0 -------------- Specialized UIs: - New File Discovery UI that allows you to search and filter for certain types of files. From 15d00d38c90aba157c09f569ccc625da6b5f894d Mon Sep 17 00:00:00 2001 From: apriestman Date: Wed, 8 Apr 2020 14:34:31 -0400 Subject: [PATCH 075/137] Fix doxygen warning --- .../centralrepository/datamodel/CorrelationAttributeUtil.java | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/Core/src/org/sleuthkit/autopsy/centralrepository/datamodel/CorrelationAttributeUtil.java b/Core/src/org/sleuthkit/autopsy/centralrepository/datamodel/CorrelationAttributeUtil.java index 71c6b41f86..5cbc3307a0 100755 --- a/Core/src/org/sleuthkit/autopsy/centralrepository/datamodel/CorrelationAttributeUtil.java +++ b/Core/src/org/sleuthkit/autopsy/centralrepository/datamodel/CorrelationAttributeUtil.java @@ -201,11 +201,9 @@ public class CorrelationAttributeUtil { * Makes a correlation attribute instance from a phone number attribute of an * artifact. * + * @param corrAttrInstances Correlation attributes will be added to this. * @param artifact An artifact with a phone number attribute. * - * @return The correlation instance artifact or null, if the phone number is - * not a valid correlation attribute. - * * @throws TskCoreException If there is an error querying the case * database. * @throws CentralRepoException If there is an error querying the central From 48d1e08280c13ea276550aed9e1e36f35301b9ec Mon Sep 17 00:00:00 2001 From: Greg DiCristofaro Date: Wed, 8 Apr 2020 15:11:03 -0400 Subject: [PATCH 076/137] remove synchronization --- .../autopsy/guiutils/WrapLayout.java | 112 ++++++++---------- 1 file changed, 51 insertions(+), 61 deletions(-) diff --git a/Core/src/org/sleuthkit/autopsy/guiutils/WrapLayout.java b/Core/src/org/sleuthkit/autopsy/guiutils/WrapLayout.java index 2c5f666af6..f46d450558 100644 --- a/Core/src/org/sleuthkit/autopsy/guiutils/WrapLayout.java +++ b/Core/src/org/sleuthkit/autopsy/guiutils/WrapLayout.java @@ -110,10 +110,8 @@ public class WrapLayout implements LayoutManager, java.io.Serializable { * alignment. */ public void setOppositeAligned(Collection oppAlignedComponents) { - synchronized (this.oppositeAlignedItems) { - this.oppositeAlignedItems.clear(); - this.oppositeAlignedItems.addAll(oppAlignedComponents); - } + this.oppositeAlignedItems.clear(); + this.oppositeAlignedItems.addAll(oppAlignedComponents); } /** @@ -287,41 +285,37 @@ public class WrapLayout implements LayoutManager, java.io.Serializable { */ @Override public void layoutContainer(Container target) { - synchronized (target.getTreeLock()) { - synchronized (this.oppositeAlignedItems) { - ParentDimensions targetDims = getTargetDimensions(target); - List components = Arrays.asList(target.getComponents()); - List rows = getAllRows(components, true, targetDims.getInnerWidth()); + ParentDimensions targetDims = getTargetDimensions(target); + List components = Arrays.asList(target.getComponents()); + List rows = getAllRows(components, true, targetDims.getInnerWidth()); - boolean ltr = target.getComponentOrientation().isLeftToRight(); - boolean useBaseline = getAlignOnBaseline(); + boolean ltr = target.getComponentOrientation().isLeftToRight(); + boolean useBaseline = getAlignOnBaseline(); - int rowY = targetDims.getInsets().top + getVgap(); - int leftX = targetDims.getInsets().left + getHgap(); - int rightX = targetDims.getOuterWidth() - targetDims.getInsets().right - getHgap(); + int rowY = targetDims.getInsets().top + getVgap(); + int leftX = targetDims.getInsets().left + getHgap(); + int rightX = targetDims.getOuterWidth() - targetDims.getInsets().right - getHgap(); - for (WrapLayoutRow row : rows) { - int rowHeight = row.getHeight(); + for (WrapLayoutRow row : rows) { + int rowHeight = row.getHeight(); - int curX = 0; - if (row.getComponents() != null) { - for (Component origComp : row.getComponents()) { - curX += setComponentDims(origComp, useBaseline, ltr, rowY, rowHeight, leftX, rightX, curX) + getHgap(); - } - } - - if (row.getOppositeAligned() != null) { - curX = 0; - // reverse opposite aligned for layout purposes since flipping ltr - Collections.reverse(row.getOppositeAligned()); - for (Component oppAlignedComp : row.getOppositeAligned()) { - curX += setComponentDims(oppAlignedComp, useBaseline, !ltr, rowY, rowHeight, leftX, rightX, curX) + getHgap(); - } - } - - rowY += rowHeight + getVgap(); + int curX = 0; + if (row.getComponents() != null) { + for (Component origComp : row.getComponents()) { + curX += setComponentDims(origComp, useBaseline, ltr, rowY, rowHeight, leftX, rightX, curX) + getHgap(); } } + + if (row.getOppositeAligned() != null) { + curX = 0; + // reverse opposite aligned for layout purposes since flipping ltr + Collections.reverse(row.getOppositeAligned()); + for (Component oppAlignedComp : row.getOppositeAligned()) { + curX += setComponentDims(oppAlignedComp, useBaseline, !ltr, rowY, rowHeight, leftX, rightX, curX) + getHgap(); + } + } + + rowY += rowHeight + getVgap(); } } @@ -442,36 +436,32 @@ public class WrapLayout implements LayoutManager, java.io.Serializable { * @return The dimension to layout the target container. */ private Dimension layoutSize(Container target, boolean preferred) { - synchronized (target.getTreeLock()) { - synchronized (this.oppositeAlignedItems) { - ParentDimensions targetDims = getTargetDimensions(target); - List components = Arrays.asList(target.getComponents()); - List rows = getAllRows(components, preferred, targetDims.getInnerWidth()); + ParentDimensions targetDims = getTargetDimensions(target); + List components = Arrays.asList(target.getComponents()); + List rows = getAllRows(components, preferred, targetDims.getInnerWidth()); - Integer containerHeight = rows.stream().map((r) -> r.getHeight()).reduce(0, Integer::sum); - // add in vertical gap between rows - if (rows.size() > 1) { - containerHeight += (rows.size() - 1) * getVgap(); - } - - containerHeight += targetDims.getInsets().top + targetDims.getInsets().bottom; - - Integer containerWidth = rows.stream().map((r) -> r.getWidth()).reduce(0, Math::max); - containerWidth += targetDims.getInsets().left + targetDims.getInsets().right + (getHgap() * 2); - - // When using a scroll pane or the DecoratedLookAndFeel we need to - // make sure the preferred size is less than the size of the - // target containter so shrinking the container size works - // correctly. Removing the horizontal gap is an easy way to do this. - Container scrollPane = SwingUtilities.getAncestorOfClass(JScrollPane.class, target); - - if (scrollPane != null && target.isValid()) { - containerWidth -= (getHgap() + 1); - } - - return new Dimension(containerWidth, containerHeight); - } + Integer containerHeight = rows.stream().map((r) -> r.getHeight()).reduce(0, Integer::sum); + // add in vertical gap between rows + if (rows.size() > 1) { + containerHeight += (rows.size() - 1) * getVgap(); } + + containerHeight += targetDims.getInsets().top + targetDims.getInsets().bottom; + + Integer containerWidth = rows.stream().map((r) -> r.getWidth()).reduce(0, Math::max); + containerWidth += targetDims.getInsets().left + targetDims.getInsets().right + (getHgap() * 2); + + // When using a scroll pane or the DecoratedLookAndFeel we need to + // make sure the preferred size is less than the size of the + // target containter so shrinking the container size works + // correctly. Removing the horizontal gap is an easy way to do this. + Container scrollPane = SwingUtilities.getAncestorOfClass(JScrollPane.class, target); + + if (scrollPane != null && target.isValid()) { + containerWidth -= (getHgap() + 1); + } + + return new Dimension(containerWidth, containerHeight); } /** From cc46accfa2f79cc8e1bab1c40b8e48f50e64a448 Mon Sep 17 00:00:00 2001 From: Greg DiCristofaro Date: Wed, 8 Apr 2020 15:47:54 -0400 Subject: [PATCH 077/137] updated parent of ManageOrganizationsDialog when launching from OptionalCasePropertiesPanel --- .../OptionalCasePropertiesPanel.java | 4 +- .../ManageOrganizationsDialog.java | 37 +++++++++++++++++-- 2 files changed, 37 insertions(+), 4 deletions(-) diff --git a/Core/src/org/sleuthkit/autopsy/casemodule/OptionalCasePropertiesPanel.java b/Core/src/org/sleuthkit/autopsy/casemodule/OptionalCasePropertiesPanel.java index b5706027a3..9b753900b1 100644 --- a/Core/src/org/sleuthkit/autopsy/casemodule/OptionalCasePropertiesPanel.java +++ b/Core/src/org/sleuthkit/autopsy/casemodule/OptionalCasePropertiesPanel.java @@ -19,8 +19,10 @@ package org.sleuthkit.autopsy.casemodule; import java.awt.Cursor; +import java.awt.Dialog; import java.util.logging.Level; import javax.swing.JComboBox; +import javax.swing.SwingUtilities; import org.openide.util.NbBundle.Messages; import org.sleuthkit.autopsy.centralrepository.datamodel.CorrelationCase; import org.sleuthkit.autopsy.centralrepository.datamodel.CentralRepoException; @@ -516,7 +518,7 @@ final class OptionalCasePropertiesPanel extends javax.swing.JPanel { }//GEN-LAST:event_comboBoxOrgNameActionPerformed private void bnNewOrganizationActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_bnNewOrganizationActionPerformed - ManageOrganizationsDialog dialog = new ManageOrganizationsDialog(); + ManageOrganizationsDialog dialog = new ManageOrganizationsDialog((Dialog) SwingUtilities.getWindowAncestor(this)); // update the combobox options and org data fields loadOrganizationData(); if (dialog.isChanged()) { diff --git a/Core/src/org/sleuthkit/autopsy/centralrepository/optionspanel/ManageOrganizationsDialog.java b/Core/src/org/sleuthkit/autopsy/centralrepository/optionspanel/ManageOrganizationsDialog.java index dff44aa0c5..85373c06d2 100644 --- a/Core/src/org/sleuthkit/autopsy/centralrepository/optionspanel/ManageOrganizationsDialog.java +++ b/Core/src/org/sleuthkit/autopsy/centralrepository/optionspanel/ManageOrganizationsDialog.java @@ -19,6 +19,7 @@ package org.sleuthkit.autopsy.centralrepository.optionspanel; import java.awt.Component; +import java.awt.Dialog; import java.util.List; import java.util.logging.Level; import javax.swing.DefaultListCellRenderer; @@ -51,12 +52,41 @@ public final class ManageOrganizationsDialog extends JDialog { @Messages({"ManageOrganizationsDialog.title.text=Manage Organizations"}) /** - * Creates new form ManageOrganizationsPanel + * Creates new form ManageOrganizationsPanel. + * @param parent The dialog parent. */ - public ManageOrganizationsDialog() { - super((JFrame) WindowManager.getDefault().getMainWindow(), + public ManageOrganizationsDialog(Dialog parent) { + super(parent, Bundle.ManageOrganizationsDialog_title_text(), true); // NON-NLS + init(); + } + + + /** + * Creates new form ManageOrganizationsPanel. + * @param parent The JFrame parent. + */ + public ManageOrganizationsDialog(JFrame parent) { + super(parent, + Bundle.ManageOrganizationsDialog_title_text(), + true); // NON-NLS + init(); + } + + + /** + * Creates new form ManageOrganizationsPanel. + */ + public ManageOrganizationsDialog() { + this((JFrame) WindowManager.getDefault().getMainWindow()); + } + + + /** + * To be run as a part of constructor initialization. + */ + private void init() { initComponents(); try { this.dbManager = CentralRepository.getInstance(); @@ -85,6 +115,7 @@ public final class ManageOrganizationsDialog extends JDialog { private void display() { this.setLocationRelativeTo(WindowManager.getDefault().getMainWindow()); setVisible(true); + toFront(); } private void populateListAndSelect(CentralRepoOrganization selected) throws CentralRepoException { From 8755ba9302a9b27ad524fe9fe21c3056bf70e2b3 Mon Sep 17 00:00:00 2001 From: Greg DiCristofaro Date: Wed, 8 Apr 2020 16:07:53 -0400 Subject: [PATCH 078/137] update for codacy remark --- .../src/org/sleuthkit/autopsy/guiutils/WrapLayout.java | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/Core/src/org/sleuthkit/autopsy/guiutils/WrapLayout.java b/Core/src/org/sleuthkit/autopsy/guiutils/WrapLayout.java index f46d450558..2b993f9330 100644 --- a/Core/src/org/sleuthkit/autopsy/guiutils/WrapLayout.java +++ b/Core/src/org/sleuthkit/autopsy/guiutils/WrapLayout.java @@ -409,17 +409,19 @@ public class WrapLayout implements LayoutManager, java.io.Serializable { * @return The dimensions for laying out components. */ private ParentDimensions getTargetDimensions(Container target) { - while (target.getSize().width == 0 && target.getParent() != null) { - target = target.getParent(); + Container container = target; + + while (container.getSize().width == 0 && container.getParent() != null) { + container = container.getParent(); } - int targetWidth = target.getSize().width; + int targetWidth = container.getSize().width; if (targetWidth == 0) { targetWidth = Integer.MAX_VALUE; } - Insets insets = target.getInsets(); + Insets insets = container.getInsets(); int horizontalInsetsAndGap = insets.left + insets.right + (getHgap() * 2); int maxWidth = targetWidth - horizontalInsetsAndGap; From d5ed936797523f6521d6d143a5a12cbaa3729a7d Mon Sep 17 00:00:00 2001 From: Richard Cordovano Date: Wed, 8 Apr 2020 19:08:35 -0400 Subject: [PATCH 079/137] Release 4.15.0 version number changes --- Core/manifest.mf | 2 +- Core/nbproject/project.properties | 2 +- Core/nbproject/project.xml | 2 +- CoreLibs/manifest.mf | 4 ++-- Experimental/nbproject/project.xml | 4 ++-- ImageGallery/nbproject/project.xml | 4 ++-- KeywordSearch/nbproject/project.xml | 4 ++-- RecentActivity/nbproject/project.xml | 4 ++-- Testing/nbproject/project.xml | 2 +- docs/doxygen-user/Doxyfile | 4 ++-- docs/doxygen/Doxyfile | 4 ++-- nbproject/project.properties | 6 +++--- thunderbirdparser/nbproject/project.xml | 2 +- 13 files changed, 22 insertions(+), 22 deletions(-) diff --git a/Core/manifest.mf b/Core/manifest.mf index 494ba39afc..00681f3e7f 100644 --- a/Core/manifest.mf +++ b/Core/manifest.mf @@ -2,7 +2,7 @@ Manifest-Version: 1.0 OpenIDE-Module: org.sleuthkit.autopsy.core/10 OpenIDE-Module-Localizing-Bundle: org/sleuthkit/autopsy/core/Bundle.properties OpenIDE-Module-Layer: org/sleuthkit/autopsy/core/layer.xml -OpenIDE-Module-Implementation-Version: 30 +OpenIDE-Module-Implementation-Version: 31 OpenIDE-Module-Requires: org.openide.windows.WindowManager AutoUpdate-Show-In-Client: true AutoUpdate-Essential-Module: true diff --git a/Core/nbproject/project.properties b/Core/nbproject/project.properties index c7ceb01a4a..3fd1ed05d9 100644 --- a/Core/nbproject/project.properties +++ b/Core/nbproject/project.properties @@ -126,5 +126,5 @@ nbm.homepage=http://www.sleuthkit.org/ nbm.module.author=Brian Carrier nbm.needs.restart=true source.reference.curator-recipes-2.8.0.jar=release/modules/ext/curator-recipes-2.8.0-sources.jar -spec.version.base=10.18 +spec.version.base=10.19 diff --git a/Core/nbproject/project.xml b/Core/nbproject/project.xml index 4aa97960f3..64d9509e59 100644 --- a/Core/nbproject/project.xml +++ b/Core/nbproject/project.xml @@ -251,7 +251,7 @@ 3 - 1.3 + 1.4 diff --git a/CoreLibs/manifest.mf b/CoreLibs/manifest.mf index 1f7fcc545e..95267126df 100644 --- a/CoreLibs/manifest.mf +++ b/CoreLibs/manifest.mf @@ -1,8 +1,8 @@ Manifest-Version: 1.0 OpenIDE-Module: org.sleuthkit.autopsy.corelibs/3 -OpenIDE-Module-Implementation-Version: 6 +OpenIDE-Module-Implementation-Version: 7 OpenIDE-Module-Localizing-Bundle: org/sleuthkit/autopsy/corelibs/Bundle.properties -OpenIDE-Module-Specification-Version: 1.3 +OpenIDE-Module-Specification-Version: 1.4 AutoUpdate-Show-In-Client: true AutoUpdate-Essential-Module: true diff --git a/Experimental/nbproject/project.xml b/Experimental/nbproject/project.xml index 90fbce3d76..166c73f0a5 100644 --- a/Experimental/nbproject/project.xml +++ b/Experimental/nbproject/project.xml @@ -135,7 +135,7 @@ 10 - 10.18 + 10.19 @@ -144,7 +144,7 @@ 3 - 1.3 + 1.4 diff --git a/ImageGallery/nbproject/project.xml b/ImageGallery/nbproject/project.xml index a7157df475..4ef4c1fde1 100644 --- a/ImageGallery/nbproject/project.xml +++ b/ImageGallery/nbproject/project.xml @@ -127,7 +127,7 @@ 10 - 10.18 + 10.19 @@ -136,7 +136,7 @@ 3 - 1.3 + 1.4 diff --git a/KeywordSearch/nbproject/project.xml b/KeywordSearch/nbproject/project.xml index 2de991d105..10e1e76bfe 100644 --- a/KeywordSearch/nbproject/project.xml +++ b/KeywordSearch/nbproject/project.xml @@ -119,7 +119,7 @@ 10 - 10.18 + 10.19 @@ -128,7 +128,7 @@ 3 - 1.3 + 1.4 diff --git a/RecentActivity/nbproject/project.xml b/RecentActivity/nbproject/project.xml index 89394f1b1f..f6465f00a5 100644 --- a/RecentActivity/nbproject/project.xml +++ b/RecentActivity/nbproject/project.xml @@ -60,7 +60,7 @@ 10 - 10.18 + 10.19 @@ -69,7 +69,7 @@ 3 - 1.3 + 1.4 diff --git a/Testing/nbproject/project.xml b/Testing/nbproject/project.xml index def60a06ac..2ebb94a835 100644 --- a/Testing/nbproject/project.xml +++ b/Testing/nbproject/project.xml @@ -47,7 +47,7 @@ 10 - 10.18 + 10.19 diff --git a/docs/doxygen-user/Doxyfile b/docs/doxygen-user/Doxyfile index 6eb71ae8f8..0f985042a3 100644 --- a/docs/doxygen-user/Doxyfile +++ b/docs/doxygen-user/Doxyfile @@ -38,7 +38,7 @@ PROJECT_NAME = "Autopsy User Documentation" # could be handy for archiving the generated documentation or if some version # control system is used. -PROJECT_NUMBER = 4.14.0 +PROJECT_NUMBER = 4.15.0 # Using the PROJECT_BRIEF tag one can provide an optional one line description # for a project that appears at the top of each page and should give viewer a @@ -1025,7 +1025,7 @@ GENERATE_HTML = YES # The default directory is: html. # This tag requires that the tag GENERATE_HTML is set to YES. -HTML_OUTPUT = 4.14.0 +HTML_OUTPUT = 4.15.0 # The HTML_FILE_EXTENSION tag can be used to specify the file extension for each # generated HTML page (for example: .htm, .php, .asp). diff --git a/docs/doxygen/Doxyfile b/docs/doxygen/Doxyfile index 6490edacd6..993ee8ded2 100644 --- a/docs/doxygen/Doxyfile +++ b/docs/doxygen/Doxyfile @@ -38,7 +38,7 @@ PROJECT_NAME = "Autopsy" # could be handy for archiving the generated documentation or if some version # control system is used. -PROJECT_NUMBER = 4.14.0 +PROJECT_NUMBER = 4.15.0 # Using the PROJECT_BRIEF tag one can provide an optional one line description # for a project that appears a the top of each page and should give viewer a @@ -1066,7 +1066,7 @@ GENERATE_HTML = YES # The default directory is: html. # This tag requires that the tag GENERATE_HTML is set to YES. -HTML_OUTPUT = api-docs/4.14.0/ +HTML_OUTPUT = api-docs/4.15.0/ # The HTML_FILE_EXTENSION tag can be used to specify the file extension for each # generated HTML page (for example: .htm, .php, .asp). diff --git a/nbproject/project.properties b/nbproject/project.properties index 1f61a9c967..7cb61fc13a 100644 --- a/nbproject/project.properties +++ b/nbproject/project.properties @@ -4,10 +4,10 @@ app.title=Autopsy ### lowercase version of above app.name=${branding.token} ### if left unset, version will default to today's date -app.version=4.14.0 +app.version=4.15.0 ### build.type must be one of: DEVELOPMENT, RELEASE -#build.type=RELEASE -build.type=DEVELOPMENT +build.type=RELEASE +#build.type=DEVELOPMENT project.org.netbeans.progress=org-netbeans-api-progress project.org.sleuthkit.autopsy.experimental=Experimental diff --git a/thunderbirdparser/nbproject/project.xml b/thunderbirdparser/nbproject/project.xml index 4eebb3d2f4..29782066ac 100644 --- a/thunderbirdparser/nbproject/project.xml +++ b/thunderbirdparser/nbproject/project.xml @@ -36,7 +36,7 @@ 10 - 10.18 + 10.19 From 72a350debf688c5d768bb62e1e2809c8baa05835 Mon Sep 17 00:00:00 2001 From: Richard Cordovano Date: Wed, 8 Apr 2020 20:42:07 -0400 Subject: [PATCH 080/137] Toggle build to DEVELOPMENT --- nbproject/project.properties | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/nbproject/project.properties b/nbproject/project.properties index 7cb61fc13a..390228bc4d 100644 --- a/nbproject/project.properties +++ b/nbproject/project.properties @@ -6,8 +6,8 @@ app.name=${branding.token} ### if left unset, version will default to today's date app.version=4.15.0 ### build.type must be one of: DEVELOPMENT, RELEASE -build.type=RELEASE -#build.type=DEVELOPMENT +#build.type=RELEASE +build.type=DEVELOPMENT project.org.netbeans.progress=org-netbeans-api-progress project.org.sleuthkit.autopsy.experimental=Experimental From 797b4a99060ac555b8f0c09feb5af6b228fbe819 Mon Sep 17 00:00:00 2001 From: Greg DiCristofaro Date: Thu, 9 Apr 2020 07:54:25 -0400 Subject: [PATCH 081/137] remove in-memory mime type change --- .../sleuthkit/autopsy/textextractors/TextFileExtractor.java | 4 ---- 1 file changed, 4 deletions(-) diff --git a/Core/src/org/sleuthkit/autopsy/textextractors/TextFileExtractor.java b/Core/src/org/sleuthkit/autopsy/textextractors/TextFileExtractor.java index dda59cdcfd..af31797b52 100644 --- a/Core/src/org/sleuthkit/autopsy/textextractors/TextFileExtractor.java +++ b/Core/src/org/sleuthkit/autopsy/textextractors/TextFileExtractor.java @@ -90,10 +90,6 @@ public final class TextFileExtractor implements TextExtractor { return false; } mimeType = fileTypeDetector.getMIMEType(file); - - // if able to determine mime type, - if (!StringUtils.isEmpty(mimeType)) - file.setMIMEType(mimeType); } return PLAIN_TEXT_MIME_TYPE.equals(mimeType); From 4d72ae14b0b9400cd5cdb9294bfc7edd099e7509 Mon Sep 17 00:00:00 2001 From: Greg DiCristofaro Date: Thu, 9 Apr 2020 08:08:25 -0400 Subject: [PATCH 082/137] changed spelling error --- .../experimental/autoingest/DeleteOrphanCaseNodesTask.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Experimental/src/org/sleuthkit/autopsy/experimental/autoingest/DeleteOrphanCaseNodesTask.java b/Experimental/src/org/sleuthkit/autopsy/experimental/autoingest/DeleteOrphanCaseNodesTask.java index bc2371104d..63a3051d9b 100755 --- a/Experimental/src/org/sleuthkit/autopsy/experimental/autoingest/DeleteOrphanCaseNodesTask.java +++ b/Experimental/src/org/sleuthkit/autopsy/experimental/autoingest/DeleteOrphanCaseNodesTask.java @@ -179,7 +179,7 @@ final class DeleteOrphanCaseNodesTask implements Runnable { return dialogResult.isValue(); } catch (InterruptedException | InvocationTargetException e) { - logger.log(Level.WARNING, "Task cancelled while confirmingg case znodes to delete"); //NON-NLS + logger.log(Level.WARNING, "Task cancelled while confirming case znodes to delete"); //NON-NLS return false; } } From dd2ceabe21744b5aff13c7fa71f32dffa33e329c Mon Sep 17 00:00:00 2001 From: Raman Arora Date: Thu, 9 Apr 2020 09:13:25 -0400 Subject: [PATCH 083/137] 6200: Add personas tables to the CR. --- .../centralrepository/datamodel/RdbmsCentralRepo.java | 2 +- .../datamodel/RdbmsCentralRepoFactory.java | 11 +++++------ 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/Core/src/org/sleuthkit/autopsy/centralrepository/datamodel/RdbmsCentralRepo.java b/Core/src/org/sleuthkit/autopsy/centralrepository/datamodel/RdbmsCentralRepo.java index 256e5407c9..53d67ed21b 100644 --- a/Core/src/org/sleuthkit/autopsy/centralrepository/datamodel/RdbmsCentralRepo.java +++ b/Core/src/org/sleuthkit/autopsy/centralrepository/datamodel/RdbmsCentralRepo.java @@ -65,7 +65,7 @@ abstract class RdbmsCentralRepo implements CentralRepository { static final String SCHEMA_MINOR_VERSION_KEY = "SCHEMA_MINOR_VERSION"; static final String CREATION_SCHEMA_MAJOR_VERSION_KEY = "CREATION_SCHEMA_MAJOR_VERSION"; static final String CREATION_SCHEMA_MINOR_VERSION_KEY = "CREATION_SCHEMA_MINOR_VERSION"; - static final CaseDbSchemaVersionNumber SOFTWARE_CR_DB_SCHEMA_VERSION = new CaseDbSchemaVersionNumber(1, 4); + static final CaseDbSchemaVersionNumber SOFTWARE_CR_DB_SCHEMA_VERSION = new CaseDbSchemaVersionNumber(1, 5); protected final List defaultCorrelationTypes; diff --git a/Core/src/org/sleuthkit/autopsy/centralrepository/datamodel/RdbmsCentralRepoFactory.java b/Core/src/org/sleuthkit/autopsy/centralrepository/datamodel/RdbmsCentralRepoFactory.java index c01d3ee4e4..e56dae287d 100644 --- a/Core/src/org/sleuthkit/autopsy/centralrepository/datamodel/RdbmsCentralRepoFactory.java +++ b/Core/src/org/sleuthkit/autopsy/centralrepository/datamodel/RdbmsCentralRepoFactory.java @@ -168,8 +168,8 @@ public class RdbmsCentralRepoFactory { stmt.execute(String.format(getReferenceTypeValueKnownstatusIndexTemplate(), reference_type_dbname, reference_type_dbname)); } } - // @TODO: uncomment this when ready to create Persona tables. - //createPersonaTables(stmt); + // create Persona tables. + createPersonaTables(stmt); } catch (SQLException ex) { LOGGER.log(Level.SEVERE, "Error initializing db schema.", ex); // NON-NLS return false; @@ -199,10 +199,9 @@ public class RdbmsCentralRepoFactory { } result = CentralRepoDbUtil.insertDefaultCorrelationTypes(conn) - && CentralRepoDbUtil.insertDefaultOrganization(conn) && - RdbmsCentralRepoFactory.insertDefaultAccountsTablesContent(conn, selectedPlatform ); - // @TODO: uncomment when ready to create/populate persona tables - // && insertDefaultPersonaTablesContent(conn); + && CentralRepoDbUtil.insertDefaultOrganization(conn) + && RdbmsCentralRepoFactory.insertDefaultAccountsTablesContent(conn, selectedPlatform ) + && insertDefaultPersonaTablesContent(conn, selectedPlatform); } catch (SQLException ex) { LOGGER.log(Level.SEVERE, String.format("Failed to populate default data in CR tables."), ex); From 6ff3be941e3cd41229d94cd7ee36d8b1766181d6 Mon Sep 17 00:00:00 2001 From: apriestman Date: Thu, 9 Apr 2020 11:00:53 -0400 Subject: [PATCH 084/137] Specify Java 8 and add installer links. --- docs/doxygen-user/multi-user/installActiveMQ.dox | 2 +- docs/doxygen-user/multi-user/installSolr.dox | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/doxygen-user/multi-user/installActiveMQ.dox b/docs/doxygen-user/multi-user/installActiveMQ.dox index 475e558a08..07a6f1dcfd 100644 --- a/docs/doxygen-user/multi-user/installActiveMQ.dox +++ b/docs/doxygen-user/multi-user/installActiveMQ.dox @@ -8,7 +8,7 @@ ActiveMQ is a messaging service that allows the Autopsy clients to communicate w \section install_activemq_prereq Prerequisites You will need: -- 64-bit version of the Java Runtime Environment (JRE) from https://github.com/ojdkbuild/ojdkbuild. +- 64-bit version of the Java 8 Runtime Environment (JRE) from https://github.com/ojdkbuild/ojdkbuild ( Link to installer) - Download ActiveMQ from: http://activemq.apache.org/download.html . Autopsy has been tested with ActiveMQ version 5.14.0. diff --git a/docs/doxygen-user/multi-user/installSolr.dox b/docs/doxygen-user/multi-user/installSolr.dox index f49c2e4b39..1c3970e344 100644 --- a/docs/doxygen-user/multi-user/installSolr.dox +++ b/docs/doxygen-user/multi-user/installSolr.dox @@ -13,7 +13,7 @@ Solr's embedded ZooKeeper is also used as a coordination service for Autopsy. We use Bitnami Solr, which packages Solr as a Windows service. You will need: -- A 64-bit version of the Java Runtime Environment (JRE) from https://github.com/ojdkbuild/ojdkbuild. +- A 64-bit version of the Java 8 Runtime Environment (JRE) from https://github.com/ojdkbuild/ojdkbuild. ( Link to installer) - The Apache Solr 4.10.3-0 installation package. This is no longer available from its original source, but you can find it on our site: https://sourceforge.net/projects/autopsy/files/CollaborativeServices/Solr. -- NOTE: We tested Solr 6 at one point, but ran into stability problems when loading and unloading cores. For now, you need to use Solr 4. - An installed version of Autopsy so that you can copy files from it. You can install Autopsy on one of the planned client systems. You do not need to install it on the Solr server. From 8a71c6e9f90e05ac11b7cd7c1d5fd265f4081717 Mon Sep 17 00:00:00 2001 From: Greg DiCristofaro Date: Thu, 9 Apr 2020 15:02:12 -0400 Subject: [PATCH 085/137] update for wrapped jars --- Core/nbproject/project.properties | 2 +- Core/nbproject/project.xml | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/Core/nbproject/project.properties b/Core/nbproject/project.properties index c7ceb01a4a..b34db751e1 100644 --- a/Core/nbproject/project.properties +++ b/Core/nbproject/project.properties @@ -42,7 +42,7 @@ file.reference.jdom-2.0.5.jar=release/modules/ext/jdom-2.0.5.jar file.reference.jdom2-2.0.6.jar=release\\modules\\ext\\jdom2-2.0.6.jar file.reference.jempbox-1.8.16.jar=release\\modules\\ext\\jempbox-1.8.16.jar file.reference.jericho-html-3.3.jar=release/modules/ext/jericho-html-3.3.jar -file.reference.jgraphx-v3.8.0.jar=release/modules/ext/jgraphx-v3.8.0.jar +file.reference.jgraphx-4.1.0.jar=release/modules/ext/jgraphx-4.1.0.jar file.reference.jhighlight-1.0.3.jar=release\\modules\\ext\\jhighlight-1.0.3.jar file.reference.jmatio-1.5.jar=release\\modules\\ext\\jmatio-1.5.jar file.reference.json-simple-1.1.1.jar=release\\modules\\ext\\json-simple-1.1.1.jar diff --git a/Core/nbproject/project.xml b/Core/nbproject/project.xml index 4aa97960f3..d05ee534d9 100644 --- a/Core/nbproject/project.xml +++ b/Core/nbproject/project.xml @@ -495,6 +495,10 @@ ext/vorbis-java-core-0.8.jar release\modules\ext\vorbis-java-core-0.8.jar + + ext/jgraphx-4.1.0.jar + release/modules/ext/jgraphx-4.1.0.jar + ext/java-libpst-0.8.1.jar release\modules\ext\java-libpst-0.8.1.jar @@ -711,10 +715,6 @@ ext/google-auth-library-oauth2-http-0.15.0.jar release/modules/ext/google-auth-library-oauth2-http-0.15.0.jar - - ext/jgraphx-v3.8.0.jar - release/modules/ext/jgraphx-v3.8.0.jar - ext/juniversalchardet-1.0.3.jar release\modules\ext\juniversalchardet-1.0.3.jar From 5a089bae8cf8c7c5daaa631babf2f411f2083628 Mon Sep 17 00:00:00 2001 From: Greg DiCristofaro Date: Thu, 9 Apr 2020 15:21:30 -0400 Subject: [PATCH 086/137] move to new WrapLayout --- .../communications/VisualizationPanel.java | 5 +- .../DataResultViewerThumbnail.java | 4 +- .../autopsy/uicomponents/WrapLayout.java | 204 ------------------ 3 files changed, 4 insertions(+), 209 deletions(-) delete mode 100755 Core/src/org/sleuthkit/autopsy/uicomponents/WrapLayout.java diff --git a/Core/src/org/sleuthkit/autopsy/communications/VisualizationPanel.java b/Core/src/org/sleuthkit/autopsy/communications/VisualizationPanel.java index 263bb200e6..1799ebcb8d 100644 --- a/Core/src/org/sleuthkit/autopsy/communications/VisualizationPanel.java +++ b/Core/src/org/sleuthkit/autopsy/communications/VisualizationPanel.java @@ -43,7 +43,6 @@ import java.awt.BorderLayout; import java.awt.Color; import java.awt.Desktop; import java.awt.Dimension; -import java.awt.FlowLayout; import java.awt.Font; import java.awt.Frame; import java.awt.Graphics; @@ -110,7 +109,7 @@ import org.sleuthkit.datamodel.AccountDeviceInstance; import org.sleuthkit.datamodel.CommunicationsFilter; import org.sleuthkit.datamodel.CommunicationsManager; import org.sleuthkit.datamodel.TskCoreException; -import org.sleuthkit.autopsy.uicomponents.WrapLayout; +import org.sleuthkit.autopsy.guiutils.WrapLayout; /** * A panel that goes in the Visualize tab of the Communications Visualization * Tool. Hosts an JGraphX mxGraphComponent that implements the communications @@ -245,7 +244,7 @@ final public class VisualizationPanel extends JPanel { setStateButtonsEnabled(); - toolbar.setLayout(new WrapLayout(FlowLayout.LEFT)); + toolbar.setLayout(new WrapLayout()); } @Subscribe diff --git a/Core/src/org/sleuthkit/autopsy/corecomponents/DataResultViewerThumbnail.java b/Core/src/org/sleuthkit/autopsy/corecomponents/DataResultViewerThumbnail.java index 807acc5e07..c0aa235223 100644 --- a/Core/src/org/sleuthkit/autopsy/corecomponents/DataResultViewerThumbnail.java +++ b/Core/src/org/sleuthkit/autopsy/corecomponents/DataResultViewerThumbnail.java @@ -56,7 +56,7 @@ import static org.sleuthkit.autopsy.corecomponents.Bundle.*; import org.sleuthkit.autopsy.corecomponents.ResultViewerPersistence.SortCriterion; import org.sleuthkit.autopsy.coreutils.ImageUtils; import org.sleuthkit.autopsy.coreutils.Logger; -import org.sleuthkit.autopsy.uicomponents.WrapLayout; +import org.sleuthkit.autopsy.guiutils.WrapLayout; import org.sleuthkit.datamodel.AbstractFile; import org.sleuthkit.datamodel.TskCoreException; @@ -127,7 +127,7 @@ public final class DataResultViewerThumbnail extends AbstractDataResultViewer { // The GUI builder is using FlowLayout therefore this change so have no // impact on the initally designed layout. This change will just effect // how the components are laid out as size of the window changes. - buttonBarPanel.setLayout(new WrapLayout(java.awt.FlowLayout.LEFT)); + buttonBarPanel.setLayout(new WrapLayout()); } /** diff --git a/Core/src/org/sleuthkit/autopsy/uicomponents/WrapLayout.java b/Core/src/org/sleuthkit/autopsy/uicomponents/WrapLayout.java deleted file mode 100755 index 5daf8d5646..0000000000 --- a/Core/src/org/sleuthkit/autopsy/uicomponents/WrapLayout.java +++ /dev/null @@ -1,204 +0,0 @@ -/* - * 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.uicomponents; - -import java.awt.Component; -import java.awt.Container; -import java.awt.Dimension; -import java.awt.FlowLayout; -import java.awt.Insets; -import javax.swing.JScrollPane; -import javax.swing.SwingUtilities; - -/** -* FlowLayout subclass that fully supports wrapping of components. -* -* Originally written by Rob Camick -* https://tips4java.wordpress.com/2008/11/06/wrap-layout/ -*/ -public class WrapLayout extends FlowLayout { - - private static final long serialVersionUID = 1L; - /** - * Constructs a new WrapLayout with a left alignment and a - * default 5-unit horizontal and vertical gap. - */ - public WrapLayout() { - super(); - } - - /** - * Constructs a new FlowLayout with the specified alignment - * and a default 5-unit horizontal and vertical gap. The value of the - * alignment argument must be one of WrapLayout, - * WrapLayout, or WrapLayout. - * - * @param align the alignment value - */ - public WrapLayout(int align) { - super(align); - } - - /** - * Creates a new flow layout manager with the indicated alignment and - * the indicated horizontal and vertical gaps. - *

    - * The value of the alignment argument must be one of - * WrapLayout, WrapLayout, or - * WrapLayout. - * - * @param align the alignment value - * @param hgap the horizontal gap between components - * @param vgap the vertical gap between components - */ - public WrapLayout(int align, int hgap, int vgap) { - super(align, hgap, vgap); - } - - /** - * Returns the preferred dimensions for this layout given the - * visible components in the specified target container. - * - * @param target the component which needs to be laid out - * - * @return the preferred dimensions to lay out the subcomponents of the - * specified container - */ - @Override - public Dimension preferredLayoutSize(Container target) { - return layoutSize(target, true); - } - - /** - * Returns the minimum dimensions needed to layout the visible - * components contained in the specified target container. - * - * @param target the component which needs to be laid out - * - * @return the minimum dimensions to lay out the subcomponents of the - * specified container - */ - @Override - public Dimension minimumLayoutSize(Container target) { - Dimension minimum = layoutSize(target, false); - minimum.width -= (getHgap() + 1); - return minimum; - } - - /** - * Returns the minimum or preferred dimension needed to layout the - * target container. - * - * @param target target to get layout size for - * @param preferred should preferred size be calculated - * - * @return the dimension to layout the target container - */ - private Dimension layoutSize(Container target, boolean preferred) { - synchronized (target.getTreeLock()) { - // Each row must fit with the width allocated to the containter. - // When the container width = 0, the preferred width of the container - // has not yet been calculated so lets ask for the maximum. - - int targetWidth = target.getSize().width; - Container container = target; - - while (container.getSize().width == 0 && container.getParent() != null) { - container = container.getParent(); - } - - targetWidth = container.getSize().width; - - if (targetWidth == 0) { - targetWidth = Integer.MAX_VALUE; - } - - int hgap = getHgap(); - int vgap = getVgap(); - Insets insets = target.getInsets(); - int horizontalInsetsAndGap = insets.left + insets.right + (hgap * 2); - int maxWidth = targetWidth - horizontalInsetsAndGap; - - // Fit components into the allowed width - Dimension dim = new Dimension(0, 0); - int rowWidth = 0; - int rowHeight = 0; - - int nmembers = target.getComponentCount(); - - for (int i = 0; i < nmembers; i++) { - Component m = target.getComponent(i); - - if (m.isVisible()) { - Dimension d = preferred ? m.getPreferredSize() : m.getMinimumSize(); - - // Can't add the component to current row. Start a new row. - if (rowWidth + d.width > maxWidth) { - addRow(dim, rowWidth, rowHeight); - rowWidth = 0; - rowHeight = 0; - } - - // Add a horizontal gap for all components after the first - if (rowWidth != 0) { - rowWidth += hgap; - } - - rowWidth += d.width; - rowHeight = Math.max(rowHeight, d.height); - } - } - - addRow(dim, rowWidth, rowHeight); - - dim.width += horizontalInsetsAndGap; - dim.height += insets.top + insets.bottom + vgap * 2; - - // When using a scroll pane or the DecoratedLookAndFeel we need to - // make sure the preferred size is less than the size of the - // target containter so shrinking the container size works - // correctly. Removing the horizontal gap is an easy way to do this. - Container scrollPane = SwingUtilities.getAncestorOfClass(JScrollPane.class, target); - - if (scrollPane != null && target.isValid()) { - dim.width -= (hgap + 1); - } - - return dim; - } - } - - /* - * A new row has been completed. Use the dimensions of this row to - * update the preferred size for the container. - * - * @param dim update the width and height when appropriate @param - * rowWidth the width of the row to add @param rowHeight the height of - * the row to add - */ - private void addRow(Dimension dim, int rowWidth, int rowHeight) { - dim.width = Math.max(dim.width, rowWidth); - - if (dim.height > 0) { - dim.height += getVgap(); - } - - dim.height += rowHeight; - } - } \ No newline at end of file From 3a110c2849cfcd72cab0dd693429d8bd65b5e00b Mon Sep 17 00:00:00 2001 From: Ethan Roseman Date: Fri, 10 Apr 2020 09:57:41 -0400 Subject: [PATCH 087/137] 6161: Highlight color -> white --- .../autopsy/geolocation/MapPanel.java | 24 +------------------ 1 file changed, 1 insertion(+), 23 deletions(-) diff --git a/Core/src/org/sleuthkit/autopsy/geolocation/MapPanel.java b/Core/src/org/sleuthkit/autopsy/geolocation/MapPanel.java index 26caf30654..430d2e58f5 100755 --- a/Core/src/org/sleuthkit/autopsy/geolocation/MapPanel.java +++ b/Core/src/org/sleuthkit/autopsy/geolocation/MapPanel.java @@ -692,28 +692,6 @@ final public class MapPanel extends javax.swing.JPanel { private final Map imageCache = new HashMap<>(); - /** - * - * @param from the color to start with - * @param to the color to blend into - * @param amount the amount by which to blend - * @return a blended color - */ - private Color blend(Color from, Color to, float amount) { - float inverse = 1.0f - amount; - - float fromC[] = new float[3]; - from.getColorComponents(fromC); - float toC[] = new float[3]; - to.getColorComponents(toC); - float result[] = new float[3]; - result[0] = fromC[0] * inverse + toC[0] * amount; - result[1] = fromC[1] * inverse + toC[1] * amount; - result[2] = fromC[2] * inverse + toC[2] * amount; - - return new Color(result[0], result[1], result[2]); - } - /** * * @param waypoint the waypoint for which to get the color @@ -725,7 +703,7 @@ final public class MapPanel extends javax.swing.JPanel { Color baseColor = waypoint.getColor(); if (waypoint.equals(currentlySelectedWaypoint)) { // Highlight this waypoint since it is selected - return blend(baseColor, Color.WHITE, 0.8f); + return Color.WHITE; } else { return baseColor; } From f43e375891685d47f292cbe05ff9f7d3a9a19124 Mon Sep 17 00:00:00 2001 From: apriestman Date: Fri, 10 Apr 2020 11:03:29 -0400 Subject: [PATCH 088/137] Change variable name --- InternalPythonModules/GPX_Module/GPX_Parser_Module.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/InternalPythonModules/GPX_Module/GPX_Parser_Module.py b/InternalPythonModules/GPX_Module/GPX_Parser_Module.py index fe92d0d659..3d202a963b 100644 --- a/InternalPythonModules/GPX_Module/GPX_Parser_Module.py +++ b/InternalPythonModules/GPX_Module/GPX_Parser_Module.py @@ -214,10 +214,10 @@ class GPXParserDataSourceIngestModule(DataSourceIngestModule): geoWaypoints = GeoWaypoints() for point in route.points: - geoWaypointList.addPoint(Waypoint(point.latitude, point.longitude, point.elevation, point.name)) + geoWaypoints.addPoint(Waypoint(point.latitude, point.longitude, point.elevation, point.name)) try: - geoArtifactHelper.addRoute(None, None, geoWaypointList, None) + geoArtifactHelper.addRoute(None, None, geoWaypoints, None) except Blackboard.BlackboardException as e: self.log("Error posting GPS route artifact for " + file.getUniquePath() + " (objID = " + str(file.getId()) + "):" + e.getMessage()) except TskCoreException as e: From f15a2ea712f5391dade596dae076438dc4153b8a Mon Sep 17 00:00:00 2001 From: Greg DiCristofaro Date: Fri, 10 Apr 2020 11:49:39 -0400 Subject: [PATCH 089/137] improved commenting --- .../autopsy/guiutils/WrapLayout.java | 139 ++++++++---------- 1 file changed, 63 insertions(+), 76 deletions(-) diff --git a/Core/src/org/sleuthkit/autopsy/guiutils/WrapLayout.java b/Core/src/org/sleuthkit/autopsy/guiutils/WrapLayout.java index 2b993f9330..c9df4aa4a4 100644 --- a/Core/src/org/sleuthkit/autopsy/guiutils/WrapLayout.java +++ b/Core/src/org/sleuthkit/autopsy/guiutils/WrapLayout.java @@ -35,13 +35,13 @@ import javax.swing.JScrollPane; import javax.swing.SwingUtilities; /** - * A layout class similar to FlowLayout in that when a component can't fit in a - * row it is moved to the next row. Inspired by WrapLayout, this layout also - * allows for aligning some components in the opposite side. In instances where - * components are laid out left to right, these opposite aligned components will - * be aligned to the right. + * A wrap layout, similar to flow layout, orders subcomponents in a horizontal + * row similar to words in a paragraph. When subcomponents are moved to a new + * row, the height of the target component is expanded to accomodate. This + * layout also accomodates simultaneously left-aligned and right-aligned + * components. * - * Inspired by WrapLayout + * Inspired by Rob Camick's WrapLayout * https://tips4java.wordpress.com/2008/11/06/wrap-layout/ and FlowLayout * https://raw.githubusercontent.com/mynawang/Java8-Source-Code/master/src/main/jdk8/java/awt/FlowLayout.java. */ @@ -50,9 +50,9 @@ public class WrapLayout implements LayoutManager, java.io.Serializable { private static final long serialVersionUID = 1L; /** - * The WrapLayout manager allows a separation of components - * with gaps. The horizontal gap will specify the space between components - * and between the components and the borders of the Container. + * The horizontal gap will specify the spacing between neighboring + * subcomponents as well as the spacing between subcomponents and the + * borders of the target component. * * @serial * @see #getHgap() @@ -61,9 +61,8 @@ public class WrapLayout implements LayoutManager, java.io.Serializable { private int hgap = 0; /** - * The WrapLayout manager allows a separation of components - * with gaps. The vertical gap will specify the space between rows and - * between the the rows and the borders of the Container. + * The vertical gap between neighboring rows as well as the spacing between + * rows and the borders of the target component. * * @serial * @see #getVgap() @@ -72,29 +71,34 @@ public class WrapLayout implements LayoutManager, java.io.Serializable { private int vgap = 0; /** - * If true, components will be aligned on their baseline. + * If true, subcomponents will be aligned on their bottom edge. Otherwise, + * subcomponents are aligned on their top edge. */ private boolean alignOnBaseline = false; /** - * The set of components that will be aligned on the opposite side (if left - * to right, on the right). + * The set of components that will be aligned on the opposite side. If the + * target component's orientation is left to right, this set of components + * will be right aligned. */ private final Set oppositeAlignedItems = new HashSet<>(); /** - * Constructs a new WrapLayout with a left alignment and a - * default 5-unit horizontal and vertical gap. + * Constructs a new WrapLayout with a default 5-unit horizontal + * and vertical gap. */ public WrapLayout() { this(5, 5); } /** - * Constructs a new WrapLayout with a left alignment. + * Constructs a new WrapLayout. * - * @param vgap The vertical gap spacing between rows of components. - * @param hgap The horizontal gap spacing between components. + * @param vgap The vertical gap spacing between rows of subcomponents as + * well as the spacing between the target component and rows. + * @param hgap The horizontal gap spacing between neighboring subcomponents + * as well as the spacing between the subcomponents and the + * target component's border. */ public WrapLayout(int vgap, int hgap) { this.vgap = vgap; @@ -102,12 +106,12 @@ public class WrapLayout implements LayoutManager, java.io.Serializable { } /** - * Items in the collection will be aligned opposite to the rest. For - * instance, if items should be displayed left to right based on locale, - * these components will be on the right. + * Sets the set of components that will be aligned on the opposite side. If + * the target component's orientation is left to right, this set of + * components will be right aligned. * - * @param oppAlignedComponents The components to display with opposite - * alignment. + * @param oppAlignedComponents The components that will be aligned on the + * opposite side. */ public void setOppositeAligned(Collection oppAlignedComponents) { this.oppositeAlignedItems.clear(); @@ -115,19 +119,20 @@ public class WrapLayout implements LayoutManager, java.io.Serializable { } /** - * Items in the collection will be aligned opposite to the rest. For - * instance, if items should be displayed left to right based on locale, - * these components will be on the right. + * Retrieves the set of components that will be aligned on the opposite + * side. If the target component's orientation is left to right, this set of + * components will be right aligned. * - * @return The components to display with opposite alignment. + * @return The components that will be aligned on the opposite side. */ public Collection getOppositeAlignedItems() { return Collections.unmodifiableCollection(oppositeAlignedItems); } /** - * Gets the horizontal gap between components and between the components and - * the borders of the Container + * Retrieves the horizontal gap between neighboring subcomponents as well as + * the spacing between subcomponents and the borders of the target + * component. * * @return The horizontal gap between components and between the components * and the borders of the Container. @@ -137,8 +142,8 @@ public class WrapLayout implements LayoutManager, java.io.Serializable { } /** - * Sets the horizontal gap between components and between the components and - * the borders of the Container. + * Sets the horizontal gap between neighboring subcomponents as well as the + * spacing between subcomponents and the borders of the target component. * * @param hgap The horizontal gap between components and between the * components and the borders of the Container. @@ -148,8 +153,8 @@ public class WrapLayout implements LayoutManager, java.io.Serializable { } /** - * Gets the vertical gap between components and between the components and - * the borders of the Container. + * Retrieves the vertical gap between neighboring rows as well as the + * spacing between rows and the borders of the target component. * * @return The vertical gap between components and between the components * and the borders of the Container. @@ -159,8 +164,8 @@ public class WrapLayout implements LayoutManager, java.io.Serializable { } /** - * Sets the vertical gap between components and between the components and - * the borders of the Container. + * Sets the vertical gap between neighboring rows as well as the spacing + * between rows and the borders of the target component. * * @param vgap The vertical gap between components and between the * components and the borders of the Container. @@ -170,12 +175,12 @@ public class WrapLayout implements LayoutManager, java.io.Serializable { } /** - * Sets whether or not components should be vertically aligned along their - * baseline. Components that do not have a baseline will be centered. The - * default is false. + * Sets whether or not subcomponents should be vertically aligned along + * their bottom edge. Otherwise, subcomponents are aligned on their top + * edge. The default is false. * * @param alignOnBaseline Whether or not components should be vertically - * aligned on their baseline. + * aligned on their bottom edge. */ public void setAlignOnBaseline(boolean alignOnBaseline) { this.alignOnBaseline = alignOnBaseline; @@ -183,10 +188,11 @@ public class WrapLayout implements LayoutManager, java.io.Serializable { /** * Returns true if components are to be vertically aligned along their - * baseline. The default is false. + * bottom edge. Otherwise, subcomponents are aligned on their top edge. The + * default is false. * - * @return true If components are to be vertically aligned along their - * baseline. + * @return If components are to be vertically aligned along their bottom + * edge. */ public boolean getAlignOnBaseline() { return alignOnBaseline; @@ -194,7 +200,7 @@ public class WrapLayout implements LayoutManager, java.io.Serializable { /** * Adds the specified component to the layout. Not used by this class. NOTE: - * This is not used for this layout + * This method is not used by this layout. * * @param name The name of the component. * @param comp The component to be added. @@ -206,7 +212,7 @@ public class WrapLayout implements LayoutManager, java.io.Serializable { /** * Removes the specified component from the layout. Not used by this class. - * NOTE: This is not used for this layout + * NOTE: This method is not used by this layout. * * @param comp The component to remove. */ @@ -226,7 +232,8 @@ public class WrapLayout implements LayoutManager, java.io.Serializable { * * @return The top y position of the component. */ - private int getComponentY(int rowY, boolean alignBaseline, int rowHeight, int itemHeight) { + private int getComponentY(int rowY, boolean alignBaseline, int rowHeight, + int itemHeight) { return alignBaseline ? rowY + rowHeight - itemHeight : rowY; @@ -244,7 +251,8 @@ public class WrapLayout implements LayoutManager, java.io.Serializable { * * @return The component's left x position. */ - private int getComponentX(int leftX, int rightX, boolean ltr, int xPos, int componentWidth) { + private int getComponentX(int leftX, int rightX, boolean ltr, int xPos, + int componentWidth) { return ltr ? leftX + xPos : rightX - xPos - componentWidth; } @@ -265,7 +273,10 @@ public class WrapLayout implements LayoutManager, java.io.Serializable { * * @return The width of the component. */ - private int setComponentDims(Component comp, boolean alignBaseline, boolean ltr, int rowY, int rowHeight, int leftX, int rightX, int xPos) { + private int setComponentDims(Component comp, boolean alignBaseline, + boolean ltr, int rowY, int rowHeight, int leftX, int rightX, + int xPos) { + Dimension d = comp.getPreferredSize(); comp.setSize(d); @@ -276,13 +287,6 @@ public class WrapLayout implements LayoutManager, java.io.Serializable { return d.width; } - /** - * Lays out the container. This method lets each - * visible component take its preferred size by reshaping the - * components in the target container and creating new rows. - * - * @param target The specified component being laid out. - */ @Override public void layoutContainer(Container target) { ParentDimensions targetDims = getTargetDimensions(target); @@ -319,29 +323,11 @@ public class WrapLayout implements LayoutManager, java.io.Serializable { } } - /** - * Returns the preferred dimensions for this layout given the - * visible components in the specified target container. - * - * @param target The component which needs to be laid out. - * - * @return The preferred dimensions to lay out the subcomponents of the - * specified container. - */ @Override public Dimension preferredLayoutSize(Container target) { return layoutSize(target, true); } - /** - * Returns the minimum dimensions needed to layout the visible - * components contained in the specified target container. - * - * @param target The component which needs to be laid out. - * - * @return The minimum dimensions to lay out the subcomponents of the - * specified container. - */ @Override public Dimension minimumLayoutSize(Container target) { Dimension minimum = layoutSize(target, false); @@ -410,7 +396,7 @@ public class WrapLayout implements LayoutManager, java.io.Serializable { */ private ParentDimensions getTargetDimensions(Container target) { Container container = target; - + while (container.getSize().width == 0 && container.getParent() != null) { container = container.getParent(); } @@ -613,7 +599,8 @@ public class WrapLayout implements LayoutManager, java.io.Serializable { * * @return The list of rows determined. */ - private List getRowSet(List components, boolean preferred, int maxWidth) { + private List getRowSet(List components, + boolean preferred, int maxWidth) { List rows = new ArrayList<>(); List rowComponents = new ArrayList<>(); From f1e2bd67f0d2ea78b750914c71c168e207befe31 Mon Sep 17 00:00:00 2001 From: Greg DiCristofaro Date: Fri, 10 Apr 2020 11:55:18 -0400 Subject: [PATCH 090/137] improved commenting --- Core/src/org/sleuthkit/autopsy/guiutils/WrapLayout.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Core/src/org/sleuthkit/autopsy/guiutils/WrapLayout.java b/Core/src/org/sleuthkit/autopsy/guiutils/WrapLayout.java index c9df4aa4a4..b4208faa6c 100644 --- a/Core/src/org/sleuthkit/autopsy/guiutils/WrapLayout.java +++ b/Core/src/org/sleuthkit/autopsy/guiutils/WrapLayout.java @@ -473,7 +473,8 @@ public class WrapLayout implements LayoutManager, java.io.Serializable { * @param height The maximum height of the row. * @param width The total width of the row. */ - WrapLayoutRow(List components, List oppositeAligned, int height, int width) { + WrapLayoutRow(List components, List oppositeAligned, + int height, int width) { this.components = components; this.oppositeAligned = oppositeAligned; this.height = height; @@ -536,7 +537,8 @@ public class WrapLayout implements LayoutManager, java.io.Serializable { * * @return The list of rows ordered from top to bottom. */ - private List getAllRows(List components, boolean preferred, int maxWidth) { + private List getAllRows(List components, + boolean preferred, int maxWidth) { List originalComp = components .stream() From e44251ce0b44499e8ee08f09b4bb23f962930530 Mon Sep 17 00:00:00 2001 From: Ethan Roseman Date: Fri, 10 Apr 2020 12:30:10 -0400 Subject: [PATCH 091/137] 6161: Icons are now the color of their waypoint rather than the artifact type icon --- .../autopsy/geolocation/GeoFilterPanel.java | 70 ++++++++++++------- .../autopsy/geolocation/MapWaypoint.java | 10 ++- 2 files changed, 54 insertions(+), 26 deletions(-) diff --git a/Core/src/org/sleuthkit/autopsy/geolocation/GeoFilterPanel.java b/Core/src/org/sleuthkit/autopsy/geolocation/GeoFilterPanel.java index 213f7fe188..f9d8fca38e 100755 --- a/Core/src/org/sleuthkit/autopsy/geolocation/GeoFilterPanel.java +++ b/Core/src/org/sleuthkit/autopsy/geolocation/GeoFilterPanel.java @@ -18,8 +18,11 @@ */ package org.sleuthkit.autopsy.geolocation; +import java.awt.Color; +import java.awt.Graphics; import java.awt.GridBagConstraints; import java.awt.event.ActionListener; +import java.awt.image.BufferedImage; import java.util.ArrayList; import java.util.Collections; import java.util.HashMap; @@ -363,21 +366,17 @@ class GeoFilterPanel extends javax.swing.JPanel { * for the numbers of days after the most recent waypoint, not the * current date. * - * @param showAll True if all waypoints should be shown - * @param withoutTimeStamp True to show waypoints without timeStamps, - * this filter is only applicable if - * mostRecentNumDays is true + * @param showAll True if all waypoints should be shown + * @param withoutTimeStamp True to show waypoints without timeStamps, + * this filter is only applicable if mostRecentNumDays is true * @param mostRecentNumDays Show Waypoint for the most recent given - * number of days. This parameter is ignored if - * showAll is true. - * @param dataSources A list of dataSources to filter waypoint - * for. - * @param artifactTypes A list of artifactTypes to filter waypoint - * for. + * number of days. This parameter is ignored if showAll is true. + * @param dataSources A list of dataSources to filter waypoint for. + * @param artifactTypes A list of artifactTypes to filter waypoint for. */ GeoFilter(boolean showAll, boolean withoutTimeStamp, - int mostRecentNumDays, List dataSources, - List artifactTypes) { + int mostRecentNumDays, List dataSources, + List artifactTypes) { this.showAll = showAll; this.showWithoutTimeStamp = withoutTimeStamp; this.mostRecentNumDays = mostRecentNumDays; @@ -420,7 +419,7 @@ class GeoFilterPanel extends javax.swing.JPanel { * all datasources should be include. * * @return A list of dataSources or null if all dataSources should be - * included. + * included. */ List getDataSources() { return Collections.unmodifiableList(dataSources); @@ -439,14 +438,16 @@ class GeoFilterPanel extends javax.swing.JPanel { } /** - * Container for data sources and artifact types to be given as filter options + * Container for data sources and artifact types to be given as filter + * options */ final private class Sources { + final List> dataSources; final Map artifactTypes; private Sources(List> dataSources, - Map artifactTypes) { + Map artifactTypes) { this.dataSources = dataSources; this.artifactTypes = artifactTypes; } @@ -454,9 +455,9 @@ class GeoFilterPanel extends javax.swing.JPanel { /** * SwingWorker for updating the list of valid data sources. - * - * doInBackground creates a list of Pair objects that contain the - * display name of the data source and the data source object. + * + * doInBackground creates a list of Pair objects that contain the display + * name of the data source and the data source object. */ final private class DataSourceUpdater extends SwingWorker { @@ -484,13 +485,13 @@ class GeoFilterPanel extends javax.swing.JPanel { /** * Returns a Map representing the number of sources found for each * artifact type. If no data was found, an empty map is returned. - * + * * @param sleuthkitCase The current sleuthkitCase - * @param dataSource - * + * @param dataSource + * * @return True if the data source as at least one TSK_GPS_XXXX - * - * @throws TskCoreException + * + * @throws TskCoreException */ private Map getGPSDataSources(SleuthkitCase sleuthkitCase, DataSource dataSource) throws TskCoreException { HashMap ret = new HashMap<>(); @@ -503,6 +504,26 @@ class GeoFilterPanel extends javax.swing.JPanel { return ret; } + /** + * Returns a new ImageIcon for the given artifact type ID representing + * the type's waypoint color + * + * @param artifactTypeId The artifact type id + * + * @return the ImageIcon + */ + private ImageIcon getImageIcon(int artifactTypeId) { + Color color = MapWaypoint.getColor(artifactTypeId); + BufferedImage img = new BufferedImage(16, 16, BufferedImage.TYPE_INT_ARGB); + + Graphics g = img.createGraphics(); + g.setColor(color); + g.fillRect(0, 0, 16, 16); + g.dispose(); + + return new ImageIcon(img); + } + @Override public void done() { Sources sources = null; @@ -523,8 +544,7 @@ class GeoFilterPanel extends javax.swing.JPanel { } for (Map.Entry entry : sources.artifactTypes.entrySet()) { String dispName = entry.getKey().getDisplayName() + " (" + entry.getValue() + ")"; - String iconPath = IconsUtil.getIconFilePath(entry.getKey().getTypeID()); - Icon icon = new ImageIcon(getClass().getResource(iconPath)); + Icon icon = getImageIcon(entry.getKey().getTypeID()); atCheckboxPanel.addElement(dispName, icon, entry.getKey()); } } diff --git a/Core/src/org/sleuthkit/autopsy/geolocation/MapWaypoint.java b/Core/src/org/sleuthkit/autopsy/geolocation/MapWaypoint.java index 48a0593a95..353915bca7 100755 --- a/Core/src/org/sleuthkit/autopsy/geolocation/MapWaypoint.java +++ b/Core/src/org/sleuthkit/autopsy/geolocation/MapWaypoint.java @@ -341,12 +341,20 @@ final class MapWaypoint extends KdTree.XYZPoint implements org.jxmapviewer.viewe return DATE_FORMAT.format(new java.util.Date(timeStamp * 1000)); } + /** + * + * @return the waypoint color that represents the given artifact type id + */ + static Color getColor(int artifactTypeId) { + return artifactTypesToColors.getOrDefault(artifactTypeId, Color.GRAY); + } + /** * * @return the color that this waypoint should be rendered */ Color getColor() { - return artifactTypesToColors.getOrDefault(dataModelWaypoint.getArtifact().getArtifactTypeID(), Color.GRAY); + return getColor(dataModelWaypoint.getArtifact().getArtifactTypeID()); } /** From fdb013d407986fbd49e9014e90f41046155d08dd Mon Sep 17 00:00:00 2001 From: Ethan Roseman Date: Fri, 10 Apr 2020 12:37:49 -0400 Subject: [PATCH 092/137] 6161: Hightlight color -> yellow --- Core/src/org/sleuthkit/autopsy/geolocation/MapPanel.java | 2 +- Core/src/org/sleuthkit/autopsy/geolocation/MapWaypoint.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Core/src/org/sleuthkit/autopsy/geolocation/MapPanel.java b/Core/src/org/sleuthkit/autopsy/geolocation/MapPanel.java index 430d2e58f5..848f561660 100755 --- a/Core/src/org/sleuthkit/autopsy/geolocation/MapPanel.java +++ b/Core/src/org/sleuthkit/autopsy/geolocation/MapPanel.java @@ -703,7 +703,7 @@ final public class MapPanel extends javax.swing.JPanel { Color baseColor = waypoint.getColor(); if (waypoint.equals(currentlySelectedWaypoint)) { // Highlight this waypoint since it is selected - return Color.WHITE; + return Color.YELLOW; } else { return baseColor; } diff --git a/Core/src/org/sleuthkit/autopsy/geolocation/MapWaypoint.java b/Core/src/org/sleuthkit/autopsy/geolocation/MapWaypoint.java index 353915bca7..f9e4ed86ee 100755 --- a/Core/src/org/sleuthkit/autopsy/geolocation/MapWaypoint.java +++ b/Core/src/org/sleuthkit/autopsy/geolocation/MapWaypoint.java @@ -73,7 +73,7 @@ final class MapWaypoint extends KdTree.XYZPoint implements org.jxmapviewer.viewe static { artifactTypesToColors.put(BlackboardArtifact.ARTIFACT_TYPE.TSK_GPS_BOOKMARK.getTypeID(), Color.BLUE); artifactTypesToColors.put(BlackboardArtifact.ARTIFACT_TYPE.TSK_GPS_LAST_KNOWN_LOCATION.getTypeID(), Color.RED); - artifactTypesToColors.put(BlackboardArtifact.ARTIFACT_TYPE.TSK_GPS_ROUTE.getTypeID(), Color.YELLOW); + artifactTypesToColors.put(BlackboardArtifact.ARTIFACT_TYPE.TSK_GPS_ROUTE.getTypeID(), Color.CYAN); artifactTypesToColors.put(BlackboardArtifact.ARTIFACT_TYPE.TSK_GPS_SEARCH.getTypeID(), Color.GREEN); artifactTypesToColors.put(BlackboardArtifact.ARTIFACT_TYPE.TSK_GPS_TRACK.getTypeID(), Color.ORANGE); artifactTypesToColors.put(BlackboardArtifact.ARTIFACT_TYPE.TSK_GPS_TRACKPOINT.getTypeID(), Color.ORANGE); From 837cd5110c697ea9faa5b248f47efada0ade231c Mon Sep 17 00:00:00 2001 From: Raman Arora Date: Fri, 10 Apr 2020 12:56:02 -0400 Subject: [PATCH 093/137] 6103: Add persona tables on CR database upgrade. --- .../CentralRepoDbUpgrader14To15.java | 47 +++++++++++++++++++ .../datamodel/RdbmsCentralRepo.java | 3 ++ .../datamodel/RdbmsCentralRepoFactory.java | 6 +-- 3 files changed, 53 insertions(+), 3 deletions(-) create mode 100644 Core/src/org/sleuthkit/autopsy/centralrepository/datamodel/CentralRepoDbUpgrader14To15.java diff --git a/Core/src/org/sleuthkit/autopsy/centralrepository/datamodel/CentralRepoDbUpgrader14To15.java b/Core/src/org/sleuthkit/autopsy/centralrepository/datamodel/CentralRepoDbUpgrader14To15.java new file mode 100644 index 0000000000..6d238060f8 --- /dev/null +++ b/Core/src/org/sleuthkit/autopsy/centralrepository/datamodel/CentralRepoDbUpgrader14To15.java @@ -0,0 +1,47 @@ +/* + * Central Repository + * + * Copyright 2020 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.centralrepository.datamodel; + +import java.sql.Connection; +import java.sql.SQLException; +import java.sql.Statement; +import org.sleuthkit.datamodel.CaseDbSchemaVersionNumber; + +/** + * This class updates CR schema to 1.5 + * + */ +public class CentralRepoDbUpgrader14To15 implements CentralRepoDbUpgrader { + + @Override + public void upgradeSchema(CaseDbSchemaVersionNumber dbSchemaVersion, Connection connection) throws CentralRepoException, SQLException { + + if (dbSchemaVersion.compareTo(new CaseDbSchemaVersionNumber(1, 5)) < 0) { + + try (Statement statement = connection.createStatement();) { + CentralRepoPlatforms selectedPlatform = CentralRepoDbManager.getSavedDbChoice().getDbPlatform(); + + // create persona tables and insert default data + RdbmsCentralRepoFactory.createPersonaTables(statement, selectedPlatform); + RdbmsCentralRepoFactory.insertDefaultPersonaTablesContent(connection, selectedPlatform); + } + } + + } +} diff --git a/Core/src/org/sleuthkit/autopsy/centralrepository/datamodel/RdbmsCentralRepo.java b/Core/src/org/sleuthkit/autopsy/centralrepository/datamodel/RdbmsCentralRepo.java index 53d67ed21b..24d02ae2c2 100644 --- a/Core/src/org/sleuthkit/autopsy/centralrepository/datamodel/RdbmsCentralRepo.java +++ b/Core/src/org/sleuthkit/autopsy/centralrepository/datamodel/RdbmsCentralRepo.java @@ -3786,6 +3786,9 @@ abstract class RdbmsCentralRepo implements CentralRepository { // Upgrade to 1.4 (new CentralRepoDbUpgrader13To14()).upgradeSchema(dbSchemaVersion, conn); + + // Upgrade to 1.5 + (new CentralRepoDbUpgrader14To15()).upgradeSchema(dbSchemaVersion, conn); updateSchemaVersion(conn); conn.commit(); diff --git a/Core/src/org/sleuthkit/autopsy/centralrepository/datamodel/RdbmsCentralRepoFactory.java b/Core/src/org/sleuthkit/autopsy/centralrepository/datamodel/RdbmsCentralRepoFactory.java index e56dae287d..aedfce276d 100644 --- a/Core/src/org/sleuthkit/autopsy/centralrepository/datamodel/RdbmsCentralRepoFactory.java +++ b/Core/src/org/sleuthkit/autopsy/centralrepository/datamodel/RdbmsCentralRepoFactory.java @@ -169,7 +169,7 @@ public class RdbmsCentralRepoFactory { } } // create Persona tables. - createPersonaTables(stmt); + createPersonaTables(stmt, selectedPlatform); } catch (SQLException ex) { LOGGER.log(Level.SEVERE, "Error initializing db schema.", ex); // NON-NLS return false; @@ -606,7 +606,7 @@ public class RdbmsCentralRepoFactory { * * @return True if success, False otherwise. */ - private boolean createPersonaTables(Statement stmt) throws SQLException { + static boolean createPersonaTables(Statement stmt, CentralRepoPlatforms selectedPlatform) throws SQLException { stmt.execute(getCreateConfidenceTableStatement(selectedPlatform)); stmt.execute(getCreateExaminersTableStatement(selectedPlatform)); @@ -806,7 +806,7 @@ public class RdbmsCentralRepoFactory { * * @return True if success, false otherwise. */ - private static boolean insertDefaultPersonaTablesContent(Connection conn, CentralRepoPlatforms selectedPlatform) { + static boolean insertDefaultPersonaTablesContent(Connection conn, CentralRepoPlatforms selectedPlatform) { try (Statement stmt = conn.createStatement()) { // populate the confidence table From bae759f2b8a8f230dbb8fc950d69ffcffe8c83d6 Mon Sep 17 00:00:00 2001 From: Andrea Lazzarotto Date: Sun, 12 Apr 2020 15:15:06 +0200 Subject: [PATCH 094/137] Update installation instructions for macOS On macOS one has to install the liberica-jdk8-full package in order to have OpenJFX. --- Running_Linux_OSX.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Running_Linux_OSX.txt b/Running_Linux_OSX.txt index 521fa6e9f1..a45553b246 100644 --- a/Running_Linux_OSX.txt +++ b/Running_Linux_OSX.txt @@ -27,7 +27,7 @@ The following need to be done at least once. They do not need to be repeated for -- OS X: 1. Install BellSoft Java 8. % brew tap bell-sw/liberica - % brew cask install liberica-jdk8 + % brew cask install liberica-jdk8-full 2. Set JAVA_HOME environment variable to location of JRE installation. e.g. add the following to ~/.bashrc export JAVA_HOME=$(/usr/libexec/java_home -v 1.8) From 6126181eb7181f10da42a879e8bafc44d11ce398 Mon Sep 17 00:00:00 2001 From: William Schaefer Date: Mon, 13 Apr 2020 00:24:43 -0400 Subject: [PATCH 095/137] 6225 fix for screenshot 4 --- .../optionspanel/ManageCasesDialog.form | 248 +++++++++-------- .../optionspanel/ManageCasesDialog.java | 252 +++++++++++------- 2 files changed, 293 insertions(+), 207 deletions(-) diff --git a/Core/src/org/sleuthkit/autopsy/centralrepository/optionspanel/ManageCasesDialog.form b/Core/src/org/sleuthkit/autopsy/centralrepository/optionspanel/ManageCasesDialog.form index 9010e849e9..386ad9c76b 100644 --- a/Core/src/org/sleuthkit/autopsy/centralrepository/optionspanel/ManageCasesDialog.form +++ b/Core/src/org/sleuthkit/autopsy/centralrepository/optionspanel/ManageCasesDialog.form @@ -26,12 +26,12 @@ - + - + @@ -39,6 +39,7 @@ + @@ -50,122 +51,17 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + @@ -190,10 +86,21 @@ + + + + + + + + + + + @@ -219,66 +126,155 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -286,7 +282,7 @@ - + @@ -298,6 +294,26 @@ + + + + + + + + + + + + + + + + + + + + @@ -312,7 +328,7 @@ - + @@ -320,7 +336,7 @@ - + diff --git a/Core/src/org/sleuthkit/autopsy/centralrepository/optionspanel/ManageCasesDialog.java b/Core/src/org/sleuthkit/autopsy/centralrepository/optionspanel/ManageCasesDialog.java index 47697f73ce..b30614585a 100644 --- a/Core/src/org/sleuthkit/autopsy/centralrepository/optionspanel/ManageCasesDialog.java +++ b/Core/src/org/sleuthkit/autopsy/centralrepository/optionspanel/ManageCasesDialog.java @@ -100,6 +100,7 @@ final class ManageCasesDialog extends javax.swing.JDialog { @SuppressWarnings("unchecked") // //GEN-BEGIN:initComponents private void initComponents() { + java.awt.GridBagConstraints gridBagConstraints; casesSplitPane = new javax.swing.JSplitPane(); caseInfoPanel = new javax.swing.JPanel(); @@ -121,6 +122,7 @@ final class ManageCasesDialog extends javax.swing.JDialog { examinerEmailValueLabel = new javax.swing.JLabel(); examinerPhoneValueLabel = new javax.swing.JLabel(); closeButton = new javax.swing.JButton(); + filler1 = new javax.swing.Box.Filler(new java.awt.Dimension(0, 0), new java.awt.Dimension(0, 0), new java.awt.Dimension(32767, 0)); casesPanel = new javax.swing.JPanel(); casesScrollPane = new javax.swing.JScrollPane(); casesTable = new javax.swing.JTable(); @@ -129,13 +131,29 @@ final class ManageCasesDialog extends javax.swing.JDialog { setMinimumSize(new java.awt.Dimension(400, 400)); casesSplitPane.setDividerLocation(380); + casesSplitPane.setResizeWeight(0.5); + + caseInfoPanel.setLayout(new java.awt.GridBagLayout()); dataSourcesTable.setAutoCreateRowSorter(true); dataSourcesTable.setModel(dataSourcesTableModel); dataSourcesTable.setSelectionMode(javax.swing.ListSelectionModel.SINGLE_SELECTION); dataSourcesScrollPane.setViewportView(dataSourcesTable); + gridBagConstraints = new java.awt.GridBagConstraints(); + gridBagConstraints.gridx = 0; + gridBagConstraints.gridy = 9; + gridBagConstraints.gridwidth = 5; + 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(7, 22, 0, 12); + caseInfoPanel.add(dataSourcesScrollPane, gridBagConstraints); + notesScrollPane.setBorder(null); + notesScrollPane.setMinimumSize(new java.awt.Dimension(25, 54)); + notesScrollPane.setPreferredSize(new java.awt.Dimension(160, 70)); notesTextArea.setEditable(false); notesTextArea.setBackground(new java.awt.Color(240, 240, 240)); @@ -146,24 +164,147 @@ final class ManageCasesDialog extends javax.swing.JDialog { notesTextArea.setBorder(null); notesScrollPane.setViewportView(notesTextArea); + gridBagConstraints = new java.awt.GridBagConstraints(); + gridBagConstraints.gridx = 0; + gridBagConstraints.gridy = 7; + gridBagConstraints.gridwidth = 5; + gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL; + gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST; + gridBagConstraints.weightx = 1.0; + gridBagConstraints.insets = new java.awt.Insets(7, 28, 0, 12); + caseInfoPanel.add(notesScrollPane, gridBagConstraints); + org.openide.awt.Mnemonics.setLocalizedText(caseInfoLabel, org.openide.util.NbBundle.getMessage(ManageCasesDialog.class, "ManageCasesDialog.caseInfoLabel.text")); // NOI18N + caseInfoLabel.setMaximumSize(new java.awt.Dimension(237, 16)); + gridBagConstraints = new java.awt.GridBagConstraints(); + gridBagConstraints.gridx = 0; + gridBagConstraints.gridy = 0; + gridBagConstraints.gridwidth = 2; + gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL; + gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST; + gridBagConstraints.insets = new java.awt.Insets(13, 12, 0, 0); + caseInfoPanel.add(caseInfoLabel, gridBagConstraints); org.openide.awt.Mnemonics.setLocalizedText(dataSourcesLabel, org.openide.util.NbBundle.getMessage(ManageCasesDialog.class, "ManageCasesDialog.dataSourcesLabel.text")); // NOI18N + dataSourcesLabel.setMaximumSize(new java.awt.Dimension(237, 16)); + gridBagConstraints = new java.awt.GridBagConstraints(); + gridBagConstraints.gridx = 0; + gridBagConstraints.gridy = 8; + gridBagConstraints.gridwidth = 3; + gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL; + gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST; + gridBagConstraints.weightx = 0.1; + gridBagConstraints.insets = new java.awt.Insets(7, 12, 0, 0); + caseInfoPanel.add(dataSourcesLabel, gridBagConstraints); org.openide.awt.Mnemonics.setLocalizedText(notesLabel, org.openide.util.NbBundle.getMessage(ManageCasesDialog.class, "ManageCasesDialog.notesLabel.text")); // NOI18N + notesLabel.setMaximumSize(new java.awt.Dimension(237, 16)); + gridBagConstraints = new java.awt.GridBagConstraints(); + gridBagConstraints.gridx = 0; + gridBagConstraints.gridy = 6; + gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL; + gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST; + gridBagConstraints.weightx = 0.1; + gridBagConstraints.insets = new java.awt.Insets(7, 18, 0, 0); + caseInfoPanel.add(notesLabel, gridBagConstraints); org.openide.awt.Mnemonics.setLocalizedText(orgLabel, org.openide.util.NbBundle.getMessage(ManageCasesDialog.class, "ManageCasesDialog.orgLabel.text")); // NOI18N + orgLabel.setMaximumSize(new java.awt.Dimension(237, 16)); + gridBagConstraints = new java.awt.GridBagConstraints(); + gridBagConstraints.gridx = 0; + gridBagConstraints.gridy = 1; + gridBagConstraints.gridwidth = 4; + gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL; + gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST; + gridBagConstraints.weightx = 0.1; + gridBagConstraints.insets = new java.awt.Insets(7, 18, 0, 0); + caseInfoPanel.add(orgLabel, gridBagConstraints); org.openide.awt.Mnemonics.setLocalizedText(caseNumberLabel, org.openide.util.NbBundle.getMessage(ManageCasesDialog.class, "ManageCasesDialog.caseNumberLabel.text")); // NOI18N + caseNumberLabel.setPreferredSize(new java.awt.Dimension(237, 16)); + gridBagConstraints = new java.awt.GridBagConstraints(); + gridBagConstraints.gridx = 0; + gridBagConstraints.gridy = 2; + gridBagConstraints.gridwidth = 4; + gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL; + gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST; + gridBagConstraints.weightx = 0.1; + gridBagConstraints.insets = new java.awt.Insets(7, 18, 0, 0); + caseInfoPanel.add(caseNumberLabel, gridBagConstraints); org.openide.awt.Mnemonics.setLocalizedText(examinerEmailLabel, org.openide.util.NbBundle.getMessage(ManageCasesDialog.class, "ManageCasesDialog.examinerEmailLabel.text")); // NOI18N + examinerEmailLabel.setMaximumSize(new java.awt.Dimension(237, 16)); + gridBagConstraints = new java.awt.GridBagConstraints(); + gridBagConstraints.gridx = 0; + gridBagConstraints.gridy = 4; + gridBagConstraints.gridwidth = 4; + gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL; + gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST; + gridBagConstraints.weightx = 0.1; + gridBagConstraints.insets = new java.awt.Insets(7, 18, 0, 0); + caseInfoPanel.add(examinerEmailLabel, gridBagConstraints); org.openide.awt.Mnemonics.setLocalizedText(examinerNameLabel, org.openide.util.NbBundle.getMessage(ManageCasesDialog.class, "ManageCasesDialog.examinerNameLabel.text")); // NOI18N + examinerNameLabel.setMaximumSize(new java.awt.Dimension(237, 16)); + gridBagConstraints = new java.awt.GridBagConstraints(); + gridBagConstraints.gridx = 0; + gridBagConstraints.gridy = 3; + gridBagConstraints.gridwidth = 4; + gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL; + gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST; + gridBagConstraints.weightx = 0.1; + gridBagConstraints.insets = new java.awt.Insets(7, 18, 0, 0); + caseInfoPanel.add(examinerNameLabel, gridBagConstraints); org.openide.awt.Mnemonics.setLocalizedText(examinerPhoneLabel, org.openide.util.NbBundle.getMessage(ManageCasesDialog.class, "ManageCasesDialog.examinerPhoneLabel.text")); // NOI18N + examinerPhoneLabel.setMaximumSize(new java.awt.Dimension(237, 16)); + gridBagConstraints = new java.awt.GridBagConstraints(); + gridBagConstraints.gridx = 0; + gridBagConstraints.gridy = 5; + gridBagConstraints.gridwidth = 4; + gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL; + gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST; + gridBagConstraints.weightx = 0.1; + gridBagConstraints.insets = new java.awt.Insets(7, 18, 0, 0); + caseInfoPanel.add(examinerPhoneLabel, gridBagConstraints); + gridBagConstraints = new java.awt.GridBagConstraints(); + gridBagConstraints.gridx = 4; + gridBagConstraints.gridy = 1; + gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL; + gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST; + gridBagConstraints.insets = new java.awt.Insets(7, 7, 0, 12); + caseInfoPanel.add(orgValueLabel, gridBagConstraints); + gridBagConstraints = new java.awt.GridBagConstraints(); + gridBagConstraints.gridx = 4; + gridBagConstraints.gridy = 2; + gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL; + gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST; + gridBagConstraints.insets = new java.awt.Insets(7, 7, 0, 12); + caseInfoPanel.add(caseNumberValueLabel, gridBagConstraints); + gridBagConstraints = new java.awt.GridBagConstraints(); + gridBagConstraints.gridx = 4; + gridBagConstraints.gridy = 3; + gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL; + gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST; + gridBagConstraints.insets = new java.awt.Insets(7, 6, 0, 12); + caseInfoPanel.add(examinerNameValueLabel, gridBagConstraints); + gridBagConstraints = new java.awt.GridBagConstraints(); + gridBagConstraints.gridx = 4; + gridBagConstraints.gridy = 4; + gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL; + gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST; + gridBagConstraints.insets = new java.awt.Insets(9, 6, 0, 12); + caseInfoPanel.add(examinerEmailValueLabel, gridBagConstraints); + gridBagConstraints = new java.awt.GridBagConstraints(); + gridBagConstraints.gridx = 4; + gridBagConstraints.gridy = 5; + gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL; + gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST; + gridBagConstraints.insets = new java.awt.Insets(7, 6, 0, 12); + caseInfoPanel.add(examinerPhoneValueLabel, gridBagConstraints); org.openide.awt.Mnemonics.setLocalizedText(closeButton, org.openide.util.NbBundle.getMessage(ManageCasesDialog.class, "ManageCasesDialog.closeButton.text")); // NOI18N - closeButton.setMaximumSize(new java.awt.Dimension(65, 23)); + closeButton.setMaximumSize(new java.awt.Dimension(125, 23)); closeButton.setMinimumSize(new java.awt.Dimension(65, 23)); closeButton.setPreferredSize(new java.awt.Dimension(65, 23)); closeButton.addActionListener(new java.awt.event.ActionListener() { @@ -171,92 +312,20 @@ final class ManageCasesDialog extends javax.swing.JDialog { closeButtonActionPerformed(evt); } }); - - javax.swing.GroupLayout caseInfoPanelLayout = new javax.swing.GroupLayout(caseInfoPanel); - caseInfoPanel.setLayout(caseInfoPanelLayout); - caseInfoPanelLayout.setHorizontalGroup( - caseInfoPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) - .addGroup(caseInfoPanelLayout.createSequentialGroup() - .addContainerGap() - .addGroup(caseInfoPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) - .addGroup(caseInfoPanelLayout.createSequentialGroup() - .addGap(10, 10, 10) - .addComponent(dataSourcesScrollPane, javax.swing.GroupLayout.PREFERRED_SIZE, 0, Short.MAX_VALUE)) - .addGroup(caseInfoPanelLayout.createSequentialGroup() - .addGap(6, 6, 6) - .addGroup(caseInfoPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) - .addGroup(caseInfoPanelLayout.createSequentialGroup() - .addGroup(caseInfoPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING) - .addComponent(orgLabel, javax.swing.GroupLayout.PREFERRED_SIZE, 88, javax.swing.GroupLayout.PREFERRED_SIZE) - .addComponent(caseNumberLabel, javax.swing.GroupLayout.PREFERRED_SIZE, 88, javax.swing.GroupLayout.PREFERRED_SIZE) - .addComponent(examinerNameLabel, javax.swing.GroupLayout.PREFERRED_SIZE, 88, javax.swing.GroupLayout.PREFERRED_SIZE) - .addComponent(examinerEmailLabel, javax.swing.GroupLayout.PREFERRED_SIZE, 88, javax.swing.GroupLayout.PREFERRED_SIZE) - .addComponent(examinerPhoneLabel, javax.swing.GroupLayout.PREFERRED_SIZE, 88, javax.swing.GroupLayout.PREFERRED_SIZE)) - .addGroup(caseInfoPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) - .addGroup(caseInfoPanelLayout.createSequentialGroup() - .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) - .addGroup(caseInfoPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) - .addComponent(caseNumberValueLabel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) - .addComponent(orgValueLabel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))) - .addGroup(caseInfoPanelLayout.createSequentialGroup() - .addGap(6, 6, 6) - .addGroup(caseInfoPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) - .addComponent(examinerNameValueLabel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) - .addComponent(examinerEmailValueLabel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) - .addComponent(examinerPhoneValueLabel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))))) - .addComponent(notesLabel) - .addGroup(caseInfoPanelLayout.createSequentialGroup() - .addGap(10, 10, 10) - .addComponent(notesScrollPane, javax.swing.GroupLayout.DEFAULT_SIZE, 428, Short.MAX_VALUE)))) - .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, caseInfoPanelLayout.createSequentialGroup() - .addGap(0, 0, Short.MAX_VALUE) - .addComponent(closeButton, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) - .addGroup(caseInfoPanelLayout.createSequentialGroup() - .addGroup(caseInfoPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) - .addComponent(caseInfoLabel) - .addComponent(dataSourcesLabel, javax.swing.GroupLayout.PREFERRED_SIZE, 77, javax.swing.GroupLayout.PREFERRED_SIZE)) - .addGap(0, 0, Short.MAX_VALUE))) - .addContainerGap()) - ); - caseInfoPanelLayout.setVerticalGroup( - caseInfoPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) - .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, caseInfoPanelLayout.createSequentialGroup() - .addContainerGap() - .addComponent(caseInfoLabel) - .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) - .addGroup(caseInfoPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING) - .addGroup(caseInfoPanelLayout.createSequentialGroup() - .addGroup(caseInfoPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) - .addGroup(caseInfoPanelLayout.createSequentialGroup() - .addComponent(orgLabel) - .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) - .addGroup(caseInfoPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false) - .addComponent(caseNumberLabel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) - .addComponent(caseNumberValueLabel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) - .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) - .addGroup(caseInfoPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false) - .addComponent(examinerNameLabel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) - .addComponent(examinerNameValueLabel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))) - .addComponent(orgValueLabel, javax.swing.GroupLayout.PREFERRED_SIZE, 14, javax.swing.GroupLayout.PREFERRED_SIZE)) - .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) - .addComponent(examinerEmailLabel)) - .addComponent(examinerEmailValueLabel, javax.swing.GroupLayout.PREFERRED_SIZE, 14, javax.swing.GroupLayout.PREFERRED_SIZE)) - .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) - .addGroup(caseInfoPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) - .addComponent(examinerPhoneLabel) - .addComponent(examinerPhoneValueLabel, javax.swing.GroupLayout.PREFERRED_SIZE, 14, javax.swing.GroupLayout.PREFERRED_SIZE)) - .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) - .addComponent(notesLabel) - .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) - .addComponent(notesScrollPane, javax.swing.GroupLayout.DEFAULT_SIZE, 55, Short.MAX_VALUE) - .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) - .addComponent(dataSourcesLabel) - .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) - .addComponent(dataSourcesScrollPane, javax.swing.GroupLayout.DEFAULT_SIZE, 129, Short.MAX_VALUE) - .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) - .addComponent(closeButton, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) - .addContainerGap()) - ); + gridBagConstraints = new java.awt.GridBagConstraints(); + gridBagConstraints.gridx = 4; + gridBagConstraints.gridy = 10; + gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL; + gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST; + gridBagConstraints.insets = new java.awt.Insets(7, 285, 13, 12); + caseInfoPanel.add(closeButton, gridBagConstraints); + gridBagConstraints = new java.awt.GridBagConstraints(); + gridBagConstraints.gridx = 0; + gridBagConstraints.gridy = 10; + gridBagConstraints.gridwidth = 4; + gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL; + gridBagConstraints.weightx = 1.0; + caseInfoPanel.add(filler1, gridBagConstraints); casesSplitPane.setRightComponent(caseInfoPanel); @@ -270,13 +339,13 @@ final class ManageCasesDialog extends javax.swing.JDialog { casesPanelLayout.setHorizontalGroup( casesPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(casesPanelLayout.createSequentialGroup() - .addComponent(casesScrollPane, javax.swing.GroupLayout.DEFAULT_SIZE, 379, Short.MAX_VALUE) + .addComponent(casesScrollPane, javax.swing.GroupLayout.DEFAULT_SIZE, 318, Short.MAX_VALUE) .addGap(0, 0, 0)) ); casesPanelLayout.setVerticalGroup( casesPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(casesPanelLayout.createSequentialGroup() - .addComponent(casesScrollPane, javax.swing.GroupLayout.DEFAULT_SIZE, 361, Short.MAX_VALUE) + .addComponent(casesScrollPane, javax.swing.GroupLayout.DEFAULT_SIZE, 528, Short.MAX_VALUE) .addGap(40, 40, 40)) ); @@ -286,11 +355,11 @@ final class ManageCasesDialog extends javax.swing.JDialog { getContentPane().setLayout(layout); layout.setHorizontalGroup( layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) - .addComponent(casesSplitPane, javax.swing.GroupLayout.Alignment.TRAILING) + .addComponent(casesSplitPane, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, 850, Short.MAX_VALUE) ); layout.setVerticalGroup( layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) - .addComponent(casesSplitPane) + .addComponent(casesSplitPane, javax.swing.GroupLayout.DEFAULT_SIZE, 570, Short.MAX_VALUE) ); pack(); @@ -343,6 +412,7 @@ final class ManageCasesDialog extends javax.swing.JDialog { private javax.swing.JLabel examinerNameValueLabel; private javax.swing.JLabel examinerPhoneLabel; private javax.swing.JLabel examinerPhoneValueLabel; + private javax.swing.Box.Filler filler1; private javax.swing.JLabel notesLabel; private javax.swing.JScrollPane notesScrollPane; private javax.swing.JTextArea notesTextArea; From b873e823c661d8c825e7fa7f88c9de47c8308bc4 Mon Sep 17 00:00:00 2001 From: William Schaefer Date: Mon, 13 Apr 2020 01:03:37 -0400 Subject: [PATCH 096/137] 6225 fix for screenshots 5,6,9,10,11 --- .../AdvancedConfigurationDialog.form | 62 ++++++++++++------- .../AdvancedConfigurationDialog.java | 48 ++++++++------ 2 files changed, 66 insertions(+), 44 deletions(-) diff --git a/Core/src/org/sleuthkit/autopsy/corecomponents/AdvancedConfigurationDialog.form b/Core/src/org/sleuthkit/autopsy/corecomponents/AdvancedConfigurationDialog.form index 15993c7cfe..394f5a3198 100644 --- a/Core/src/org/sleuthkit/autopsy/corecomponents/AdvancedConfigurationDialog.form +++ b/Core/src/org/sleuthkit/autopsy/corecomponents/AdvancedConfigurationDialog.form @@ -56,47 +56,61 @@ - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Core/src/org/sleuthkit/autopsy/corecomponents/AdvancedConfigurationDialog.java b/Core/src/org/sleuthkit/autopsy/corecomponents/AdvancedConfigurationDialog.java index a62d3a1459..ac6dbc8216 100644 --- a/Core/src/org/sleuthkit/autopsy/corecomponents/AdvancedConfigurationDialog.java +++ b/Core/src/org/sleuthkit/autopsy/corecomponents/AdvancedConfigurationDialog.java @@ -70,12 +70,14 @@ public class AdvancedConfigurationDialog extends javax.swing.JDialog { @SuppressWarnings("unchecked") // //GEN-BEGIN:initComponents private void initComponents() { + java.awt.GridBagConstraints gridBagConstraints; jSeparator1 = new javax.swing.JSeparator(); filler1 = new javax.swing.Box.Filler(new java.awt.Dimension(0, 4), new java.awt.Dimension(0, 4), new java.awt.Dimension(0, 4)); jPanel1 = new javax.swing.JPanel(); applyButton = new javax.swing.JButton(); cancelButton = new javax.swing.JButton(); + filler3 = new javax.swing.Box.Filler(new java.awt.Dimension(0, 0), new java.awt.Dimension(0, 0), new java.awt.Dimension(32767, 0)); filler2 = new javax.swing.Box.Filler(new java.awt.Dimension(0, 4), new java.awt.Dimension(0, 4), new java.awt.Dimension(0, 4)); setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE); @@ -86,35 +88,40 @@ public class AdvancedConfigurationDialog extends javax.swing.JDialog { jPanel1.setMaximumSize(new java.awt.Dimension(4000, 27)); jPanel1.setMinimumSize(new java.awt.Dimension(100, 27)); jPanel1.setPreferredSize(new java.awt.Dimension(400, 27)); + jPanel1.setLayout(new java.awt.GridBagLayout()); applyButton.setText(org.openide.util.NbBundle.getMessage(AdvancedConfigurationDialog.class, "AdvancedConfigurationDialog.applyButton.text")); // NOI18N + applyButton.setMaximumSize(new java.awt.Dimension(150, 25)); + applyButton.setMinimumSize(new java.awt.Dimension(71, 25)); + applyButton.setPreferredSize(new java.awt.Dimension(71, 25)); + gridBagConstraints = new java.awt.GridBagConstraints(); + gridBagConstraints.gridx = 1; + gridBagConstraints.gridy = 0; + gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL; + gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST; + gridBagConstraints.insets = new java.awt.Insets(0, 0, 2, 0); + jPanel1.add(applyButton, gridBagConstraints); cancelButton.setText(org.openide.util.NbBundle.getMessage(AdvancedConfigurationDialog.class, "AdvancedConfigurationDialog.cancelButton.text")); // NOI18N + cancelButton.setMaximumSize(new java.awt.Dimension(150, 25)); cancelButton.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { cancelButtonActionPerformed(evt); } }); - - javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1); - jPanel1.setLayout(jPanel1Layout); - jPanel1Layout.setHorizontalGroup( - jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) - .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel1Layout.createSequentialGroup() - .addContainerGap(242, Short.MAX_VALUE) - .addComponent(applyButton, javax.swing.GroupLayout.PREFERRED_SIZE, 70, javax.swing.GroupLayout.PREFERRED_SIZE) - .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) - .addComponent(cancelButton, javax.swing.GroupLayout.PREFERRED_SIZE, 70, javax.swing.GroupLayout.PREFERRED_SIZE) - .addGap(12, 12, 12)) - ); - jPanel1Layout.setVerticalGroup( - jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) - .addGroup(jPanel1Layout.createSequentialGroup() - .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) - .addComponent(applyButton) - .addComponent(cancelButton)) - .addGap(0, 4, Short.MAX_VALUE)) - ); + gridBagConstraints = new java.awt.GridBagConstraints(); + gridBagConstraints.gridx = 2; + gridBagConstraints.gridy = 0; + gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL; + gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST; + gridBagConstraints.insets = new java.awt.Insets(0, 7, 2, 12); + jPanel1.add(cancelButton, gridBagConstraints); + gridBagConstraints = new java.awt.GridBagConstraints(); + gridBagConstraints.gridx = 0; + gridBagConstraints.gridy = 0; + gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL; + gridBagConstraints.weightx = 1.0; + jPanel1.add(filler3, gridBagConstraints); getContentPane().add(jPanel1); getContentPane().add(filler2); @@ -131,6 +138,7 @@ public class AdvancedConfigurationDialog extends javax.swing.JDialog { private javax.swing.JButton cancelButton; private javax.swing.Box.Filler filler1; private javax.swing.Box.Filler filler2; + private javax.swing.Box.Filler filler3; private javax.swing.JPanel jPanel1; private javax.swing.JSeparator jSeparator1; // End of variables declaration//GEN-END:variables From 721a9a2bc5c76721a9845fc01099903738f6f760 Mon Sep 17 00:00:00 2001 From: William Schaefer Date: Mon, 13 Apr 2020 01:18:36 -0400 Subject: [PATCH 097/137] 6225 partial fix for screenshot 7 --- .../sleuthkit/autopsy/modules/filetypeid/AddFileTypeDialog.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Core/src/org/sleuthkit/autopsy/modules/filetypeid/AddFileTypeDialog.java b/Core/src/org/sleuthkit/autopsy/modules/filetypeid/AddFileTypeDialog.java index 2c6b7322f9..5b5b51329c 100644 --- a/Core/src/org/sleuthkit/autopsy/modules/filetypeid/AddFileTypeDialog.java +++ b/Core/src/org/sleuthkit/autopsy/modules/filetypeid/AddFileTypeDialog.java @@ -50,7 +50,7 @@ class AddFileTypeDialog extends JDialog { } private static final long serialVersionUID = 1L; - private static final Dimension BUTTON_SIZE = new Dimension(65, 23); + private static final Dimension BUTTON_SIZE = new Dimension(85, 23); private FileType fileType; final private AddFileTypePanel addMimeTypePanel; private BUTTON_PRESSED result; From d12a95839bbd906089ea5bc5b5229796a65f86b8 Mon Sep 17 00:00:00 2001 From: William Schaefer Date: Mon, 13 Apr 2020 01:19:39 -0400 Subject: [PATCH 098/137] 6225 partial fix for screenshot 8 --- .../autopsy/modules/filetypeid/AddFileTypeSignatureDialog.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Core/src/org/sleuthkit/autopsy/modules/filetypeid/AddFileTypeSignatureDialog.java b/Core/src/org/sleuthkit/autopsy/modules/filetypeid/AddFileTypeSignatureDialog.java index 770d97ff87..4b64e13e94 100644 --- a/Core/src/org/sleuthkit/autopsy/modules/filetypeid/AddFileTypeSignatureDialog.java +++ b/Core/src/org/sleuthkit/autopsy/modules/filetypeid/AddFileTypeSignatureDialog.java @@ -42,7 +42,7 @@ import org.sleuthkit.autopsy.modules.filetypeid.FileType.Signature; final class AddFileTypeSignatureDialog extends JDialog { private static final long serialVersionUID = 1L; - private static final Dimension BUTTON_SIZE = new Dimension(65, 23); + private static final Dimension BUTTON_SIZE = new Dimension(85, 23); private final AddFileTypeSignaturePanel addFileTypeSigPanel; private static final String TITLE = NbBundle.getMessage(RunIngestModulesAction.class, "RunIngestModulesAction.name"); private Signature signature; From e430f58de260118de4f592ceb36b927a85bb96a2 Mon Sep 17 00:00:00 2001 From: William Schaefer Date: Mon, 13 Apr 2020 02:39:00 -0400 Subject: [PATCH 099/137] 6225 fix for screenshot 12 --- ...ataSourceIntegrityIngestSettingsPanel.form | 71 +++++++++++++----- ...ataSourceIntegrityIngestSettingsPanel.java | 75 +++++++++++++------ 2 files changed, 106 insertions(+), 40 deletions(-) diff --git a/Core/src/org/sleuthkit/autopsy/modules/dataSourceIntegrity/DataSourceIntegrityIngestSettingsPanel.form b/Core/src/org/sleuthkit/autopsy/modules/dataSourceIntegrity/DataSourceIntegrityIngestSettingsPanel.form index a981e39826..9d613f0cf7 100644 --- a/Core/src/org/sleuthkit/autopsy/modules/dataSourceIntegrity/DataSourceIntegrityIngestSettingsPanel.form +++ b/Core/src/org/sleuthkit/autopsy/modules/dataSourceIntegrity/DataSourceIntegrityIngestSettingsPanel.form @@ -21,15 +21,15 @@ - + - - + + - + - + @@ -39,32 +39,23 @@ - - + + - + - + - - - - - - - - - - + @@ -86,5 +77,47 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Core/src/org/sleuthkit/autopsy/modules/dataSourceIntegrity/DataSourceIntegrityIngestSettingsPanel.java b/Core/src/org/sleuthkit/autopsy/modules/dataSourceIntegrity/DataSourceIntegrityIngestSettingsPanel.java index 57e6cb8577..37537f714a 100644 --- a/Core/src/org/sleuthkit/autopsy/modules/dataSourceIntegrity/DataSourceIntegrityIngestSettingsPanel.java +++ b/Core/src/org/sleuthkit/autopsy/modules/dataSourceIntegrity/DataSourceIntegrityIngestSettingsPanel.java @@ -1,7 +1,7 @@ /* * Central Repository * - * Copyright 2018 Basis Technology Corp. + * Copyright 2018-2020 Basis Technology Corp. * Contact: carrier sleuthkit org * * Licensed under the Apache License, Version 2.0 (the "License"); @@ -20,6 +20,7 @@ package org.sleuthkit.autopsy.modules.dataSourceIntegrity; import org.sleuthkit.autopsy.ingest.IngestModuleIngestJobSettings; import org.sleuthkit.autopsy.ingest.IngestModuleIngestJobSettingsPanel; +import org.sleuthkit.autopsy.corecomponents.AutoWrappingJTextPane; /** * Ingest job settings panel for the Correlation Engine module. @@ -58,40 +59,70 @@ final class DataSourceIntegrityIngestSettingsPanel extends IngestModuleIngestJob @SuppressWarnings("unchecked") // //GEN-BEGIN:initComponents private void initComponents() { + java.awt.GridBagConstraints gridBagConstraints; - computeHashesCheckbox = new javax.swing.JCheckBox(); verifyHashesCheckbox = new javax.swing.JCheckBox(); ingestSettingsLabel = new javax.swing.JLabel(); noteLabel = new javax.swing.JLabel(); + computeHashesPanel = new javax.swing.JPanel(); + computeHashesCheckbox = new javax.swing.JCheckBox(); + computeHashesTextArea = new javax.swing.JTextArea(); setPreferredSize(new java.awt.Dimension(300, 155)); - org.openide.awt.Mnemonics.setLocalizedText(computeHashesCheckbox, org.openide.util.NbBundle.getMessage(DataSourceIntegrityIngestSettingsPanel.class, "DataSourceIntegrityIngestSettingsPanel.computeHashesCheckbox.text")); // NOI18N - computeHashesCheckbox.addActionListener(new java.awt.event.ActionListener() { - public void actionPerformed(java.awt.event.ActionEvent evt) { - computeHashesCheckboxActionPerformed(evt); - } - }); - org.openide.awt.Mnemonics.setLocalizedText(verifyHashesCheckbox, org.openide.util.NbBundle.getMessage(DataSourceIntegrityIngestSettingsPanel.class, "DataSourceIntegrityIngestSettingsPanel.verifyHashesCheckbox.text")); // NOI18N + verifyHashesCheckbox.setFocusable(false); ingestSettingsLabel.setFont(ingestSettingsLabel.getFont().deriveFont(ingestSettingsLabel.getFont().getStyle() | java.awt.Font.BOLD)); org.openide.awt.Mnemonics.setLocalizedText(ingestSettingsLabel, org.openide.util.NbBundle.getMessage(DataSourceIntegrityIngestSettingsPanel.class, "DataSourceIntegrityIngestSettingsPanel.ingestSettingsLabel.text")); // NOI18N org.openide.awt.Mnemonics.setLocalizedText(noteLabel, org.openide.util.NbBundle.getMessage(DataSourceIntegrityIngestSettingsPanel.class, "DataSourceIntegrityIngestSettingsPanel.noteLabel.text")); // NOI18N + computeHashesPanel.setLayout(new java.awt.GridBagLayout()); + gridBagConstraints = new java.awt.GridBagConstraints(); + gridBagConstraints.gridx = 0; + gridBagConstraints.gridy = 0; + gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST; + computeHashesPanel.add(computeHashesCheckbox, gridBagConstraints); + + computeHashesTextArea.setEditable(false); + computeHashesTextArea.setBackground(new java.awt.Color(240, 240, 240)); + computeHashesTextArea.setColumns(20); + computeHashesTextArea.setLineWrap(true); + computeHashesTextArea.setRows(2); + computeHashesTextArea.setText(org.openide.util.NbBundle.getMessage(DataSourceIntegrityIngestSettingsPanel.class, "DataSourceIntegrityIngestSettingsPanel.computeHashesCheckbox.text")); // NOI18N + computeHashesTextArea.setWrapStyleWord(true); + computeHashesTextArea.setBorder(null); + computeHashesTextArea.setFocusable(false); + computeHashesTextArea.setOpaque(false); + computeHashesTextArea.setRequestFocusEnabled(false); + computeHashesTextArea.addMouseListener(new java.awt.event.MouseAdapter() { + public void mouseClicked(java.awt.event.MouseEvent evt) { + computeHashesTextAreaMouseClicked(evt); + } + }); + gridBagConstraints = new java.awt.GridBagConstraints(); + gridBagConstraints.gridx = 1; + gridBagConstraints.gridy = 0; + gridBagConstraints.gridwidth = 3; + gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL; + gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST; + gridBagConstraints.weightx = 1.0; + gridBagConstraints.insets = new java.awt.Insets(3, 0, 0, 0); + computeHashesPanel.add(computeHashesTextArea, gridBagConstraints); + javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this); this.setLayout(layout); layout.setHorizontalGroup( layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createSequentialGroup() .addContainerGap() - .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) - .addComponent(noteLabel) + .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false) + .addComponent(noteLabel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent(verifyHashesCheckbox) - .addComponent(computeHashesCheckbox) - .addComponent(ingestSettingsLabel)) - .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) + .addComponent(ingestSettingsLabel) + .addComponent(computeHashesPanel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) + .addContainerGap(13, Short.MAX_VALUE)) ); layout.setVerticalGroup( layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) @@ -99,21 +130,23 @@ final class DataSourceIntegrityIngestSettingsPanel extends IngestModuleIngestJob .addContainerGap() .addComponent(ingestSettingsLabel) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) - .addComponent(computeHashesCheckbox) - .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) + .addComponent(computeHashesPanel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(verifyHashesCheckbox) - .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) + .addGap(18, 18, 18) .addComponent(noteLabel) - .addContainerGap(53, Short.MAX_VALUE)) + .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) ); }// //GEN-END:initComponents - private void computeHashesCheckboxActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_computeHashesCheckboxActionPerformed - // TODO add your handling code here: - }//GEN-LAST:event_computeHashesCheckboxActionPerformed + private void computeHashesTextAreaMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_computeHashesTextAreaMouseClicked + computeHashesCheckbox.doClick(); + }//GEN-LAST:event_computeHashesTextAreaMouseClicked // Variables declaration - do not modify//GEN-BEGIN:variables private javax.swing.JCheckBox computeHashesCheckbox; + private javax.swing.JPanel computeHashesPanel; + private javax.swing.JTextArea computeHashesTextArea; private javax.swing.JLabel ingestSettingsLabel; private javax.swing.JLabel noteLabel; private javax.swing.JCheckBox verifyHashesCheckbox; From 7ee0d1803337dbfd7bb6b7dde59b5aa9c25d0a7f Mon Sep 17 00:00:00 2001 From: William Schaefer Date: Mon, 13 Apr 2020 03:21:43 -0400 Subject: [PATCH 100/137] 6225 fix for screenshot 13 --- .../AutoIngestSettingsPanel.form | 145 ++++-- .../AutoIngestSettingsPanel.java | 474 +++++++++--------- 2 files changed, 349 insertions(+), 270 deletions(-) diff --git a/Experimental/src/org/sleuthkit/autopsy/experimental/configuration/AutoIngestSettingsPanel.form b/Experimental/src/org/sleuthkit/autopsy/experimental/configuration/AutoIngestSettingsPanel.form index 760f823543..2577ecc683 100644 --- a/Experimental/src/org/sleuthkit/autopsy/experimental/configuration/AutoIngestSettingsPanel.form +++ b/Experimental/src/org/sleuthkit/autopsy/experimental/configuration/AutoIngestSettingsPanel.form @@ -25,7 +25,7 @@ - + @@ -42,15 +42,15 @@ - + - - + + @@ -59,70 +59,73 @@ - - - - - + + + + + - - - - + + + + - - + - + - + - + - - - - - - - - - - - + + + - - - - + + + + + + + + + + + + + + + + - + @@ -177,7 +180,7 @@ - + @@ -192,7 +195,7 @@ - + @@ -225,6 +228,15 @@ + + + + + + + + + @@ -235,6 +247,15 @@ + + + + + + + + + @@ -245,6 +266,15 @@ + + + + + + + + + @@ -332,13 +362,13 @@ - + - + - + @@ -373,6 +403,15 @@ + + + + + + + + + @@ -383,6 +422,15 @@ + + + + + + + + + @@ -423,6 +471,15 @@ + + + + + + + + + @@ -478,19 +535,19 @@ - + - - + + - + - + diff --git a/Experimental/src/org/sleuthkit/autopsy/experimental/configuration/AutoIngestSettingsPanel.java b/Experimental/src/org/sleuthkit/autopsy/experimental/configuration/AutoIngestSettingsPanel.java index fcd21dd8f2..67b5997d98 100644 --- a/Experimental/src/org/sleuthkit/autopsy/experimental/configuration/AutoIngestSettingsPanel.java +++ b/Experimental/src/org/sleuthkit/autopsy/experimental/configuration/AutoIngestSettingsPanel.java @@ -1,7 +1,7 @@ /* * Autopsy Forensic Browser * - * Copyright 2015-2018 Basis Technology Corp. + * Copyright 2015-2020 Basis Technology Corp. * Contact: carrier sleuthkit org * * Licensed under the Apache License, Version 2.0 (the "License"); @@ -40,7 +40,6 @@ import javax.swing.ImageIcon; import org.openide.util.ImageUtilities; import javax.swing.JScrollPane; import javax.swing.SwingUtilities; -import org.openide.util.NbBundle.Messages; import org.sleuthkit.autopsy.coreutils.FileUtil; import org.openide.windows.WindowManager; import org.sleuthkit.autopsy.coreutils.Logger; @@ -644,7 +643,7 @@ public class AutoIngestSettingsPanel extends javax.swing.JPanel { nodeScrollPane.setMinimumSize(new java.awt.Dimension(0, 0)); - nodePanel.setMinimumSize(new java.awt.Dimension(100, 100)); + nodePanel.setMinimumSize(new java.awt.Dimension(0, 0)); tbOops.setEditable(false); tbOops.setFont(tbOops.getFont().deriveFont(tbOops.getFont().getStyle() | java.awt.Font.BOLD, tbOops.getFont().getSize()+1)); @@ -654,6 +653,9 @@ public class AutoIngestSettingsPanel extends javax.swing.JPanel { org.openide.awt.Mnemonics.setLocalizedText(bnEditIngestSettings, org.openide.util.NbBundle.getMessage(AutoIngestSettingsPanel.class, "AutoIngestSettingsPanel.bnEditIngestSettings.text")); // NOI18N bnEditIngestSettings.setToolTipText(org.openide.util.NbBundle.getMessage(AutoIngestSettingsPanel.class, "AutoIngestSettingsPanel.bnEditIngestSettings.toolTipText")); // NOI18N + bnEditIngestSettings.setMaximumSize(new java.awt.Dimension(200, 25)); + bnEditIngestSettings.setMinimumSize(new java.awt.Dimension(170, 25)); + bnEditIngestSettings.setPreferredSize(new java.awt.Dimension(170, 25)); bnEditIngestSettings.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { bnEditIngestSettingsActionPerformed(evt); @@ -661,6 +663,9 @@ public class AutoIngestSettingsPanel extends javax.swing.JPanel { }); org.openide.awt.Mnemonics.setLocalizedText(bnAdvancedSettings, org.openide.util.NbBundle.getMessage(AutoIngestSettingsPanel.class, "AutoIngestSettingsPanel.bnAdvancedSettings.text")); // NOI18N + bnAdvancedSettings.setMaximumSize(new java.awt.Dimension(200, 25)); + bnAdvancedSettings.setMinimumSize(new java.awt.Dimension(170, 25)); + bnAdvancedSettings.setPreferredSize(new java.awt.Dimension(170, 25)); bnAdvancedSettings.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { bnAdvancedSettingsActionPerformed(evt); @@ -668,6 +673,9 @@ public class AutoIngestSettingsPanel extends javax.swing.JPanel { }); org.openide.awt.Mnemonics.setLocalizedText(bnFileExport, org.openide.util.NbBundle.getMessage(AutoIngestSettingsPanel.class, "AutoIngestSettingsPanel.bnFileExport.text")); // NOI18N + bnFileExport.setMaximumSize(new java.awt.Dimension(200, 25)); + bnFileExport.setMinimumSize(new java.awt.Dimension(170, 25)); + bnFileExport.setPreferredSize(new java.awt.Dimension(170, 25)); bnFileExport.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { bnFileExportActionPerformed(evt); @@ -707,9 +715,9 @@ public class AutoIngestSettingsPanel extends javax.swing.JPanel { jLabelSelectOutputFolder.setVerticalAlignment(javax.swing.SwingConstants.BOTTOM); org.openide.awt.Mnemonics.setLocalizedText(sharedConfigCheckbox, org.openide.util.NbBundle.getMessage(AutoIngestSettingsPanel.class, "AutoIngestSettingsPanel.sharedConfigCheckbox.text")); // NOI18N - sharedConfigCheckbox.setMaximumSize(new java.awt.Dimension(191, 14)); - sharedConfigCheckbox.setMinimumSize(new java.awt.Dimension(191, 14)); - sharedConfigCheckbox.setPreferredSize(new java.awt.Dimension(191, 14)); + sharedConfigCheckbox.setMaximumSize(new java.awt.Dimension(191, 21)); + sharedConfigCheckbox.setMinimumSize(new java.awt.Dimension(191, 21)); + sharedConfigCheckbox.setPreferredSize(new java.awt.Dimension(191, 21)); sharedConfigCheckbox.addItemListener(new java.awt.event.ItemListener() { public void itemStateChanged(java.awt.event.ItemEvent evt) { sharedConfigCheckboxItemStateChanged(evt); @@ -726,6 +734,9 @@ public class AutoIngestSettingsPanel extends javax.swing.JPanel { org.openide.awt.Mnemonics.setLocalizedText(browseSharedSettingsButton, org.openide.util.NbBundle.getMessage(AutoIngestSettingsPanel.class, "AutoIngestSettingsPanel.browseSharedSettingsButton.text")); // NOI18N browseSharedSettingsButton.setEnabled(false); + browseSharedSettingsButton.setMaximumSize(new java.awt.Dimension(200, 25)); + browseSharedSettingsButton.setMinimumSize(new java.awt.Dimension(170, 25)); + browseSharedSettingsButton.setPreferredSize(new java.awt.Dimension(170, 25)); browseSharedSettingsButton.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { browseSharedSettingsButtonActionPerformed(evt); @@ -733,6 +744,9 @@ public class AutoIngestSettingsPanel extends javax.swing.JPanel { }); org.openide.awt.Mnemonics.setLocalizedText(downloadButton, org.openide.util.NbBundle.getMessage(AutoIngestSettingsPanel.class, "AutoIngestSettingsPanel.downloadButton.text")); // NOI18N + downloadButton.setMaximumSize(new java.awt.Dimension(200, 25)); + downloadButton.setMinimumSize(new java.awt.Dimension(170, 25)); + downloadButton.setPreferredSize(new java.awt.Dimension(170, 25)); downloadButton.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { downloadButtonActionPerformed(evt); @@ -749,6 +763,9 @@ public class AutoIngestSettingsPanel extends javax.swing.JPanel { org.openide.awt.Mnemonics.setLocalizedText(jLabelCurrentTask, org.openide.util.NbBundle.getMessage(AutoIngestSettingsPanel.class, "AutoIngestSettingsPanel.jLabelCurrentTask.text")); // NOI18N org.openide.awt.Mnemonics.setLocalizedText(uploadButton, org.openide.util.NbBundle.getMessage(AutoIngestSettingsPanel.class, "AutoIngestSettingsPanel.uploadButton.text")); // NOI18N + uploadButton.setMaximumSize(new java.awt.Dimension(200, 25)); + uploadButton.setMinimumSize(new java.awt.Dimension(170, 25)); + uploadButton.setPreferredSize(new java.awt.Dimension(170, 25)); uploadButton.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { uploadButtonActionPerformed(evt); @@ -805,8 +822,8 @@ public class AutoIngestSettingsPanel extends javax.swing.JPanel { .addGroup(pnTestMultiUserLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(lbTestResultText, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addGroup(pnTestMultiUserLayout.createSequentialGroup() - .addComponent(lbTestMultiUserText) - .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 236, Short.MAX_VALUE) + .addComponent(lbTestMultiUserText, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) + .addGap(236, 236, 236) .addComponent(bnTestMultiUser, javax.swing.GroupLayout.PREFERRED_SIZE, 83, javax.swing.GroupLayout.PREFERRED_SIZE) .addGap(18, 18, 18) .addComponent(lbMultiUserResult, javax.swing.GroupLayout.PREFERRED_SIZE, 16, javax.swing.GroupLayout.PREFERRED_SIZE) @@ -840,57 +857,62 @@ public class AutoIngestSettingsPanel extends javax.swing.JPanel { .addComponent(jLabelInvalidImageFolder, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) .addGroup(nodePanelLayout.createSequentialGroup() .addGroup(nodePanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) - .addComponent(pbTaskInProgress, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) - .addGroup(nodePanelLayout.createSequentialGroup() - .addComponent(jLabelCurrentTask) + .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, nodePanelLayout.createSequentialGroup() + .addComponent(sharedConfigCheckbox, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) - .addComponent(jLabelTaskDescription, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) + .addComponent(sharedSettingsErrorTextField, javax.swing.GroupLayout.PREFERRED_SIZE, 445, javax.swing.GroupLayout.PREFERRED_SIZE) + .addGap(30, 30, 30)) .addGroup(nodePanelLayout.createSequentialGroup() .addGroup(nodePanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(nodePanelLayout.createSequentialGroup() - .addComponent(outputPathTextField, javax.swing.GroupLayout.PREFERRED_SIZE, 630, javax.swing.GroupLayout.PREFERRED_SIZE) - .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) - .addComponent(browseOutputFolderButton)) + .addComponent(jLabelCurrentTask) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) + .addComponent(jLabelTaskDescription, javax.swing.GroupLayout.PREFERRED_SIZE, 626, javax.swing.GroupLayout.PREFERRED_SIZE)) .addGroup(nodePanelLayout.createSequentialGroup() .addComponent(inputPathTextField, javax.swing.GroupLayout.PREFERRED_SIZE, 630, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(browseInputFolderButton)) - .addComponent(uploadButton, javax.swing.GroupLayout.PREFERRED_SIZE, 143, javax.swing.GroupLayout.PREFERRED_SIZE) - .addComponent(masterNodeCheckBox) + .addComponent(uploadButton, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addGroup(nodePanelLayout.createSequentialGroup() - .addComponent(bnEditIngestSettings, javax.swing.GroupLayout.PREFERRED_SIZE, 155, javax.swing.GroupLayout.PREFERRED_SIZE) + .addComponent(bnEditIngestSettings, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) - .addComponent(bnAdvancedSettings, javax.swing.GroupLayout.PREFERRED_SIZE, 155, javax.swing.GroupLayout.PREFERRED_SIZE) + .addComponent(bnAdvancedSettings, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) - .addComponent(bnFileExport, javax.swing.GroupLayout.PREFERRED_SIZE, 155, javax.swing.GroupLayout.PREFERRED_SIZE)) + .addComponent(bnFileExport, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) .addGroup(nodePanelLayout.createSequentialGroup() .addComponent(jLabelSelectOutputFolder) .addGap(18, 18, 18) .addComponent(jLabelInvalidResultsFolder, javax.swing.GroupLayout.PREFERRED_SIZE, 544, javax.swing.GroupLayout.PREFERRED_SIZE)) - .addGroup(nodePanelLayout.createSequentialGroup() - .addComponent(sharedConfigCheckbox, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) - .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) - .addComponent(sharedSettingsErrorTextField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) .addGroup(nodePanelLayout.createSequentialGroup() .addComponent(sharedSettingsTextField, javax.swing.GroupLayout.PREFERRED_SIZE, 400, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) - .addComponent(browseSharedSettingsButton, javax.swing.GroupLayout.PREFERRED_SIZE, 143, javax.swing.GroupLayout.PREFERRED_SIZE)) - .addGroup(nodePanelLayout.createSequentialGroup() - .addComponent(downloadButton, javax.swing.GroupLayout.PREFERRED_SIZE, 143, javax.swing.GroupLayout.PREFERRED_SIZE) - .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) - .addComponent(configButtonErrorTextField, javax.swing.GroupLayout.PREFERRED_SIZE, 396, javax.swing.GroupLayout.PREFERRED_SIZE)) + .addComponent(browseSharedSettingsButton, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) .addGroup(nodePanelLayout.createSequentialGroup() .addComponent(examinerModeRadioButton, javax.swing.GroupLayout.PREFERRED_SIZE, 145, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) - .addComponent(tbOops, javax.swing.GroupLayout.PREFERRED_SIZE, 561, javax.swing.GroupLayout.PREFERRED_SIZE))) + .addComponent(tbOops, javax.swing.GroupLayout.PREFERRED_SIZE, 561, javax.swing.GroupLayout.PREFERRED_SIZE)) + .addComponent(downloadButton, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) + .addComponent(autoIngestModeRadioButton, javax.swing.GroupLayout.PREFERRED_SIZE, 145, javax.swing.GroupLayout.PREFERRED_SIZE)) .addGap(0, 0, Short.MAX_VALUE))) .addGap(10, 10, 10)) .addGroup(nodePanelLayout.createSequentialGroup() - .addGroup(nodePanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) - .addComponent(autoIngestModeRadioButton, javax.swing.GroupLayout.PREFERRED_SIZE, 145, javax.swing.GroupLayout.PREFERRED_SIZE) - .addComponent(pnTestMultiUser, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) - .addGap(0, 0, Short.MAX_VALUE)))) + .addGroup(nodePanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false) + .addComponent(pnTestMultiUser, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) + .addGroup(javax.swing.GroupLayout.Alignment.LEADING, nodePanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING) + .addComponent(configButtonErrorTextField, javax.swing.GroupLayout.PREFERRED_SIZE, 531, javax.swing.GroupLayout.PREFERRED_SIZE) + .addGroup(nodePanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false) + .addComponent(masterNodeCheckBox, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) + .addGroup(javax.swing.GroupLayout.Alignment.LEADING, nodePanelLayout.createSequentialGroup() + .addGap(6, 6, 6) + .addComponent(outputPathTextField, javax.swing.GroupLayout.PREFERRED_SIZE, 625, javax.swing.GroupLayout.PREFERRED_SIZE) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) + .addComponent(browseOutputFolderButton)))) + .addComponent(pbTaskInProgress, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) + .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)))) ); + + nodePanelLayout.linkSize(javax.swing.SwingConstants.HORIZONTAL, new java.awt.Component[] {bnAdvancedSettings, bnEditIngestSettings, bnFileExport, browseSharedSettingsButton, downloadButton, uploadButton}); + nodePanelLayout.setVerticalGroup( nodePanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(nodePanelLayout.createSequentialGroup() @@ -918,9 +940,9 @@ public class AutoIngestSettingsPanel extends javax.swing.JPanel { .addComponent(outputPathTextField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) .addGap(25, 25, 25) .addGroup(nodePanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) - .addComponent(bnEditIngestSettings) - .addComponent(bnFileExport) - .addComponent(bnAdvancedSettings)) + .addComponent(bnEditIngestSettings, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) + .addComponent(bnFileExport, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) + .addComponent(bnAdvancedSettings, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) .addGap(18, 18, 18) .addGroup(nodePanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(sharedConfigCheckbox, javax.swing.GroupLayout.PREFERRED_SIZE, 21, javax.swing.GroupLayout.PREFERRED_SIZE) @@ -928,15 +950,15 @@ public class AutoIngestSettingsPanel extends javax.swing.JPanel { .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addGroup(nodePanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(sharedSettingsTextField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) - .addComponent(browseSharedSettingsButton)) + .addComponent(browseSharedSettingsButton, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) .addGroup(nodePanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) - .addComponent(downloadButton) - .addComponent(configButtonErrorTextField, javax.swing.GroupLayout.PREFERRED_SIZE, 21, javax.swing.GroupLayout.PREFERRED_SIZE)) + .addComponent(downloadButton, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) + .addComponent(configButtonErrorTextField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) .addGap(18, 18, 18) .addComponent(masterNodeCheckBox, javax.swing.GroupLayout.PREFERRED_SIZE, 23, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) - .addComponent(uploadButton) + .addComponent(uploadButton, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addGap(8, 8, 8) .addGroup(nodePanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(jLabelCurrentTask) @@ -945,7 +967,7 @@ public class AutoIngestSettingsPanel extends javax.swing.JPanel { .addComponent(pbTaskInProgress, javax.swing.GroupLayout.PREFERRED_SIZE, 22, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) .addComponent(pnTestMultiUser, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) - .addContainerGap(82, Short.MAX_VALUE)) + .addContainerGap(20, Short.MAX_VALUE)) ); nodeScrollPane.setViewportView(nodePanel); @@ -958,193 +980,10 @@ public class AutoIngestSettingsPanel extends javax.swing.JPanel { ); layout.setVerticalGroup( layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) - .addComponent(nodeScrollPane, javax.swing.GroupLayout.DEFAULT_SIZE, 656, Short.MAX_VALUE) + .addComponent(nodeScrollPane, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) ); }// //GEN-END:initComponents - boolean permissionsAppropriate(String path) { - return FileUtil.hasReadWriteAccess(Paths.get(path)); - } - - private void setSharedConfigEnable() { - setEnabledStateForSharedConfiguration(); - if (sharedConfigCheckbox.isEnabled() && sharedConfigCheckbox.isSelected()) { - sharedSettingsTextField.setEnabled(true); - browseSharedSettingsButton.setEnabled(true); - masterNodeCheckBox.setEnabled(true); - downloadButton.setEnabled(true); - validateSettings(); - controller.changed(); - } else { - sharedSettingsTextField.setEnabled(false); - browseSharedSettingsButton.setEnabled(false); - masterNodeCheckBox.setEnabled(false); - downloadButton.setEnabled(false); - sharedSettingsErrorTextField.setText(""); - validateSettings(); - controller.changed(); - } - } - - private void downloadButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_downloadButtonActionPerformed - // First save the shared config folder and solr settings to the properties - String globalSettingsPath = getNormalizedFolderPath(sharedSettingsTextField.getText().trim()); - AutoIngestUserPreferences.setSharedConfigFolder(globalSettingsPath); - - enableUI(false); - jLabelCurrentTask.setEnabled(true); - jLabelTaskDescription.setEnabled(true); - pbTaskInProgress.setEnabled(true); - pbTaskInProgress.setIndeterminate(true); - - UpdateConfigSwingWorker worker = new UpdateConfigSwingWorker(ConfigTaskType.DOWNLOAD); - try { - worker.execute(); - } catch (Exception ex) { - jLabelTaskDescription.setText(ex.getLocalizedMessage()); - } - }//GEN-LAST:event_downloadButtonActionPerformed - - private void uploadButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_uploadButtonActionPerformed - store(); - - enableUI(false); - jLabelCurrentTask.setEnabled(true); - jLabelTaskDescription.setEnabled(true); - pbTaskInProgress.setEnabled(true); - pbTaskInProgress.setIndeterminate(true); - - UpdateConfigSwingWorker worker = new UpdateConfigSwingWorker(ConfigTaskType.UPLOAD); - try { - worker.execute(); - } catch (Exception ex) { - jLabelTaskDescription.setText(ex.getLocalizedMessage()); - } - }//GEN-LAST:event_uploadButtonActionPerformed - - private void masterNodeCheckBoxItemStateChanged(java.awt.event.ItemEvent evt) {//GEN-FIRST:event_masterNodeCheckBoxItemStateChanged - // Enable the global settings text box and browse button iff the checkbox is checked and enabled - setEnabledStateForSharedConfiguration(); - if (masterNodeCheckBox.isEnabled() && masterNodeCheckBox.isSelected()) { - uploadButton.setEnabled(true); - validateSettings(); // This will disable the upload/save button if the settings aren't currently valid - controller.changed(); - } else { - uploadButton.setEnabled(false); - } - }//GEN-LAST:event_masterNodeCheckBoxItemStateChanged - - private void browseSharedSettingsButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_browseSharedSettingsButtonActionPerformed - - String oldText = sharedSettingsTextField.getText().trim(); - // set the current directory of the FileChooser if the oldText is valid - File currentDir = new File(oldText); - if (currentDir.exists()) { - fc.setCurrentDirectory(currentDir); - } - - fc.setDialogTitle("Select shared configuration folder:"); - fc.setFileSelectionMode(JFileChooser.DIRECTORIES_ONLY); - - int retval = fc.showOpenDialog(this); - if (retval == JFileChooser.APPROVE_OPTION) { - String path = fc.getSelectedFile().getPath(); - sharedSettingsTextField.setText(path); - validateSettings(); - controller.changed(); - } - }//GEN-LAST:event_browseSharedSettingsButtonActionPerformed - - private void sharedConfigCheckboxItemStateChanged(java.awt.event.ItemEvent evt) {//GEN-FIRST:event_sharedConfigCheckboxItemStateChanged - // Enable the global settings text box and browse button iff the checkbox is checked and enabled - setSharedConfigEnable(); - }//GEN-LAST:event_sharedConfigCheckboxItemStateChanged - - private void browseOutputFolderButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_browseOutputFolderButtonActionPerformed - String oldText = outputPathTextField.getText().trim(); - // set the current directory of the FileChooser if the oldText is valid - File currentDir = new File(oldText); - if (currentDir.exists()) { - fc.setCurrentDirectory(currentDir); - } - - fc.setDialogTitle("Select case output folder:"); - fc.setFileSelectionMode(JFileChooser.DIRECTORIES_ONLY); - - int retval = fc.showOpenDialog(this); - if (retval == JFileChooser.APPROVE_OPTION) { - String path = fc.getSelectedFile().getPath(); - outputPathTextField.setText(path); - validateSettings(); - controller.changed(); - } - }//GEN-LAST:event_browseOutputFolderButtonActionPerformed - - private void browseInputFolderButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_browseInputFolderButtonActionPerformed - String oldText = inputPathTextField.getText().trim(); - // set the current directory of the FileChooser if the oldText is valid - File currentDir = new File(oldText); - if (currentDir.exists()) { - fc.setCurrentDirectory(currentDir); - } - - fc.setDialogTitle("Select case input folder:"); - fc.setFileSelectionMode(JFileChooser.DIRECTORIES_ONLY); - - int retval = fc.showOpenDialog(this); - if (retval == JFileChooser.APPROVE_OPTION) { - String path = fc.getSelectedFile().getPath(); - inputPathTextField.setText(path); - validateSettings(); - controller.changed(); - } - }//GEN-LAST:event_browseInputFolderButtonActionPerformed - - private void bnFileExportActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_bnFileExportActionPerformed - JDialog jDialog = new JDialog(); - FileExporterSettingsPanel fileExporterSettingsPanel = new FileExporterSettingsPanel(jDialog); - jDialog.addWindowListener(new java.awt.event.WindowAdapter() { - @Override - public void windowClosing(java.awt.event.WindowEvent windowEvent) { - fileExporterSettingsPanel.store(); - } - }); - JScrollPane jScrollPane = new JScrollPane(fileExporterSettingsPanel); - jScrollPane.setVerticalScrollBarPolicy(javax.swing.ScrollPaneConstants.VERTICAL_SCROLLBAR_AS_NEEDED); - jScrollPane.setHorizontalScrollBarPolicy(javax.swing.ScrollPaneConstants.HORIZONTAL_SCROLLBAR_AS_NEEDED); - jScrollPane.setMinimumSize(new Dimension(100, 100)); - jDialog.add(jScrollPane); - jDialog.setTitle(NbBundle.getMessage(AutoIngestSettingsPanel.class, "AutoIngestSettingsPanel.FileExportRules.text")); - jDialog.setIconImage(ImageUtilities.loadImage("org/sleuthkit/autopsy/experimental/images/frame32.gif")); - jDialog.setModalityType(java.awt.Dialog.ModalityType.APPLICATION_MODAL); - jDialog.pack(); - jDialog.setLocationRelativeTo(this); - jDialog.setVisible(true); - }//GEN-LAST:event_bnFileExportActionPerformed - - private void bnAdvancedSettingsActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_bnAdvancedSettingsActionPerformed - AdvancedAutoIngestSettingsPanel advancedAutoIngestSettingsPanel = new AdvancedAutoIngestSettingsPanel(getModeFromRadioButtons()); - if (JOptionPane.showConfirmDialog(this, advancedAutoIngestSettingsPanel, - NbBundle.getMessage(AutoIngestSettingsPanel.class, "AutoIngestSettingsPanel.AdvancedAutoIngestSettingsPanel.Title"), - JOptionPane.OK_CANCEL_OPTION, JOptionPane.PLAIN_MESSAGE) == JOptionPane.OK_OPTION) { - advancedAutoIngestSettingsPanel.store(); - } - }//GEN-LAST:event_bnAdvancedSettingsActionPerformed - - private void bnEditIngestSettingsActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_bnEditIngestSettingsActionPerformed - displayIngestJobSettingsPanel(); - }//GEN-LAST:event_bnEditIngestSettingsActionPerformed - - private void autoIngestModeRadioButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_autoIngestModeRadioButtonActionPerformed - enableOptionsBasedOnMode(getModeFromRadioButtons()); - controller.changed(); - }//GEN-LAST:event_autoIngestModeRadioButtonActionPerformed - - private void examinerModeRadioButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_examinerModeRadioButtonActionPerformed - enableOptionsBasedOnMode(getModeFromRadioButtons()); - controller.changed(); - }//GEN-LAST:event_examinerModeRadioButtonActionPerformed - private void bnTestMultiUserActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_bnTestMultiUserActionPerformed lbTestResultText.setForeground(Color.BLACK); @@ -1176,6 +1015,189 @@ public class AutoIngestSettingsPanel extends javax.swing.JPanel { } }//GEN-LAST:event_bnTestMultiUserActionPerformed + private void autoIngestModeRadioButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_autoIngestModeRadioButtonActionPerformed + enableOptionsBasedOnMode(getModeFromRadioButtons()); + controller.changed(); + }//GEN-LAST:event_autoIngestModeRadioButtonActionPerformed + + private void examinerModeRadioButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_examinerModeRadioButtonActionPerformed + enableOptionsBasedOnMode(getModeFromRadioButtons()); + controller.changed(); + }//GEN-LAST:event_examinerModeRadioButtonActionPerformed + + private void masterNodeCheckBoxItemStateChanged(java.awt.event.ItemEvent evt) {//GEN-FIRST:event_masterNodeCheckBoxItemStateChanged + // Enable the global settings text box and browse button iff the checkbox is checked and enabled + setEnabledStateForSharedConfiguration(); + if (masterNodeCheckBox.isEnabled() && masterNodeCheckBox.isSelected()) { + uploadButton.setEnabled(true); + validateSettings(); // This will disable the upload/save button if the settings aren't currently valid + controller.changed(); + } else { + uploadButton.setEnabled(false); + } + }//GEN-LAST:event_masterNodeCheckBoxItemStateChanged + + private void uploadButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_uploadButtonActionPerformed + store(); + + enableUI(false); + jLabelCurrentTask.setEnabled(true); + jLabelTaskDescription.setEnabled(true); + pbTaskInProgress.setEnabled(true); + pbTaskInProgress.setIndeterminate(true); + + UpdateConfigSwingWorker worker = new UpdateConfigSwingWorker(ConfigTaskType.UPLOAD); + try { + worker.execute(); + } catch (Exception ex) { + jLabelTaskDescription.setText(ex.getLocalizedMessage()); + } + }//GEN-LAST:event_uploadButtonActionPerformed + + private void downloadButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_downloadButtonActionPerformed + // First save the shared config folder and solr settings to the properties + String globalSettingsPath = getNormalizedFolderPath(sharedSettingsTextField.getText().trim()); + AutoIngestUserPreferences.setSharedConfigFolder(globalSettingsPath); + + enableUI(false); + jLabelCurrentTask.setEnabled(true); + jLabelTaskDescription.setEnabled(true); + pbTaskInProgress.setEnabled(true); + pbTaskInProgress.setIndeterminate(true); + + UpdateConfigSwingWorker worker = new UpdateConfigSwingWorker(ConfigTaskType.DOWNLOAD); + try { + worker.execute(); + } catch (Exception ex) { + jLabelTaskDescription.setText(ex.getLocalizedMessage()); + } + }//GEN-LAST:event_downloadButtonActionPerformed + + private void browseSharedSettingsButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_browseSharedSettingsButtonActionPerformed + + String oldText = sharedSettingsTextField.getText().trim(); + // set the current directory of the FileChooser if the oldText is valid + File currentDir = new File(oldText); + if (currentDir.exists()) { + fc.setCurrentDirectory(currentDir); + } + + fc.setDialogTitle("Select shared configuration folder:"); + fc.setFileSelectionMode(JFileChooser.DIRECTORIES_ONLY); + + int retval = fc.showOpenDialog(this); + if (retval == JFileChooser.APPROVE_OPTION) { + String path = fc.getSelectedFile().getPath(); + sharedSettingsTextField.setText(path); + validateSettings(); + controller.changed(); + } + }//GEN-LAST:event_browseSharedSettingsButtonActionPerformed + + private void sharedConfigCheckboxItemStateChanged(java.awt.event.ItemEvent evt) {//GEN-FIRST:event_sharedConfigCheckboxItemStateChanged + // Enable the global settings text box and browse button iff the checkbox is checked and enabled + setSharedConfigEnable(); + }//GEN-LAST:event_sharedConfigCheckboxItemStateChanged + + private void browseInputFolderButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_browseInputFolderButtonActionPerformed + String oldText = inputPathTextField.getText().trim(); + // set the current directory of the FileChooser if the oldText is valid + File currentDir = new File(oldText); + if (currentDir.exists()) { + fc.setCurrentDirectory(currentDir); + } + + fc.setDialogTitle("Select case input folder:"); + fc.setFileSelectionMode(JFileChooser.DIRECTORIES_ONLY); + + int retval = fc.showOpenDialog(this); + if (retval == JFileChooser.APPROVE_OPTION) { + String path = fc.getSelectedFile().getPath(); + inputPathTextField.setText(path); + validateSettings(); + controller.changed(); + } + }//GEN-LAST:event_browseInputFolderButtonActionPerformed + + private void browseOutputFolderButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_browseOutputFolderButtonActionPerformed + String oldText = outputPathTextField.getText().trim(); + // set the current directory of the FileChooser if the oldText is valid + File currentDir = new File(oldText); + if (currentDir.exists()) { + fc.setCurrentDirectory(currentDir); + } + + fc.setDialogTitle("Select case output folder:"); + fc.setFileSelectionMode(JFileChooser.DIRECTORIES_ONLY); + + int retval = fc.showOpenDialog(this); + if (retval == JFileChooser.APPROVE_OPTION) { + String path = fc.getSelectedFile().getPath(); + outputPathTextField.setText(path); + validateSettings(); + controller.changed(); + } + }//GEN-LAST:event_browseOutputFolderButtonActionPerformed + + private void bnFileExportActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_bnFileExportActionPerformed + JDialog jDialog = new JDialog(); + FileExporterSettingsPanel fileExporterSettingsPanel = new FileExporterSettingsPanel(jDialog); + jDialog.addWindowListener(new java.awt.event.WindowAdapter() { + @Override + public void windowClosing(java.awt.event.WindowEvent windowEvent) { + fileExporterSettingsPanel.store(); + } + }); + JScrollPane jScrollPane = new JScrollPane(fileExporterSettingsPanel); + jScrollPane.setVerticalScrollBarPolicy(javax.swing.ScrollPaneConstants.VERTICAL_SCROLLBAR_AS_NEEDED); + jScrollPane.setHorizontalScrollBarPolicy(javax.swing.ScrollPaneConstants.HORIZONTAL_SCROLLBAR_AS_NEEDED); + jScrollPane.setMinimumSize(new Dimension(100, 100)); + jDialog.add(jScrollPane); + jDialog.setTitle(NbBundle.getMessage(AutoIngestSettingsPanel.class, "AutoIngestSettingsPanel.FileExportRules.text")); + jDialog.setIconImage(ImageUtilities.loadImage("org/sleuthkit/autopsy/experimental/images/frame32.gif")); + jDialog.setModalityType(java.awt.Dialog.ModalityType.APPLICATION_MODAL); + jDialog.pack(); + jDialog.setLocationRelativeTo(this); + jDialog.setVisible(true); + }//GEN-LAST:event_bnFileExportActionPerformed + + private void bnAdvancedSettingsActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_bnAdvancedSettingsActionPerformed + AdvancedAutoIngestSettingsPanel advancedAutoIngestSettingsPanel = new AdvancedAutoIngestSettingsPanel(getModeFromRadioButtons()); + if (JOptionPane.showConfirmDialog(this, advancedAutoIngestSettingsPanel, + NbBundle.getMessage(AutoIngestSettingsPanel.class, "AutoIngestSettingsPanel.AdvancedAutoIngestSettingsPanel.Title"), + JOptionPane.OK_CANCEL_OPTION, JOptionPane.PLAIN_MESSAGE) == JOptionPane.OK_OPTION) { + advancedAutoIngestSettingsPanel.store(); + } + }//GEN-LAST:event_bnAdvancedSettingsActionPerformed + + private void bnEditIngestSettingsActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_bnEditIngestSettingsActionPerformed + displayIngestJobSettingsPanel(); + }//GEN-LAST:event_bnEditIngestSettingsActionPerformed + + boolean permissionsAppropriate(String path) { + return FileUtil.hasReadWriteAccess(Paths.get(path)); + } + + private void setSharedConfigEnable() { + setEnabledStateForSharedConfiguration(); + if (sharedConfigCheckbox.isEnabled() && sharedConfigCheckbox.isSelected()) { + sharedSettingsTextField.setEnabled(true); + browseSharedSettingsButton.setEnabled(true); + masterNodeCheckBox.setEnabled(true); + downloadButton.setEnabled(true); + validateSettings(); + controller.changed(); + } else { + sharedSettingsTextField.setEnabled(false); + browseSharedSettingsButton.setEnabled(false); + masterNodeCheckBox.setEnabled(false); + downloadButton.setEnabled(false); + sharedSettingsErrorTextField.setText(""); + validateSettings(); + controller.changed(); + } + } + private void enableUI(boolean state) { enableOptionsBasedOnMode(OptionsUiMode.DOWNLOADING_CONFIGURATION); downloadButton.setEnabled(state); From 646e334a19994a955f6d586e5b3416b7300d581d Mon Sep 17 00:00:00 2001 From: William Schaefer Date: Mon, 13 Apr 2020 03:21:47 -0400 Subject: [PATCH 101/137] 6225 fix for screenshot 13 --- .../AutoIngestSettingsPanel.form | 19 +++++++------------ .../AutoIngestSettingsPanel.java | 17 +++++++---------- 2 files changed, 14 insertions(+), 22 deletions(-) diff --git a/Experimental/src/org/sleuthkit/autopsy/experimental/configuration/AutoIngestSettingsPanel.form b/Experimental/src/org/sleuthkit/autopsy/experimental/configuration/AutoIngestSettingsPanel.form index 2577ecc683..87cb248163 100644 --- a/Experimental/src/org/sleuthkit/autopsy/experimental/configuration/AutoIngestSettingsPanel.form +++ b/Experimental/src/org/sleuthkit/autopsy/experimental/configuration/AutoIngestSettingsPanel.form @@ -111,17 +111,12 @@ - - - - - - - - - - - + + + + + + @@ -539,7 +534,7 @@ - + diff --git a/Experimental/src/org/sleuthkit/autopsy/experimental/configuration/AutoIngestSettingsPanel.java b/Experimental/src/org/sleuthkit/autopsy/experimental/configuration/AutoIngestSettingsPanel.java index 67b5997d98..1aa7238642 100644 --- a/Experimental/src/org/sleuthkit/autopsy/experimental/configuration/AutoIngestSettingsPanel.java +++ b/Experimental/src/org/sleuthkit/autopsy/experimental/configuration/AutoIngestSettingsPanel.java @@ -822,7 +822,7 @@ public class AutoIngestSettingsPanel extends javax.swing.JPanel { .addGroup(pnTestMultiUserLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(lbTestResultText, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addGroup(pnTestMultiUserLayout.createSequentialGroup() - .addComponent(lbTestMultiUserText, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) + .addComponent(lbTestMultiUserText, javax.swing.GroupLayout.DEFAULT_SIZE, 324, Short.MAX_VALUE) .addGap(236, 236, 236) .addComponent(bnTestMultiUser, javax.swing.GroupLayout.PREFERRED_SIZE, 83, javax.swing.GroupLayout.PREFERRED_SIZE) .addGap(18, 18, 18) @@ -898,15 +898,12 @@ public class AutoIngestSettingsPanel extends javax.swing.JPanel { .addGroup(nodePanelLayout.createSequentialGroup() .addGroup(nodePanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false) .addComponent(pnTestMultiUser, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) - .addGroup(javax.swing.GroupLayout.Alignment.LEADING, nodePanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING) - .addComponent(configButtonErrorTextField, javax.swing.GroupLayout.PREFERRED_SIZE, 531, javax.swing.GroupLayout.PREFERRED_SIZE) - .addGroup(nodePanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false) - .addComponent(masterNodeCheckBox, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) - .addGroup(javax.swing.GroupLayout.Alignment.LEADING, nodePanelLayout.createSequentialGroup() - .addGap(6, 6, 6) - .addComponent(outputPathTextField, javax.swing.GroupLayout.PREFERRED_SIZE, 625, javax.swing.GroupLayout.PREFERRED_SIZE) - .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) - .addComponent(browseOutputFolderButton)))) + .addComponent(configButtonErrorTextField, javax.swing.GroupLayout.PREFERRED_SIZE, 531, javax.swing.GroupLayout.PREFERRED_SIZE) + .addComponent(masterNodeCheckBox, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) + .addGroup(javax.swing.GroupLayout.Alignment.LEADING, nodePanelLayout.createSequentialGroup() + .addComponent(outputPathTextField) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) + .addComponent(browseOutputFolderButton)) .addComponent(pbTaskInProgress, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)))) ); From ad74553829845acfb02530b167ac7124e0a75305 Mon Sep 17 00:00:00 2001 From: William Schaefer Date: Mon, 13 Apr 2020 03:29:20 -0400 Subject: [PATCH 102/137] 6225 fix for screenshot 13 --- .../configuration/AutoIngestSettingsPanel.form | 8 ++++---- .../configuration/AutoIngestSettingsPanel.java | 4 ++++ 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/Experimental/src/org/sleuthkit/autopsy/experimental/configuration/AutoIngestSettingsPanel.form b/Experimental/src/org/sleuthkit/autopsy/experimental/configuration/AutoIngestSettingsPanel.form index 87cb248163..7aa013e047 100644 --- a/Experimental/src/org/sleuthkit/autopsy/experimental/configuration/AutoIngestSettingsPanel.form +++ b/Experimental/src/org/sleuthkit/autopsy/experimental/configuration/AutoIngestSettingsPanel.form @@ -73,9 +73,9 @@ - + - + @@ -114,9 +114,9 @@ - + - + diff --git a/Experimental/src/org/sleuthkit/autopsy/experimental/configuration/AutoIngestSettingsPanel.java b/Experimental/src/org/sleuthkit/autopsy/experimental/configuration/AutoIngestSettingsPanel.java index 1aa7238642..696c33ccb4 100644 --- a/Experimental/src/org/sleuthkit/autopsy/experimental/configuration/AutoIngestSettingsPanel.java +++ b/Experimental/src/org/sleuthkit/autopsy/experimental/configuration/AutoIngestSettingsPanel.java @@ -910,6 +910,10 @@ public class AutoIngestSettingsPanel extends javax.swing.JPanel { nodePanelLayout.linkSize(javax.swing.SwingConstants.HORIZONTAL, new java.awt.Component[] {bnAdvancedSettings, bnEditIngestSettings, bnFileExport, browseSharedSettingsButton, downloadButton, uploadButton}); + nodePanelLayout.linkSize(javax.swing.SwingConstants.HORIZONTAL, new java.awt.Component[] {inputPathTextField, outputPathTextField}); + + nodePanelLayout.linkSize(javax.swing.SwingConstants.HORIZONTAL, new java.awt.Component[] {browseInputFolderButton, browseOutputFolderButton}); + nodePanelLayout.setVerticalGroup( nodePanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(nodePanelLayout.createSequentialGroup() From c8d084886eb566edc3c11464811d9af75b51ee9e Mon Sep 17 00:00:00 2001 From: William Schaefer Date: Mon, 13 Apr 2020 04:24:26 -0400 Subject: [PATCH 103/137] 6225 fix for screenshot 13 --- .../BingTranslatorSettingsPanel.form | 155 ++++++++-------- .../BingTranslatorSettingsPanel.java | 159 ++++++++++------ .../GoogleTranslatorSettingsPanel.form | 168 ++++++++--------- .../GoogleTranslatorSettingsPanel.java | 171 +++++++++++------- 4 files changed, 367 insertions(+), 286 deletions(-) diff --git a/Core/src/org/sleuthkit/autopsy/texttranslation/translators/BingTranslatorSettingsPanel.form b/Core/src/org/sleuthkit/autopsy/texttranslation/translators/BingTranslatorSettingsPanel.form index 08f7946452..52655f1a85 100644 --- a/Core/src/org/sleuthkit/autopsy/texttranslation/translators/BingTranslatorSettingsPanel.form +++ b/Core/src/org/sleuthkit/autopsy/texttranslation/translators/BingTranslatorSettingsPanel.form @@ -11,90 +11,25 @@ + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + @@ -105,6 +40,11 @@ + + + + + @@ -115,6 +55,11 @@ + + + + + @@ -122,6 +67,11 @@ + + + + + @@ -136,13 +86,26 @@ + + + + + + + + + + + + + @@ -150,6 +113,11 @@ + + + + + @@ -157,20 +125,41 @@ + + + + + + + + + + + + + + + + + + + + + @@ -180,10 +169,18 @@ + + + + + + + + @@ -195,11 +192,17 @@ - + + + + + + + diff --git a/Core/src/org/sleuthkit/autopsy/texttranslation/translators/BingTranslatorSettingsPanel.java b/Core/src/org/sleuthkit/autopsy/texttranslation/translators/BingTranslatorSettingsPanel.java index 5b34605403..3fec49de8c 100644 --- a/Core/src/org/sleuthkit/autopsy/texttranslation/translators/BingTranslatorSettingsPanel.java +++ b/Core/src/org/sleuthkit/autopsy/texttranslation/translators/BingTranslatorSettingsPanel.java @@ -127,6 +127,7 @@ public class BingTranslatorSettingsPanel extends javax.swing.JPanel { @SuppressWarnings("unchecked") // //GEN-BEGIN:initComponents private void initComponents() { + java.awt.GridBagConstraints gridBagConstraints; authenticationKeyField = new javax.swing.JTextField(); warningLabel = new javax.swing.JLabel(); @@ -141,10 +142,31 @@ public class BingTranslatorSettingsPanel extends javax.swing.JPanel { instructionsScrollPane = new javax.swing.JScrollPane(); instructionsTextArea = new javax.swing.JTextArea(); + setLayout(new java.awt.GridBagLayout()); + authenticationKeyField.setToolTipText(org.openide.util.NbBundle.getMessage(BingTranslatorSettingsPanel.class, "BingTranslatorSettingsPanel.authenticationKeyField.toolTipText")); // NOI18N + authenticationKeyField.setMaximumSize(new java.awt.Dimension(800, 22)); + gridBagConstraints = new java.awt.GridBagConstraints(); + gridBagConstraints.gridx = 3; + gridBagConstraints.gridy = 1; + gridBagConstraints.gridwidth = 7; + gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL; + gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST; + gridBagConstraints.weightx = 1.0; + gridBagConstraints.insets = new java.awt.Insets(14, 5, 0, 12); + add(authenticationKeyField, gridBagConstraints); warningLabel.setForeground(new java.awt.Color(255, 0, 0)); org.openide.awt.Mnemonics.setLocalizedText(warningLabel, org.openide.util.NbBundle.getMessage(BingTranslatorSettingsPanel.class, "GoogleTranslatorSettingsPanel.warningLabel.text")); // NOI18N + gridBagConstraints = new java.awt.GridBagConstraints(); + gridBagConstraints.gridx = 0; + gridBagConstraints.gridy = 4; + gridBagConstraints.gridwidth = 10; + gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH; + gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST; + gridBagConstraints.weightx = 1.0; + gridBagConstraints.insets = new java.awt.Insets(7, 12, 6, 0); + add(warningLabel, gridBagConstraints); org.openide.awt.Mnemonics.setLocalizedText(testButton, org.openide.util.NbBundle.getMessage(BingTranslatorSettingsPanel.class, "BingTranslatorSettingsPanel.testButton.text")); // NOI18N testButton.addActionListener(new java.awt.event.ActionListener() { @@ -152,8 +174,23 @@ public class BingTranslatorSettingsPanel extends javax.swing.JPanel { testButtonActionPerformed(evt); } }); + gridBagConstraints = new java.awt.GridBagConstraints(); + gridBagConstraints.gridx = 0; + gridBagConstraints.gridy = 3; + gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL; + gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST; + gridBagConstraints.insets = new java.awt.Insets(6, 12, 0, 0); + add(testButton, gridBagConstraints); org.openide.awt.Mnemonics.setLocalizedText(targetLanguageLabel, org.openide.util.NbBundle.getMessage(BingTranslatorSettingsPanel.class, "BingTranslatorSettingsPanel.targetLanguageLabel.text")); // NOI18N + gridBagConstraints = new java.awt.GridBagConstraints(); + gridBagConstraints.gridx = 0; + gridBagConstraints.gridy = 2; + gridBagConstraints.gridwidth = 3; + gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL; + gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST; + gridBagConstraints.insets = new java.awt.Insets(10, 12, 0, 0); + add(targetLanguageLabel, gridBagConstraints); targetLanguageComboBox.setEnabled(false); targetLanguageComboBox.addItemListener(new java.awt.event.ItemListener() { @@ -161,88 +198,90 @@ public class BingTranslatorSettingsPanel extends javax.swing.JPanel { targetLanguageComboBoxSelected(evt); } }); + gridBagConstraints = new java.awt.GridBagConstraints(); + gridBagConstraints.gridx = 3; + gridBagConstraints.gridy = 2; + gridBagConstraints.gridwidth = 4; + gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL; + gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST; + gridBagConstraints.insets = new java.awt.Insets(8, 5, 0, 0); + add(targetLanguageComboBox, gridBagConstraints); testUntranslatedTextField.setText(DEFUALT_TEST_STRING); + testUntranslatedTextField.setPreferredSize(new java.awt.Dimension(160, 22)); + gridBagConstraints = new java.awt.GridBagConstraints(); + gridBagConstraints.gridx = 4; + gridBagConstraints.gridy = 3; + gridBagConstraints.gridwidth = 2; + gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL; + gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST; + gridBagConstraints.insets = new java.awt.Insets(8, 5, 0, 0); + add(testUntranslatedTextField, gridBagConstraints); org.openide.awt.Mnemonics.setLocalizedText(untranslatedLabel, org.openide.util.NbBundle.getMessage(BingTranslatorSettingsPanel.class, "BingTranslatorSettingsPanel.untranslatedLabel.text")); // NOI18N + gridBagConstraints = new java.awt.GridBagConstraints(); + gridBagConstraints.gridx = 3; + gridBagConstraints.gridy = 3; + gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL; + gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST; + gridBagConstraints.insets = new java.awt.Insets(10, 5, 0, 0); + add(untranslatedLabel, gridBagConstraints); org.openide.awt.Mnemonics.setLocalizedText(resultLabel, org.openide.util.NbBundle.getMessage(BingTranslatorSettingsPanel.class, "BingTranslatorSettingsPanel.resultLabel.text")); // NOI18N + gridBagConstraints = new java.awt.GridBagConstraints(); + gridBagConstraints.gridx = 6; + gridBagConstraints.gridy = 3; + gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST; + gridBagConstraints.insets = new java.awt.Insets(10, 10, 0, 0); + add(resultLabel, gridBagConstraints); org.openide.awt.Mnemonics.setLocalizedText(testResultValueLabel, org.openide.util.NbBundle.getMessage(BingTranslatorSettingsPanel.class, "BingTranslatorSettingsPanel.testResultValueLabel.text")); // NOI18N + testResultValueLabel.setMaximumSize(new java.awt.Dimension(600, 22)); + gridBagConstraints = new java.awt.GridBagConstraints(); + gridBagConstraints.gridx = 7; + gridBagConstraints.gridy = 3; + gridBagConstraints.gridwidth = 3; + gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL; + gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST; + gridBagConstraints.insets = new java.awt.Insets(4, 7, 0, 12); + add(testResultValueLabel, gridBagConstraints); org.openide.awt.Mnemonics.setLocalizedText(authenticationKeyLabel, org.openide.util.NbBundle.getMessage(BingTranslatorSettingsPanel.class, "BingTranslatorSettingsPanel.authenticationKeyLabel.text")); // NOI18N + authenticationKeyLabel.setMaximumSize(new java.awt.Dimension(200, 16)); + 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.insets = new java.awt.Insets(16, 12, 0, 0); + add(authenticationKeyLabel, gridBagConstraints); instructionsScrollPane.setBorder(javax.swing.BorderFactory.createEtchedBorder()); instructionsScrollPane.setHorizontalScrollBarPolicy(javax.swing.ScrollPaneConstants.HORIZONTAL_SCROLLBAR_NEVER); + instructionsScrollPane.setPreferredSize(new java.awt.Dimension(168, 80)); instructionsTextArea.setEditable(false); instructionsTextArea.setBackground(new java.awt.Color(240, 240, 240)); instructionsTextArea.setColumns(20); instructionsTextArea.setLineWrap(true); - instructionsTextArea.setRows(2); + instructionsTextArea.setRows(4); instructionsTextArea.setText(org.openide.util.NbBundle.getMessage(BingTranslatorSettingsPanel.class, "BingTranslatorSettingsPanel.instructionsTextArea.text")); // NOI18N instructionsTextArea.setWrapStyleWord(true); + instructionsTextArea.setMaximumSize(new java.awt.Dimension(1000, 200)); + instructionsTextArea.setPreferredSize(new java.awt.Dimension(164, 78)); instructionsScrollPane.setViewportView(instructionsTextArea); - javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this); - this.setLayout(layout); - layout.setHorizontalGroup( - layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) - .addGroup(layout.createSequentialGroup() - .addContainerGap() - .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) - .addComponent(instructionsScrollPane) - .addGroup(layout.createSequentialGroup() - .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false) - .addGroup(layout.createSequentialGroup() - .addComponent(authenticationKeyLabel, javax.swing.GroupLayout.PREFERRED_SIZE, 100, javax.swing.GroupLayout.PREFERRED_SIZE) - .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) - .addComponent(authenticationKeyField, javax.swing.GroupLayout.PREFERRED_SIZE, 486, javax.swing.GroupLayout.PREFERRED_SIZE)) - .addComponent(warningLabel, javax.swing.GroupLayout.PREFERRED_SIZE, 551, javax.swing.GroupLayout.PREFERRED_SIZE) - .addGroup(layout.createSequentialGroup() - .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) - .addComponent(targetLanguageLabel) - .addComponent(testButton, javax.swing.GroupLayout.PREFERRED_SIZE, 79, javax.swing.GroupLayout.PREFERRED_SIZE)) - .addGap(18, 18, 18) - .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) - .addGroup(layout.createSequentialGroup() - .addComponent(untranslatedLabel, javax.swing.GroupLayout.PREFERRED_SIZE, 66, javax.swing.GroupLayout.PREFERRED_SIZE) - .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) - .addComponent(testUntranslatedTextField, javax.swing.GroupLayout.PREFERRED_SIZE, 140, javax.swing.GroupLayout.PREFERRED_SIZE) - .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) - .addComponent(resultLabel) - .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) - .addComponent(testResultValueLabel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) - .addGroup(layout.createSequentialGroup() - .addComponent(targetLanguageComboBox, 0, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) - .addGap(276, 276, 276))))) - .addGap(0, 0, Short.MAX_VALUE))) - .addContainerGap()) - ); - layout.setVerticalGroup( - layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) - .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup() - .addContainerGap() - .addComponent(instructionsScrollPane, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) - .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) - .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) - .addComponent(authenticationKeyField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) - .addComponent(authenticationKeyLabel)) - .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) - .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) - .addComponent(targetLanguageLabel) - .addComponent(targetLanguageComboBox, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) - .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) - .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) - .addComponent(testButton) - .addComponent(testUntranslatedTextField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) - .addComponent(untranslatedLabel) - .addComponent(resultLabel) - .addComponent(testResultValueLabel)) - .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) - .addComponent(warningLabel, javax.swing.GroupLayout.PREFERRED_SIZE, 18, javax.swing.GroupLayout.PREFERRED_SIZE) - .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) - ); + gridBagConstraints = new java.awt.GridBagConstraints(); + gridBagConstraints.gridx = 0; + gridBagConstraints.gridy = 0; + gridBagConstraints.gridwidth = 10; + 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(13, 12, 0, 12); + add(instructionsScrollPane, gridBagConstraints); }// //GEN-END:initComponents @Messages({"BingTranslatorSettingsPanel.warning.invalidKey=Invalid translation authentication key"}) diff --git a/Core/src/org/sleuthkit/autopsy/texttranslation/translators/GoogleTranslatorSettingsPanel.form b/Core/src/org/sleuthkit/autopsy/texttranslation/translators/GoogleTranslatorSettingsPanel.form index 33fca620d1..d4902149d3 100644 --- a/Core/src/org/sleuthkit/autopsy/texttranslation/translators/GoogleTranslatorSettingsPanel.form +++ b/Core/src/org/sleuthkit/autopsy/texttranslation/translators/GoogleTranslatorSettingsPanel.form @@ -11,116 +11,59 @@ + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + @@ -132,6 +75,11 @@ + + + + + @@ -139,6 +87,11 @@ + + + + + @@ -149,13 +102,26 @@ + + + + + + + + + + + + + @@ -164,6 +130,11 @@ + + + + + @@ -172,6 +143,11 @@ + + + + + @@ -179,7 +155,15 @@ + + + + + + + + @@ -191,6 +175,11 @@ + + + + + @@ -204,6 +193,11 @@ + + + + + @@ -215,11 +209,17 @@ - + + + + + + + diff --git a/Core/src/org/sleuthkit/autopsy/texttranslation/translators/GoogleTranslatorSettingsPanel.java b/Core/src/org/sleuthkit/autopsy/texttranslation/translators/GoogleTranslatorSettingsPanel.java index 9244ba3b86..cbc164b938 100644 --- a/Core/src/org/sleuthkit/autopsy/texttranslation/translators/GoogleTranslatorSettingsPanel.java +++ b/Core/src/org/sleuthkit/autopsy/texttranslation/translators/GoogleTranslatorSettingsPanel.java @@ -184,6 +184,7 @@ public class GoogleTranslatorSettingsPanel extends javax.swing.JPanel { @SuppressWarnings("unchecked") // //GEN-BEGIN:initComponents private void initComponents() { + java.awt.GridBagConstraints gridBagConstraints; credentialsLabel = new javax.swing.JLabel(); credentialsPathField = new javax.swing.JTextField(); @@ -199,39 +200,123 @@ public class GoogleTranslatorSettingsPanel extends javax.swing.JPanel { instructionsScrollPane = new javax.swing.JScrollPane(); instructionsTextArea = new javax.swing.JTextArea(); + setLayout(new java.awt.GridBagLayout()); + org.openide.awt.Mnemonics.setLocalizedText(credentialsLabel, org.openide.util.NbBundle.getMessage(GoogleTranslatorSettingsPanel.class, "GoogleTranslatorSettingsPanel.credentialsLabel.text")); // NOI18N + credentialsLabel.setMaximumSize(new java.awt.Dimension(200, 16)); + 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.insets = new java.awt.Insets(17, 12, 0, 0); + add(credentialsLabel, gridBagConstraints); credentialsPathField.setEditable(false); + credentialsPathField.setPreferredSize(new java.awt.Dimension(700, 22)); credentialsPathField.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { credentialsPathFieldActionPerformed(evt); } }); + gridBagConstraints = new java.awt.GridBagConstraints(); + gridBagConstraints.gridx = 3; + gridBagConstraints.gridy = 1; + gridBagConstraints.gridwidth = 6; + gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL; + gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST; + gridBagConstraints.weightx = 1.0; + gridBagConstraints.insets = new java.awt.Insets(14, 7, 0, 0); + add(credentialsPathField, gridBagConstraints); org.openide.awt.Mnemonics.setLocalizedText(browseButton, org.openide.util.NbBundle.getMessage(GoogleTranslatorSettingsPanel.class, "GoogleTranslatorSettingsPanel.browseButton.text")); // NOI18N + browseButton.setMaximumSize(new java.awt.Dimension(100, 25)); browseButton.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { browseButtonActionPerformed(evt); } }); + gridBagConstraints = new java.awt.GridBagConstraints(); + gridBagConstraints.gridx = 9; + gridBagConstraints.gridy = 1; + gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST; + gridBagConstraints.insets = new java.awt.Insets(13, 7, 0, 0); + add(browseButton, gridBagConstraints); targetLanguageComboBox.setEnabled(false); + gridBagConstraints = new java.awt.GridBagConstraints(); + gridBagConstraints.gridx = 3; + gridBagConstraints.gridy = 2; + gridBagConstraints.gridwidth = 4; + gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL; + gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST; + gridBagConstraints.insets = new java.awt.Insets(13, 7, 0, 0); + add(targetLanguageComboBox, gridBagConstraints); org.openide.awt.Mnemonics.setLocalizedText(targetLanguageLabel, org.openide.util.NbBundle.getMessage(GoogleTranslatorSettingsPanel.class, "GoogleTranslatorSettingsPanel.targetLanguageLabel.text")); // NOI18N + gridBagConstraints = new java.awt.GridBagConstraints(); + gridBagConstraints.gridx = 0; + gridBagConstraints.gridy = 2; + gridBagConstraints.gridwidth = 3; + gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL; + gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST; + gridBagConstraints.insets = new java.awt.Insets(16, 12, 0, 0); + add(targetLanguageLabel, gridBagConstraints); warningLabel.setForeground(new java.awt.Color(255, 0, 0)); org.openide.awt.Mnemonics.setLocalizedText(warningLabel, org.openide.util.NbBundle.getMessage(GoogleTranslatorSettingsPanel.class, "GoogleTranslatorSettingsPanel.warningLabel.text")); // NOI18N + gridBagConstraints = new java.awt.GridBagConstraints(); + gridBagConstraints.gridx = 0; + gridBagConstraints.gridy = 4; + gridBagConstraints.gridwidth = 10; + gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH; + gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST; + gridBagConstraints.weightx = 1.0; + gridBagConstraints.insets = new java.awt.Insets(13, 12, 6, 0); + add(warningLabel, gridBagConstraints); org.openide.awt.Mnemonics.setLocalizedText(testResultValueLabel, org.openide.util.NbBundle.getMessage(GoogleTranslatorSettingsPanel.class, "GoogleTranslatorSettingsPanel.testResultValueLabel.text")); // NOI18N + testResultValueLabel.setMaximumSize(new java.awt.Dimension(600, 22)); + gridBagConstraints = new java.awt.GridBagConstraints(); + gridBagConstraints.gridx = 7; + gridBagConstraints.gridy = 3; + gridBagConstraints.gridwidth = 3; + gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL; + gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST; + gridBagConstraints.insets = new java.awt.Insets(0, 7, 0, 0); + add(testResultValueLabel, gridBagConstraints); org.openide.awt.Mnemonics.setLocalizedText(resultLabel, org.openide.util.NbBundle.getMessage(GoogleTranslatorSettingsPanel.class, "GoogleTranslatorSettingsPanel.resultLabel.text")); // NOI18N resultLabel.setEnabled(false); + gridBagConstraints = new java.awt.GridBagConstraints(); + gridBagConstraints.gridx = 6; + gridBagConstraints.gridy = 3; + gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST; + gridBagConstraints.insets = new java.awt.Insets(10, 5, 0, 0); + add(resultLabel, gridBagConstraints); org.openide.awt.Mnemonics.setLocalizedText(untranslatedLabel, org.openide.util.NbBundle.getMessage(GoogleTranslatorSettingsPanel.class, "GoogleTranslatorSettingsPanel.untranslatedLabel.text")); // NOI18N untranslatedLabel.setEnabled(false); + gridBagConstraints = new java.awt.GridBagConstraints(); + gridBagConstraints.gridx = 3; + gridBagConstraints.gridy = 3; + gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL; + gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST; + gridBagConstraints.insets = new java.awt.Insets(10, 7, 0, 0); + add(untranslatedLabel, gridBagConstraints); testUntranslatedTextField.setText(DEFUALT_TEST_STRING); testUntranslatedTextField.setEnabled(false); + testUntranslatedTextField.setPreferredSize(new java.awt.Dimension(160, 22)); + gridBagConstraints = new java.awt.GridBagConstraints(); + gridBagConstraints.gridx = 4; + gridBagConstraints.gridy = 3; + gridBagConstraints.gridwidth = 2; + gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL; + gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST; + gridBagConstraints.insets = new java.awt.Insets(8, 5, 0, 0); + add(testUntranslatedTextField, gridBagConstraints); org.openide.awt.Mnemonics.setLocalizedText(testButton, org.openide.util.NbBundle.getMessage(GoogleTranslatorSettingsPanel.class, "GoogleTranslatorSettingsPanel.testButton.text")); // NOI18N testButton.setEnabled(false); @@ -240,6 +325,13 @@ public class GoogleTranslatorSettingsPanel extends javax.swing.JPanel { testButtonActionPerformed(evt); } }); + gridBagConstraints = new java.awt.GridBagConstraints(); + gridBagConstraints.gridx = 0; + gridBagConstraints.gridy = 3; + gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL; + gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST; + gridBagConstraints.insets = new java.awt.Insets(6, 12, 0, 0); + add(testButton, gridBagConstraints); instructionsScrollPane.setBorder(javax.swing.BorderFactory.createEtchedBorder()); instructionsScrollPane.setHorizontalScrollBarPolicy(javax.swing.ScrollPaneConstants.HORIZONTAL_SCROLLBAR_NEVER); @@ -248,76 +340,23 @@ public class GoogleTranslatorSettingsPanel extends javax.swing.JPanel { instructionsTextArea.setBackground(new java.awt.Color(240, 240, 240)); instructionsTextArea.setColumns(20); instructionsTextArea.setLineWrap(true); - instructionsTextArea.setRows(2); + instructionsTextArea.setRows(4); instructionsTextArea.setText(org.openide.util.NbBundle.getMessage(GoogleTranslatorSettingsPanel.class, "GoogleTranslatorSettingsPanel.instructionsTextArea.text")); // NOI18N instructionsTextArea.setWrapStyleWord(true); + instructionsTextArea.setMaximumSize(new java.awt.Dimension(1000, 200)); + instructionsTextArea.setPreferredSize(new java.awt.Dimension(164, 78)); instructionsScrollPane.setViewportView(instructionsTextArea); - javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this); - this.setLayout(layout); - layout.setHorizontalGroup( - layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) - .addGroup(layout.createSequentialGroup() - .addContainerGap() - .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) - .addGroup(layout.createSequentialGroup() - .addComponent(instructionsScrollPane) - .addContainerGap()) - .addGroup(layout.createSequentialGroup() - .addComponent(warningLabel, javax.swing.GroupLayout.PREFERRED_SIZE, 551, javax.swing.GroupLayout.PREFERRED_SIZE) - .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) - .addGroup(layout.createSequentialGroup() - .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false) - .addComponent(testButton, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) - .addComponent(credentialsLabel, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) - .addComponent(targetLanguageLabel, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) - .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) - .addGroup(layout.createSequentialGroup() - .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) - .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) - .addGroup(layout.createSequentialGroup() - .addComponent(credentialsPathField) - .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) - .addComponent(browseButton) - .addGap(14, 14, 14)) - .addGroup(layout.createSequentialGroup() - .addComponent(targetLanguageComboBox, javax.swing.GroupLayout.PREFERRED_SIZE, 317, javax.swing.GroupLayout.PREFERRED_SIZE) - .addGap(0, 0, Short.MAX_VALUE)))) - .addGroup(layout.createSequentialGroup() - .addGap(7, 7, 7) - .addComponent(untranslatedLabel) - .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) - .addComponent(testUntranslatedTextField, javax.swing.GroupLayout.PREFERRED_SIZE, 140, javax.swing.GroupLayout.PREFERRED_SIZE) - .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) - .addComponent(resultLabel) - .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) - .addComponent(testResultValueLabel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)))))) - ); - layout.setVerticalGroup( - layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) - .addGroup(layout.createSequentialGroup() - .addContainerGap() - .addComponent(instructionsScrollPane, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) - .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) - .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) - .addComponent(credentialsLabel) - .addComponent(credentialsPathField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) - .addComponent(browseButton)) - .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) - .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) - .addComponent(targetLanguageLabel) - .addComponent(targetLanguageComboBox, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) - .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) - .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) - .addComponent(testButton) - .addComponent(testUntranslatedTextField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) - .addComponent(untranslatedLabel) - .addComponent(resultLabel) - .addComponent(testResultValueLabel)) - .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) - .addComponent(warningLabel, javax.swing.GroupLayout.PREFERRED_SIZE, 18, javax.swing.GroupLayout.PREFERRED_SIZE) - .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) - ); + gridBagConstraints = new java.awt.GridBagConstraints(); + gridBagConstraints.gridx = 0; + gridBagConstraints.gridy = 0; + gridBagConstraints.gridwidth = 10; + 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(13, 12, 0, 0); + add(instructionsScrollPane, gridBagConstraints); }// //GEN-END:initComponents @Messages({"GoogleTranslatorSettingsPanel.json.description=JSON Files", From 251965962779aa62758f327aa8da34ba2438ccc4 Mon Sep 17 00:00:00 2001 From: William Schaefer Date: Mon, 13 Apr 2020 04:32:24 -0400 Subject: [PATCH 104/137] 6225 fix for screenshot 13 --- .../BingTranslatorSettingsPanel.form | 20 ++++++++++++++++++- .../BingTranslatorSettingsPanel.java | 10 ++++++++++ .../GoogleTranslatorSettingsPanel.form | 20 ++++++++++++++++++- .../GoogleTranslatorSettingsPanel.java | 10 ++++++++++ 4 files changed, 58 insertions(+), 2 deletions(-) diff --git a/Core/src/org/sleuthkit/autopsy/texttranslation/translators/BingTranslatorSettingsPanel.form b/Core/src/org/sleuthkit/autopsy/texttranslation/translators/BingTranslatorSettingsPanel.form index 52655f1a85..7052f80eb3 100644 --- a/Core/src/org/sleuthkit/autopsy/texttranslation/translators/BingTranslatorSettingsPanel.form +++ b/Core/src/org/sleuthkit/autopsy/texttranslation/translators/BingTranslatorSettingsPanel.form @@ -11,7 +11,7 @@ - + @@ -97,6 +97,9 @@ + + + @@ -207,5 +210,20 @@ + + + + + + + + + + + + + + + diff --git a/Core/src/org/sleuthkit/autopsy/texttranslation/translators/BingTranslatorSettingsPanel.java b/Core/src/org/sleuthkit/autopsy/texttranslation/translators/BingTranslatorSettingsPanel.java index 3fec49de8c..38dc78fa8b 100644 --- a/Core/src/org/sleuthkit/autopsy/texttranslation/translators/BingTranslatorSettingsPanel.java +++ b/Core/src/org/sleuthkit/autopsy/texttranslation/translators/BingTranslatorSettingsPanel.java @@ -141,6 +141,7 @@ public class BingTranslatorSettingsPanel extends javax.swing.JPanel { authenticationKeyLabel = new javax.swing.JLabel(); instructionsScrollPane = new javax.swing.JScrollPane(); instructionsTextArea = new javax.swing.JTextArea(); + filler1 = new javax.swing.Box.Filler(new java.awt.Dimension(0, 0), new java.awt.Dimension(0, 0), new java.awt.Dimension(32767, 0)); setLayout(new java.awt.GridBagLayout()); @@ -208,6 +209,7 @@ public class BingTranslatorSettingsPanel extends javax.swing.JPanel { add(targetLanguageComboBox, gridBagConstraints); testUntranslatedTextField.setText(DEFUALT_TEST_STRING); + testUntranslatedTextField.setMinimumSize(new java.awt.Dimension(160, 22)); testUntranslatedTextField.setPreferredSize(new java.awt.Dimension(160, 22)); gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.gridx = 4; @@ -282,6 +284,13 @@ public class BingTranslatorSettingsPanel extends javax.swing.JPanel { gridBagConstraints.weighty = 1.0; gridBagConstraints.insets = new java.awt.Insets(13, 12, 0, 12); add(instructionsScrollPane, gridBagConstraints); + gridBagConstraints = new java.awt.GridBagConstraints(); + gridBagConstraints.gridx = 10; + gridBagConstraints.gridy = 0; + gridBagConstraints.gridheight = 5; + gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL; + gridBagConstraints.weightx = 0.6; + add(filler1, gridBagConstraints); }// //GEN-END:initComponents @Messages({"BingTranslatorSettingsPanel.warning.invalidKey=Invalid translation authentication key"}) @@ -305,6 +314,7 @@ public class BingTranslatorSettingsPanel extends javax.swing.JPanel { // Variables declaration - do not modify//GEN-BEGIN:variables private javax.swing.JTextField authenticationKeyField; private javax.swing.JLabel authenticationKeyLabel; + private javax.swing.Box.Filler filler1; private javax.swing.JScrollPane instructionsScrollPane; private javax.swing.JTextArea instructionsTextArea; private javax.swing.JLabel resultLabel; diff --git a/Core/src/org/sleuthkit/autopsy/texttranslation/translators/GoogleTranslatorSettingsPanel.form b/Core/src/org/sleuthkit/autopsy/texttranslation/translators/GoogleTranslatorSettingsPanel.form index d4902149d3..80e6036d77 100644 --- a/Core/src/org/sleuthkit/autopsy/texttranslation/translators/GoogleTranslatorSettingsPanel.form +++ b/Core/src/org/sleuthkit/autopsy/texttranslation/translators/GoogleTranslatorSettingsPanel.form @@ -11,7 +11,7 @@ - + @@ -155,6 +155,9 @@ + + + @@ -224,5 +227,20 @@ + + + + + + + + + + + + + + + diff --git a/Core/src/org/sleuthkit/autopsy/texttranslation/translators/GoogleTranslatorSettingsPanel.java b/Core/src/org/sleuthkit/autopsy/texttranslation/translators/GoogleTranslatorSettingsPanel.java index cbc164b938..2a4aee7887 100644 --- a/Core/src/org/sleuthkit/autopsy/texttranslation/translators/GoogleTranslatorSettingsPanel.java +++ b/Core/src/org/sleuthkit/autopsy/texttranslation/translators/GoogleTranslatorSettingsPanel.java @@ -199,6 +199,7 @@ public class GoogleTranslatorSettingsPanel extends javax.swing.JPanel { testButton = new javax.swing.JButton(); instructionsScrollPane = new javax.swing.JScrollPane(); instructionsTextArea = new javax.swing.JTextArea(); + filler1 = new javax.swing.Box.Filler(new java.awt.Dimension(0, 0), new java.awt.Dimension(0, 0), new java.awt.Dimension(32767, 0)); setLayout(new java.awt.GridBagLayout()); @@ -308,6 +309,7 @@ public class GoogleTranslatorSettingsPanel extends javax.swing.JPanel { testUntranslatedTextField.setText(DEFUALT_TEST_STRING); testUntranslatedTextField.setEnabled(false); + testUntranslatedTextField.setMinimumSize(new java.awt.Dimension(160, 22)); testUntranslatedTextField.setPreferredSize(new java.awt.Dimension(160, 22)); gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.gridx = 4; @@ -357,6 +359,13 @@ public class GoogleTranslatorSettingsPanel extends javax.swing.JPanel { gridBagConstraints.weighty = 1.0; gridBagConstraints.insets = new java.awt.Insets(13, 12, 0, 0); add(instructionsScrollPane, gridBagConstraints); + gridBagConstraints = new java.awt.GridBagConstraints(); + gridBagConstraints.gridx = 10; + gridBagConstraints.gridy = 0; + gridBagConstraints.gridheight = 5; + gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL; + gridBagConstraints.weightx = 0.6; + add(filler1, gridBagConstraints); }// //GEN-END:initComponents @Messages({"GoogleTranslatorSettingsPanel.json.description=JSON Files", @@ -404,6 +413,7 @@ public class GoogleTranslatorSettingsPanel extends javax.swing.JPanel { private javax.swing.JButton browseButton; private javax.swing.JLabel credentialsLabel; private javax.swing.JTextField credentialsPathField; + private javax.swing.Box.Filler filler1; private javax.swing.JScrollPane instructionsScrollPane; private javax.swing.JTextArea instructionsTextArea; private javax.swing.JLabel resultLabel; From c1f656931d490b4ca2101b2eef7152d8a57abbdc Mon Sep 17 00:00:00 2001 From: William Schaefer Date: Mon, 13 Apr 2020 04:47:52 -0400 Subject: [PATCH 105/137] 6225 fix for screenshot 13 --- .../translators/BingTranslatorSettingsPanel.form | 10 +++++++--- .../translators/BingTranslatorSettingsPanel.java | 5 +++-- .../translators/GoogleTranslatorSettingsPanel.form | 8 ++++++-- .../translators/GoogleTranslatorSettingsPanel.java | 5 +++-- 4 files changed, 19 insertions(+), 9 deletions(-) diff --git a/Core/src/org/sleuthkit/autopsy/texttranslation/translators/BingTranslatorSettingsPanel.form b/Core/src/org/sleuthkit/autopsy/texttranslation/translators/BingTranslatorSettingsPanel.form index 7052f80eb3..5cacffe9a3 100644 --- a/Core/src/org/sleuthkit/autopsy/texttranslation/translators/BingTranslatorSettingsPanel.form +++ b/Core/src/org/sleuthkit/autopsy/texttranslation/translators/BingTranslatorSettingsPanel.form @@ -11,7 +11,7 @@ - + @@ -24,10 +24,13 @@ + + + - + @@ -181,7 +184,7 @@ - + @@ -200,6 +203,7 @@ + diff --git a/Core/src/org/sleuthkit/autopsy/texttranslation/translators/BingTranslatorSettingsPanel.java b/Core/src/org/sleuthkit/autopsy/texttranslation/translators/BingTranslatorSettingsPanel.java index 38dc78fa8b..19d6b98944 100644 --- a/Core/src/org/sleuthkit/autopsy/texttranslation/translators/BingTranslatorSettingsPanel.java +++ b/Core/src/org/sleuthkit/autopsy/texttranslation/translators/BingTranslatorSettingsPanel.java @@ -147,13 +147,13 @@ public class BingTranslatorSettingsPanel extends javax.swing.JPanel { authenticationKeyField.setToolTipText(org.openide.util.NbBundle.getMessage(BingTranslatorSettingsPanel.class, "BingTranslatorSettingsPanel.authenticationKeyField.toolTipText")); // NOI18N authenticationKeyField.setMaximumSize(new java.awt.Dimension(800, 22)); + authenticationKeyField.setPreferredSize(new java.awt.Dimension(163, 22)); gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.gridx = 3; gridBagConstraints.gridy = 1; gridBagConstraints.gridwidth = 7; gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL; gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST; - gridBagConstraints.weightx = 1.0; gridBagConstraints.insets = new java.awt.Insets(14, 5, 0, 12); add(authenticationKeyField, gridBagConstraints); @@ -270,6 +270,7 @@ public class BingTranslatorSettingsPanel extends javax.swing.JPanel { instructionsTextArea.setRows(4); instructionsTextArea.setText(org.openide.util.NbBundle.getMessage(BingTranslatorSettingsPanel.class, "BingTranslatorSettingsPanel.instructionsTextArea.text")); // NOI18N instructionsTextArea.setWrapStyleWord(true); + instructionsTextArea.setCaretPosition(0); instructionsTextArea.setMaximumSize(new java.awt.Dimension(1000, 200)); instructionsTextArea.setPreferredSize(new java.awt.Dimension(164, 78)); instructionsScrollPane.setViewportView(instructionsTextArea); @@ -282,7 +283,7 @@ public class BingTranslatorSettingsPanel extends javax.swing.JPanel { gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST; gridBagConstraints.weightx = 1.0; gridBagConstraints.weighty = 1.0; - gridBagConstraints.insets = new java.awt.Insets(13, 12, 0, 12); + gridBagConstraints.insets = new java.awt.Insets(13, 12, 0, 0); add(instructionsScrollPane, gridBagConstraints); gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.gridx = 10; diff --git a/Core/src/org/sleuthkit/autopsy/texttranslation/translators/GoogleTranslatorSettingsPanel.form b/Core/src/org/sleuthkit/autopsy/texttranslation/translators/GoogleTranslatorSettingsPanel.form index 80e6036d77..c30c056b62 100644 --- a/Core/src/org/sleuthkit/autopsy/texttranslation/translators/GoogleTranslatorSettingsPanel.form +++ b/Core/src/org/sleuthkit/autopsy/texttranslation/translators/GoogleTranslatorSettingsPanel.form @@ -34,16 +34,19 @@ - + + + + - + @@ -217,6 +220,7 @@ + diff --git a/Core/src/org/sleuthkit/autopsy/texttranslation/translators/GoogleTranslatorSettingsPanel.java b/Core/src/org/sleuthkit/autopsy/texttranslation/translators/GoogleTranslatorSettingsPanel.java index 2a4aee7887..3e5782515e 100644 --- a/Core/src/org/sleuthkit/autopsy/texttranslation/translators/GoogleTranslatorSettingsPanel.java +++ b/Core/src/org/sleuthkit/autopsy/texttranslation/translators/GoogleTranslatorSettingsPanel.java @@ -215,7 +215,8 @@ public class GoogleTranslatorSettingsPanel extends javax.swing.JPanel { add(credentialsLabel, gridBagConstraints); credentialsPathField.setEditable(false); - credentialsPathField.setPreferredSize(new java.awt.Dimension(700, 22)); + credentialsPathField.setMaximumSize(new java.awt.Dimension(700, 22)); + credentialsPathField.setPreferredSize(new java.awt.Dimension(100, 22)); credentialsPathField.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { credentialsPathFieldActionPerformed(evt); @@ -227,7 +228,6 @@ public class GoogleTranslatorSettingsPanel extends javax.swing.JPanel { gridBagConstraints.gridwidth = 6; gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL; gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST; - gridBagConstraints.weightx = 1.0; gridBagConstraints.insets = new java.awt.Insets(14, 7, 0, 0); add(credentialsPathField, gridBagConstraints); @@ -345,6 +345,7 @@ public class GoogleTranslatorSettingsPanel extends javax.swing.JPanel { instructionsTextArea.setRows(4); instructionsTextArea.setText(org.openide.util.NbBundle.getMessage(GoogleTranslatorSettingsPanel.class, "GoogleTranslatorSettingsPanel.instructionsTextArea.text")); // NOI18N instructionsTextArea.setWrapStyleWord(true); + instructionsTextArea.setCaretPosition(0); instructionsTextArea.setMaximumSize(new java.awt.Dimension(1000, 200)); instructionsTextArea.setPreferredSize(new java.awt.Dimension(164, 78)); instructionsScrollPane.setViewportView(instructionsTextArea); From a26a3b850451b8143883d74301fb934ce119294c Mon Sep 17 00:00:00 2001 From: William Schaefer Date: Mon, 13 Apr 2020 05:01:22 -0400 Subject: [PATCH 106/137] 6225 - fix for screenshot 14 --- .../OptionalCasePropertiesPanel.form | 107 +++++++--------- .../OptionalCasePropertiesPanel.java | 121 ++++++++++-------- 2 files changed, 115 insertions(+), 113 deletions(-) diff --git a/Core/src/org/sleuthkit/autopsy/casemodule/OptionalCasePropertiesPanel.form b/Core/src/org/sleuthkit/autopsy/casemodule/OptionalCasePropertiesPanel.form index 47481f8bdd..86dd05cb80 100644 --- a/Core/src/org/sleuthkit/autopsy/casemodule/OptionalCasePropertiesPanel.form +++ b/Core/src/org/sleuthkit/autopsy/casemodule/OptionalCasePropertiesPanel.form @@ -312,67 +312,7 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + @@ -389,6 +329,11 @@ + + + + + @@ -402,6 +347,11 @@ + + + + + @@ -418,6 +368,11 @@ + + + + + @@ -440,10 +395,25 @@ + + + + + + + + + + + + + + + @@ -460,6 +430,11 @@ + + + + + @@ -476,8 +451,18 @@ + + + + + + + + + + diff --git a/Core/src/org/sleuthkit/autopsy/casemodule/OptionalCasePropertiesPanel.java b/Core/src/org/sleuthkit/autopsy/casemodule/OptionalCasePropertiesPanel.java index b5706027a3..c863649973 100644 --- a/Core/src/org/sleuthkit/autopsy/casemodule/OptionalCasePropertiesPanel.java +++ b/Core/src/org/sleuthkit/autopsy/casemodule/OptionalCasePropertiesPanel.java @@ -227,6 +227,7 @@ final class OptionalCasePropertiesPanel extends javax.swing.JPanel { @SuppressWarnings("unchecked") // //GEN-BEGIN:initComponents private void initComponents() { + java.awt.GridBagConstraints gridBagConstraints; casePanel = new javax.swing.JPanel(); caseNumberLabel = new javax.swing.JLabel(); @@ -378,22 +379,44 @@ final class OptionalCasePropertiesPanel extends javax.swing.JPanel { ); orgainizationPanel.setBorder(javax.swing.BorderFactory.createTitledBorder(org.openide.util.NbBundle.getMessage(OptionalCasePropertiesPanel.class, "OptionalCasePropertiesPanel.orgainizationPanel.border.title"))); // NOI18N + orgainizationPanel.setLayout(new java.awt.GridBagLayout()); org.openide.awt.Mnemonics.setLocalizedText(lbPointOfContactPhoneLabel, org.openide.util.NbBundle.getMessage(OptionalCasePropertiesPanel.class, "OptionalCasePropertiesPanel.lbPointOfContactPhoneLabel.text")); // NOI18N lbPointOfContactPhoneLabel.setMaximumSize(new java.awt.Dimension(82, 14)); lbPointOfContactPhoneLabel.setMinimumSize(new java.awt.Dimension(82, 14)); lbPointOfContactPhoneLabel.setPreferredSize(new java.awt.Dimension(82, 14)); + gridBagConstraints = new java.awt.GridBagConstraints(); + gridBagConstraints.gridx = 0; + gridBagConstraints.gridy = 2; + gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL; + gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST; + gridBagConstraints.insets = new java.awt.Insets(7, 12, 0, 0); + orgainizationPanel.add(lbPointOfContactPhoneLabel, gridBagConstraints); comboBoxOrgName.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { comboBoxOrgNameActionPerformed(evt); } }); + gridBagConstraints = new java.awt.GridBagConstraints(); + gridBagConstraints.gridx = 2; + gridBagConstraints.gridy = 0; + gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL; + gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST; + gridBagConstraints.insets = new java.awt.Insets(8, 18, 0, 0); + orgainizationPanel.add(comboBoxOrgName, gridBagConstraints); org.openide.awt.Mnemonics.setLocalizedText(lbPointOfContactNameLabel, org.openide.util.NbBundle.getMessage(OptionalCasePropertiesPanel.class, "OptionalCasePropertiesPanel.lbPointOfContactNameLabel.text")); // NOI18N lbPointOfContactNameLabel.setMaximumSize(new java.awt.Dimension(82, 14)); lbPointOfContactNameLabel.setMinimumSize(new java.awt.Dimension(82, 14)); lbPointOfContactNameLabel.setPreferredSize(new java.awt.Dimension(82, 14)); + gridBagConstraints = new java.awt.GridBagConstraints(); + gridBagConstraints.gridx = 0; + gridBagConstraints.gridy = 1; + gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL; + gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST; + gridBagConstraints.insets = new java.awt.Insets(13, 12, 0, 5); + orgainizationPanel.add(lbPointOfContactNameLabel, gridBagConstraints); org.openide.awt.Mnemonics.setLocalizedText(bnNewOrganization, org.openide.util.NbBundle.getMessage(OptionalCasePropertiesPanel.class, "OptionalCasePropertiesPanel.bnNewOrganization.text")); // NOI18N bnNewOrganization.setMargin(new java.awt.Insets(2, 6, 2, 6)); @@ -405,68 +428,62 @@ final class OptionalCasePropertiesPanel extends javax.swing.JPanel { bnNewOrganizationActionPerformed(evt); } }); + gridBagConstraints = new java.awt.GridBagConstraints(); + gridBagConstraints.gridx = 3; + gridBagConstraints.gridy = 0; + gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL; + gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST; + gridBagConstraints.insets = new java.awt.Insets(8, 12, 0, 18); + orgainizationPanel.add(bnNewOrganization, gridBagConstraints); + gridBagConstraints = new java.awt.GridBagConstraints(); + gridBagConstraints.gridx = 1; + gridBagConstraints.gridy = 3; + gridBagConstraints.gridwidth = 3; + gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL; + gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST; + gridBagConstraints.insets = new java.awt.Insets(7, 4, 13, 18); + orgainizationPanel.add(lbPointOfContactEmailText, gridBagConstraints); + gridBagConstraints = new java.awt.GridBagConstraints(); + gridBagConstraints.gridx = 1; + gridBagConstraints.gridy = 1; + gridBagConstraints.gridwidth = 3; + gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL; + gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST; + gridBagConstraints.insets = new java.awt.Insets(13, 4, 0, 18); + orgainizationPanel.add(lbPointOfContactNameText, gridBagConstraints); org.openide.awt.Mnemonics.setLocalizedText(lbOrganizationNameLabel, org.openide.util.NbBundle.getMessage(OptionalCasePropertiesPanel.class, "OptionalCasePropertiesPanel.lbOrganizationNameLabel.text")); // NOI18N lbOrganizationNameLabel.setMaximumSize(new java.awt.Dimension(189, 14)); lbOrganizationNameLabel.setMinimumSize(new java.awt.Dimension(189, 14)); lbOrganizationNameLabel.setPreferredSize(new java.awt.Dimension(189, 14)); + gridBagConstraints = new java.awt.GridBagConstraints(); + gridBagConstraints.gridx = 0; + gridBagConstraints.gridy = 0; + gridBagConstraints.gridwidth = 2; + gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL; + gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST; + gridBagConstraints.insets = new java.awt.Insets(12, 0, 0, 0); + orgainizationPanel.add(lbOrganizationNameLabel, gridBagConstraints); org.openide.awt.Mnemonics.setLocalizedText(lbPointOfContactEmailLabel, org.openide.util.NbBundle.getMessage(OptionalCasePropertiesPanel.class, "OptionalCasePropertiesPanel.lbPointOfContactEmailLabel.text")); // NOI18N lbPointOfContactEmailLabel.setMaximumSize(new java.awt.Dimension(82, 14)); lbPointOfContactEmailLabel.setMinimumSize(new java.awt.Dimension(82, 14)); lbPointOfContactEmailLabel.setPreferredSize(new java.awt.Dimension(82, 14)); - - javax.swing.GroupLayout orgainizationPanelLayout = new javax.swing.GroupLayout(orgainizationPanel); - orgainizationPanel.setLayout(orgainizationPanelLayout); - orgainizationPanelLayout.setHorizontalGroup( - orgainizationPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) - .addGroup(orgainizationPanelLayout.createSequentialGroup() - .addGroup(orgainizationPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) - .addGroup(orgainizationPanelLayout.createSequentialGroup() - .addGap(106, 106, 106) - .addGroup(orgainizationPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) - .addComponent(lbPointOfContactPhoneLabel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) - .addComponent(lbPointOfContactEmailLabel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) - .addComponent(lbPointOfContactNameLabel, javax.swing.GroupLayout.PREFERRED_SIZE, 109, javax.swing.GroupLayout.PREFERRED_SIZE)) - .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) - .addGroup(orgainizationPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) - .addComponent(lbPointOfContactPhoneText, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) - .addComponent(lbPointOfContactNameText, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) - .addComponent(lbPointOfContactEmailText, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))) - .addGroup(orgainizationPanelLayout.createSequentialGroup() - .addContainerGap() - .addComponent(lbOrganizationNameLabel, javax.swing.GroupLayout.DEFAULT_SIZE, 206, Short.MAX_VALUE) - .addGap(18, 18, 18) - .addComponent(comboBoxOrgName, javax.swing.GroupLayout.PREFERRED_SIZE, 108, javax.swing.GroupLayout.PREFERRED_SIZE) - .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) - .addComponent(bnNewOrganization, javax.swing.GroupLayout.PREFERRED_SIZE, 147, javax.swing.GroupLayout.PREFERRED_SIZE))) - .addContainerGap()) - ); - - orgainizationPanelLayout.linkSize(javax.swing.SwingConstants.HORIZONTAL, new java.awt.Component[] {lbPointOfContactEmailLabel, lbPointOfContactNameLabel, lbPointOfContactPhoneLabel}); - - orgainizationPanelLayout.setVerticalGroup( - orgainizationPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) - .addGroup(orgainizationPanelLayout.createSequentialGroup() - .addContainerGap() - .addGroup(orgainizationPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) - .addComponent(lbOrganizationNameLabel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) - .addComponent(comboBoxOrgName, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) - .addComponent(bnNewOrganization, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) - .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) - .addGroup(orgainizationPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false) - .addComponent(lbPointOfContactNameText, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) - .addComponent(lbPointOfContactNameLabel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) - .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) - .addGroup(orgainizationPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false) - .addComponent(lbPointOfContactPhoneLabel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) - .addComponent(lbPointOfContactPhoneText, javax.swing.GroupLayout.PREFERRED_SIZE, 14, javax.swing.GroupLayout.PREFERRED_SIZE)) - .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) - .addGroup(orgainizationPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false) - .addComponent(lbPointOfContactEmailLabel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) - .addComponent(lbPointOfContactEmailText, javax.swing.GroupLayout.PREFERRED_SIZE, 14, javax.swing.GroupLayout.PREFERRED_SIZE)) - .addGap(6, 6, 6)) - ); + gridBagConstraints = new java.awt.GridBagConstraints(); + gridBagConstraints.gridx = 0; + gridBagConstraints.gridy = 3; + gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL; + gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST; + gridBagConstraints.insets = new java.awt.Insets(7, 12, 13, 0); + orgainizationPanel.add(lbPointOfContactEmailLabel, gridBagConstraints); + gridBagConstraints = new java.awt.GridBagConstraints(); + gridBagConstraints.gridx = 1; + gridBagConstraints.gridy = 2; + gridBagConstraints.gridwidth = 3; + gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL; + gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST; + gridBagConstraints.insets = new java.awt.Insets(7, 4, 0, 18); + orgainizationPanel.add(lbPointOfContactPhoneText, gridBagConstraints); javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this); this.setLayout(layout); From 76dc4be398ec6458f88984248ba54fd2b6e2be2a Mon Sep 17 00:00:00 2001 From: William Schaefer Date: Mon, 13 Apr 2020 05:14:38 -0400 Subject: [PATCH 107/137] 6225 fix for screenshot 16 --- .../DataContentViewerOtherCases.form | 126 ++++++++++++------ .../DataContentViewerOtherCases.java | 78 +++++++---- 2 files changed, 135 insertions(+), 69 deletions(-) diff --git a/Core/src/org/sleuthkit/autopsy/centralrepository/contentviewer/DataContentViewerOtherCases.form b/Core/src/org/sleuthkit/autopsy/centralrepository/contentviewer/DataContentViewerOtherCases.form index fd1b0b81b1..2491b7fe0b 100644 --- a/Core/src/org/sleuthkit/autopsy/centralrepository/contentviewer/DataContentViewerOtherCases.form +++ b/Core/src/org/sleuthkit/autopsy/centralrepository/contentviewer/DataContentViewerOtherCases.form @@ -67,7 +67,7 @@ - + @@ -87,16 +87,10 @@ - - - - - - - - + + - + @@ -104,45 +98,15 @@ - - - - - - - - - - + + + + - - - - - - - - - - - - - - - - - - - - - - - - @@ -292,6 +256,80 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Core/src/org/sleuthkit/autopsy/centralrepository/contentviewer/DataContentViewerOtherCases.java b/Core/src/org/sleuthkit/autopsy/centralrepository/contentviewer/DataContentViewerOtherCases.java index 1429a60312..01ebc70d5c 100644 --- a/Core/src/org/sleuthkit/autopsy/centralrepository/contentviewer/DataContentViewerOtherCases.java +++ b/Core/src/org/sleuthkit/autopsy/centralrepository/contentviewer/DataContentViewerOtherCases.java @@ -958,6 +958,7 @@ public class DataContentViewerOtherCases extends JPanel implements DataContentVi @SuppressWarnings("unchecked") // //GEN-BEGIN:initComponents private void initComponents() { + java.awt.GridBagConstraints gridBagConstraints; rightClickPopupMenu = new javax.swing.JPopupMenu(); exportToCSVMenuItem = new javax.swing.JMenuItem(); @@ -965,9 +966,6 @@ public class DataContentViewerOtherCases extends JPanel implements DataContentVi showCommonalityMenuItem = new javax.swing.JMenuItem(); CSVFileChooser = new javax.swing.JFileChooser(); tableContainerPanel = new javax.swing.JPanel(); - earliestCaseLabel = new javax.swing.JLabel(); - earliestCaseDate = new javax.swing.JLabel(); - foundInLabel = new javax.swing.JLabel(); tablesViewerSplitPane = new javax.swing.JSplitPane(); caseDatasourceFileSplitPane = new javax.swing.JSplitPane(); caseDatasourceSplitPane = new javax.swing.JSplitPane(); @@ -978,6 +976,11 @@ public class DataContentViewerOtherCases extends JPanel implements DataContentVi filesTableScrollPane = new javax.swing.JScrollPane(); filesTable = new javax.swing.JTable(); detailsPanelScrollPane = new javax.swing.JScrollPane(); + jPanel1 = new javax.swing.JPanel(); + foundInLabel = new javax.swing.JLabel(); + earliestCaseDate = new javax.swing.JLabel(); + earliestCaseLabel = 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(32767, 0)); rightClickPopupMenu.addPopupMenuListener(new javax.swing.event.PopupMenuListener() { public void popupMenuCanceled(javax.swing.event.PopupMenuEvent evt) { @@ -1005,13 +1008,6 @@ public class DataContentViewerOtherCases extends JPanel implements DataContentVi tableContainerPanel.setPreferredSize(new java.awt.Dimension(600, 63)); tableContainerPanel.setRequestFocusEnabled(false); - org.openide.awt.Mnemonics.setLocalizedText(earliestCaseLabel, org.openide.util.NbBundle.getMessage(DataContentViewerOtherCases.class, "DataContentViewerOtherCases.earliestCaseLabel.text")); // NOI18N - earliestCaseLabel.setToolTipText(org.openide.util.NbBundle.getMessage(DataContentViewerOtherCases.class, "DataContentViewerOtherCases.earliestCaseLabel.toolTipText")); // NOI18N - - org.openide.awt.Mnemonics.setLocalizedText(earliestCaseDate, org.openide.util.NbBundle.getMessage(DataContentViewerOtherCases.class, "DataContentViewerOtherCases.earliestCaseDate.text")); // NOI18N - - org.openide.awt.Mnemonics.setLocalizedText(foundInLabel, org.openide.util.NbBundle.getMessage(DataContentViewerOtherCases.class, "DataContentViewerOtherCases.foundInLabel.text")); // NOI18N - tablesViewerSplitPane.setDividerLocation(450); tablesViewerSplitPane.setResizeWeight(0.75); @@ -1057,33 +1053,63 @@ public class DataContentViewerOtherCases extends JPanel implements DataContentVi detailsPanelScrollPane.setPreferredSize(new java.awt.Dimension(300, 100)); tablesViewerSplitPane.setRightComponent(detailsPanelScrollPane); + jPanel1.setPreferredSize(new java.awt.Dimension(576, 22)); + jPanel1.setLayout(new java.awt.GridBagLayout()); + + org.openide.awt.Mnemonics.setLocalizedText(foundInLabel, org.openide.util.NbBundle.getMessage(DataContentViewerOtherCases.class, "DataContentViewerOtherCases.foundInLabel.text")); // NOI18N + foundInLabel.setPreferredSize(new java.awt.Dimension(100, 16)); + gridBagConstraints = new java.awt.GridBagConstraints(); + gridBagConstraints.gridx = 3; + gridBagConstraints.gridy = 0; + gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL; + gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHEAST; + gridBagConstraints.insets = new java.awt.Insets(2, 2, 0, 0); + jPanel1.add(foundInLabel, gridBagConstraints); + + org.openide.awt.Mnemonics.setLocalizedText(earliestCaseDate, org.openide.util.NbBundle.getMessage(DataContentViewerOtherCases.class, "DataContentViewerOtherCases.earliestCaseDate.text")); // NOI18N + earliestCaseDate.setMaximumSize(new java.awt.Dimension(200, 16)); + gridBagConstraints = new java.awt.GridBagConstraints(); + gridBagConstraints.gridx = 1; + gridBagConstraints.gridy = 0; + gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL; + gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST; + gridBagConstraints.insets = new java.awt.Insets(0, 7, 0, 0); + jPanel1.add(earliestCaseDate, gridBagConstraints); + + org.openide.awt.Mnemonics.setLocalizedText(earliestCaseLabel, org.openide.util.NbBundle.getMessage(DataContentViewerOtherCases.class, "DataContentViewerOtherCases.earliestCaseLabel.text")); // NOI18N + earliestCaseLabel.setToolTipText(org.openide.util.NbBundle.getMessage(DataContentViewerOtherCases.class, "DataContentViewerOtherCases.earliestCaseLabel.toolTipText")); // NOI18N + earliestCaseLabel.setMaximumSize(new java.awt.Dimension(260, 16)); + gridBagConstraints = new java.awt.GridBagConstraints(); + gridBagConstraints.gridx = 0; + gridBagConstraints.gridy = 0; + gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL; + gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST; + jPanel1.add(earliestCaseLabel, gridBagConstraints); + gridBagConstraints = new java.awt.GridBagConstraints(); + gridBagConstraints.gridx = 2; + gridBagConstraints.gridy = 0; + gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL; + gridBagConstraints.weightx = 0.1; + jPanel1.add(filler1, gridBagConstraints); + javax.swing.GroupLayout tableContainerPanelLayout = new javax.swing.GroupLayout(tableContainerPanel); tableContainerPanel.setLayout(tableContainerPanelLayout); tableContainerPanelLayout.setHorizontalGroup( tableContainerPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(tableContainerPanelLayout.createSequentialGroup() .addGroup(tableContainerPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) - .addGroup(tableContainerPanelLayout.createSequentialGroup() - .addComponent(earliestCaseLabel, javax.swing.GroupLayout.PREFERRED_SIZE, 161, javax.swing.GroupLayout.PREFERRED_SIZE) - .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) - .addComponent(earliestCaseDate, 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(foundInLabel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) - .addComponent(tablesViewerSplitPane, javax.swing.GroupLayout.DEFAULT_SIZE, 990, Short.MAX_VALUE)) + .addComponent(tablesViewerSplitPane) + .addComponent(jPanel1, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) .addContainerGap()) ); tableContainerPanelLayout.setVerticalGroup( tableContainerPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(tableContainerPanelLayout.createSequentialGroup() .addGap(0, 0, 0) - .addComponent(tablesViewerSplitPane, javax.swing.GroupLayout.DEFAULT_SIZE, 33, Short.MAX_VALUE) + .addComponent(tablesViewerSplitPane, javax.swing.GroupLayout.DEFAULT_SIZE, 37, Short.MAX_VALUE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) - .addGroup(tableContainerPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING) - .addGroup(tableContainerPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) - .addComponent(earliestCaseLabel) - .addComponent(earliestCaseDate)) - .addComponent(foundInLabel, javax.swing.GroupLayout.PREFERRED_SIZE, 14, javax.swing.GroupLayout.PREFERRED_SIZE)) - .addContainerGap()) + .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) + .addGap(12, 12, 12)) ); javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this); @@ -1095,7 +1121,7 @@ public class DataContentViewerOtherCases extends JPanel implements DataContentVi layout.setVerticalGroup( layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createSequentialGroup() - .addComponent(tableContainerPanel, javax.swing.GroupLayout.DEFAULT_SIZE, 64, Short.MAX_VALUE) + .addComponent(tableContainerPanel, javax.swing.GroupLayout.DEFAULT_SIZE, 78, Short.MAX_VALUE) .addGap(0, 0, 0)) ); }// //GEN-END:initComponents @@ -1128,7 +1154,9 @@ public class DataContentViewerOtherCases extends JPanel implements DataContentVi private javax.swing.JMenuItem exportToCSVMenuItem; private javax.swing.JTable filesTable; private javax.swing.JScrollPane filesTableScrollPane; + private javax.swing.Box.Filler filler1; private javax.swing.JLabel foundInLabel; + private javax.swing.JPanel jPanel1; private javax.swing.JPopupMenu rightClickPopupMenu; private javax.swing.JMenuItem showCaseDetailsMenuItem; private javax.swing.JMenuItem showCommonalityMenuItem; From da25cc8c70e9182b8fa0d8522bf3845e71385897 Mon Sep 17 00:00:00 2001 From: William Schaefer Date: Mon, 13 Apr 2020 05:31:20 -0400 Subject: [PATCH 108/137] 6225 fix for screenshot 16 --- .../contentviewer/DataContentViewerOtherCases.form | 3 ++- .../contentviewer/DataContentViewerOtherCases.java | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/Core/src/org/sleuthkit/autopsy/centralrepository/contentviewer/DataContentViewerOtherCases.form b/Core/src/org/sleuthkit/autopsy/centralrepository/contentviewer/DataContentViewerOtherCases.form index 2491b7fe0b..f8ceec50e7 100644 --- a/Core/src/org/sleuthkit/autopsy/centralrepository/contentviewer/DataContentViewerOtherCases.form +++ b/Core/src/org/sleuthkit/autopsy/centralrepository/contentviewer/DataContentViewerOtherCases.form @@ -267,11 +267,12 @@ + - + diff --git a/Core/src/org/sleuthkit/autopsy/centralrepository/contentviewer/DataContentViewerOtherCases.java b/Core/src/org/sleuthkit/autopsy/centralrepository/contentviewer/DataContentViewerOtherCases.java index 01ebc70d5c..56922c7bfb 100644 --- a/Core/src/org/sleuthkit/autopsy/centralrepository/contentviewer/DataContentViewerOtherCases.java +++ b/Core/src/org/sleuthkit/autopsy/centralrepository/contentviewer/DataContentViewerOtherCases.java @@ -1056,8 +1056,9 @@ public class DataContentViewerOtherCases extends JPanel implements DataContentVi jPanel1.setPreferredSize(new java.awt.Dimension(576, 22)); jPanel1.setLayout(new java.awt.GridBagLayout()); + foundInLabel.setHorizontalAlignment(javax.swing.SwingConstants.TRAILING); org.openide.awt.Mnemonics.setLocalizedText(foundInLabel, org.openide.util.NbBundle.getMessage(DataContentViewerOtherCases.class, "DataContentViewerOtherCases.foundInLabel.text")); // NOI18N - foundInLabel.setPreferredSize(new java.awt.Dimension(100, 16)); + foundInLabel.setPreferredSize(new java.awt.Dimension(400, 16)); gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.gridx = 3; gridBagConstraints.gridy = 0; From 557852f66eb3260b537ffb867e4787c34d7d8dc0 Mon Sep 17 00:00:00 2001 From: William Schaefer Date: Mon, 13 Apr 2020 05:36:20 -0400 Subject: [PATCH 109/137] 6225 fix for screenshot 17 --- .../DataContentViewerArtifact.form | 110 +++++++++--------- .../DataContentViewerArtifact.java | 109 ++++++++++------- 2 files changed, 120 insertions(+), 99 deletions(-) diff --git a/Core/src/org/sleuthkit/autopsy/corecomponents/DataContentViewerArtifact.form b/Core/src/org/sleuthkit/autopsy/corecomponents/DataContentViewerArtifact.form index fc2e7d551d..1f01f76f6e 100644 --- a/Core/src/org/sleuthkit/autopsy/corecomponents/DataContentViewerArtifact.form +++ b/Core/src/org/sleuthkit/autopsy/corecomponents/DataContentViewerArtifact.form @@ -75,60 +75,7 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + @@ -136,6 +83,11 @@ + + + + + @@ -143,6 +95,11 @@ + + + + + @@ -159,6 +116,11 @@ + + + + + @@ -166,6 +128,11 @@ + + + + + @@ -193,6 +160,11 @@ + + + + + @@ -206,6 +178,11 @@ + + + + + @@ -233,8 +210,33 @@ + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Core/src/org/sleuthkit/autopsy/corecomponents/DataContentViewerArtifact.java b/Core/src/org/sleuthkit/autopsy/corecomponents/DataContentViewerArtifact.java index fb80ad86f2..79aa2057e2 100644 --- a/Core/src/org/sleuthkit/autopsy/corecomponents/DataContentViewerArtifact.java +++ b/Core/src/org/sleuthkit/autopsy/corecomponents/DataContentViewerArtifact.java @@ -202,6 +202,7 @@ public class DataContentViewerArtifact extends javax.swing.JPanel implements Dat @SuppressWarnings("unchecked") // //GEN-BEGIN:initComponents private void initComponents() { + java.awt.GridBagConstraints gridBagConstraints; rightClickMenu = new javax.swing.JPopupMenu(); copyMenuItem = new javax.swing.JMenuItem(); @@ -216,6 +217,7 @@ public class DataContentViewerArtifact extends javax.swing.JPanel implements Dat pageLabel2 = new javax.swing.JLabel(); prevPageButton = new javax.swing.JButton(); artifactLabel = 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(32767, 0)); resultsTableScrollPane = new javax.swing.JScrollPane(); copyMenuItem.setText(org.openide.util.NbBundle.getMessage(DataContentViewerArtifact.class, "DataContentViewerArtifact.copyMenuItem.text")); // NOI18N @@ -230,17 +232,46 @@ public class DataContentViewerArtifact extends javax.swing.JPanel implements Dat jScrollPane1.setVerticalScrollBarPolicy(javax.swing.ScrollPaneConstants.VERTICAL_SCROLLBAR_NEVER); jPanel1.setPreferredSize(new java.awt.Dimension(620, 58)); + jPanel1.setLayout(new java.awt.GridBagLayout()); totalPageLabel.setText(org.openide.util.NbBundle.getMessage(DataContentViewerArtifact.class, "DataContentViewerArtifact.totalPageLabel.text")); // NOI18N + gridBagConstraints = new java.awt.GridBagConstraints(); + gridBagConstraints.gridx = 3; + gridBagConstraints.gridy = 0; + gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL; + gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST; + gridBagConstraints.insets = new java.awt.Insets(3, 12, 0, 0); + jPanel1.add(totalPageLabel, gridBagConstraints); ofLabel.setText(org.openide.util.NbBundle.getMessage(DataContentViewerArtifact.class, "DataContentViewerArtifact.ofLabel.text")); // NOI18N + gridBagConstraints = new java.awt.GridBagConstraints(); + gridBagConstraints.gridx = 2; + gridBagConstraints.gridy = 0; + gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL; + gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST; + gridBagConstraints.insets = new java.awt.Insets(3, 12, 0, 0); + jPanel1.add(ofLabel, gridBagConstraints); currentPageLabel.setText(org.openide.util.NbBundle.getMessage(DataContentViewerArtifact.class, "DataContentViewerArtifact.currentPageLabel.text")); // NOI18N currentPageLabel.setMaximumSize(new java.awt.Dimension(18, 14)); currentPageLabel.setMinimumSize(new java.awt.Dimension(18, 14)); currentPageLabel.setPreferredSize(new java.awt.Dimension(18, 14)); + gridBagConstraints = new java.awt.GridBagConstraints(); + gridBagConstraints.gridx = 1; + gridBagConstraints.gridy = 0; + gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL; + gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST; + gridBagConstraints.insets = new java.awt.Insets(4, 7, 0, 0); + jPanel1.add(currentPageLabel, gridBagConstraints); pageLabel.setText(org.openide.util.NbBundle.getMessage(DataContentViewerArtifact.class, "DataContentViewerArtifact.pageLabel.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.insets = new java.awt.Insets(3, 12, 0, 0); + jPanel1.add(pageLabel, gridBagConstraints); nextPageButton.setIcon(new javax.swing.ImageIcon(getClass().getResource("/org/sleuthkit/autopsy/corecomponents/btn_step_forward.png"))); // NOI18N nextPageButton.setText(org.openide.util.NbBundle.getMessage(DataContentViewerArtifact.class, "DataContentViewerArtifact.nextPageButton.text")); // NOI18N @@ -255,10 +286,23 @@ public class DataContentViewerArtifact extends javax.swing.JPanel implements Dat nextPageButtonActionPerformed(evt); } }); + gridBagConstraints = new java.awt.GridBagConstraints(); + gridBagConstraints.gridx = 6; + gridBagConstraints.gridy = 0; + gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST; + gridBagConstraints.insets = new java.awt.Insets(0, 0, 35, 0); + jPanel1.add(nextPageButton, gridBagConstraints); pageLabel2.setText(org.openide.util.NbBundle.getMessage(DataContentViewerArtifact.class, "DataContentViewerArtifact.pageLabel2.text")); // NOI18N pageLabel2.setMaximumSize(new java.awt.Dimension(29, 14)); pageLabel2.setMinimumSize(new java.awt.Dimension(29, 14)); + gridBagConstraints = new java.awt.GridBagConstraints(); + gridBagConstraints.gridx = 4; + gridBagConstraints.gridy = 0; + gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL; + gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST; + gridBagConstraints.insets = new java.awt.Insets(3, 41, 0, 0); + jPanel1.add(pageLabel2, gridBagConstraints); prevPageButton.setIcon(new javax.swing.ImageIcon(getClass().getResource("/org/sleuthkit/autopsy/corecomponents/btn_step_back.png"))); // NOI18N prevPageButton.setText(org.openide.util.NbBundle.getMessage(DataContentViewerArtifact.class, "DataContentViewerArtifact.prevPageButton.text")); // NOI18N @@ -273,51 +317,25 @@ public class DataContentViewerArtifact extends javax.swing.JPanel implements Dat prevPageButtonActionPerformed(evt); } }); - - javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1); - jPanel1.setLayout(jPanel1Layout); - jPanel1Layout.setHorizontalGroup( - jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) - .addGroup(jPanel1Layout.createSequentialGroup() - .addContainerGap() - .addComponent(pageLabel) - .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) - .addComponent(currentPageLabel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) - .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) - .addComponent(ofLabel) - .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) - .addComponent(totalPageLabel) - .addGap(41, 41, 41) - .addComponent(pageLabel2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) - .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) - .addComponent(prevPageButton, javax.swing.GroupLayout.PREFERRED_SIZE, 23, javax.swing.GroupLayout.PREFERRED_SIZE) - .addGap(0, 0, 0) - .addComponent(nextPageButton, javax.swing.GroupLayout.PREFERRED_SIZE, 23, javax.swing.GroupLayout.PREFERRED_SIZE) - .addContainerGap(383, Short.MAX_VALUE)) - .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) - .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel1Layout.createSequentialGroup() - .addContainerGap(280, Short.MAX_VALUE) - .addComponent(artifactLabel) - .addContainerGap(84, Short.MAX_VALUE))) - ); - jPanel1Layout.setVerticalGroup( - jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) - .addGroup(jPanel1Layout.createSequentialGroup() - .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) - .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) - .addComponent(pageLabel) - .addComponent(currentPageLabel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) - .addComponent(ofLabel) - .addComponent(totalPageLabel)) - .addComponent(nextPageButton, javax.swing.GroupLayout.PREFERRED_SIZE, 23, javax.swing.GroupLayout.PREFERRED_SIZE) - .addComponent(prevPageButton, javax.swing.GroupLayout.PREFERRED_SIZE, 23, javax.swing.GroupLayout.PREFERRED_SIZE) - .addComponent(pageLabel2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) - .addContainerGap(35, Short.MAX_VALUE)) - .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) - .addGroup(jPanel1Layout.createSequentialGroup() - .addComponent(artifactLabel) - .addGap(0, 58, Short.MAX_VALUE))) - ); + gridBagConstraints = new java.awt.GridBagConstraints(); + gridBagConstraints.gridx = 5; + gridBagConstraints.gridy = 0; + gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST; + gridBagConstraints.insets = new java.awt.Insets(0, 5, 35, 0); + jPanel1.add(prevPageButton, gridBagConstraints); + gridBagConstraints = new java.awt.GridBagConstraints(); + gridBagConstraints.gridx = 8; + gridBagConstraints.gridy = 0; + gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL; + gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHEAST; + gridBagConstraints.insets = new java.awt.Insets(3, 0, 0, 8); + jPanel1.add(artifactLabel, gridBagConstraints); + gridBagConstraints = new java.awt.GridBagConstraints(); + gridBagConstraints.gridx = 7; + gridBagConstraints.gridy = 0; + gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL; + gridBagConstraints.weightx = 0.1; + jPanel1.add(filler1, gridBagConstraints); jScrollPane1.setViewportView(jPanel1); @@ -359,6 +377,7 @@ public class DataContentViewerArtifact extends javax.swing.JPanel implements Dat private javax.swing.JLabel artifactLabel; private javax.swing.JMenuItem copyMenuItem; private javax.swing.JLabel currentPageLabel; + private javax.swing.Box.Filler filler1; private javax.swing.JPanel jPanel1; private javax.swing.JScrollPane jScrollPane1; private javax.swing.JButton nextPageButton; From a54b655b821d1b223e1ea4576a18e2cad7c8241e Mon Sep 17 00:00:00 2001 From: William Schaefer Date: Mon, 13 Apr 2020 06:09:05 -0400 Subject: [PATCH 110/137] 6225 fix for screenshot 20 --- .../autopsy/filequery/ResultsPanel.form | 176 ++++++++++++------ .../autopsy/filequery/ResultsPanel.java | 158 ++++++++++------ 2 files changed, 224 insertions(+), 110 deletions(-) diff --git a/Core/src/org/sleuthkit/autopsy/filequery/ResultsPanel.form b/Core/src/org/sleuthkit/autopsy/filequery/ResultsPanel.form index c7d9f2b4ee..e7708facf4 100644 --- a/Core/src/org/sleuthkit/autopsy/filequery/ResultsPanel.form +++ b/Core/src/org/sleuthkit/autopsy/filequery/ResultsPanel.form @@ -21,7 +21,7 @@ - + @@ -30,7 +30,7 @@ - + @@ -50,53 +50,7 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + @@ -118,6 +72,11 @@ + + + + + @@ -125,15 +84,20 @@ - + - + + + + + + @@ -155,74 +119,105 @@ + + + + + + - + - + + + + + + + - + - + + + + + + + + + + + + + + + - + - + + + + + + @@ -239,6 +234,71 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -282,7 +342,7 @@ - + diff --git a/Core/src/org/sleuthkit/autopsy/filequery/ResultsPanel.java b/Core/src/org/sleuthkit/autopsy/filequery/ResultsPanel.java index 7a750f50eb..5dbdca0089 100644 --- a/Core/src/org/sleuthkit/autopsy/filequery/ResultsPanel.java +++ b/Core/src/org/sleuthkit/autopsy/filequery/ResultsPanel.java @@ -410,6 +410,7 @@ public class ResultsPanel extends javax.swing.JPanel { @SuppressWarnings("unchecked") // //GEN-BEGIN:initComponents private void initComponents() { + java.awt.GridBagConstraints gridBagConstraints; javax.swing.JPanel pagingPanel = new javax.swing.JPanel(); previousPageButton = new javax.swing.JButton(); @@ -420,6 +421,10 @@ public class ResultsPanel extends javax.swing.JPanel { gotoPageField = new javax.swing.JTextField(); javax.swing.JLabel pageSizeLabel = new javax.swing.JLabel(); pageSizeComboBox = new javax.swing.JComboBox<>(); + filler1 = new javax.swing.Box.Filler(new java.awt.Dimension(0, 0), new java.awt.Dimension(0, 0), new java.awt.Dimension(32767, 0)); + filler2 = new javax.swing.Box.Filler(new java.awt.Dimension(0, 0), new java.awt.Dimension(0, 0), new java.awt.Dimension(32767, 0)); + filler3 = new javax.swing.Box.Filler(new java.awt.Dimension(0, 0), new java.awt.Dimension(0, 0), new java.awt.Dimension(32767, 0)); + filler4 = new javax.swing.Box.Filler(new java.awt.Dimension(0, 0), new java.awt.Dimension(0, 0), new java.awt.Dimension(32767, 0)); javax.swing.JSplitPane resultsSplitPane = new javax.swing.JSplitPane(); javax.swing.JPanel instancesPanel = new javax.swing.JPanel(); javax.swing.JScrollPane instancesScrollPane = new javax.swing.JScrollPane(); @@ -429,6 +434,7 @@ public class ResultsPanel extends javax.swing.JPanel { setPreferredSize(new java.awt.Dimension(777, 475)); pagingPanel.setBorder(javax.swing.BorderFactory.createEtchedBorder()); + pagingPanel.setLayout(new java.awt.GridBagLayout()); previousPageButton.setIcon(new javax.swing.ImageIcon(getClass().getResource("/org/sleuthkit/autopsy/corecomponents/btn_step_back.png"))); // NOI18N previousPageButton.setBorder(null); @@ -441,11 +447,26 @@ public class ResultsPanel extends javax.swing.JPanel { previousPageButtonActionPerformed(evt); } }); + gridBagConstraints = new java.awt.GridBagConstraints(); + gridBagConstraints.gridx = 3; + gridBagConstraints.gridy = 0; + gridBagConstraints.gridheight = 2; + gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST; + gridBagConstraints.insets = new java.awt.Insets(6, 12, 6, 0); + pagingPanel.add(previousPageButton, gridBagConstraints); org.openide.awt.Mnemonics.setLocalizedText(currentPageLabel, org.openide.util.NbBundle.getMessage(ResultsPanel.class, "ResultsPanel.currentPageLabel.text")); // NOI18N - currentPageLabel.setMaximumSize(new java.awt.Dimension(90, 23)); + currentPageLabel.setMaximumSize(new java.awt.Dimension(190, 23)); currentPageLabel.setMinimumSize(new java.awt.Dimension(90, 23)); - currentPageLabel.setPreferredSize(new java.awt.Dimension(90, 23)); + currentPageLabel.setPreferredSize(new java.awt.Dimension(100, 23)); + gridBagConstraints = new java.awt.GridBagConstraints(); + gridBagConstraints.gridx = 0; + gridBagConstraints.gridy = 0; + gridBagConstraints.gridheight = 2; + gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL; + gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST; + gridBagConstraints.insets = new java.awt.Insets(6, 14, 6, 0); + pagingPanel.add(currentPageLabel, gridBagConstraints); nextPageButton.setIcon(new javax.swing.ImageIcon(getClass().getResource("/org/sleuthkit/autopsy/corecomponents/btn_step_forward.png"))); // NOI18N nextPageButton.setBorder(null); @@ -458,28 +479,70 @@ public class ResultsPanel extends javax.swing.JPanel { nextPageButtonActionPerformed(evt); } }); + gridBagConstraints = new java.awt.GridBagConstraints(); + gridBagConstraints.gridx = 4; + gridBagConstraints.gridy = 0; + gridBagConstraints.gridheight = 2; + gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST; + gridBagConstraints.insets = new java.awt.Insets(6, 0, 6, 0); + pagingPanel.add(nextPageButton, gridBagConstraints); + pageControlsLabel.setHorizontalAlignment(javax.swing.SwingConstants.TRAILING); org.openide.awt.Mnemonics.setLocalizedText(pageControlsLabel, org.openide.util.NbBundle.getMessage(ResultsPanel.class, "ResultsPanel.pageControlsLabel.text")); // NOI18N - pageControlsLabel.setMaximumSize(new java.awt.Dimension(33, 23)); + pageControlsLabel.setMaximumSize(new java.awt.Dimension(133, 23)); pageControlsLabel.setMinimumSize(new java.awt.Dimension(33, 23)); - pageControlsLabel.setPreferredSize(new java.awt.Dimension(33, 23)); + pageControlsLabel.setPreferredSize(new java.awt.Dimension(60, 23)); + gridBagConstraints = new java.awt.GridBagConstraints(); + gridBagConstraints.gridx = 2; + gridBagConstraints.gridy = 0; + gridBagConstraints.gridheight = 2; + gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL; + gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHEAST; + gridBagConstraints.insets = new java.awt.Insets(6, 18, 6, 0); + pagingPanel.add(pageControlsLabel, gridBagConstraints); + gotoPageLabel.setHorizontalAlignment(javax.swing.SwingConstants.TRAILING); org.openide.awt.Mnemonics.setLocalizedText(gotoPageLabel, org.openide.util.NbBundle.getMessage(ResultsPanel.class, "ResultsPanel.gotoPageLabel.text")); // NOI18N - gotoPageLabel.setMaximumSize(new java.awt.Dimension(70, 23)); + gotoPageLabel.setMaximumSize(new java.awt.Dimension(170, 23)); gotoPageLabel.setMinimumSize(new java.awt.Dimension(70, 23)); - gotoPageLabel.setPreferredSize(new java.awt.Dimension(70, 23)); + gotoPageLabel.setPreferredSize(new java.awt.Dimension(100, 23)); + gridBagConstraints = new java.awt.GridBagConstraints(); + gridBagConstraints.gridx = 6; + gridBagConstraints.gridy = 0; + gridBagConstraints.gridheight = 2; + gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL; + gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHEAST; + gridBagConstraints.insets = new java.awt.Insets(6, 18, 6, 0); + pagingPanel.add(gotoPageLabel, gridBagConstraints); gotoPageField.setEnabled(false); + gotoPageField.setPreferredSize(new java.awt.Dimension(26, 22)); gotoPageField.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { gotoPageFieldActionPerformed(evt); } }); + gridBagConstraints = new java.awt.GridBagConstraints(); + gridBagConstraints.gridx = 7; + gridBagConstraints.gridy = 0; + gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL; + gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST; + gridBagConstraints.insets = new java.awt.Insets(6, 5, 0, 0); + pagingPanel.add(gotoPageField, gridBagConstraints); + pageSizeLabel.setHorizontalAlignment(javax.swing.SwingConstants.TRAILING); org.openide.awt.Mnemonics.setLocalizedText(pageSizeLabel, org.openide.util.NbBundle.getMessage(ResultsPanel.class, "ResultsPanel.pageSizeLabel.text")); // NOI18N - pageSizeLabel.setMaximumSize(new java.awt.Dimension(60, 23)); + pageSizeLabel.setMaximumSize(new java.awt.Dimension(160, 23)); pageSizeLabel.setMinimumSize(new java.awt.Dimension(60, 23)); - pageSizeLabel.setPreferredSize(new java.awt.Dimension(60, 23)); + pageSizeLabel.setPreferredSize(new java.awt.Dimension(90, 23)); + gridBagConstraints = new java.awt.GridBagConstraints(); + gridBagConstraints.gridx = 9; + gridBagConstraints.gridy = 0; + gridBagConstraints.gridheight = 2; + gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL; + gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHEAST; + gridBagConstraints.insets = new java.awt.Insets(6, 18, 6, 0); + pagingPanel.add(pageSizeLabel, gridBagConstraints); pageSizeComboBox.setModel(new DefaultComboBoxModel(new Integer[] {25,50,75,100,125,150,175,200})); pageSizeComboBox.setSelectedIndex(3); @@ -488,47 +551,34 @@ public class ResultsPanel extends javax.swing.JPanel { pageSizeChanged(evt); } }); - - javax.swing.GroupLayout pagingPanelLayout = new javax.swing.GroupLayout(pagingPanel); - pagingPanel.setLayout(pagingPanelLayout); - pagingPanelLayout.setHorizontalGroup( - pagingPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) - .addGroup(pagingPanelLayout.createSequentialGroup() - .addContainerGap() - .addComponent(currentPageLabel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) - .addGap(18, 18, 18) - .addComponent(pageControlsLabel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) - .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) - .addComponent(previousPageButton) - .addGap(0, 0, 0) - .addComponent(nextPageButton) - .addGap(18, 18, 18) - .addComponent(gotoPageLabel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) - .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) - .addComponent(gotoPageField, javax.swing.GroupLayout.PREFERRED_SIZE, 64, javax.swing.GroupLayout.PREFERRED_SIZE) - .addGap(18, 18, 18) - .addComponent(pageSizeLabel, javax.swing.GroupLayout.PREFERRED_SIZE, 52, javax.swing.GroupLayout.PREFERRED_SIZE) - .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) - .addComponent(pageSizeComboBox, javax.swing.GroupLayout.PREFERRED_SIZE, 55, javax.swing.GroupLayout.PREFERRED_SIZE) - .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) - ); - pagingPanelLayout.setVerticalGroup( - pagingPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) - .addGroup(pagingPanelLayout.createSequentialGroup() - .addGap(4, 4, 4) - .addGroup(pagingPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) - .addComponent(nextPageButton, javax.swing.GroupLayout.Alignment.TRAILING) - .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, pagingPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) - .addComponent(previousPageButton, javax.swing.GroupLayout.Alignment.TRAILING) - .addComponent(currentPageLabel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) - .addComponent(pageControlsLabel, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) - .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, pagingPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) - .addComponent(gotoPageLabel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) - .addComponent(gotoPageField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) - .addComponent(pageSizeLabel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) - .addComponent(pageSizeComboBox, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))) - .addGap(4, 4, 4)) - ); + gridBagConstraints = new java.awt.GridBagConstraints(); + gridBagConstraints.gridx = 10; + gridBagConstraints.gridy = 0; + gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL; + gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST; + gridBagConstraints.insets = new java.awt.Insets(6, 5, 0, 277); + pagingPanel.add(pageSizeComboBox, gridBagConstraints); + gridBagConstraints = new java.awt.GridBagConstraints(); + gridBagConstraints.gridx = 11; + gridBagConstraints.gridy = 0; + gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL; + gridBagConstraints.weightx = 0.1; + pagingPanel.add(filler1, gridBagConstraints); + gridBagConstraints = new java.awt.GridBagConstraints(); + gridBagConstraints.gridx = 1; + gridBagConstraints.gridy = 0; + gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL; + pagingPanel.add(filler2, gridBagConstraints); + gridBagConstraints = new java.awt.GridBagConstraints(); + gridBagConstraints.gridx = 5; + gridBagConstraints.gridy = 0; + gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL; + pagingPanel.add(filler3, gridBagConstraints); + gridBagConstraints = new java.awt.GridBagConstraints(); + gridBagConstraints.gridx = 8; + gridBagConstraints.gridy = 0; + gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL; + pagingPanel.add(filler4, gridBagConstraints); resultsSplitPane.setDividerLocation(380); resultsSplitPane.setOrientation(javax.swing.JSplitPane.VERTICAL_SPLIT); @@ -553,7 +603,7 @@ public class ResultsPanel extends javax.swing.JPanel { instancesPanel.setLayout(instancesPanelLayout); instancesPanelLayout.setHorizontalGroup( instancesPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) - .addGap(0, 775, Short.MAX_VALUE) + .addGap(0, 779, Short.MAX_VALUE) .addGroup(instancesPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(instancesScrollPane, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) ); @@ -576,7 +626,7 @@ public class ResultsPanel extends javax.swing.JPanel { this.setLayout(layout); layout.setHorizontalGroup( layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) - .addComponent(pagingPanel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) + .addComponent(pagingPanel, javax.swing.GroupLayout.PREFERRED_SIZE, 0, Short.MAX_VALUE) .addComponent(resultsSplitPane, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) ); layout.setVerticalGroup( @@ -584,7 +634,7 @@ public class ResultsPanel extends javax.swing.JPanel { .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup() .addComponent(pagingPanel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addGap(0, 0, 0) - .addComponent(resultsSplitPane, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) + .addComponent(resultsSplitPane, javax.swing.GroupLayout.DEFAULT_SIZE, 436, Short.MAX_VALUE) .addGap(0, 0, 0)) ); }// //GEN-END:initComponents @@ -668,6 +718,10 @@ public class ResultsPanel extends javax.swing.JPanel { // Variables declaration - do not modify//GEN-BEGIN:variables private javax.swing.JLabel currentPageLabel; + private javax.swing.Box.Filler filler1; + private javax.swing.Box.Filler filler2; + private javax.swing.Box.Filler filler3; + private javax.swing.Box.Filler filler4; private javax.swing.JTextField gotoPageField; private javax.swing.JList instancesList; private javax.swing.JButton nextPageButton; From 2155345812c2f1ed7ef91378a3c0aa86eeb8ad89 Mon Sep 17 00:00:00 2001 From: William Schaefer Date: Mon, 13 Apr 2020 06:18:39 -0400 Subject: [PATCH 111/137] 6225 fix for screenshot 19 --- .../CommonAttributePanel.form | 78 ++++++++++--------- .../CommonAttributePanel.java | 43 +++++----- 2 files changed, 67 insertions(+), 54 deletions(-) diff --git a/Core/src/org/sleuthkit/autopsy/commonpropertiessearch/CommonAttributePanel.form b/Core/src/org/sleuthkit/autopsy/commonpropertiessearch/CommonAttributePanel.form index 74ebe1bd30..6eaa6bdb08 100644 --- a/Core/src/org/sleuthkit/autopsy/commonpropertiessearch/CommonAttributePanel.form +++ b/Core/src/org/sleuthkit/autopsy/commonpropertiessearch/CommonAttributePanel.form @@ -29,7 +29,7 @@ - + @@ -40,7 +40,7 @@ - + @@ -54,7 +54,7 @@ - + @@ -63,15 +63,15 @@ - - + + - + @@ -79,36 +79,41 @@ - - - - + + + + - - - - - - - - + + + + + - + + + + + - - + + + - + + + + @@ -120,36 +125,36 @@ - + - + - + - + - + - + - + - + - + - + - + - + @@ -204,12 +209,15 @@ + + + - + diff --git a/Core/src/org/sleuthkit/autopsy/commonpropertiessearch/CommonAttributePanel.java b/Core/src/org/sleuthkit/autopsy/commonpropertiessearch/CommonAttributePanel.java index 5e7aa3adb4..70de86c837 100644 --- a/Core/src/org/sleuthkit/autopsy/commonpropertiessearch/CommonAttributePanel.java +++ b/Core/src/org/sleuthkit/autopsy/commonpropertiessearch/CommonAttributePanel.java @@ -649,7 +649,7 @@ final class CommonAttributePanel extends javax.swing.JDialog implements Observer }); jPanel1.setMaximumSize(null); - jPanel1.setPreferredSize(new java.awt.Dimension(450, 646)); + jPanel1.setPreferredSize(new java.awt.Dimension(499, 646)); jPanel1.setRequestFocusEnabled(false); org.openide.awt.Mnemonics.setLocalizedText(commonItemSearchDescription, org.openide.util.NbBundle.getMessage(CommonAttributePanel.class, "CommonAttributePanel.commonItemSearchDescription.text")); // NOI18N @@ -677,12 +677,13 @@ final class CommonAttributePanel extends javax.swing.JDialog implements Observer containerPanel.setBackground(new java.awt.Color(0, 0, 0)); containerPanel.setOpaque(false); + containerPanel.setPreferredSize(new java.awt.Dimension(475, 326)); javax.swing.GroupLayout containerPanelLayout = new javax.swing.GroupLayout(containerPanel); containerPanel.setLayout(containerPanelLayout); containerPanelLayout.setHorizontalGroup( containerPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) - .addGap(0, 430, Short.MAX_VALUE) + .addGap(0, 0, Short.MAX_VALUE) ); containerPanelLayout.setVerticalGroup( containerPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) @@ -746,40 +747,44 @@ final class CommonAttributePanel extends javax.swing.JDialog implements Observer .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel1Layout.createSequentialGroup() .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING) .addGroup(jPanel1Layout.createSequentialGroup() - .addGap(0, 0, Short.MAX_VALUE) - .addComponent(intraCaseRadio, javax.swing.GroupLayout.PREFERRED_SIZE, 383, javax.swing.GroupLayout.PREFERRED_SIZE)) + .addGap(20, 20, 20) + .addComponent(intraCaseRadio, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) .addComponent(scopeLabel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) .addGap(37, 37, 37)) .addGroup(jPanel1Layout.createSequentialGroup() - .addComponent(percentageThresholdCheck) + .addComponent(percentageThresholdCheck, javax.swing.GroupLayout.PREFERRED_SIZE, 175, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(percentageThresholdInputBox, javax.swing.GroupLayout.PREFERRED_SIZE, 40, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(percentageThresholdTextTwo, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addContainerGap()) .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel1Layout.createSequentialGroup() - .addComponent(errorText, javax.swing.GroupLayout.PREFERRED_SIZE, 330, javax.swing.GroupLayout.PREFERRED_SIZE) - .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) - .addComponent(searchButton) + .addComponent(errorText, javax.swing.GroupLayout.PREFERRED_SIZE, 384, javax.swing.GroupLayout.PREFERRED_SIZE) + .addGap(18, 18, 18) + .addComponent(searchButton, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addContainerGap()) .addGroup(jPanel1Layout.createSequentialGroup() - .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) - .addComponent(containerPanel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) - .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false) - .addComponent(commonItemSearchDescription, javax.swing.GroupLayout.Alignment.LEADING) - .addGroup(javax.swing.GroupLayout.Alignment.LEADING, jPanel1Layout.createSequentialGroup() - .addGap(20, 20, 20) - .addComponent(interCaseRadio, javax.swing.GroupLayout.PREFERRED_SIZE, 383, javax.swing.GroupLayout.PREFERRED_SIZE)))) - .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)))) + .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING) + .addComponent(commonItemSearchDescription, javax.swing.GroupLayout.Alignment.LEADING) + .addGroup(javax.swing.GroupLayout.Alignment.LEADING, jPanel1Layout.createSequentialGroup() + .addGap(20, 20, 20) + .addComponent(interCaseRadio, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))) + .addGap(84, 84, 84)) + .addGroup(jPanel1Layout.createSequentialGroup() + .addComponent(containerPanel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) + .addContainerGap()))) .addGroup(jPanel1Layout.createSequentialGroup() .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel1Layout.createSequentialGroup() .addContainerGap() - .addComponent(displayResultsLabel)) + .addComponent(displayResultsLabel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) + .addGap(313, 313, 313)) .addGroup(jPanel1Layout.createSequentialGroup() .addGap(30, 30, 30) .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) - .addComponent(caseResultsRadioButton, javax.swing.GroupLayout.PREFERRED_SIZE, 410, javax.swing.GroupLayout.PREFERRED_SIZE) + .addGroup(jPanel1Layout.createSequentialGroup() + .addComponent(caseResultsRadioButton, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) + .addGap(49, 49, 49)) .addComponent(countResultsRadioButton, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)))) .addGap(10, 10, 10)) ); @@ -813,7 +818,7 @@ final class CommonAttributePanel extends javax.swing.JDialog implements Observer .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(searchButton) .addComponent(errorText, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) - .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) + .addGap(14, 14, 14)) ); getContentPane().add(jPanel1, java.awt.BorderLayout.CENTER); From 6761bfe8862b4aff605630f3063bc27976911a8a Mon Sep 17 00:00:00 2001 From: William Schaefer Date: Mon, 13 Apr 2020 06:49:00 -0400 Subject: [PATCH 112/137] 6225 fix for screenshot 19 --- .../CommonAttributePanel.form | 66 +++++++++++-------- .../CommonAttributePanel.java | 46 +++++++------ 2 files changed, 65 insertions(+), 47 deletions(-) diff --git a/Core/src/org/sleuthkit/autopsy/commonpropertiessearch/CommonAttributePanel.form b/Core/src/org/sleuthkit/autopsy/commonpropertiessearch/CommonAttributePanel.form index 6eaa6bdb08..ffd6af0ea7 100644 --- a/Core/src/org/sleuthkit/autopsy/commonpropertiessearch/CommonAttributePanel.form +++ b/Core/src/org/sleuthkit/autopsy/commonpropertiessearch/CommonAttributePanel.form @@ -8,8 +8,11 @@ + + + - + @@ -29,7 +32,7 @@ - + @@ -37,7 +40,10 @@ - + + + + @@ -71,17 +77,17 @@ - - + + - - - + + + - - - + + + @@ -96,30 +102,26 @@ - + + - - - - - - - - - - - - - + + + + + + + + @@ -210,7 +212,7 @@ - + @@ -259,6 +261,9 @@ + + + @@ -286,6 +291,15 @@ + + + + + + + + + diff --git a/Core/src/org/sleuthkit/autopsy/commonpropertiessearch/CommonAttributePanel.java b/Core/src/org/sleuthkit/autopsy/commonpropertiessearch/CommonAttributePanel.java index 70de86c837..b301e69d04 100644 --- a/Core/src/org/sleuthkit/autopsy/commonpropertiessearch/CommonAttributePanel.java +++ b/Core/src/org/sleuthkit/autopsy/commonpropertiessearch/CommonAttributePanel.java @@ -640,7 +640,8 @@ final class CommonAttributePanel extends javax.swing.JDialog implements Observer countResultsRadioButton = new javax.swing.JRadioButton(); displayResultsLabel = new javax.swing.JLabel(); - setMinimumSize(new java.awt.Dimension(450, 570)); + setMaximumSize(new java.awt.Dimension(499, 646)); + setMinimumSize(new java.awt.Dimension(499, 646)); setResizable(false); addWindowListener(new java.awt.event.WindowAdapter() { public void windowClosed(java.awt.event.WindowEvent evt) { @@ -648,7 +649,8 @@ final class CommonAttributePanel extends javax.swing.JDialog implements Observer } }); - jPanel1.setMaximumSize(null); + jPanel1.setMaximumSize(new java.awt.Dimension(499, 646)); + jPanel1.setMinimumSize(new java.awt.Dimension(499, 646)); jPanel1.setPreferredSize(new java.awt.Dimension(499, 646)); jPanel1.setRequestFocusEnabled(false); @@ -677,7 +679,7 @@ final class CommonAttributePanel extends javax.swing.JDialog implements Observer containerPanel.setBackground(new java.awt.Color(0, 0, 0)); containerPanel.setOpaque(false); - containerPanel.setPreferredSize(new java.awt.Dimension(475, 326)); + containerPanel.setPreferredSize(new java.awt.Dimension(477, 326)); javax.swing.GroupLayout containerPanelLayout = new javax.swing.GroupLayout(containerPanel); containerPanel.setLayout(containerPanelLayout); @@ -704,6 +706,7 @@ final class CommonAttributePanel extends javax.swing.JDialog implements Observer percentageThresholdInputBox.setPreferredSize(new java.awt.Dimension(40, 24)); org.openide.awt.Mnemonics.setLocalizedText(percentageThresholdTextTwo, org.openide.util.NbBundle.getMessage(CommonAttributePanel.class, "CommonAttributePanel.percentageThresholdTextTwo.text_1")); // NOI18N + percentageThresholdTextTwo.setMaximumSize(new java.awt.Dimension(260, 16)); org.openide.awt.Mnemonics.setLocalizedText(dataSourcesLabel, org.openide.util.NbBundle.getMessage(CommonAttributePanel.class, "CommonAttributePanel.dataSourcesLabel.text")); // NOI18N @@ -714,6 +717,9 @@ final class CommonAttributePanel extends javax.swing.JDialog implements Observer org.openide.awt.Mnemonics.setLocalizedText(searchButton, org.openide.util.NbBundle.getMessage(CommonAttributePanel.class, "CommonAttributePanel.searchButton.text")); // NOI18N searchButton.setEnabled(false); searchButton.setHorizontalTextPosition(javax.swing.SwingConstants.LEADING); + searchButton.setMaximumSize(new java.awt.Dimension(100, 25)); + searchButton.setMinimumSize(new java.awt.Dimension(100, 25)); + searchButton.setPreferredSize(new java.awt.Dimension(100, 25)); searchButton.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { searchButtonActionPerformed(evt); @@ -752,16 +758,16 @@ final class CommonAttributePanel extends javax.swing.JDialog implements Observer .addComponent(scopeLabel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) .addGap(37, 37, 37)) .addGroup(jPanel1Layout.createSequentialGroup() - .addComponent(percentageThresholdCheck, javax.swing.GroupLayout.PREFERRED_SIZE, 175, javax.swing.GroupLayout.PREFERRED_SIZE) - .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) + .addComponent(percentageThresholdCheck, javax.swing.GroupLayout.DEFAULT_SIZE, 184, Short.MAX_VALUE) + .addGap(1, 1, 1) .addComponent(percentageThresholdInputBox, javax.swing.GroupLayout.PREFERRED_SIZE, 40, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) - .addComponent(percentageThresholdTextTwo, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) + .addComponent(percentageThresholdTextTwo, javax.swing.GroupLayout.DEFAULT_SIZE, 247, Short.MAX_VALUE) .addContainerGap()) .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel1Layout.createSequentialGroup() - .addComponent(errorText, javax.swing.GroupLayout.PREFERRED_SIZE, 384, javax.swing.GroupLayout.PREFERRED_SIZE) - .addGap(18, 18, 18) - .addComponent(searchButton, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) + .addComponent(errorText) + .addGap(6, 6, 6) + .addComponent(searchButton, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addContainerGap()) .addGroup(jPanel1Layout.createSequentialGroup() .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING) @@ -774,19 +780,17 @@ final class CommonAttributePanel extends javax.swing.JDialog implements Observer .addComponent(containerPanel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addContainerGap()))) .addGroup(jPanel1Layout.createSequentialGroup() + .addGap(30, 30, 30) .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel1Layout.createSequentialGroup() - .addContainerGap() - .addComponent(displayResultsLabel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) - .addGap(313, 313, 313)) - .addGroup(jPanel1Layout.createSequentialGroup() - .addGap(30, 30, 30) - .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) - .addGroup(jPanel1Layout.createSequentialGroup() - .addComponent(caseResultsRadioButton, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) - .addGap(49, 49, 49)) - .addComponent(countResultsRadioButton, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)))) + .addComponent(caseResultsRadioButton, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) + .addGap(49, 49, 49)) + .addComponent(countResultsRadioButton, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) .addGap(10, 10, 10)) + .addGroup(jPanel1Layout.createSequentialGroup() + .addContainerGap() + .addComponent(displayResultsLabel, javax.swing.GroupLayout.PREFERRED_SIZE, 225, javax.swing.GroupLayout.PREFERRED_SIZE) + .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) ); jPanel1Layout.setVerticalGroup( jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) @@ -805,7 +809,7 @@ final class CommonAttributePanel extends javax.swing.JDialog implements Observer .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(percentageThresholdCheck) .addComponent(percentageThresholdInputBox, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) - .addComponent(percentageThresholdTextTwo)) + .addComponent(percentageThresholdTextTwo, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) .addComponent(displayResultsLabel) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) @@ -816,7 +820,7 @@ final class CommonAttributePanel extends javax.swing.JDialog implements Observer .addComponent(dataSourcesLabel, javax.swing.GroupLayout.PREFERRED_SIZE, 14, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) - .addComponent(searchButton) + .addComponent(searchButton, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(errorText, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) .addGap(14, 14, 14)) ); From 14145cc6d80f60d8024c25b063b00611f896c688 Mon Sep 17 00:00:00 2001 From: William Schaefer Date: Mon, 13 Apr 2020 06:56:14 -0400 Subject: [PATCH 113/137] 6225 fix for screenshot 18 --- .../corecomponents/Bundle.properties-MERGED | 12 +- .../corecomponents/ViewPreferencesPanel.form | 149 +++++++++++------- .../corecomponents/ViewPreferencesPanel.java | 115 ++++++++------ 3 files changed, 162 insertions(+), 114 deletions(-) diff --git a/Core/src/org/sleuthkit/autopsy/corecomponents/Bundle.properties-MERGED b/Core/src/org/sleuthkit/autopsy/corecomponents/Bundle.properties-MERGED index f252420726..544cfa63c0 100755 --- a/Core/src/org/sleuthkit/autopsy/corecomponents/Bundle.properties-MERGED +++ b/Core/src/org/sleuthkit/autopsy/corecomponents/Bundle.properties-MERGED @@ -63,9 +63,9 @@ DataContentViewerHex.totalPageLabel.text_1=100 DataContentViewerHex.pageLabel2.text=Page # Product Information panel -LBL_Description=

    \n Product Version: {0} ({9})
    Sleuth Kit Version: {7}
    Netbeans RCP Build: {8}
    Java: {1}; {2}
    System: {3}; {4}; {5}
    Userdir: {6}
    +LBL_Description=
    \n Product Version: {0} ({9})
    Sleuth Kit Version: {7}
    Netbeans RCP Build: {8}
    Java: {1}; {2}
    System: {3}; {4}; {5}
    Userdir: {6}
    Format_OperatingSystem_Value={0} version {1} running on {2} -LBL_Copyright=
    Autopsy™ is a digital forensics platform based on The Sleuth Kit™ and other tools.
    Copyright © 2003-2018.
    +LBL_Copyright=
    Autopsy™ is a digital forensics platform based on The Sleuth Kit™ and other tools.
    Copyright © 2003-2018.
    SortChooser.dialogTitle=Choose Sort Criteria ThumbnailViewChildren.progress.cancelling=(Cancelling) # {0} - file name @@ -95,7 +95,7 @@ DataResultViewerThumbnail.pageNextButton.text= DataResultViewerThumbnail.imagesLabel.text=Images: DataResultViewerThumbnail.imagesRangeLabel.text=- DataResultViewerThumbnail.pageNumLabel.text=- -DataResultViewerThumbnail.filePathLabel.text=\ +DataResultViewerThumbnail.filePathLabel.text=\ \ \ DataResultViewerThumbnail.goToPageLabel.text=Go to Page: DataResultViewerThumbnail.goToPageField.text= AdvancedConfigurationDialog.cancelButton.text=Cancel @@ -129,9 +129,9 @@ DataResultViewerThumbnail.switchPage.done.errMsg=Error making thumbnails: {0} AboutWindowPanel.actVerboseLogging.text=Activate verbose logging OptionsCategory_Name_Multi_User_Settings=Multi-User OptionsCategory_Keywords_Multi_User_Options=Multi-User Settings -MultiUserSettingsPanel.lbSolrSettings.text=Solr Settings +MultiUserSettingsPanel.lbSolrSettings.text=Solr Server Settings MultiUserSettingsPanel.cbEnableMultiUser.text=Enable multi-user cases -MultiUserSettingsPanel.lbDatabaseSettings.text=Database Settings +MultiUserSettingsPanel.lbDatabaseSettings.text=Database Server Settings MultiUserSettingsPanel.validationErrMsg.incomplete=Fill in all values MultiUserSettingsPanel.nonWindowsOs.msg=Multi-user cases are only available on Windows platforms MultiUserSettingsPanel.validationErrMsg.invalidDatabasePort=Invalid database port number @@ -159,7 +159,7 @@ MultiUserSettingsPanel.tbSolrHostname.toolTipText=Hostname or IP Address MultiUserSettingsPanel.tbSolrPort.toolTipText=Port Number MultiUserSettingsPanel.lbTestMessageService.text= MultiUserSettingsPanel.bnTestMessageService.text=Test -MultiUserSettingsPanel.lbMessageServiceSettings.text=ActiveMQ Message Service Settings +MultiUserSettingsPanel.lbMessageServiceSettings.text=ActiveMQ Message Server Settings MultiUserSettingsPanel.tbMsgPort.toolTipText=Port Number MultiUserSettingsPanel.tbMsgPort.text= MultiUserSettingsPanel.tbMsgUsername.toolTipText=User Name (optional) diff --git a/Core/src/org/sleuthkit/autopsy/corecomponents/ViewPreferencesPanel.form b/Core/src/org/sleuthkit/autopsy/corecomponents/ViewPreferencesPanel.form index f604a6257e..83e04a9d1b 100755 --- a/Core/src/org/sleuthkit/autopsy/corecomponents/ViewPreferencesPanel.form +++ b/Core/src/org/sleuthkit/autopsy/corecomponents/ViewPreferencesPanel.form @@ -3,7 +3,7 @@
    - + @@ -37,7 +37,7 @@ - + @@ -46,7 +46,7 @@ - + @@ -72,7 +72,7 @@ - + @@ -93,73 +93,103 @@ - + - - + + + + - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - + + + + + + + - - - - - + + + + + + + + + + + + + - - - - - + + + + + + + + + + + + + - - - - - + + + + + + + + + + + + + + - - - - - - + @@ -202,7 +232,7 @@ - + @@ -365,7 +395,6 @@ - @@ -453,10 +482,10 @@ - - - - + + + + @@ -497,9 +526,9 @@ - - - + + + diff --git a/Core/src/org/sleuthkit/autopsy/corecomponents/ViewPreferencesPanel.java b/Core/src/org/sleuthkit/autopsy/corecomponents/ViewPreferencesPanel.java index fb85efcf0c..acb6446c9d 100755 --- a/Core/src/org/sleuthkit/autopsy/corecomponents/ViewPreferencesPanel.java +++ b/Core/src/org/sleuthkit/autopsy/corecomponents/ViewPreferencesPanel.java @@ -31,7 +31,6 @@ import org.sleuthkit.autopsy.core.UserPreferences; import org.sleuthkit.autopsy.coreutils.TimeZoneUtils; import org.sleuthkit.autopsy.directorytree.DirectoryTreeTopComponent; import org.sleuthkit.autopsy.texttranslation.TextTranslationService; -import org.sleuthkit.autopsy.centralrepository.datamodel.CentralRepository; /** * Panel for configuring view preferences. @@ -180,12 +179,12 @@ public class ViewPreferencesPanel extends JPanel implements OptionsPanel { currentSessionSettingsPanel = new javax.swing.JPanel(); hideRejectedResultsCheckbox = new javax.swing.JCheckBox(); - setPreferredSize(new java.awt.Dimension(625, 465)); + setPreferredSize(new java.awt.Dimension(727, 495)); viewPreferencesScrollPane.setBorder(null); - viewPreferencesScrollPane.setPreferredSize(new java.awt.Dimension(625, 465)); + viewPreferencesScrollPane.setPreferredSize(new java.awt.Dimension(727, 493)); - viewPreferencesPanel.setPreferredSize(new java.awt.Dimension(625, 465)); + viewPreferencesPanel.setPreferredSize(new java.awt.Dimension(727, 492)); globalSettingsPanel.setBorder(javax.swing.BorderFactory.createTitledBorder(org.openide.util.NbBundle.getMessage(ViewPreferencesPanel.class, "ViewPreferencesPanel.globalSettingsPanel.border.title"))); // NOI18N @@ -267,7 +266,6 @@ public class ViewPreferencesPanel extends JPanel implements OptionsPanel { org.openide.awt.Mnemonics.setLocalizedText(scoColumnsLabel, org.openide.util.NbBundle.getMessage(ViewPreferencesPanel.class, "ViewPreferencesPanel.scoColumnsLabel.text")); // NOI18N org.openide.awt.Mnemonics.setLocalizedText(scoColumnsCheckbox, org.openide.util.NbBundle.getMessage(ViewPreferencesPanel.class, "ViewPreferencesPanel.scoColumnsCheckbox.text")); // NOI18N - scoColumnsCheckbox.setHorizontalAlignment(javax.swing.SwingConstants.TRAILING); scoColumnsCheckbox.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { scoColumnsCheckboxActionPerformed(evt); @@ -310,53 +308,74 @@ public class ViewPreferencesPanel extends JPanel implements OptionsPanel { .addContainerGap() .addGroup(globalSettingsPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(globalSettingsPanelLayout.createSequentialGroup() - .addGap(10, 10, 10) - .addComponent(hideOtherUsersTagsCheckbox)) + .addComponent(maxResultsLabel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) + .addComponent(maxResultsSpinner, javax.swing.GroupLayout.PREFERRED_SIZE, 74, javax.swing.GroupLayout.PREFERRED_SIZE) + .addGap(325, 325, 325)) .addGroup(globalSettingsPanelLayout.createSequentialGroup() - .addComponent(scoColumnsLabel) - .addGap(135, 135, 135) - .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 272, javax.swing.GroupLayout.PREFERRED_SIZE)) - .addComponent(hideOtherUsersTagsLabel) - .addGroup(globalSettingsPanelLayout.createSequentialGroup() - .addGroup(globalSettingsPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) - .addComponent(hideKnownFilesLabel) - .addGroup(globalSettingsPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING) + .addGroup(globalSettingsPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING) + .addGroup(globalSettingsPanelLayout.createSequentialGroup() .addGroup(globalSettingsPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addComponent(hideKnownFilesLabel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) + .addGroup(globalSettingsPanelLayout.createSequentialGroup() + .addComponent(hideOtherUsersTagsLabel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) + .addGap(77, 77, 77)) + .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, globalSettingsPanelLayout.createSequentialGroup() + .addGroup(globalSettingsPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING) + .addComponent(scoColumnsLabel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) + .addGroup(javax.swing.GroupLayout.Alignment.LEADING, globalSettingsPanelLayout.createSequentialGroup() + .addGap(10, 10, 10) + .addComponent(hideOtherUsersTagsCheckbox, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))) + .addGap(99, 99, 99)) + .addGroup(globalSettingsPanelLayout.createSequentialGroup() + .addGap(32, 32, 32) + .addComponent(scoColumnsWrapAroundText, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) + .addGap(93, 93, 93)) .addGroup(globalSettingsPanelLayout.createSequentialGroup() .addGap(10, 10, 10) - .addGroup(globalSettingsPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) - .addComponent(dataSourcesHideSlackCheckbox) - .addComponent(viewsHideSlackCheckbox))) - .addComponent(hideSlackFilesLabel)) - .addGroup(globalSettingsPanelLayout.createSequentialGroup() - .addGap(10, 10, 10) - .addGroup(globalSettingsPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) - .addComponent(dataSourcesHideKnownCheckbox) - .addComponent(viewsHideKnownCheckbox)))) + .addComponent(scoColumnsCheckbox, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) + .addGap(14, 14, 14))) + .addGap(10, 10, 10)) + .addGroup(javax.swing.GroupLayout.Alignment.LEADING, globalSettingsPanelLayout.createSequentialGroup() + .addComponent(hideSlackFilesLabel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) + .addGap(51, 51, 51)) .addGroup(globalSettingsPanelLayout.createSequentialGroup() .addGap(10, 10, 10) - .addComponent(scoColumnsCheckbox)) - .addGroup(globalSettingsPanelLayout.createSequentialGroup() - .addGap(32, 32, 32) - .addComponent(scoColumnsWrapAroundText))) - .addGap(18, 18, 18) + .addGroup(globalSettingsPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING) + .addComponent(dataSourcesHideSlackCheckbox, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) + .addGroup(javax.swing.GroupLayout.Alignment.LEADING, globalSettingsPanelLayout.createSequentialGroup() + .addComponent(viewsHideKnownCheckbox, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) + .addGap(103, 103, 103)) + .addComponent(dataSourcesHideKnownCheckbox, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) + .addGroup(globalSettingsPanelLayout.createSequentialGroup() + .addComponent(viewsHideSlackCheckbox, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) + .addGap(116, 116, 116))) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED))) .addGroup(globalSettingsPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) - .addComponent(displayTimeLabel) - .addComponent(selectFileLabel) - .addComponent(translateTextLabel, javax.swing.GroupLayout.PREFERRED_SIZE, 120, javax.swing.GroupLayout.PREFERRED_SIZE) + .addGroup(globalSettingsPanelLayout.createSequentialGroup() + .addComponent(displayTimeLabel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) + .addGap(91, 91, 91)) + .addGroup(globalSettingsPanelLayout.createSequentialGroup() + .addComponent(translateTextLabel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) + .addGap(46, 46, 46)) + .addGroup(globalSettingsPanelLayout.createSequentialGroup() + .addComponent(selectFileLabel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) + .addGap(90, 90, 90)) .addGroup(globalSettingsPanelLayout.createSequentialGroup() .addGap(10, 10, 10) .addGroup(globalSettingsPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) - .addComponent(fileNameTranslationColumnCheckbox) - .addComponent(keepCurrentViewerRadioButton) - .addComponent(useBestViewerRadioButton) - .addComponent(useLocalTimeRadioButton) - .addComponent(useAnotherTimeRadioButton))))) - .addGroup(globalSettingsPanelLayout.createSequentialGroup() - .addComponent(maxResultsLabel) - .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) - .addComponent(maxResultsSpinner, javax.swing.GroupLayout.PREFERRED_SIZE, 74, javax.swing.GroupLayout.PREFERRED_SIZE))) - .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) + .addGroup(globalSettingsPanelLayout.createSequentialGroup() + .addGap(24, 24, 24) + .addComponent(jScrollPane1)) + .addComponent(fileNameTranslationColumnCheckbox, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) + .addComponent(useAnotherTimeRadioButton, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) + .addGroup(globalSettingsPanelLayout.createSequentialGroup() + .addGroup(globalSettingsPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addComponent(useLocalTimeRadioButton, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) + .addComponent(keepCurrentViewerRadioButton, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) + .addComponent(useBestViewerRadioButton, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) + .addGap(44, 44, 44))))))) + .addContainerGap()) ); globalSettingsPanelLayout.setVerticalGroup( globalSettingsPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) @@ -396,7 +415,7 @@ public class ViewPreferencesPanel extends JPanel implements OptionsPanel { .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(useLocalTimeRadioButton) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) - .addComponent(useAnotherTimeRadioButton) + .addComponent(useAnotherTimeRadioButton, javax.swing.GroupLayout.PREFERRED_SIZE, 25, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 67, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) @@ -425,8 +444,8 @@ public class ViewPreferencesPanel extends JPanel implements OptionsPanel { currentCaseSettingsPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(currentCaseSettingsPanelLayout.createSequentialGroup() .addContainerGap() - .addComponent(groupByDataSourceCheckbox) - .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) + .addComponent(groupByDataSourceCheckbox, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) + .addGap(474, 474, 474)) ); currentCaseSettingsPanelLayout.setVerticalGroup( currentCaseSettingsPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) @@ -450,8 +469,8 @@ public class ViewPreferencesPanel extends JPanel implements OptionsPanel { currentSessionSettingsPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(currentSessionSettingsPanelLayout.createSequentialGroup() .addContainerGap() - .addComponent(hideRejectedResultsCheckbox, javax.swing.GroupLayout.PREFERRED_SIZE, 259, javax.swing.GroupLayout.PREFERRED_SIZE) - .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) + .addComponent(hideRejectedResultsCheckbox, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) + .addGap(418, 418, 418)) ); currentSessionSettingsPanelLayout.setVerticalGroup( currentSessionSettingsPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) @@ -480,7 +499,7 @@ public class ViewPreferencesPanel extends JPanel implements OptionsPanel { .addComponent(currentCaseSettingsPanel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) .addComponent(currentSessionSettingsPanel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) - .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) + .addGap(0, 0, 0)) ); viewPreferencesScrollPane.setViewportView(viewPreferencesPanel); From 721906cfd918daa369b78713e03506afd46514ae Mon Sep 17 00:00:00 2001 From: William Schaefer Date: Mon, 13 Apr 2020 07:02:03 -0400 Subject: [PATCH 114/137] 6225 undo accidental merged file commit --- .../autopsy/corecomponents/Bundle.properties-MERGED | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/Core/src/org/sleuthkit/autopsy/corecomponents/Bundle.properties-MERGED b/Core/src/org/sleuthkit/autopsy/corecomponents/Bundle.properties-MERGED index 544cfa63c0..f252420726 100755 --- a/Core/src/org/sleuthkit/autopsy/corecomponents/Bundle.properties-MERGED +++ b/Core/src/org/sleuthkit/autopsy/corecomponents/Bundle.properties-MERGED @@ -63,9 +63,9 @@ DataContentViewerHex.totalPageLabel.text_1=100 DataContentViewerHex.pageLabel2.text=Page # Product Information panel -LBL_Description=
    \n Product Version: {0} ({9})
    Sleuth Kit Version: {7}
    Netbeans RCP Build: {8}
    Java: {1}; {2}
    System: {3}; {4}; {5}
    Userdir: {6}
    +LBL_Description=
    \n Product Version: {0} ({9})
    Sleuth Kit Version: {7}
    Netbeans RCP Build: {8}
    Java: {1}; {2}
    System: {3}; {4}; {5}
    Userdir: {6}
    Format_OperatingSystem_Value={0} version {1} running on {2} -LBL_Copyright=
    Autopsy™ is a digital forensics platform based on The Sleuth Kit™ and other tools.
    Copyright © 2003-2018.
    +LBL_Copyright=
    Autopsy™ is a digital forensics platform based on The Sleuth Kit™ and other tools.
    Copyright © 2003-2018.
    SortChooser.dialogTitle=Choose Sort Criteria ThumbnailViewChildren.progress.cancelling=(Cancelling) # {0} - file name @@ -95,7 +95,7 @@ DataResultViewerThumbnail.pageNextButton.text= DataResultViewerThumbnail.imagesLabel.text=Images: DataResultViewerThumbnail.imagesRangeLabel.text=- DataResultViewerThumbnail.pageNumLabel.text=- -DataResultViewerThumbnail.filePathLabel.text=\ \ \ +DataResultViewerThumbnail.filePathLabel.text=\ DataResultViewerThumbnail.goToPageLabel.text=Go to Page: DataResultViewerThumbnail.goToPageField.text= AdvancedConfigurationDialog.cancelButton.text=Cancel @@ -129,9 +129,9 @@ DataResultViewerThumbnail.switchPage.done.errMsg=Error making thumbnails: {0} AboutWindowPanel.actVerboseLogging.text=Activate verbose logging OptionsCategory_Name_Multi_User_Settings=Multi-User OptionsCategory_Keywords_Multi_User_Options=Multi-User Settings -MultiUserSettingsPanel.lbSolrSettings.text=Solr Server Settings +MultiUserSettingsPanel.lbSolrSettings.text=Solr Settings MultiUserSettingsPanel.cbEnableMultiUser.text=Enable multi-user cases -MultiUserSettingsPanel.lbDatabaseSettings.text=Database Server Settings +MultiUserSettingsPanel.lbDatabaseSettings.text=Database Settings MultiUserSettingsPanel.validationErrMsg.incomplete=Fill in all values MultiUserSettingsPanel.nonWindowsOs.msg=Multi-user cases are only available on Windows platforms MultiUserSettingsPanel.validationErrMsg.invalidDatabasePort=Invalid database port number @@ -159,7 +159,7 @@ MultiUserSettingsPanel.tbSolrHostname.toolTipText=Hostname or IP Address MultiUserSettingsPanel.tbSolrPort.toolTipText=Port Number MultiUserSettingsPanel.lbTestMessageService.text= MultiUserSettingsPanel.bnTestMessageService.text=Test -MultiUserSettingsPanel.lbMessageServiceSettings.text=ActiveMQ Message Server Settings +MultiUserSettingsPanel.lbMessageServiceSettings.text=ActiveMQ Message Service Settings MultiUserSettingsPanel.tbMsgPort.toolTipText=Port Number MultiUserSettingsPanel.tbMsgPort.text= MultiUserSettingsPanel.tbMsgUsername.toolTipText=User Name (optional) From 32e536d9a20963530386b24339027bff6b5ccfb9 Mon Sep 17 00:00:00 2001 From: William Schaefer Date: Mon, 13 Apr 2020 11:09:06 -0400 Subject: [PATCH 115/137] 6225 codacy fixes --- .../optionspanel/ManageCasesDialog.form | 2 ++ .../optionspanel/ManageCasesDialog.java | 5 ++- .../DataContentViewerArtifact.java | 2 +- .../autopsy/filequery/ResultsPanel.form | 8 +++++ .../autopsy/filequery/ResultsPanel.java | 12 +++---- ...ataSourceIntegrityIngestSettingsPanel.java | 3 +- .../BingTranslatorSettingsPanel.form | 2 ++ .../BingTranslatorSettingsPanel.java | 5 ++- .../GoogleTranslatorSettingsPanel.form | 13 +++++-- .../GoogleTranslatorSettingsPanel.java | 34 +++++++------------ 10 files changed, 44 insertions(+), 42 deletions(-) diff --git a/Core/src/org/sleuthkit/autopsy/centralrepository/optionspanel/ManageCasesDialog.form b/Core/src/org/sleuthkit/autopsy/centralrepository/optionspanel/ManageCasesDialog.form index 386ad9c76b..9ba0711f55 100644 --- a/Core/src/org/sleuthkit/autopsy/centralrepository/optionspanel/ManageCasesDialog.form +++ b/Core/src/org/sleuthkit/autopsy/centralrepository/optionspanel/ManageCasesDialog.form @@ -307,6 +307,8 @@
    + + diff --git a/Core/src/org/sleuthkit/autopsy/centralrepository/optionspanel/ManageCasesDialog.java b/Core/src/org/sleuthkit/autopsy/centralrepository/optionspanel/ManageCasesDialog.java index b30614585a..2d2cfc38bf 100644 --- a/Core/src/org/sleuthkit/autopsy/centralrepository/optionspanel/ManageCasesDialog.java +++ b/Core/src/org/sleuthkit/autopsy/centralrepository/optionspanel/ManageCasesDialog.java @@ -1,7 +1,7 @@ /* * Central Repository * - * Copyright 2018 Basis Technology Corp. + * Copyright 2018-2020 Basis Technology Corp. * Contact: carrier sleuthkit org * * Licensed under the Apache License, Version 2.0 (the "License"); @@ -122,7 +122,7 @@ final class ManageCasesDialog extends javax.swing.JDialog { examinerEmailValueLabel = new javax.swing.JLabel(); examinerPhoneValueLabel = new javax.swing.JLabel(); closeButton = new javax.swing.JButton(); - filler1 = new javax.swing.Box.Filler(new java.awt.Dimension(0, 0), new java.awt.Dimension(0, 0), new java.awt.Dimension(32767, 0)); + javax.swing.Box.Filler filler1 = new javax.swing.Box.Filler(new java.awt.Dimension(0, 0), new java.awt.Dimension(0, 0), new java.awt.Dimension(32767, 0)); casesPanel = new javax.swing.JPanel(); casesScrollPane = new javax.swing.JScrollPane(); casesTable = new javax.swing.JTable(); @@ -412,7 +412,6 @@ final class ManageCasesDialog extends javax.swing.JDialog { private javax.swing.JLabel examinerNameValueLabel; private javax.swing.JLabel examinerPhoneLabel; private javax.swing.JLabel examinerPhoneValueLabel; - private javax.swing.Box.Filler filler1; private javax.swing.JLabel notesLabel; private javax.swing.JScrollPane notesScrollPane; private javax.swing.JTextArea notesTextArea; diff --git a/Core/src/org/sleuthkit/autopsy/corecomponents/DataContentViewerArtifact.java b/Core/src/org/sleuthkit/autopsy/corecomponents/DataContentViewerArtifact.java index 79aa2057e2..6db644be4f 100644 --- a/Core/src/org/sleuthkit/autopsy/corecomponents/DataContentViewerArtifact.java +++ b/Core/src/org/sleuthkit/autopsy/corecomponents/DataContentViewerArtifact.java @@ -1,7 +1,7 @@ /* * Autopsy Forensic Browser * - * Copyright 2011-2018 Basis Technology Corp. + * Copyright 2011-2020 Basis Technology Corp. * Contact: carrier sleuthkit org * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/Core/src/org/sleuthkit/autopsy/filequery/ResultsPanel.form b/Core/src/org/sleuthkit/autopsy/filequery/ResultsPanel.form index e7708facf4..09e12b5693 100644 --- a/Core/src/org/sleuthkit/autopsy/filequery/ResultsPanel.form +++ b/Core/src/org/sleuthkit/autopsy/filequery/ResultsPanel.form @@ -247,6 +247,8 @@ + + @@ -262,6 +264,8 @@ + + @@ -277,6 +281,8 @@ + + @@ -292,6 +298,8 @@ + + diff --git a/Core/src/org/sleuthkit/autopsy/filequery/ResultsPanel.java b/Core/src/org/sleuthkit/autopsy/filequery/ResultsPanel.java index 5dbdca0089..0acc2e1bf3 100644 --- a/Core/src/org/sleuthkit/autopsy/filequery/ResultsPanel.java +++ b/Core/src/org/sleuthkit/autopsy/filequery/ResultsPanel.java @@ -421,10 +421,10 @@ public class ResultsPanel extends javax.swing.JPanel { gotoPageField = new javax.swing.JTextField(); javax.swing.JLabel pageSizeLabel = new javax.swing.JLabel(); pageSizeComboBox = new javax.swing.JComboBox<>(); - filler1 = new javax.swing.Box.Filler(new java.awt.Dimension(0, 0), new java.awt.Dimension(0, 0), new java.awt.Dimension(32767, 0)); - filler2 = new javax.swing.Box.Filler(new java.awt.Dimension(0, 0), new java.awt.Dimension(0, 0), new java.awt.Dimension(32767, 0)); - filler3 = new javax.swing.Box.Filler(new java.awt.Dimension(0, 0), new java.awt.Dimension(0, 0), new java.awt.Dimension(32767, 0)); - filler4 = new javax.swing.Box.Filler(new java.awt.Dimension(0, 0), new java.awt.Dimension(0, 0), new java.awt.Dimension(32767, 0)); + javax.swing.Box.Filler filler1 = new javax.swing.Box.Filler(new java.awt.Dimension(0, 0), new java.awt.Dimension(0, 0), new java.awt.Dimension(32767, 0)); + javax.swing.Box.Filler filler2 = new javax.swing.Box.Filler(new java.awt.Dimension(0, 0), new java.awt.Dimension(0, 0), new java.awt.Dimension(32767, 0)); + javax.swing.Box.Filler filler3 = new javax.swing.Box.Filler(new java.awt.Dimension(0, 0), new java.awt.Dimension(0, 0), new java.awt.Dimension(32767, 0)); + javax.swing.Box.Filler filler4 = new javax.swing.Box.Filler(new java.awt.Dimension(0, 0), new java.awt.Dimension(0, 0), new java.awt.Dimension(32767, 0)); javax.swing.JSplitPane resultsSplitPane = new javax.swing.JSplitPane(); javax.swing.JPanel instancesPanel = new javax.swing.JPanel(); javax.swing.JScrollPane instancesScrollPane = new javax.swing.JScrollPane(); @@ -718,10 +718,6 @@ public class ResultsPanel extends javax.swing.JPanel { // Variables declaration - do not modify//GEN-BEGIN:variables private javax.swing.JLabel currentPageLabel; - private javax.swing.Box.Filler filler1; - private javax.swing.Box.Filler filler2; - private javax.swing.Box.Filler filler3; - private javax.swing.Box.Filler filler4; private javax.swing.JTextField gotoPageField; private javax.swing.JList instancesList; private javax.swing.JButton nextPageButton; diff --git a/Core/src/org/sleuthkit/autopsy/modules/dataSourceIntegrity/DataSourceIntegrityIngestSettingsPanel.java b/Core/src/org/sleuthkit/autopsy/modules/dataSourceIntegrity/DataSourceIntegrityIngestSettingsPanel.java index 37537f714a..2c83297673 100644 --- a/Core/src/org/sleuthkit/autopsy/modules/dataSourceIntegrity/DataSourceIntegrityIngestSettingsPanel.java +++ b/Core/src/org/sleuthkit/autopsy/modules/dataSourceIntegrity/DataSourceIntegrityIngestSettingsPanel.java @@ -20,7 +20,6 @@ package org.sleuthkit.autopsy.modules.dataSourceIntegrity; import org.sleuthkit.autopsy.ingest.IngestModuleIngestJobSettings; import org.sleuthkit.autopsy.ingest.IngestModuleIngestJobSettingsPanel; -import org.sleuthkit.autopsy.corecomponents.AutoWrappingJTextPane; /** * Ingest job settings panel for the Correlation Engine module. @@ -31,7 +30,7 @@ final class DataSourceIntegrityIngestSettingsPanel extends IngestModuleIngestJob /** * Creates new form DataSourceIntegrityIngestSettingsPanel */ - public DataSourceIntegrityIngestSettingsPanel(DataSourceIntegrityIngestSettings settings) { + DataSourceIntegrityIngestSettingsPanel(DataSourceIntegrityIngestSettings settings) { initComponents(); customizeComponents(settings); } diff --git a/Core/src/org/sleuthkit/autopsy/texttranslation/translators/BingTranslatorSettingsPanel.form b/Core/src/org/sleuthkit/autopsy/texttranslation/translators/BingTranslatorSettingsPanel.form index 5cacffe9a3..18cd9b97af 100644 --- a/Core/src/org/sleuthkit/autopsy/texttranslation/translators/BingTranslatorSettingsPanel.form +++ b/Core/src/org/sleuthkit/autopsy/texttranslation/translators/BingTranslatorSettingsPanel.form @@ -221,6 +221,8 @@ + + diff --git a/Core/src/org/sleuthkit/autopsy/texttranslation/translators/BingTranslatorSettingsPanel.java b/Core/src/org/sleuthkit/autopsy/texttranslation/translators/BingTranslatorSettingsPanel.java index 19d6b98944..621aec9d2a 100644 --- a/Core/src/org/sleuthkit/autopsy/texttranslation/translators/BingTranslatorSettingsPanel.java +++ b/Core/src/org/sleuthkit/autopsy/texttranslation/translators/BingTranslatorSettingsPanel.java @@ -1,7 +1,7 @@ /* * Autopsy * - * Copyright 2019 Basis Technology Corp. + * Copyright 2019-2020 Basis Technology Corp. * Contact: carrier sleuthkit org * * Licensed under the Apache License, Version 2.0 (the "License"); @@ -141,7 +141,7 @@ public class BingTranslatorSettingsPanel extends javax.swing.JPanel { authenticationKeyLabel = new javax.swing.JLabel(); instructionsScrollPane = new javax.swing.JScrollPane(); instructionsTextArea = new javax.swing.JTextArea(); - filler1 = new javax.swing.Box.Filler(new java.awt.Dimension(0, 0), new java.awt.Dimension(0, 0), new java.awt.Dimension(32767, 0)); + javax.swing.Box.Filler filler1 = new javax.swing.Box.Filler(new java.awt.Dimension(0, 0), new java.awt.Dimension(0, 0), new java.awt.Dimension(32767, 0)); setLayout(new java.awt.GridBagLayout()); @@ -315,7 +315,6 @@ public class BingTranslatorSettingsPanel extends javax.swing.JPanel { // Variables declaration - do not modify//GEN-BEGIN:variables private javax.swing.JTextField authenticationKeyField; private javax.swing.JLabel authenticationKeyLabel; - private javax.swing.Box.Filler filler1; private javax.swing.JScrollPane instructionsScrollPane; private javax.swing.JTextArea instructionsTextArea; private javax.swing.JLabel resultLabel; diff --git a/Core/src/org/sleuthkit/autopsy/texttranslation/translators/GoogleTranslatorSettingsPanel.form b/Core/src/org/sleuthkit/autopsy/texttranslation/translators/GoogleTranslatorSettingsPanel.form index c30c056b62..67bf16ebf9 100644 --- a/Core/src/org/sleuthkit/autopsy/texttranslation/translators/GoogleTranslatorSettingsPanel.form +++ b/Core/src/org/sleuthkit/autopsy/texttranslation/translators/GoogleTranslatorSettingsPanel.form @@ -25,6 +25,10 @@ + + + + @@ -41,9 +45,6 @@ - - - @@ -90,6 +91,10 @@ + + + + @@ -238,6 +243,8 @@ + + diff --git a/Core/src/org/sleuthkit/autopsy/texttranslation/translators/GoogleTranslatorSettingsPanel.java b/Core/src/org/sleuthkit/autopsy/texttranslation/translators/GoogleTranslatorSettingsPanel.java index 3e5782515e..b9c6b852b1 100644 --- a/Core/src/org/sleuthkit/autopsy/texttranslation/translators/GoogleTranslatorSettingsPanel.java +++ b/Core/src/org/sleuthkit/autopsy/texttranslation/translators/GoogleTranslatorSettingsPanel.java @@ -1,7 +1,7 @@ /* * Autopsy * - * Copyright 2019 Basis Technology Corp. + * Copyright 2019-2020 Basis Technology Corp. * Contact: carrier sleuthkit org * * Licensed under the Apache License, Version 2.0 (the "License"); @@ -186,11 +186,11 @@ public class GoogleTranslatorSettingsPanel extends javax.swing.JPanel { private void initComponents() { java.awt.GridBagConstraints gridBagConstraints; - credentialsLabel = new javax.swing.JLabel(); + javax.swing.JLabel credentialsLabel = new javax.swing.JLabel(); credentialsPathField = new javax.swing.JTextField(); browseButton = new javax.swing.JButton(); targetLanguageComboBox = new javax.swing.JComboBox<>(); - targetLanguageLabel = new javax.swing.JLabel(); + javax.swing.JLabel targetLanguageLabel = new javax.swing.JLabel(); warningLabel = new javax.swing.JLabel(); testResultValueLabel = new javax.swing.JLabel(); resultLabel = new javax.swing.JLabel(); @@ -199,7 +199,7 @@ public class GoogleTranslatorSettingsPanel extends javax.swing.JPanel { testButton = new javax.swing.JButton(); instructionsScrollPane = new javax.swing.JScrollPane(); instructionsTextArea = new javax.swing.JTextArea(); - filler1 = new javax.swing.Box.Filler(new java.awt.Dimension(0, 0), new java.awt.Dimension(0, 0), new java.awt.Dimension(32767, 0)); + javax.swing.Box.Filler filler1 = new javax.swing.Box.Filler(new java.awt.Dimension(0, 0), new java.awt.Dimension(0, 0), new java.awt.Dimension(32767, 0)); setLayout(new java.awt.GridBagLayout()); @@ -217,11 +217,6 @@ public class GoogleTranslatorSettingsPanel extends javax.swing.JPanel { credentialsPathField.setEditable(false); credentialsPathField.setMaximumSize(new java.awt.Dimension(700, 22)); credentialsPathField.setPreferredSize(new java.awt.Dimension(100, 22)); - credentialsPathField.addActionListener(new java.awt.event.ActionListener() { - public void actionPerformed(java.awt.event.ActionEvent evt) { - credentialsPathFieldActionPerformed(evt); - } - }); gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.gridx = 3; gridBagConstraints.gridy = 1; @@ -406,20 +401,13 @@ public class GoogleTranslatorSettingsPanel extends javax.swing.JPanel { } }//GEN-LAST:event_testButtonActionPerformed - private void credentialsPathFieldActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_credentialsPathFieldActionPerformed - // TODO add your handling code here: - }//GEN-LAST:event_credentialsPathFieldActionPerformed - // Variables declaration - do not modify//GEN-BEGIN:variables private javax.swing.JButton browseButton; - private javax.swing.JLabel credentialsLabel; private javax.swing.JTextField credentialsPathField; - private javax.swing.Box.Filler filler1; private javax.swing.JScrollPane instructionsScrollPane; private javax.swing.JTextArea instructionsTextArea; private javax.swing.JLabel resultLabel; private javax.swing.JComboBox targetLanguageComboBox; - private javax.swing.JLabel targetLanguageLabel; private javax.swing.JButton testButton; private javax.swing.JLabel testResultValueLabel; private javax.swing.JTextField testUntranslatedTextField; @@ -428,26 +416,28 @@ public class GoogleTranslatorSettingsPanel extends javax.swing.JPanel { // End of variables declaration//GEN-END:variables /** - * Get the currently selected target language code + * Get the currently selected target language code. * - * @return the target language code of the language selected in the combobox + * @return The target language code of the language selected in the combo + * box. */ String getTargetLanguageCode() { return targetLanguageCode; } /** - * Get the currently set path to the JSON credentials file + * Get the currently set path to the JSON credentials file. * - * @return the path to the credentials file specified in the textarea + * @return The path to the credentials file specified in the credentials + * field. */ String getCredentialsPath() { return credentialsPathField.getText(); } /** - * Listener to identfy when a combo box item has been selected and update - * the combo box to reflect that + * Listener to identify when a combo box item has been selected and update + * the combo box to reflect that selection. */ private class ComboBoxSelectionListener implements ItemListener { From 9597e3cabd6be70fb94afbaedde42066d9f74d3d Mon Sep 17 00:00:00 2001 From: Greg DiCristofaro Date: Mon, 13 Apr 2020 13:38:41 -0400 Subject: [PATCH 116/137] initial commit --- .../org/sleuthkit/autopsy/core/Installer.java | 21 ++++++++++++++++++- .../autopsy/python/JythonModuleLoader.java | 2 +- 2 files changed, 21 insertions(+), 2 deletions(-) diff --git a/Core/src/org/sleuthkit/autopsy/core/Installer.java b/Core/src/org/sleuthkit/autopsy/core/Installer.java index 65b5fbacdb..37decea601 100644 --- a/Core/src/org/sleuthkit/autopsy/core/Installer.java +++ b/Core/src/org/sleuthkit/autopsy/core/Installer.java @@ -47,6 +47,7 @@ import org.sleuthkit.autopsy.coreutils.MessageNotifyUtil; import org.sleuthkit.autopsy.coreutils.ModuleSettings; import org.sleuthkit.autopsy.coreutils.PlatformUtil; import org.sleuthkit.autopsy.modules.filetypeid.FileTypeDetector; +import org.sleuthkit.autopsy.python.JythonModuleLoader; /** * Wrapper over Installers in packages in Core module. This is the main @@ -389,7 +390,25 @@ public class Installer extends ModuleInstall { logger.log(Level.WARNING, msg, e); } } - logger.log(Level.INFO, "Autopsy Core restore completed"); //NON-NLS + logger.log(Level.INFO, "Autopsy Core restore completed"); //NON-NLS + preloadJython(); + } + + + /** + * Runs an initial load of the Jython modules to speed ub subsequent loads. + */ + private void preloadJython() { + Runnable loader = () -> { + try { + JythonModuleLoader.getIngestModuleFactories(); + } + catch (Exception ex) { + logger.log(Level.SEVERE, "There was an error while pre-loading jython submodules.", ex); + } + + }; + new Thread(loader).run(); } @Override diff --git a/Core/src/org/sleuthkit/autopsy/python/JythonModuleLoader.java b/Core/src/org/sleuthkit/autopsy/python/JythonModuleLoader.java index 04f5e49a1e..e16e98d62c 100644 --- a/Core/src/org/sleuthkit/autopsy/python/JythonModuleLoader.java +++ b/Core/src/org/sleuthkit/autopsy/python/JythonModuleLoader.java @@ -56,7 +56,7 @@ public final class JythonModuleLoader { * @return A list of objects that implement the IngestModuleFactory * interface. */ - public static List getIngestModuleFactories() { + public static synchronized List getIngestModuleFactories() { return getInterfaceImplementations(new IngestModuleFactoryDefFilter(), IngestModuleFactory.class); } From 26b7094e18b789998636b5e644e8cb6f277d843b Mon Sep 17 00:00:00 2001 From: William Schaefer Date: Mon, 13 Apr 2020 14:20:53 -0400 Subject: [PATCH 117/137] 6225 second attempt at fixing screenshot 2 --- .../datamodel/CentralRepoDbManager.java | 255 ++++++++++-------- .../optionspanel/EamDbSettingsDialog.form | 60 +++-- .../optionspanel/EamDbSettingsDialog.java | 232 ++++++++-------- 3 files changed, 306 insertions(+), 241 deletions(-) diff --git a/Core/src/org/sleuthkit/autopsy/centralrepository/datamodel/CentralRepoDbManager.java b/Core/src/org/sleuthkit/autopsy/centralrepository/datamodel/CentralRepoDbManager.java index 3fab7af47f..b0f288673b 100755 --- a/Core/src/org/sleuthkit/autopsy/centralrepository/datamodel/CentralRepoDbManager.java +++ b/Core/src/org/sleuthkit/autopsy/centralrepository/datamodel/CentralRepoDbManager.java @@ -30,7 +30,8 @@ import org.sleuthkit.autopsy.coreutils.Logger; import org.sleuthkit.autopsy.coreutils.ModuleSettings; /** - * This class contains business logic for saving and validating settings for central repository. + * This class contains business logic for saving and validating settings for + * central repository. */ public class CentralRepoDbManager { @@ -42,35 +43,40 @@ public class CentralRepoDbManager { private static final String DISABLED_DUE_TO_FAILURE_KEY = "disabledDueToFailure"; private static volatile CentralRepoDbChoice savedChoice = null; - + private static final PropertyChangeSupport propertyChangeSupport = new PropertyChangeSupport(CentralRepoDbManager.class); - + private static final Object dbChoiceLock = new Object(); private static final Object disabledDueToFailureLock = new Object(); - - - + /** - * This saves the currently selected database choice and clears any disabledDueToFailure flag. - * @param choice The choice to save. - * @return The newly saved choice. + * This saves the currently selected database choice and clears any + * disabledDueToFailure flag. + * + * @param choice The choice to save. + * + * @return The newly saved choice. */ public static CentralRepoDbChoice saveDbChoice(CentralRepoDbChoice choice) { return saveDbChoice(choice, true); } - + /** * This saves the currently selected database choice. - * @param choice The choice to save. - * @param clearDisabledDueToError Whether or not to clear the 'disabledDueToFailure' settings key. - * @return The newly saved choice. + * + * @param choice The choice to save. + * @param clearDisabledDueToError Whether or not to clear the + * 'disabledDueToFailure' settings key. + * + * @return The newly saved choice. */ public static CentralRepoDbChoice saveDbChoice(CentralRepoDbChoice choice, boolean clearDisabledDueToError) { - synchronized(dbChoiceLock) { + synchronized (dbChoiceLock) { // clear disabling due to a failure - if (clearDisabledDueToError) + if (clearDisabledDueToError) { setDisabledDueToFailure(false); - + } + // change the settings CentralRepoDbChoice newChoice = (choice == null) ? CentralRepoDbChoice.DISABLED : choice; CentralRepoDbChoice oldChoice = savedChoice; @@ -81,55 +87,61 @@ public class CentralRepoDbManager { } } - + /** - * This method indicates whether or not 'PostgreSQL using multi-user settings' is a valid option. - * @return True if 'PostgreSQL using multi-user settings' is valid. + * This method indicates whether or not 'PostgreSQL using multi-user + * settings' is a valid option. + * + * @return True if 'PostgreSQL using multi-user settings' is valid. */ public static boolean isPostgresMultiuserAllowed() { // if multi user mode is not enabled, then this cannot be used - if (!UserPreferences.getIsMultiUserModeEnabled()) + if (!UserPreferences.getIsMultiUserModeEnabled()) { return false; - + } // also validate the connection as well - PostgresCentralRepoSettings multiUserSettings = - new PostgresCentralRepoSettings(PostgresSettingsLoader.MULTIUSER_SETTINGS_LOADER); - + PostgresCentralRepoSettings multiUserSettings + = new PostgresCentralRepoSettings(PostgresSettingsLoader.MULTIUSER_SETTINGS_LOADER); + return multiUserSettings.testStatus() == DatabaseTestResult.TESTED_OK; } - /** - * This method loads the selectedPlatform boolean from the config file if it is set. + * This method loads the selectedPlatform boolean from the config file if it + * is set. */ public static CentralRepoDbChoice getSavedDbChoice() { - synchronized(dbChoiceLock) { + synchronized (dbChoiceLock) { if (savedChoice == null) { String selectedPlatformString = ModuleSettings.getConfigSetting(CENTRAL_REPOSITORY_SETTINGS_KEY, DB_SELECTED_PLATFORM_KEY); // NON-NLS savedChoice = fromKey(selectedPlatformString); } - return savedChoice; + return savedChoice; } } - + /** - * This method disables the central repository and indicates through a flag that this was due to a failure during database setup. - * This is used when re-enabling multi-user as a flag to determine whether or not CR should be re-enabled. + * This method disables the central repository and indicates through a flag + * that this was due to a failure during database setup. This is used when + * re-enabling multi-user as a flag to determine whether or not CR should be + * re-enabled. */ public static void disableDueToFailure() { CentralRepoDbUtil.setUseCentralRepo(false); setDisabledDueToFailure(true); } - + /** - * This method sets whether or not the repository has been disabled due to a database setup issue; - * This is used when re-enabling multi-user as a flag to determine whether or not CR should be re-enabled. - * - * @param disabledDueToFailure Whether or not the repository has been disabled due to a database setup issue. + * This method sets whether or not the repository has been disabled due to a + * database setup issue; This is used when re-enabling multi-user as a flag + * to determine whether or not CR should be re-enabled. + * + * @param disabledDueToFailure Whether or not the repository has been + * disabled due to a database setup issue. */ private static void setDisabledDueToFailure(boolean disabledDueToFailure) { - synchronized(disabledDueToFailureLock) { + synchronized (disabledDueToFailureLock) { boolean oldValue = isDisabledDueToFailure(); ModuleSettings.setConfigSetting(CENTRAL_REPOSITORY_SETTINGS_KEY, DISABLED_DUE_TO_FAILURE_KEY, Boolean.toString(disabledDueToFailure)); propertyChangeSupport.firePropertyChange("disabledDueToFailure", oldValue, disabledDueToFailure); @@ -137,36 +149,38 @@ public class CentralRepoDbManager { } /** - * This method retrieves setting whether or not the repository has been disabled due to a database setup issue; - * this is used when re-enabling multi-user as a flag to determine whether or not CR should be re-enabled. - * - * @return Whether or not the repository has been disabled due to a database setup issue. + * This method retrieves setting whether or not the repository has been + * disabled due to a database setup issue; this is used when re-enabling + * multi-user as a flag to determine whether or not CR should be re-enabled. + * + * @return Whether or not the repository has been disabled due to a database + * setup issue. */ public static boolean isDisabledDueToFailure() { - synchronized(disabledDueToFailureLock) { + synchronized (disabledDueToFailureLock) { return Boolean.toString(true).equals(ModuleSettings.getConfigSetting(CENTRAL_REPOSITORY_SETTINGS_KEY, DISABLED_DUE_TO_FAILURE_KEY)); } } /** - * This method adds a property change listener. - * NOTE: currently only listening for changes in currently saved db choice and disabling due to failure. - * - * @param listener The listener for the event. + * This method adds a property change listener. NOTE: currently only + * listening for changes in currently saved db choice and disabling due to + * failure. + * + * @param listener The listener for the event. */ public static void addPropertyChangeListener(PropertyChangeListener listener) { - propertyChangeSupport.addPropertyChangeListener(listener); - } + propertyChangeSupport.addPropertyChangeListener(listener); + } /** * This method removes a propert change listener. - * @param listener The listener to remove. + * + * @param listener The listener to remove. */ - public static void removePropertyChangeListener(PropertyChangeListener listener) { - propertyChangeSupport.removePropertyChangeListener(listener); - } - - + public static void removePropertyChangeListener(PropertyChangeListener listener) { + propertyChangeSupport.removePropertyChangeListener(listener); + } private static CentralRepoDbChoice fromKey(String keyName) { for (CentralRepoDbChoice dbChoice : CentralRepoDbChoice.values()) { @@ -178,12 +192,11 @@ public class CentralRepoDbManager { return CentralRepoDbChoice.DISABLED; } - - /** * This method obtains the database connectivity for central repository. * * @return The CentralRepository object that will be used for connection. + * * @throws CentralRepoException */ private static CentralRepository obtainCentralRepository() throws CentralRepoException { @@ -203,8 +216,10 @@ public class CentralRepoDbManager { /** * This method obtains a central repository lock. * - * @param db The database connection. - * @return The lock if acquired. + * @param db The database connection. + * + * @return The lock if acquired. + * * @throws CentralRepoException */ private static CoordinationService.Lock obtainCentralRepoLock(CentralRepository db) throws CentralRepoException { @@ -227,8 +242,9 @@ public class CentralRepoDbManager { /** * This method updates the central repository schema if necessary. * - * @param db The database connectivity object. - * @param lock The acquired lock. + * @param db The database connectivity object. + * @param lock The acquired lock. + * * @throws CentralRepoException */ private static void updatedDbSchema(CentralRepository db, CoordinationService.Lock lock) throws CentralRepoException { @@ -257,9 +273,9 @@ public class CentralRepoDbManager { } /** - * This method upgrades the current Central Reposity schema to the newest version. If the - * upgrade fails, the Central Repository will be disabled and the current - * settings will be cleared. + * This method upgrades the current Central Reposity schema to the newest + * version. If the upgrade fails, the Central Repository will be disabled + * and the current settings will be cleared. */ @NbBundle.Messages(value = {"EamDbUtil.centralRepoDisabled.message= The Central Repository has been disabled.", "EamDbUtil.centralRepoUpgradeFailed.message=Failed to upgrade Central Repository.", "EamDbUtil.centralRepoConnectionFailed.message=Unable to connect to Central Repository.", "EamDbUtil.exclusiveLockAquisitionFailure.message=Unable to acquire exclusive lock for Central Repository."}) public static void upgradeDatabase() throws CentralRepoException { @@ -296,8 +312,6 @@ public class CentralRepoDbManager { } } - - private DatabaseTestResult testingStatus; private CentralRepoDbChoice selectedDbChoice; @@ -314,10 +328,10 @@ public class CentralRepoDbManager { dbSettingsSqlite = new SqliteCentralRepoSettings(); } - /** * This method retrieves the current multi-user database settings. - * @return The current multi-user database settings. + * + * @return The current multi-user database settings. */ public PostgresCentralRepoSettings getDbSettingsMultiUser() { return dbSettingsMultiUser; @@ -325,15 +339,18 @@ public class CentralRepoDbManager { /** * This method retrieves the current custom postgres database settings. - * @return The current custom postgres database settings. + * + * @return The current custom postgres database settings. */ public PostgresCentralRepoSettings getDbSettingsPostgres() { return dbSettingsPostgres; } /** - * This method returns the current SQLite database settings for central repository. - * @return The current SQLite database settings + * This method returns the current SQLite database settings for central + * repository. + * + * @return The current SQLite database settings */ public SqliteCentralRepoSettings getDbSettingsSqlite() { return dbSettingsSqlite; @@ -341,7 +358,8 @@ public class CentralRepoDbManager { /** * This method sets up the sqlite database with default settings. - * @throws CentralRepoException if unable to successfully set up database. + * + * @throws CentralRepoException if unable to successfully set up database. */ public void setupDefaultSqliteDb() throws CentralRepoException { // change in-memory settings to default sqlite @@ -354,67 +372,78 @@ public class CentralRepoDbManager { createDb(); curStatus = testStatus(); } - + // the only successful setup status is tested ok if (curStatus != DatabaseTestResult.TESTED_OK) { throw new CentralRepoException("Unable to successfully create sqlite database"); } - + // if successfully got here, then save the settings CentralRepoDbUtil.setUseCentralRepo(true); saveNewCentralRepo(); } /** - * This method returns if changes to the central repository configuration were - * successfully applied. + * This method returns if changes to the central repository configuration + * were successfully applied. * - * @return Returns true if the database configuration was successfully changed false - * if it was not. + * @return Returns true if the database configuration was successfully + * changed false if it was not. */ public boolean wasConfigurationChanged() { return configurationChanged; } private CentralRepoDbConnectivityManager getSelectedSettings() throws CentralRepoException { - if (selectedDbChoice == CentralRepoDbChoice.POSTGRESQL_MULTIUSER) + if (selectedDbChoice == CentralRepoDbChoice.POSTGRESQL_MULTIUSER) { return dbSettingsMultiUser; - if (selectedDbChoice == CentralRepoDbChoice.POSTGRESQL_CUSTOM) + } + if (selectedDbChoice == CentralRepoDbChoice.POSTGRESQL_CUSTOM) { return dbSettingsPostgres; - if (selectedDbChoice == CentralRepoDbChoice.SQLITE) + } + if (selectedDbChoice == CentralRepoDbChoice.SQLITE) { return dbSettingsSqlite; - if (selectedDbChoice == CentralRepoDbChoice.DISABLED) + } + if (selectedDbChoice == CentralRepoDbChoice.DISABLED) { return null; - - throw new CentralRepoException("Unknown database type: " + selectedDbChoice); + } + + throw new CentralRepoException("Unknown database type: " + selectedDbChoice); } private RdbmsCentralRepoFactory getDbFactory() throws CentralRepoException { - if (selectedDbChoice == CentralRepoDbChoice.POSTGRESQL_MULTIUSER) + if (selectedDbChoice == CentralRepoDbChoice.POSTGRESQL_MULTIUSER) { return new RdbmsCentralRepoFactory(CentralRepoPlatforms.POSTGRESQL, dbSettingsMultiUser); - if (selectedDbChoice == CentralRepoDbChoice.POSTGRESQL_CUSTOM) + } + if (selectedDbChoice == CentralRepoDbChoice.POSTGRESQL_CUSTOM) { return new RdbmsCentralRepoFactory(CentralRepoPlatforms.POSTGRESQL, dbSettingsPostgres); - if (selectedDbChoice == CentralRepoDbChoice.SQLITE) + } + if (selectedDbChoice == CentralRepoDbChoice.SQLITE) { return new RdbmsCentralRepoFactory(CentralRepoPlatforms.SQLITE, dbSettingsSqlite); - if (selectedDbChoice == CentralRepoDbChoice.DISABLED) + } + if (selectedDbChoice == CentralRepoDbChoice.DISABLED) { return null; - + } + throw new CentralRepoException("Unknown database type: " + selectedDbChoice); } /** * This method creates a central repo database if it does not already exist. - * @return True if successful; false if unsuccessful. + * + * @return True if successful; false if unsuccessful. + * * @throws CentralRepoException */ public boolean createDb() throws CentralRepoException { CentralRepoDbConnectivityManager selectedDbSettings = getSelectedSettings(); - if (selectedDbSettings == null) + if (selectedDbSettings == null) { throw new CentralRepoException("Unable to derive connectivity manager from settings: " + selectedDbChoice); + } boolean result = false; boolean dbCreated = true; - + if (!selectedDbSettings.verifyDatabaseExists()) { dbCreated = selectedDbSettings.createDatabase(); } @@ -493,18 +522,20 @@ public class CentralRepoDbManager { } /** - * This method retrieves the current status. - * Note: this could be a dirty value if testing of the connection has not been performed. - * @return The current status of the database connection. + * This method retrieves the current status. Note: this could be a dirty + * value if testing of the connection has not been performed. + * + * @return The current status of the database connection. */ public DatabaseTestResult getStatus() { return testingStatus; } /** - * This method retrieves the currently selected database choice. - * NOTE: This choice may not align with the saved setting. - * @return The currently selected database choice. + * This method retrieves the currently selected database choice. NOTE: This + * choice may not align with the saved setting. + * + * @return The currently selected database choice. */ public CentralRepoDbChoice getSelectedDbChoice() { return selectedDbChoice; @@ -518,8 +549,10 @@ public class CentralRepoDbManager { } /** - * This method sets the currently selected database choice and sets the testing status to untested. - * @param newSelected The new database choice. + * This method sets the currently selected database choice and sets the + * testing status to untested. + * + * @param newSelected The new database choice. */ public void setSelctedDbChoice(CentralRepoDbChoice newSelected) { selectedDbChoice = newSelected; @@ -527,8 +560,8 @@ public class CentralRepoDbManager { } /** - * This method tests whether or not the settings have been filled in for the UI. - * NOTE: This does not check the connectivity status of these settings. + * This method tests whether or not the settings have been filled in for the + * UI. NOTE: This does not check the connectivity status of these settings. * * @return True if database settings are valid. */ @@ -541,13 +574,11 @@ public class CentralRepoDbManager { dbSettingsPostgres.setDbName(CENTRAL_REPO_DB_NAME); dbSettingsPostgres.setUserName(tbDbUsername); dbSettingsPostgres.setPassword(jpDbPassword); - } - else if (selectedDbChoice == CentralRepoDbChoice.SQLITE) { + } else if (selectedDbChoice == CentralRepoDbChoice.SQLITE) { File databasePath = new File(tfDatabasePath); dbSettingsSqlite.setDbName(SqliteCentralRepoSettings.DEFAULT_DBNAME); dbSettingsSqlite.setDbDirectory(databasePath.getPath()); - } - else if (selectedDbChoice != CentralRepoDbChoice.POSTGRESQL_MULTIUSER) { + } else if (selectedDbChoice != CentralRepoDbChoice.POSTGRESQL_MULTIUSER) { throw new IllegalStateException("Central Repo has an unknown selected platform: " + selectedDbChoice); } @@ -555,19 +586,21 @@ public class CentralRepoDbManager { } /** - * This method tests the current database settings to see if a valid connection can be made. - * @return The result of testing the connection. + * This method tests the current database settings to see if a valid + * connection can be made. + * + * @return The result of testing the connection. */ public DatabaseTestResult testStatus() { try { CentralRepoDbConnectivityManager manager = getSelectedSettings(); - if (manager != null) + if (manager != null) { testingStatus = manager.testStatus(); - } - catch (CentralRepoException e) { + } + } catch (CentralRepoException e) { logger.log(Level.WARNING, "unable to test status of db connection in central repo", e); } - + return testingStatus; } } diff --git a/Core/src/org/sleuthkit/autopsy/centralrepository/optionspanel/EamDbSettingsDialog.form b/Core/src/org/sleuthkit/autopsy/centralrepository/optionspanel/EamDbSettingsDialog.form index 8d074c0ef3..d8460c48c7 100644 --- a/Core/src/org/sleuthkit/autopsy/centralrepository/optionspanel/EamDbSettingsDialog.form +++ b/Core/src/org/sleuthkit/autopsy/centralrepository/optionspanel/EamDbSettingsDialog.form @@ -38,7 +38,7 @@ - + @@ -94,8 +94,11 @@ + + + - + @@ -109,8 +112,11 @@ + + + - + @@ -127,7 +133,7 @@ - + @@ -136,8 +142,11 @@ + + + - + @@ -154,7 +163,7 @@ - + @@ -163,8 +172,11 @@ + + + - + @@ -181,7 +193,7 @@ - + @@ -190,8 +202,11 @@ + + + - + @@ -208,7 +223,7 @@ - +
    @@ -218,13 +233,13 @@ - + - + @@ -238,8 +253,11 @@ + + + - + @@ -296,7 +314,7 @@ - + @@ -304,11 +322,11 @@ - - - + + + - + @@ -362,10 +380,10 @@ - - + + - + diff --git a/Core/src/org/sleuthkit/autopsy/centralrepository/optionspanel/EamDbSettingsDialog.java b/Core/src/org/sleuthkit/autopsy/centralrepository/optionspanel/EamDbSettingsDialog.java index fb78f049b5..675e7c8807 100644 --- a/Core/src/org/sleuthkit/autopsy/centralrepository/optionspanel/EamDbSettingsDialog.java +++ b/Core/src/org/sleuthkit/autopsy/centralrepository/optionspanel/EamDbSettingsDialog.java @@ -41,7 +41,6 @@ import javax.swing.SwingUtilities; import javax.swing.event.DocumentEvent; import javax.swing.event.DocumentListener; import javax.swing.filechooser.FileFilter; -import org.netbeans.spi.options.OptionsPanelController; import org.openide.util.NbBundle; import org.openide.util.NbBundle.Messages; import org.openide.windows.WindowManager; @@ -61,15 +60,17 @@ import org.sleuthkit.autopsy.centralrepository.datamodel.SqliteCentralRepoSettin public class EamDbSettingsDialog extends JDialog { private static final Logger logger = Logger.getLogger(EamDbSettingsDialog.class.getName()); - + private static final long serialVersionUID = 1L; - + /** - * This class handles displaying and rendering drop down menu for database choices in central repo. + * This class handles displaying and rendering drop down menu for database + * choices in central repo. */ private class DbChoiceRenderer extends JLabel implements ListCellRenderer, Serializable { + private static final long serialVersionUID = 1L; - + @Override public Component getListCellRendererComponent( JList list, CentralRepoDbChoice value, @@ -82,22 +83,20 @@ public class EamDbSettingsDialog extends JDialog { return this; } } - - + private final Collection textBoxes; private final TextBoxChangedListener textBoxChangedListener; private final CentralRepoDbManager manager = new CentralRepoDbManager(); private final DbChoiceRenderer DB_CHOICE_RENDERER = new DbChoiceRenderer(); - + public EamDbSettingsDialog() { this(null); } - + private boolean isDbChoiceSelectable(CentralRepoDbChoice item) { - return (item != CentralRepoDbChoice.POSTGRESQL_MULTIUSER || manager.isPostgresMultiuserAllowed()); + return (item != CentralRepoDbChoice.POSTGRESQL_MULTIUSER || CentralRepoDbManager.isPostgresMultiuserAllowed()); } - - + /** * Creates new form EamDbSettingsDialog */ @@ -123,7 +122,7 @@ public class EamDbSettingsDialog extends JDialog { if (pathname.isDirectory()) { return true; } - return pathname.getName().equalsIgnoreCase(SqliteCentralRepoSettings.DEFAULT_DBNAME); + return pathname.getName().equalsIgnoreCase(SqliteCentralRepoSettings.DEFAULT_DBNAME); } @Override @@ -131,32 +130,34 @@ public class EamDbSettingsDialog extends JDialog { return "Directories and Central Repository databases"; } }); - + setupDbChoice(initialMenuItem); valid(); display(); } - private void setupDbChoice(CentralRepoDbChoice initialMenuItem) { // setup initially selected item - CentralRepoDbChoice toSelect = (initialMenuItem == null) ? - (Arrays.asList(CentralRepoDbChoice.DB_CHOICES).contains(manager.getSelectedDbChoice())) ? - manager.getSelectedDbChoice() : - CentralRepoDbChoice.DB_CHOICES[0] : - initialMenuItem; - + CentralRepoDbChoice toSelect = (initialMenuItem == null) + ? (Arrays.asList(CentralRepoDbChoice.DB_CHOICES).contains(manager.getSelectedDbChoice())) + ? manager.getSelectedDbChoice() + : CentralRepoDbChoice.DB_CHOICES[0] + : initialMenuItem; + cbDatabaseType.setRenderer(DB_CHOICE_RENDERER); changeDbSelection(toSelect); } - - - - /** - * This method prompts user based on testing status (i.e. failure to connect, invalid schema, db does not exist, etc.). - * @param manager The manager to use when setting up the database. - * @param dialog If non-null value, validates settings and updates 'okay' button enabled state. - * @return Whether or not the ultimate status after prompts is okay to continue. + + /** + * This method prompts user based on testing status (i.e. failure to + * connect, invalid schema, db does not exist, etc.). + * + * @param manager The manager to use when setting up the database. + * @param dialog If non-null value, validates settings and updates 'okay' + * button enabled state. + * + * @return Whether or not the ultimate status after prompts is okay to + * continue. */ @NbBundle.Messages({"EamDbSettingsDialog.okButton.corruptDatabaseExists.title=Error Loading Central Repository Database", "EamDbSettingsDialog.okButton.corruptDatabaseExists.message=Central Repository Database exists but is not the right format. Manually delete it or choose a different path (if applicable).", @@ -184,13 +185,13 @@ public class EamDbSettingsDialog extends JDialog { } return (manager.getStatus() == DatabaseTestResult.TESTED_OK); - } - - - /** - * This method prompts the user whether or not they would like to create a database in the instance that - * it doesn't exist. - * @param manager The manager to use when setting up the database. + } + + /** + * This method prompts the user whether or not they would like to create a + * database in the instance that it doesn't exist. + * + * @param manager The manager to use when setting up the database. * @param dialog If non-null value, validates settings and updates 'okay' * button enabled state. * @@ -204,26 +205,28 @@ public class EamDbSettingsDialog extends JDialog { JOptionPane.YES_NO_OPTION)) { try { manager.createDb(); - + } catch (CentralRepoException e) { onPromptStatusError(manager); return false; } - + if (dialog != null) { dialog.valid(); } return true; } - + return manager.testStatus() == DatabaseTestResult.TESTED_OK; } - /** - * When an error occurs while going through promptTestStatusWarning, this method is called. - * @param manager1 The manager to use as service class. - * @throws HeadlessException + * When an error occurs while going through promptTestStatusWarning, this + * method is called. + * + * @param manager1 The manager to use as service class. + * + * @throws HeadlessException */ private static void onPromptStatusError(CentralRepoDbManager manager1) { // in the event that there is a failure to connect, notify user with corresponding message @@ -240,7 +243,6 @@ public class EamDbSettingsDialog extends JDialog { Bundle.EamDbSettingsDialog_okButton_createDbError_title(), JOptionPane.WARNING_MESSAGE); } - /** * This method is called from within the constructor to initialize the form. @@ -296,7 +298,8 @@ public class EamDbSettingsDialog extends JDialog { pnSQLiteSettings.setLayout(new java.awt.GridBagLayout()); 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)); + lbDatabasePath.setMaximumSize(new java.awt.Dimension(191, 16)); + lbDatabasePath.setPreferredSize(new java.awt.Dimension(100, 14)); gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.gridx = 0; gridBagConstraints.gridy = 1; @@ -307,7 +310,8 @@ public class EamDbSettingsDialog extends JDialog { pnSQLiteSettings.add(lbDatabasePath, gridBagConstraints); 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)); + lbHostName.setMaximumSize(new java.awt.Dimension(195, 16)); + lbHostName.setPreferredSize(new java.awt.Dimension(110, 14)); gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.gridx = 0; gridBagConstraints.gridy = 3; @@ -322,12 +326,14 @@ public class EamDbSettingsDialog extends JDialog { gridBagConstraints.gridx = 2; gridBagConstraints.gridy = 3; gridBagConstraints.gridheight = 2; + gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL; gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST; gridBagConstraints.insets = new java.awt.Insets(7, 10, 0, 6); pnSQLiteSettings.add(tbDbHostname, gridBagConstraints); 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)); + lbPort.setMaximumSize(new java.awt.Dimension(132, 16)); + lbPort.setPreferredSize(new java.awt.Dimension(90, 14)); gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.gridx = 0; gridBagConstraints.gridy = 5; @@ -342,12 +348,14 @@ public class EamDbSettingsDialog extends JDialog { gridBagConstraints.gridx = 2; gridBagConstraints.gridy = 5; gridBagConstraints.gridheight = 2; + gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL; gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST; gridBagConstraints.insets = new java.awt.Insets(7, 10, 0, 6); pnSQLiteSettings.add(tbDbPort, gridBagConstraints); 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)); + lbUserName.setMaximumSize(new java.awt.Dimension(172, 16)); + lbUserName.setPreferredSize(new java.awt.Dimension(100, 14)); gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.gridx = 0; gridBagConstraints.gridy = 7; @@ -362,12 +370,14 @@ public class EamDbSettingsDialog extends JDialog { gridBagConstraints.gridx = 2; gridBagConstraints.gridy = 7; gridBagConstraints.gridheight = 2; + gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL; gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST; gridBagConstraints.insets = new java.awt.Insets(7, 10, 0, 6); pnSQLiteSettings.add(tbDbUsername, gridBagConstraints); 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)); + lbUserPassword.setMaximumSize(new java.awt.Dimension(194, 16)); + lbUserPassword.setPreferredSize(new java.awt.Dimension(110, 14)); gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.gridx = 0; gridBagConstraints.gridy = 9; @@ -382,14 +392,15 @@ public class EamDbSettingsDialog extends JDialog { gridBagConstraints.gridx = 2; gridBagConstraints.gridy = 9; gridBagConstraints.gridheight = 2; + gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL; gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST; gridBagConstraints.insets = new java.awt.Insets(7, 10, 0, 6); pnSQLiteSettings.add(jpDbPassword, gridBagConstraints); 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.setMaximumSize(new java.awt.Dimension(180, 14)); lbDatabaseType.setMinimumSize(new java.awt.Dimension(80, 14)); - lbDatabaseType.setPreferredSize(new java.awt.Dimension(80, 14)); + lbDatabaseType.setPreferredSize(new java.awt.Dimension(100, 14)); gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.gridx = 0; gridBagConstraints.gridy = 0; @@ -400,7 +411,8 @@ public class EamDbSettingsDialog extends JDialog { pnSQLiteSettings.add(lbDatabaseType, gridBagConstraints); 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)); + lbDatabaseDesc.setMaximumSize(new java.awt.Dimension(182, 16)); + lbDatabaseDesc.setPreferredSize(new java.awt.Dimension(100, 14)); gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.gridx = 0; gridBagConstraints.gridy = 11; @@ -452,7 +464,7 @@ public class EamDbSettingsDialog extends JDialog { pathPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(pathPanelLayout.createSequentialGroup() .addGap(0, 0, 0) - .addComponent(tfDatabasePath, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) + .addComponent(tfDatabasePath, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) .addComponent(bnDatabasePathFileOpen) .addGap(0, 0, 0)) @@ -471,6 +483,7 @@ public class EamDbSettingsDialog extends JDialog { gridBagConstraints.gridx = 2; gridBagConstraints.gridy = 1; gridBagConstraints.gridheight = 2; + gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL; gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST; gridBagConstraints.insets = new java.awt.Insets(7, 10, 0, 6); pnSQLiteSettings.add(pathPanel, gridBagConstraints); @@ -492,9 +505,9 @@ public class EamDbSettingsDialog extends JDialog { typePanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(typePanelLayout.createSequentialGroup() .addGap(0, 0, 0) - .addComponent(cbDatabaseType, javax.swing.GroupLayout.PREFERRED_SIZE, 210, javax.swing.GroupLayout.PREFERRED_SIZE) + .addComponent(cbDatabaseType, 0, 210, Short.MAX_VALUE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) - .addComponent(lbSingleUserSqLite, javax.swing.GroupLayout.DEFAULT_SIZE, 318, Short.MAX_VALUE) + .addComponent(lbSingleUserSqLite, javax.swing.GroupLayout.DEFAULT_SIZE, 303, Short.MAX_VALUE) .addGap(0, 0, 0)) ); typePanelLayout.setVerticalGroup( @@ -545,7 +558,7 @@ public class EamDbSettingsDialog extends JDialog { .addComponent(bnOk) .addGap(11, 11, 11) .addComponent(bnCancel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) - .addComponent(pnSQLiteSettings, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) + .addComponent(pnSQLiteSettings, javax.swing.GroupLayout.DEFAULT_SIZE, 648, Short.MAX_VALUE)) .addContainerGap()) ); @@ -575,12 +588,10 @@ public class EamDbSettingsDialog extends JDialog { if (manager.getSelectedDbChoice() == CentralRepoDbChoice.SQLITE) { updatePostgresFields(false); updateSqliteFields(true); - } - else if (manager.getSelectedDbChoice() == CentralRepoDbChoice.POSTGRESQL_CUSTOM) { + } else if (manager.getSelectedDbChoice() == CentralRepoDbChoice.POSTGRESQL_CUSTOM) { updatePostgresFields(true); updateSqliteFields(false); - } - else { + } else { updatePostgresFields(false); updateSqliteFields(false); } @@ -615,53 +626,63 @@ public class EamDbSettingsDialog extends JDialog { "EamDbSettingsDialog.okButton.errorMsg.text=Please restart Autopsy to begin using the new database platform.", "EamDbSettingsDialog.okButton.connectionErrorMsg.text=Failed to connect to central repository database."}) private void bnOkActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_bnOkActionPerformed - if (testStatusAndCreate(this, manager, this)) + if (testStatusAndCreate(this, manager, this)) { dispose(); + } }//GEN-LAST:event_bnOkActionPerformed - /** - * This method tests status for central repo db / creation and prompts user accordingly. - * @param parent The parent component (the anchor for displaying dialogs). - * @param manager The central repo db manager with settings to be tested and saved. - * @return Whether or not central repo db was successfully be created or found. + * This method tests status for central repo db / creation and prompts user + * accordingly. + * + * @param parent The parent component (the anchor for displaying dialogs). + * @param manager The central repo db manager with settings to be tested and + * saved. + * + * @return Whether or not central repo db was successfully be created or + * found. */ public static boolean testStatusAndCreate(Component parent, CentralRepoDbManager manager) { return testStatusAndCreate(parent, manager, null); } - - + /** - * This method tests status for central repo db / creation and prompts user accordingly. - * @param parent The parent component (the anchor for displaying dialogs). - * @param manager The central repo db manager with settings to be tested and saved. - * @param dialog The db settings dialog; if non-null, will validate okay button state. - * @return Whether or not central repo db was successfully be created or found. + * This method tests status for central repo db / creation and prompts user + * accordingly. + * + * @param parent The parent component (the anchor for displaying dialogs). + * @param manager The central repo db manager with settings to be tested and + * saved. + * @param dialog The db settings dialog; if non-null, will validate okay + * button state. + * + * @return Whether or not central repo db was successfully be created or + * found. */ private static boolean testStatusAndCreate(Component parent, CentralRepoDbManager manager, EamDbSettingsDialog dialog) { parent.setCursor(Cursor.getPredefinedCursor(Cursor.WAIT_CURSOR)); manager.testStatus(); - - if (dialog != null) + + if (dialog != null) { dialog.valid(); - + } + boolean testedOk = promptTestStatusWarnings(manager, dialog); if (!testedOk) { parent.setCursor(Cursor.getPredefinedCursor(Cursor.DEFAULT_CURSOR)); return false; } - - try{ + + try { manager.saveNewCentralRepo(); - } - catch (CentralRepoException e) { + } catch (CentralRepoException e) { SwingUtilities.invokeLater(() -> { JOptionPane.showMessageDialog(parent, - Bundle.EamDbSettingsDialog_okButton_errorMsg_text(), - Bundle.EamDbSettingsDialog_okButton_errorTitle_text(), - JOptionPane.WARNING_MESSAGE); + Bundle.EamDbSettingsDialog_okButton_errorMsg_text(), + Bundle.EamDbSettingsDialog_okButton_errorTitle_text(), + JOptionPane.WARNING_MESSAGE); }); - + parent.setCursor(Cursor.getPredefinedCursor(Cursor.DEFAULT_CURSOR)); return false; } @@ -669,14 +690,13 @@ public class EamDbSettingsDialog extends JDialog { parent.setCursor(Cursor.getPredefinedCursor(Cursor.DEFAULT_CURSOR)); return true; } - - + /** - * This method returns if changes to the central repository configuration were - * successfully applied. + * This method returns if changes to the central repository configuration + * were successfully applied. * - * @return True if the database configuration was successfully changed; false - * if it was not. + * @return True if the database configuration was successfully changed; + * false if it was not. */ public boolean wasConfigurationChanged() { return manager.wasConfigurationChanged(); @@ -696,11 +716,10 @@ public class EamDbSettingsDialog extends JDialog { if (isDbChoiceSelectable(selectedItem)) { manager.setSelctedDbChoice(selectedItem); cbDatabaseType.setSelectedItem(selectedItem); - } - else { + } else { cbDatabaseType.setSelectedItem(manager.getSelectedDbChoice()); } - + customizeComponents(); } @@ -712,14 +731,14 @@ public class EamDbSettingsDialog extends JDialog { private void displayDatabaseSettings(CentralRepoDbChoice choice) { boolean isSqlite = choice == CentralRepoDbChoice.SQLITE; boolean isPostgres = choice == CentralRepoDbChoice.POSTGRESQL_CUSTOM; - + lbDatabasePath.setVisible(isSqlite); tfDatabasePath.setVisible(isSqlite); lbDatabaseDesc.setVisible(isSqlite); dataBaseFileTextArea.setVisible(isSqlite); lbSingleUserSqLite.setVisible(isSqlite); bnDatabasePathFileOpen.setVisible(isSqlite); - + lbHostName.setVisible(isPostgres); tbDbHostname.setVisible(isPostgres); lbPort.setVisible(isPostgres); @@ -800,7 +819,7 @@ public class EamDbSettingsDialog extends JDialog { * Adds a change listener to a collection of text fields. * * @param textFields The text fields. - * @param listener The change listener. + * @param listener The change listener. */ private static void addDocumentListeners(Collection textFields, TextBoxChangedListener listener) { textFields.forEach((textField) -> { @@ -823,8 +842,7 @@ public class EamDbSettingsDialog extends JDialog { // && !tbDbName.getText().trim().isEmpty() && !tbDbUsername.getText().trim().isEmpty() && 0 < jpDbPassword.getPassword().length; - } - else if (manager.getSelectedDbChoice() == CentralRepoDbChoice.SQLITE) { + } else if (manager.getSelectedDbChoice() == CentralRepoDbChoice.SQLITE) { result = !tfDatabasePath.getText().trim().isEmpty(); } @@ -841,7 +859,6 @@ public class EamDbSettingsDialog extends JDialog { && databaseSettingsAreValid(); } - /** * Validates that the form is filled out correctly for our usage. * @@ -867,9 +884,7 @@ public class EamDbSettingsDialog extends JDialog { return true; } - - - + /** * Tests whether or not the database settings are valid. * @@ -878,16 +893,15 @@ public class EamDbSettingsDialog extends JDialog { private boolean databaseSettingsAreValid() { try { manager.testDatabaseSettingsAreValid( - tbDbHostname.getText().trim(), - tbDbPort.getText().trim(), - tbDbUsername.getText().trim(), - tfDatabasePath.getText().trim(), + tbDbHostname.getText().trim(), + tbDbPort.getText().trim(), + tbDbUsername.getText().trim(), + tfDatabasePath.getText().trim(), new String(jpDbPassword.getPassword())); - } - catch (CentralRepoException | NumberFormatException | IllegalStateException e) { + } catch (CentralRepoException | NumberFormatException | IllegalStateException e) { return false; } - + return true; } From 077eedfef0210a64847b8579d24bb66f2f9293e0 Mon Sep 17 00:00:00 2001 From: William Schaefer Date: Mon, 13 Apr 2020 14:39:36 -0400 Subject: [PATCH 118/137] 6225 second attempt at screenshot 4 --- .../optionspanel/ManageCasesDialog.form | 34 ++++++++++++++++--- .../optionspanel/ManageCasesDialog.java | 17 +++++++--- 2 files changed, 42 insertions(+), 9 deletions(-) diff --git a/Core/src/org/sleuthkit/autopsy/centralrepository/optionspanel/ManageCasesDialog.form b/Core/src/org/sleuthkit/autopsy/centralrepository/optionspanel/ManageCasesDialog.form index 9ba0711f55..f7c005b254 100644 --- a/Core/src/org/sleuthkit/autopsy/centralrepository/optionspanel/ManageCasesDialog.form +++ b/Core/src/org/sleuthkit/autopsy/centralrepository/optionspanel/ManageCasesDialog.form @@ -129,10 +129,13 @@ + + + - +
    @@ -144,6 +147,9 @@ + + + @@ -159,10 +165,13 @@ + + + - +
    @@ -174,6 +183,9 @@ + + + @@ -186,9 +198,12 @@ - + + + + @@ -204,6 +219,9 @@ + + + @@ -219,6 +237,9 @@ + + + @@ -234,6 +255,9 @@ + + + @@ -282,13 +306,13 @@ - + - + diff --git a/Core/src/org/sleuthkit/autopsy/centralrepository/optionspanel/ManageCasesDialog.java b/Core/src/org/sleuthkit/autopsy/centralrepository/optionspanel/ManageCasesDialog.java index 2d2cfc38bf..b4aa36f78a 100644 --- a/Core/src/org/sleuthkit/autopsy/centralrepository/optionspanel/ManageCasesDialog.java +++ b/Core/src/org/sleuthkit/autopsy/centralrepository/optionspanel/ManageCasesDialog.java @@ -176,10 +176,11 @@ final class ManageCasesDialog extends javax.swing.JDialog { org.openide.awt.Mnemonics.setLocalizedText(caseInfoLabel, org.openide.util.NbBundle.getMessage(ManageCasesDialog.class, "ManageCasesDialog.caseInfoLabel.text")); // NOI18N caseInfoLabel.setMaximumSize(new java.awt.Dimension(237, 16)); + caseInfoLabel.setPreferredSize(new java.awt.Dimension(130, 16)); gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.gridx = 0; gridBagConstraints.gridy = 0; - gridBagConstraints.gridwidth = 2; + gridBagConstraints.gridwidth = 4; gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL; gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST; gridBagConstraints.insets = new java.awt.Insets(13, 12, 0, 0); @@ -187,6 +188,7 @@ final class ManageCasesDialog extends javax.swing.JDialog { org.openide.awt.Mnemonics.setLocalizedText(dataSourcesLabel, org.openide.util.NbBundle.getMessage(ManageCasesDialog.class, "ManageCasesDialog.dataSourcesLabel.text")); // NOI18N dataSourcesLabel.setMaximumSize(new java.awt.Dimension(237, 16)); + dataSourcesLabel.setPreferredSize(new java.awt.Dimension(130, 16)); gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.gridx = 0; gridBagConstraints.gridy = 8; @@ -199,9 +201,11 @@ final class ManageCasesDialog extends javax.swing.JDialog { org.openide.awt.Mnemonics.setLocalizedText(notesLabel, org.openide.util.NbBundle.getMessage(ManageCasesDialog.class, "ManageCasesDialog.notesLabel.text")); // NOI18N notesLabel.setMaximumSize(new java.awt.Dimension(237, 16)); + notesLabel.setPreferredSize(new java.awt.Dimension(130, 16)); gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.gridx = 0; gridBagConstraints.gridy = 6; + gridBagConstraints.gridwidth = 4; gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL; gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST; gridBagConstraints.weightx = 0.1; @@ -210,6 +214,7 @@ final class ManageCasesDialog extends javax.swing.JDialog { org.openide.awt.Mnemonics.setLocalizedText(orgLabel, org.openide.util.NbBundle.getMessage(ManageCasesDialog.class, "ManageCasesDialog.orgLabel.text")); // NOI18N orgLabel.setMaximumSize(new java.awt.Dimension(237, 16)); + orgLabel.setPreferredSize(new java.awt.Dimension(130, 16)); gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.gridx = 0; gridBagConstraints.gridy = 1; @@ -221,7 +226,8 @@ final class ManageCasesDialog extends javax.swing.JDialog { caseInfoPanel.add(orgLabel, gridBagConstraints); org.openide.awt.Mnemonics.setLocalizedText(caseNumberLabel, org.openide.util.NbBundle.getMessage(ManageCasesDialog.class, "ManageCasesDialog.caseNumberLabel.text")); // NOI18N - caseNumberLabel.setPreferredSize(new java.awt.Dimension(237, 16)); + caseNumberLabel.setMaximumSize(new java.awt.Dimension(237, 16)); + caseNumberLabel.setPreferredSize(new java.awt.Dimension(130, 16)); gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.gridx = 0; gridBagConstraints.gridy = 2; @@ -234,6 +240,7 @@ final class ManageCasesDialog extends javax.swing.JDialog { org.openide.awt.Mnemonics.setLocalizedText(examinerEmailLabel, org.openide.util.NbBundle.getMessage(ManageCasesDialog.class, "ManageCasesDialog.examinerEmailLabel.text")); // NOI18N examinerEmailLabel.setMaximumSize(new java.awt.Dimension(237, 16)); + examinerEmailLabel.setPreferredSize(new java.awt.Dimension(130, 16)); gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.gridx = 0; gridBagConstraints.gridy = 4; @@ -246,6 +253,7 @@ final class ManageCasesDialog extends javax.swing.JDialog { org.openide.awt.Mnemonics.setLocalizedText(examinerNameLabel, org.openide.util.NbBundle.getMessage(ManageCasesDialog.class, "ManageCasesDialog.examinerNameLabel.text")); // NOI18N examinerNameLabel.setMaximumSize(new java.awt.Dimension(237, 16)); + examinerNameLabel.setPreferredSize(new java.awt.Dimension(130, 16)); gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.gridx = 0; gridBagConstraints.gridy = 3; @@ -258,6 +266,7 @@ final class ManageCasesDialog extends javax.swing.JDialog { org.openide.awt.Mnemonics.setLocalizedText(examinerPhoneLabel, org.openide.util.NbBundle.getMessage(ManageCasesDialog.class, "ManageCasesDialog.examinerPhoneLabel.text")); // NOI18N examinerPhoneLabel.setMaximumSize(new java.awt.Dimension(237, 16)); + examinerPhoneLabel.setPreferredSize(new java.awt.Dimension(130, 16)); gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.gridx = 0; gridBagConstraints.gridy = 5; @@ -304,9 +313,9 @@ final class ManageCasesDialog extends javax.swing.JDialog { caseInfoPanel.add(examinerPhoneValueLabel, gridBagConstraints); org.openide.awt.Mnemonics.setLocalizedText(closeButton, org.openide.util.NbBundle.getMessage(ManageCasesDialog.class, "ManageCasesDialog.closeButton.text")); // NOI18N - closeButton.setMaximumSize(new java.awt.Dimension(125, 23)); + closeButton.setMaximumSize(new java.awt.Dimension(140, 23)); closeButton.setMinimumSize(new java.awt.Dimension(65, 23)); - closeButton.setPreferredSize(new java.awt.Dimension(65, 23)); + closeButton.setPreferredSize(new java.awt.Dimension(90, 23)); closeButton.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { closeButtonActionPerformed(evt); From 780c8d59c25f162975f67761ae9736f0d5639054 Mon Sep 17 00:00:00 2001 From: Greg DiCristofaro Date: Tue, 14 Apr 2020 12:32:30 -0400 Subject: [PATCH 119/137] start not run... --- Core/src/org/sleuthkit/autopsy/core/Installer.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Core/src/org/sleuthkit/autopsy/core/Installer.java b/Core/src/org/sleuthkit/autopsy/core/Installer.java index 37decea601..60cbf6daa6 100644 --- a/Core/src/org/sleuthkit/autopsy/core/Installer.java +++ b/Core/src/org/sleuthkit/autopsy/core/Installer.java @@ -408,7 +408,7 @@ public class Installer extends ModuleInstall { } }; - new Thread(loader).run(); + new Thread(loader).start(); } @Override From 7639a6a5aa88f2c0c7751351d0c8b8c9124cb32b Mon Sep 17 00:00:00 2001 From: Greg DiCristofaro Date: Tue, 14 Apr 2020 16:04:24 -0400 Subject: [PATCH 120/137] fixing misspellings --- Core/src/org/sleuthkit/autopsy/core/Installer.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Core/src/org/sleuthkit/autopsy/core/Installer.java b/Core/src/org/sleuthkit/autopsy/core/Installer.java index 60cbf6daa6..1d554b062b 100644 --- a/Core/src/org/sleuthkit/autopsy/core/Installer.java +++ b/Core/src/org/sleuthkit/autopsy/core/Installer.java @@ -396,7 +396,7 @@ public class Installer extends ModuleInstall { /** - * Runs an initial load of the Jython modules to speed ub subsequent loads. + * Runs an initial load of the Jython modules to speed up subsequent loads. */ private void preloadJython() { Runnable loader = () -> { @@ -404,7 +404,7 @@ public class Installer extends ModuleInstall { JythonModuleLoader.getIngestModuleFactories(); } catch (Exception ex) { - logger.log(Level.SEVERE, "There was an error while pre-loading jython submodules.", ex); + logger.log(Level.SEVERE, "There was an error while doing an initial load of python plugins.", ex); } }; From b6bd2d3b63c5a6fd8be46c48592ab12625b60605 Mon Sep 17 00:00:00 2001 From: Dennis Date: Wed, 15 Apr 2020 11:30:33 +0200 Subject: [PATCH 121/137] Update modDev.dox Add a hint, that you can deploy changes without rebuilding while debugging. --- docs/doxygen/modDev.dox | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/doxygen/modDev.dox b/docs/doxygen/modDev.dox index a3195b74ed..ed2c3f34ea 100644 --- a/docs/doxygen/modDev.dox +++ b/docs/doxygen/modDev.dox @@ -81,7 +81,7 @@ As you will read in the later sections about the different module types, each Au \subsection mod_dev_aut_run1 Running Your Module During Development -When you are developing your Autopsy module, you can simply choose "Run" on the module and it will launch the Autopsy platform with the module enabled in it. This is also how you can debug the module. +When you are developing your Autopsy module, you can simply choose "Run" on the module and it will launch the Autopsy platform with the module enabled in it. This is also how you can debug the module. If you want to apply changes during debugging, you can use the "Apply Code Changes" function in NetBeans. \subsection mod_dev_aut_deploy Deploying Your Module From 76c198c4ab7c9c05b1680b44a9ae8219d65236ac Mon Sep 17 00:00:00 2001 From: William Schaefer Date: Wed, 15 Apr 2020 08:42:28 -0400 Subject: [PATCH 122/137] 6225 second attempt to fix screen shots 7 and 8 --- .../modules/filetypeid/AddFileTypeDialog.java | 40 ++++++---- .../modules/filetypeid/AddFileTypePanel.form | 4 +- .../modules/filetypeid/AddFileTypePanel.java | 6 +- .../AddFileTypeSignatureDialog.java | 80 ++++++++++--------- .../filetypeid/AddFileTypeSignaturePanel.form | 2 +- .../filetypeid/AddFileTypeSignaturePanel.java | 2 +- 6 files changed, 72 insertions(+), 62 deletions(-) diff --git a/Core/src/org/sleuthkit/autopsy/modules/filetypeid/AddFileTypeDialog.java b/Core/src/org/sleuthkit/autopsy/modules/filetypeid/AddFileTypeDialog.java index 5b5b51329c..fb0b591c28 100644 --- a/Core/src/org/sleuthkit/autopsy/modules/filetypeid/AddFileTypeDialog.java +++ b/Core/src/org/sleuthkit/autopsy/modules/filetypeid/AddFileTypeDialog.java @@ -61,9 +61,10 @@ class AddFileTypeDialog extends JDialog { * Creates a dialog for creating a file type */ @Messages({"AddMimeTypedialog.title=File Type"}) - AddFileTypeDialog() { + AddFileTypeDialog() { super(WindowManager.getDefault().getMainWindow(), Bundle.AddMimeTypedialog_title(), true); addMimeTypePanel = new AddFileTypePanel(); + init(); } /** @@ -74,23 +75,18 @@ class AddFileTypeDialog extends JDialog { AddFileTypeDialog(FileType fileType) { super(WindowManager.getDefault().getMainWindow(), Bundle.AddMimeTypedialog_title(), true); addMimeTypePanel = new AddFileTypePanel(fileType); + init(); } /** - * Displays the add file type dialog. - * + * Do initialization of dialog components. */ - @NbBundle.Messages({ + @NbBundle.Messages({ "AddMimeTypeDialog.addButton.title=OK", "AddMimeTypeDialog.cancelButton.title=Cancel"}) - void display() { + private void init() { setLayout(new BorderLayout()); - /** - * Center the dialog. - */ - setLocationRelativeTo(WindowManager.getDefault().getMainWindow()); - /** * Get the default or saved ingest job settings for this context and use * them to create and add an ingest job settings panel. @@ -120,15 +116,15 @@ class AddFileTypeDialog extends JDialog { //setting both max and preffered size appears to be necessary to change the button size cancelButton.setMaximumSize(BUTTON_SIZE); cancelButton.setPreferredSize(BUTTON_SIZE); - + // Put the buttons in their own panel, under the settings panel. JPanel buttonPanel = new JPanel(); buttonPanel.setLayout(new BoxLayout(buttonPanel, BoxLayout.LINE_AXIS)); - buttonPanel.add(okButton); - buttonPanel.add(new javax.swing.Box.Filler(new Dimension(10, 10), new Dimension(10, 10), new Dimension(10, 10))); + buttonPanel.add(new javax.swing.Box.Filler(new Dimension(10, 35), new Dimension(10, 35), new Dimension(10, 35))); buttonPanel.add(cancelButton); - buttonPanel.add(new javax.swing.Box.Filler(new Dimension(10, 10), new Dimension(10, 10), new Dimension(10, 10))); + buttonPanel.add(new javax.swing.Box.Filler(new Dimension(10, 35), new Dimension(10, 35), new Dimension(10, 35))); + buttonPanel.validate(); add(buttonPanel, BorderLayout.LINE_END); /** @@ -150,13 +146,23 @@ class AddFileTypeDialog extends JDialog { } }); enableOkButton(); + setResizable(false); + pack(); + } + + /** + * Displays the add file type dialog. + * + */ + void display() { + /** + * Center the dialog. + */ + setLocationRelativeTo(WindowManager.getDefault().getMainWindow()); /** * Show the dialog. */ - pack(); - setResizable(false); setVisible(true); - } /** diff --git a/Core/src/org/sleuthkit/autopsy/modules/filetypeid/AddFileTypePanel.form b/Core/src/org/sleuthkit/autopsy/modules/filetypeid/AddFileTypePanel.form index 325270ea0b..7dce458862 100644 --- a/Core/src/org/sleuthkit/autopsy/modules/filetypeid/AddFileTypePanel.form +++ b/Core/src/org/sleuthkit/autopsy/modules/filetypeid/AddFileTypePanel.form @@ -47,7 +47,7 @@ - + @@ -85,7 +85,7 @@ - + diff --git a/Core/src/org/sleuthkit/autopsy/modules/filetypeid/AddFileTypePanel.java b/Core/src/org/sleuthkit/autopsy/modules/filetypeid/AddFileTypePanel.java index c00363bc56..fdf36d74c6 100644 --- a/Core/src/org/sleuthkit/autopsy/modules/filetypeid/AddFileTypePanel.java +++ b/Core/src/org/sleuthkit/autopsy/modules/filetypeid/AddFileTypePanel.java @@ -312,7 +312,7 @@ class AddFileTypePanel extends javax.swing.JPanel { .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(jLabel1) .addComponent(postHitCheckBox)) - .addGap(0, 0, Short.MAX_VALUE)) + .addGap(0, 0, 0)) .addGroup(layout.createSequentialGroup() .addGap(71, 71, 71) .addComponent(mimeFormatLabel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))) @@ -342,7 +342,7 @@ class AddFileTypePanel extends javax.swing.JPanel { .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(setNameLabel) .addComponent(setNameTextField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) - .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) + .addContainerGap()) ); }// //GEN-END:initComponents @@ -350,6 +350,7 @@ class AddFileTypePanel extends javax.swing.JPanel { if (evt.getSource().equals(this.editSigButton) && this.signatureList.getSelectedValue() != null) { int selected = this.signatureList.getSelectedIndex(); this.addSigDialog = new AddFileTypeSignatureDialog(this.signatureList.getSelectedValue()); + this.addSigDialog.display(false); if (addSigDialog.getResult() == BUTTON_PRESSED.OK) { signaturesListModel.removeElementAt(selected); this.signaturesListModel.add(selected, this.addSigDialog.getSignature()); @@ -370,6 +371,7 @@ class AddFileTypePanel extends javax.swing.JPanel { private void addSigButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_addSigButtonActionPerformed if (evt.getSource().equals(this.addSigButton)) { this.addSigDialog = new AddFileTypeSignatureDialog(); + this.addSigDialog.display(true); if (addSigDialog.getResult() == AddFileTypeSignatureDialog.BUTTON_PRESSED.OK) { signaturesListModel.addElement(this.addSigDialog.getSignature()); } diff --git a/Core/src/org/sleuthkit/autopsy/modules/filetypeid/AddFileTypeSignatureDialog.java b/Core/src/org/sleuthkit/autopsy/modules/filetypeid/AddFileTypeSignatureDialog.java index 4b64e13e94..27773ec821 100644 --- a/Core/src/org/sleuthkit/autopsy/modules/filetypeid/AddFileTypeSignatureDialog.java +++ b/Core/src/org/sleuthkit/autopsy/modules/filetypeid/AddFileTypeSignatureDialog.java @@ -63,7 +63,7 @@ final class AddFileTypeSignatureDialog extends JDialog { AddFileTypeSignatureDialog() { super(WindowManager.getDefault().getMainWindow(), TITLE, true); this.addFileTypeSigPanel = new AddFileTypeSignaturePanel(); - this.display(true); + init(); } /** @@ -74,43 +74,12 @@ final class AddFileTypeSignatureDialog extends JDialog { AddFileTypeSignatureDialog(Signature toEdit) { super(WindowManager.getDefault().getMainWindow(), TITLE, true); this.addFileTypeSigPanel = new AddFileTypeSignaturePanel(toEdit); - this.display(false); + init(); } - /** - * Gets the signature that was created by this dialog. - * - * @return the signature. - */ - public Signature getSignature() { - return signature; - } - - /** - * Gets which button was pressed (OK or Cancel). - * - * @return The result. - */ - public BUTTON_PRESSED getResult() { - return result; - } - - /** - * Displays the add signature dialog. - * - * @param add Whether or not this is an edit or a new window. - */ - @Messages({ - "AddFileTypeSignatureDialog.addButton.title=OK", - "AddFileTypeSignatureDialog.cancelButton.title=Cancel"}) - void display(boolean add) { + private void init() { setLayout(new BorderLayout()); - /** - * Center the dialog. - */ - setLocationRelativeTo(WindowManager.getDefault().getMainWindow()); - /** * Get the default or saved ingest job settings for this context and use * them to create and add an ingest job settings panel. @@ -141,14 +110,15 @@ final class AddFileTypeSignatureDialog extends JDialog { //setting both max and preffered size appears to be necessary to change the button size cancelButton.setMaximumSize(BUTTON_SIZE); cancelButton.setPreferredSize(BUTTON_SIZE); - + // Put the buttons in their own panel, under the settings panel. JPanel buttonPanel = new JPanel(); buttonPanel.setLayout(new BoxLayout(buttonPanel, BoxLayout.LINE_AXIS)); buttonPanel.add(okButton); - buttonPanel.add(new javax.swing.Box.Filler(new Dimension(10, 10), new Dimension(10, 10), new Dimension(10, 10))); + buttonPanel.add(new javax.swing.Box.Filler(new Dimension(10, 35), new Dimension(10, 35), new Dimension(10, 35))); buttonPanel.add(cancelButton); - buttonPanel.add(new javax.swing.Box.Filler(new Dimension(10, 10), new Dimension(10, 10), new Dimension(10, 10))); + buttonPanel.add(new javax.swing.Box.Filler(new Dimension(10, 35), new Dimension(10, 35), new Dimension(10, 35))); + buttonPanel.validate(); add(buttonPanel, BorderLayout.LINE_END); /** @@ -161,12 +131,44 @@ final class AddFileTypeSignatureDialog extends JDialog { doButtonAction(false); } }); + setResizable(false); + pack(); + } + /** + * Gets the signature that was created by this dialog. + * + * @return the signature. + */ + public Signature getSignature() { + return signature; + } + + /** + * Gets which button was pressed (OK or Cancel). + * + * @return The result. + */ + public BUTTON_PRESSED getResult() { + return result; + } + + /** + * Displays the add signature dialog. + * + * @param add Whether or not this is an edit or a new window. + */ + @Messages({ + "AddFileTypeSignatureDialog.addButton.title=OK", + "AddFileTypeSignatureDialog.cancelButton.title=Cancel"}) + void display(boolean add) { + /** + * Center the dialog. + */ + setLocationRelativeTo(WindowManager.getDefault().getMainWindow()); /** * Show the dialog. */ - pack(); - setResizable(false); setVisible(true); } diff --git a/Core/src/org/sleuthkit/autopsy/modules/filetypeid/AddFileTypeSignaturePanel.form b/Core/src/org/sleuthkit/autopsy/modules/filetypeid/AddFileTypeSignaturePanel.form index f61fb16aae..1dddd44b1d 100644 --- a/Core/src/org/sleuthkit/autopsy/modules/filetypeid/AddFileTypeSignaturePanel.form +++ b/Core/src/org/sleuthkit/autopsy/modules/filetypeid/AddFileTypeSignaturePanel.form @@ -72,7 +72,7 @@ - + diff --git a/Core/src/org/sleuthkit/autopsy/modules/filetypeid/AddFileTypeSignaturePanel.java b/Core/src/org/sleuthkit/autopsy/modules/filetypeid/AddFileTypeSignaturePanel.java index 6be6a71fe0..dd939dae25 100644 --- a/Core/src/org/sleuthkit/autopsy/modules/filetypeid/AddFileTypeSignaturePanel.java +++ b/Core/src/org/sleuthkit/autopsy/modules/filetypeid/AddFileTypeSignaturePanel.java @@ -283,7 +283,7 @@ class AddFileTypeSignaturePanel extends javax.swing.JPanel { .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(offsetRelativeToComboBox, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(offsetRelativeToLabel)) - .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) + .addContainerGap()) ); }// //GEN-END:initComponents From 753ac8d45630e7105f5ed1efeb00dc278c93e358 Mon Sep 17 00:00:00 2001 From: William Schaefer Date: Wed, 15 Apr 2020 08:45:14 -0400 Subject: [PATCH 123/137] 6225 update dates --- .../sleuthkit/autopsy/modules/filetypeid/AddFileTypeDialog.java | 2 +- .../sleuthkit/autopsy/modules/filetypeid/AddFileTypePanel.java | 2 +- .../autopsy/modules/filetypeid/AddFileTypeSignatureDialog.java | 2 +- .../autopsy/modules/filetypeid/AddFileTypeSignaturePanel.java | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Core/src/org/sleuthkit/autopsy/modules/filetypeid/AddFileTypeDialog.java b/Core/src/org/sleuthkit/autopsy/modules/filetypeid/AddFileTypeDialog.java index fb0b591c28..b387ba7d40 100644 --- a/Core/src/org/sleuthkit/autopsy/modules/filetypeid/AddFileTypeDialog.java +++ b/Core/src/org/sleuthkit/autopsy/modules/filetypeid/AddFileTypeDialog.java @@ -1,7 +1,7 @@ /* * Autopsy Forensic Browser * - * Copyright 2011-2018 Basis Technology Corp. + * Copyright 2011-2020 Basis Technology Corp. * Contact: carrier sleuthkit org * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/Core/src/org/sleuthkit/autopsy/modules/filetypeid/AddFileTypePanel.java b/Core/src/org/sleuthkit/autopsy/modules/filetypeid/AddFileTypePanel.java index fdf36d74c6..f7f1da8755 100644 --- a/Core/src/org/sleuthkit/autopsy/modules/filetypeid/AddFileTypePanel.java +++ b/Core/src/org/sleuthkit/autopsy/modules/filetypeid/AddFileTypePanel.java @@ -1,7 +1,7 @@ /* * Autopsy Forensic Browser * - * Copyright 2011-2018 Basis Technology Corp. + * Copyright 2011-2020 Basis Technology Corp. * Contact: carrier sleuthkit org * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/Core/src/org/sleuthkit/autopsy/modules/filetypeid/AddFileTypeSignatureDialog.java b/Core/src/org/sleuthkit/autopsy/modules/filetypeid/AddFileTypeSignatureDialog.java index 27773ec821..c8f10e4e36 100644 --- a/Core/src/org/sleuthkit/autopsy/modules/filetypeid/AddFileTypeSignatureDialog.java +++ b/Core/src/org/sleuthkit/autopsy/modules/filetypeid/AddFileTypeSignatureDialog.java @@ -1,7 +1,7 @@ /* * Autopsy Forensic Browser * - * Copyright 2011-2018 Basis Technology Corp. + * Copyright 2011-2020 Basis Technology Corp. * Contact: carrier sleuthkit org * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/Core/src/org/sleuthkit/autopsy/modules/filetypeid/AddFileTypeSignaturePanel.java b/Core/src/org/sleuthkit/autopsy/modules/filetypeid/AddFileTypeSignaturePanel.java index dd939dae25..88c181c0fa 100644 --- a/Core/src/org/sleuthkit/autopsy/modules/filetypeid/AddFileTypeSignaturePanel.java +++ b/Core/src/org/sleuthkit/autopsy/modules/filetypeid/AddFileTypeSignaturePanel.java @@ -1,7 +1,7 @@ /* * Autopsy Forensic Browser * - * Copyright 2011-2018 Basis Technology Corp. + * Copyright 2011-2020 Basis Technology Corp. * Contact: carrier sleuthkit org * * Licensed under the Apache License, Version 2.0 (the "License"); From da7fe3b905bdd86e2235e169f912f2e661380c77 Mon Sep 17 00:00:00 2001 From: Greg DiCristofaro Date: Wed, 15 Apr 2020 09:01:50 -0400 Subject: [PATCH 124/137] updated locations where MessageAttachments should be parsed through BlackboardJsonAttrUtil --- .../relationships/AccountSummary.java | 146 ++++++++++++------ .../AttachmentThumbnailsChildren.java | 65 ++++++-- .../relationships/MessageNode.java | 53 +++---- .../contentviewers/MessageContentViewer.java | 95 ++++++++---- 4 files changed, 240 insertions(+), 119 deletions(-) diff --git a/Core/src/org/sleuthkit/autopsy/communications/relationships/AccountSummary.java b/Core/src/org/sleuthkit/autopsy/communications/relationships/AccountSummary.java index 5401f1a839..d8f74fcc66 100755 --- a/Core/src/org/sleuthkit/autopsy/communications/relationships/AccountSummary.java +++ b/Core/src/org/sleuthkit/autopsy/communications/relationships/AccountSummary.java @@ -18,7 +18,6 @@ */ package org.sleuthkit.autopsy.communications.relationships; -import com.google.gson.Gson; import java.util.Collection; import java.util.List; import java.util.Set; @@ -34,9 +33,10 @@ import org.sleuthkit.datamodel.TskCoreException; import org.sleuthkit.datamodel.blackboardutils.attributes.MessageAttachments.FileAttachment; import org.sleuthkit.datamodel.blackboardutils.attributes.MessageAttachments; import org.sleuthkit.datamodel.CommunicationsUtils; +import org.sleuthkit.datamodel.blackboardutils.attributes.BlackboardJsonAttrUtil; /** - * + * * Class representing the Summary data for a given account. */ class AccountSummary { @@ -56,9 +56,9 @@ class AccountSummary { /** * Summary constructor. - * + * * @param selectedAccount Selected account object - * @param artifacts List of relationship source artifacts + * @param artifacts List of relationship source artifacts */ AccountSummary(Account selectedAccount, Set artifacts) { this.selectedAccount = selectedAccount; @@ -67,7 +67,8 @@ class AccountSummary { } /** - * Initialize the counts based on the selected account and the given artifacts. + * Initialize the counts based on the selected account and the given + * artifacts. */ private void initCounts() { for (BlackboardArtifact artifact : artifacts) { @@ -86,18 +87,18 @@ class AccountSummary { case TSK_CONTACT: if (selectedAccount.getAccountType() != Account.Type.DEVICE) { String typeSpecificID = selectedAccount.getTypeSpecificID(); - + List attributes = null; - - try{ + + try { attributes = artifact.getAttributes(); - } catch(TskCoreException ex) { + } catch (TskCoreException ex) { logger.log(Level.WARNING, String.format("Unable to getAttributes for artifact: %d", artifact.getArtifactID()), ex); break; } - + boolean isReference = false; - + for (BlackboardAttribute attribute : attributes) { String attributeTypeName = attribute.getAttributeType().getTypeName(); @@ -108,7 +109,7 @@ class AccountSummary { } else if (attributeTypeName.contains("EMAIL")) { attributeValue = CommunicationsUtils.normalizeEmailAddress(attributeValue); } - + if (typeSpecificID.equals(attributeValue)) { isReference = true; break; @@ -133,43 +134,89 @@ class AccountSummary { break; } } - try { - // count the attachments from the TSK_ATTACHMENTS attribute. - BlackboardAttribute attachmentsAttr = artifact.getAttribute(new BlackboardAttribute.Type(BlackboardAttribute.ATTRIBUTE_TYPE.TSK_ATTACHMENTS)); - if (attachmentsAttr != null) { - String jsonVal = attachmentsAttr.getValueString(); - MessageAttachments msgAttachments = new Gson().fromJson(jsonVal, MessageAttachments.class); + handleMessageAttachments(artifact); + } + } - Collection fileAttachments = msgAttachments.getFileAttachments(); - for (FileAttachment fileAttachment : fileAttachments) { - attachmentCnt++; - long attachedFileObjId = fileAttachment.getObjectId(); - if (attachedFileObjId >= 0) { - AbstractFile attachedFile = artifact.getSleuthkitCase().getAbstractFileById(attachedFileObjId); - if (ImageUtils.thumbnailSupported(attachedFile)) { - mediaCnt++; - } - } - } - } else { // backward compatibility - email message attachments are derived files, children of the message. - attachmentCnt += artifact.getChildrenCount(); - for (Content childContent : artifact.getChildren()) { - if (ImageUtils.thumbnailSupported(childContent)) { - mediaCnt++; - } - } + /** + * Handles incrementing attachmentCnt and mediaCnt variables based on the + * attachments and media present in an artifact. + * + * @param artifact The artifact whose MessageAttachments will be used for + * this tally. If no MessageAttachments object can be found, + * then the count of the children of the artifact will be + * used instead. + */ + private void handleMessageAttachments(BlackboardArtifact artifact) { + try { + // count the attachments from the TSK_ATTACHMENTS attribute. + BlackboardAttribute attachmentsAttr = artifact.getAttribute(new BlackboardAttribute.Type(BlackboardAttribute.ATTRIBUTE_TYPE.TSK_ATTACHMENTS)); + if (attachmentsAttr != null) { + try { + countFromMessageAttachments(attachmentsAttr, artifact); + } catch (BlackboardJsonAttrUtil.InvalidJsonException ex) { + logger.log(Level.WARNING, String.format("Unable to parse json for MessageAttachments object in artifact: %s", artifact.getName()), ex); + countFromArtifactChildren(artifact); + } + } else { + countFromArtifactChildren(artifact); + } + } catch (TskCoreException ex) { + logger.log(Level.WARNING, String.format("Exception thrown " + + "from getChildrenCount artifactID: %d", + artifact.getArtifactID()), ex); //NON-NLS + } + } + + /** + * Increments attachment and media counts based on the children of the + * BlackboardArtifact. + * + * @param artifact The artifact whose children will be counted. + * + * @throws TskCoreException + */ + private void countFromArtifactChildren(BlackboardArtifact artifact) throws TskCoreException { + // backward compatibility - email message attachments are derived files, children of the message. + attachmentCnt += artifact.getChildrenCount(); + for (Content childContent : artifact.getChildren()) { + if (ImageUtils.thumbnailSupported(childContent)) { + mediaCnt++; + } + } + } + + /** + * Increments attachment and media counts based on the file attachments in + * the parsed MessageAttachments object. + * + * @param attachmentsAttr The attribute representing the MessageAttachments + * object. + * @param artifact The artifact for this attribute. + * + * @throws TskCoreException + * @throws BlackboardJsonAttrUtil.InvalidJsonException + */ + private void countFromMessageAttachments(BlackboardAttribute attachmentsAttr, BlackboardArtifact artifact) + throws TskCoreException, BlackboardJsonAttrUtil.InvalidJsonException { + + MessageAttachments msgAttachments = BlackboardJsonAttrUtil.fromAttribute(attachmentsAttr, MessageAttachments.class); + Collection fileAttachments = msgAttachments.getFileAttachments(); + for (FileAttachment fileAttachment : fileAttachments) { + attachmentCnt++; + long attachedFileObjId = fileAttachment.getObjectId(); + if (attachedFileObjId >= 0) { + AbstractFile attachedFile = artifact.getSleuthkitCase().getAbstractFileById(attachedFileObjId); + if (ImageUtils.thumbnailSupported(attachedFile)) { + mediaCnt++; } - } catch (TskCoreException ex) { - logger.log(Level.WARNING, String.format("Exception thrown " - + "from getChildrenCount artifactID: %d", - artifact.getArtifactID()), ex); //NON-NLS } } } /** * Total number of attachments that this account is referenced. - * + * * @return Attachment count */ public int getAttachmentCnt() { @@ -178,7 +225,7 @@ class AccountSummary { /** * Total number of messages that this account is referenced. - * + * * @return Message count */ public int getMessagesCnt() { @@ -187,7 +234,7 @@ class AccountSummary { /** * Total number of Emails that this account is referenced. - * + * * @return Email count */ public int getEmailCnt() { @@ -196,7 +243,7 @@ class AccountSummary { /** * Total number of call logs that this account is referenced. - * + * * @return call log count */ public int getCallLogCnt() { @@ -205,7 +252,7 @@ class AccountSummary { /** * Total number of contacts in this accounts contact book. - * + * * @return contact count */ public int getContactsCnt() { @@ -213,17 +260,18 @@ class AccountSummary { } /** - * Total number of thumbnail\media attachments that this account is referenced. - * + * Total number of thumbnail\media attachments that this account is + * referenced. + * * @return Thumbnail count */ public int getThumbnailCnt() { return mediaCnt; } - + /** * Total number of contacts that this account is referenced. - * + * * @return Contact count */ public int getReferenceCnt() { diff --git a/Core/src/org/sleuthkit/autopsy/communications/relationships/AttachmentThumbnailsChildren.java b/Core/src/org/sleuthkit/autopsy/communications/relationships/AttachmentThumbnailsChildren.java index 74ee109b6f..c703d34d84 100755 --- a/Core/src/org/sleuthkit/autopsy/communications/relationships/AttachmentThumbnailsChildren.java +++ b/Core/src/org/sleuthkit/autopsy/communications/relationships/AttachmentThumbnailsChildren.java @@ -18,7 +18,6 @@ */ package org.sleuthkit.autopsy.communications.relationships; -import com.google.gson.Gson; import java.util.Arrays; import java.util.Collection; import java.util.HashSet; @@ -38,6 +37,7 @@ import org.sleuthkit.datamodel.BlackboardArtifact; import org.sleuthkit.datamodel.BlackboardAttribute; import org.sleuthkit.datamodel.Content; import org.sleuthkit.datamodel.TskCoreException; +import org.sleuthkit.datamodel.blackboardutils.attributes.BlackboardJsonAttrUtil; import org.sleuthkit.datamodel.blackboardutils.attributes.MessageAttachments.FileAttachment; import org.sleuthkit.datamodel.blackboardutils.attributes.MessageAttachments; @@ -69,6 +69,47 @@ final class AttachmentThumbnailsChildren extends Children.Keys { return new Node[]{new AttachementThumbnailNode(t)}; } + /** + * Adds thumbnails based on MessageAttachments parsed in the + * BlackboardAttribute. + * + * @param bba The pertinent BlackboardArtifact. + * @param attachmentsAttr The appropriate attribute for MessageAttachments. + * @param thumbnails Parsed thumbnails will be added to this set. + * + * @throws BlackboardJsonAttrUtil.InvalidJsonException + * @throws TskCoreException + */ + private static void addMessageAttachmentThumbnails(BlackboardArtifact bba, BlackboardAttribute attachmentsAttr, + Set thumbnails) throws BlackboardJsonAttrUtil.InvalidJsonException, TskCoreException { + + MessageAttachments msgAttachments = BlackboardJsonAttrUtil.fromAttribute(attachmentsAttr, MessageAttachments.class); + Collection fileAttachments = msgAttachments.getFileAttachments(); + for (FileAttachment fileAttachment : fileAttachments) { + long attachedFileObjId = fileAttachment.getObjectId(); + if (attachedFileObjId >= 0) { + AbstractFile attachedFile = bba.getSleuthkitCase().getAbstractFileById(attachedFileObjId); + thumbnails.add(attachedFile); + } + } + } + + /** + * Adds thumbnails based on children in the BlackboardArtifact. + * + * @param bba The BlackboardArtifact whose children will be used. + * @param thumbnails Thumbnails will be added to this set. + * + * @throws TskCoreException + */ + private static void addChildrenThumbnails(BlackboardArtifact bba, Set thumbnails) throws TskCoreException { + for (Content childContent : bba.getChildren()) { + if (childContent instanceof AbstractFile) { + thumbnails.add((AbstractFile) childContent); + } + } + } + @Override protected void addNotify() { super.addNotify(); @@ -89,24 +130,14 @@ final class AttachmentThumbnailsChildren extends Children.Keys { // Get the attachments from TSK_ATTACHMENTS attribute. BlackboardAttribute attachmentsAttr = bba.getAttribute(new BlackboardAttribute.Type(BlackboardAttribute.ATTRIBUTE_TYPE.TSK_ATTACHMENTS)); if (attachmentsAttr != null) { - - String jsonVal = attachmentsAttr.getValueString(); - MessageAttachments msgAttachments = new Gson().fromJson(jsonVal, MessageAttachments.class); - - Collection fileAttachments = msgAttachments.getFileAttachments(); - for (FileAttachment fileAttachment : fileAttachments) { - long attachedFileObjId = fileAttachment.getObjectId(); - if (attachedFileObjId >= 0) { - AbstractFile attachedFile = bba.getSleuthkitCase().getAbstractFileById(attachedFileObjId); - thumbnails.add(attachedFile); - } + try { + addMessageAttachmentThumbnails(bba, attachmentsAttr, thumbnails); + } catch (BlackboardJsonAttrUtil.InvalidJsonException ex) { + LOGGER.log(Level.WARNING, String.format("Unable to parse json for MessageAttachments object in artifact: %s", bba.getName()), ex); + addChildrenThumbnails(bba, thumbnails); } } else { // backward compatibility - email message attachments are derived files, children of the message. - for (Content childContent : bba.getChildren()) { - if (childContent instanceof AbstractFile) { - thumbnails.add((AbstractFile) childContent); - } - } + addChildrenThumbnails(bba, thumbnails); } } catch (TskCoreException ex) { diff --git a/Core/src/org/sleuthkit/autopsy/communications/relationships/MessageNode.java b/Core/src/org/sleuthkit/autopsy/communications/relationships/MessageNode.java index 038452dcd7..58c84406e0 100755 --- a/Core/src/org/sleuthkit/autopsy/communications/relationships/MessageNode.java +++ b/Core/src/org/sleuthkit/autopsy/communications/relationships/MessageNode.java @@ -18,7 +18,6 @@ */ package org.sleuthkit.autopsy.communications.relationships; -import com.google.gson.Gson; import java.util.logging.Level; import javax.swing.Action; import org.apache.commons.lang3.StringUtils; @@ -40,6 +39,7 @@ import org.sleuthkit.autopsy.datamodel.BlackboardArtifactNode; import static org.sleuthkit.datamodel.BlackboardArtifact.ARTIFACT_TYPE.TSK_EMAIL_MSG; import static org.sleuthkit.datamodel.BlackboardArtifact.ARTIFACT_TYPE.TSK_MESSAGE; import org.sleuthkit.datamodel.BlackboardAttribute; +import org.sleuthkit.datamodel.blackboardutils.attributes.BlackboardJsonAttrUtil; import org.sleuthkit.datamodel.blackboardutils.attributes.MessageAttachments; /** @@ -48,22 +48,22 @@ import org.sleuthkit.datamodel.blackboardutils.attributes.MessageAttachments; class MessageNode extends BlackboardArtifactNode { public static final String UNTHREADED_ID = ""; - + private static final Logger logger = Logger.getLogger(MessageNode.class.getName()); - + private final String threadID; - + private final Action preferredAction; - MessageNode(BlackboardArtifact artifact, String threadID, Action preferredAction) { + MessageNode(BlackboardArtifact artifact, String threadID, Action preferredAction) { super(artifact); - + this.preferredAction = preferredAction; final String stripEnd = StringUtils.stripEnd(artifact.getDisplayName(), "s"); // NON-NLS String removeEndIgnoreCase = StringUtils.removeEndIgnoreCase(stripEnd, "message"); // NON-NLS setDisplayName(removeEndIgnoreCase.isEmpty() ? stripEnd : removeEndIgnoreCase); - + this.threadID = threadID; } @@ -75,7 +75,7 @@ class MessageNode extends BlackboardArtifactNode { "MessageNode_Node_Property_Subject=Subject", "MessageNode_Node_Property_Attms=Attachments" }) - + @Override protected Sheet createSheet() { Sheet sheet = super.createSheet(); @@ -89,22 +89,22 @@ class MessageNode extends BlackboardArtifactNode { final BlackboardArtifact artifact = getArtifact(); BlackboardArtifact.ARTIFACT_TYPE fromID = BlackboardArtifact.ARTIFACT_TYPE.fromID(artifact.getArtifactTypeID()); - - if(fromID == null || - (fromID != TSK_EMAIL_MSG && - fromID != TSK_MESSAGE)) { + + if (fromID == null + || (fromID != TSK_EMAIL_MSG + && fromID != TSK_MESSAGE)) { return sheet; } - - sheetSet.put(new NodeProperty<>("ThreadID", "ThreadID","",threadID == null ? UNTHREADED_ID : threadID)); //NON-NLS + + sheetSet.put(new NodeProperty<>("ThreadID", "ThreadID", "", threadID == null ? UNTHREADED_ID : threadID)); //NON-NLS sheetSet.put(new NodeProperty<>("Subject", Bundle.MessageNode_Node_Property_Subject(), "", - getAttributeDisplayString(artifact, TSK_SUBJECT))); //NON-NLS + getAttributeDisplayString(artifact, TSK_SUBJECT))); //NON-NLS try { sheetSet.put(new NodeProperty<>("Attms", Bundle.MessageNode_Node_Property_Attms(), "", getAttachmentsCount())); //NON-NLS } catch (TskCoreException ex) { logger.log(Level.WARNING, "Error loading attachment count for " + artifact, ex); //NON-NLS } - + switch (fromID) { case TSK_EMAIL_MSG: sheetSet.put(new NodeProperty<>("From", Bundle.MessageNode_Node_Property_From(), "", @@ -138,30 +138,31 @@ class MessageNode extends BlackboardArtifactNode { public String getSourceName() { return getDisplayName(); } - + String getThreadID() { return threadID; } - + @Override public Action getPreferredAction() { return preferredAction; } - + private int getAttachmentsCount() throws TskCoreException { final BlackboardArtifact artifact = getArtifact(); - int attachmentsCount; // Attachments are specified in an attribute TSK_ATTACHMENTS as JSON attribute BlackboardAttribute attachmentsAttr = artifact.getAttribute(new BlackboardAttribute.Type(BlackboardAttribute.ATTRIBUTE_TYPE.TSK_ATTACHMENTS)); if (attachmentsAttr != null) { - String jsonVal = attachmentsAttr.getValueString(); - MessageAttachments msgAttachments = new Gson().fromJson(jsonVal, MessageAttachments.class); - attachmentsCount = msgAttachments.getAttachmentsCount(); - } else { // legacy attachments may be children of message artifact. - attachmentsCount = artifact.getChildrenCount(); + try { + MessageAttachments msgAttachments = BlackboardJsonAttrUtil.fromAttribute(attachmentsAttr, MessageAttachments.class); + return msgAttachments.getAttachmentsCount(); + } catch (BlackboardJsonAttrUtil.InvalidJsonException ex) { + logger.log(Level.WARNING, String.format("Unable to parse json for MessageAttachments object in artifact: %s", artifact.getName()), ex); + } } - return attachmentsCount; + // legacy attachments may be children of message artifact. + return artifact.getChildrenCount(); } } diff --git a/Core/src/org/sleuthkit/autopsy/contentviewers/MessageContentViewer.java b/Core/src/org/sleuthkit/autopsy/contentviewers/MessageContentViewer.java index 8ea3867470..64ec0f60c0 100644 --- a/Core/src/org/sleuthkit/autopsy/contentviewers/MessageContentViewer.java +++ b/Core/src/org/sleuthkit/autopsy/contentviewers/MessageContentViewer.java @@ -19,7 +19,6 @@ package org.sleuthkit.autopsy.contentviewers; import org.sleuthkit.autopsy.datamodel.AttachmentNode; -import com.google.gson.Gson; import java.awt.Color; import java.awt.Component; import java.awt.ComponentOrientation; @@ -33,6 +32,7 @@ import java.util.logging.Level; import javax.swing.JScrollPane; import javax.swing.text.JTextComponent; import org.apache.commons.lang3.StringUtils; +import static org.apache.poi.hwpf.model.FileInformationBlock.logger; import org.jsoup.Jsoup; import org.jsoup.nodes.Document; import org.openide.explorer.ExplorerManager; @@ -76,6 +76,7 @@ import static org.sleuthkit.datamodel.BlackboardAttribute.ATTRIBUTE_TYPE.TSK_TEX import org.sleuthkit.datamodel.Content; import org.sleuthkit.datamodel.SleuthkitCase; import org.sleuthkit.datamodel.TskCoreException; +import org.sleuthkit.datamodel.blackboardutils.attributes.BlackboardJsonAttrUtil; import org.sleuthkit.datamodel.blackboardutils.attributes.MessageAttachments; import org.sleuthkit.datamodel.blackboardutils.attributes.MessageAttachments.FileAttachment; import org.sleuthkit.datamodel.blackboardutils.attributes.MessageAttachments.Attachment; @@ -89,7 +90,8 @@ import org.sleuthkit.datamodel.blackboardutils.attributes.MessageAttachments.URL public class MessageContentViewer extends javax.swing.JPanel implements DataContentViewer { /** - * This is a text component viewer to be a child component to be placed in a {@link TranslatablePanel TranslatablePanel}. + * This is a text component viewer to be a child component to be placed in a + * {@link TranslatablePanel TranslatablePanel}. */ class TextComponent implements TranslatablePanel.ContentComponent { @@ -439,11 +441,11 @@ public class MessageContentViewer extends javax.swing.JPanel implements DataCont * Get the artifact associated with the given artifact, if there is one. * * @param artifact The artifact to get the associated artifact from. Must - * not be null + * not be null * * @throws TskCoreException If there is a critical error querying the DB. * @return An optional containing the artifact associated with the given - * artifact, if there is one. + * artifact, if there is one. */ private static Optional getAssociatedArtifact(final BlackboardArtifact artifact) throws TskCoreException { BlackboardAttribute attribute = artifact.getAttribute(TSK_ASSOCIATED_TYPE); @@ -523,10 +525,10 @@ public class MessageContentViewer extends javax.swing.JPanel implements DataCont * Is the given artifact one that can be shown in this viewer? * * @param nodeArtifact An artifact that might be a message. Must not be - * null. + * null. * * @return True if the given artifact can be shown as a message in this - * viewer. + * viewer. */ private static boolean isMessageArtifact(BlackboardArtifact nodeArtifact) { final int artifactTypeID = nodeArtifact.getArtifactTypeID(); @@ -543,6 +545,7 @@ public class MessageContentViewer extends javax.swing.JPanel implements DataCont * the file, that artifact is returned. * * @param node Node to check. + * * @return Blackboard artifact for the node, null if there isn't any. */ private BlackboardArtifact getNodeArtifact(Node node) { @@ -592,7 +595,7 @@ public class MessageContentViewer extends javax.swing.JPanel implements DataCont * Configure the text area at the given index to show the content of the * given type. * - * @param type The ATTRIBUT_TYPE to show in the indexed tab. + * @param type The ATTRIBUT_TYPE to show in the indexed tab. * @param index The index of the text area to configure. * * @throws TskCoreException @@ -628,33 +631,71 @@ public class MessageContentViewer extends javax.swing.JPanel implements DataCont datetimeText.setEnabled(true); } + /** + * Retrieves the set of attachments present in the children of the + * BlackboardArtifact. + * + * @param artifact The artifact whose children will be used for attachments. + * + * @return The attachments found in the BlackboardArtifact. + * + * @throws TskCoreException + */ + private static Set getAttachmentsFromChildren(BlackboardArtifact artifact) throws TskCoreException { + // For backward compatibility - email attachements are derived files and children of the email message artifact + Set attachments = new HashSet<>(); + for (Content child : artifact.getChildren()) { + if (child instanceof AbstractFile) { + attachments.add(new FileAttachment((AbstractFile) child)); + } + } + return attachments; + } + + /** + * Retrieves the set of attachments present in the MessageAttachments object + * parsed from the blackboard attribute. + * + * @param attachmentsAttr The blackboard attribute to be parsed to a + * MessageAttachments object. + * + * @return The set of attachments present in the MessageAttachments object. + * + * @throws BlackboardJsonAttrUtil.InvalidJsonException If the + * BlackboardAttribute + * cannot be parsed to a + * MessageAttachments + * object. + */ + private static Set getAttachmentsFromMessageAttachments(BlackboardAttribute attachmentsAttr) throws BlackboardJsonAttrUtil.InvalidJsonException { + Set attachments = new HashSet<>(); + MessageAttachments msgAttachments = BlackboardJsonAttrUtil.fromAttribute(attachmentsAttr, MessageAttachments.class); + Collection fileAttachments = msgAttachments.getFileAttachments(); + for (FileAttachment fileAttachment : fileAttachments) { + attachments.add(fileAttachment); + } + Collection urlAttachments = msgAttachments.getUrlAttachments(); + for (URLAttachment urlAttachment : urlAttachments) { + attachments.add(urlAttachment); + } + return attachments; + } + private void configureAttachments() throws TskCoreException { - final Set attachments; + Set attachments; // Attachments are specified in an attribute TSK_ATTACHMENTS as JSON attribute BlackboardAttribute attachmentsAttr = artifact.getAttribute(new BlackboardAttribute.Type(BlackboardAttribute.ATTRIBUTE_TYPE.TSK_ATTACHMENTS)); if (attachmentsAttr != null) { - - attachments = new HashSet<>(); - String jsonVal = attachmentsAttr.getValueString(); - MessageAttachments msgAttachments = new Gson().fromJson(jsonVal, MessageAttachments.class); - - Collection fileAttachments = msgAttachments.getFileAttachments(); - for (FileAttachment fileAttachment : fileAttachments) { - attachments.add(fileAttachment); - } - Collection urlAttachments = msgAttachments.getUrlAttachments(); - for (URLAttachment urlAttachment : urlAttachments) { - attachments.add(urlAttachment); - } - } else { // For backward compatibility - email attachements are derived files and children of the email message artifact - attachments = new HashSet<>(); - for (Content child : artifact.getChildren()) { - if (child instanceof AbstractFile) { - attachments.add(new FileAttachment((AbstractFile) child)); - } + try { + attachments = getAttachmentsFromMessageAttachments(attachmentsAttr); + } catch (BlackboardJsonAttrUtil.InvalidJsonException ex) { + LOGGER.log(Level.WARNING, String.format("Unable to parse json for MessageAttachments object in artifact: %s", artifact.getName()), ex); + attachments = getAttachmentsFromChildren(artifact); } + } else { + attachments = getAttachmentsFromChildren(artifact); } final int numberOfAttachments = attachments.size(); From ad808e0538a4566d1f4cf33ec36ce4711ffd23e8 Mon Sep 17 00:00:00 2001 From: William Schaefer Date: Wed, 15 Apr 2020 09:11:11 -0400 Subject: [PATCH 125/137] 6225 second attempt to fix screenshot 15 --- .../OptionalCasePropertiesPanel.form | 32 ++++++++--------- .../OptionalCasePropertiesPanel.java | 35 ++++++++++--------- 2 files changed, 35 insertions(+), 32 deletions(-) diff --git a/Core/src/org/sleuthkit/autopsy/casemodule/OptionalCasePropertiesPanel.form b/Core/src/org/sleuthkit/autopsy/casemodule/OptionalCasePropertiesPanel.form index 86dd05cb80..0d49bf2241 100644 --- a/Core/src/org/sleuthkit/autopsy/casemodule/OptionalCasePropertiesPanel.form +++ b/Core/src/org/sleuthkit/autopsy/casemodule/OptionalCasePropertiesPanel.form @@ -320,18 +320,18 @@ - + - + - + @@ -359,18 +359,18 @@ - + - + - + @@ -383,13 +383,13 @@ - + - + @@ -404,14 +404,14 @@ - + - + @@ -421,13 +421,13 @@ - + - + @@ -442,25 +442,25 @@ - + - + - + - + diff --git a/Core/src/org/sleuthkit/autopsy/casemodule/OptionalCasePropertiesPanel.java b/Core/src/org/sleuthkit/autopsy/casemodule/OptionalCasePropertiesPanel.java index c863649973..287a86863f 100644 --- a/Core/src/org/sleuthkit/autopsy/casemodule/OptionalCasePropertiesPanel.java +++ b/Core/src/org/sleuthkit/autopsy/casemodule/OptionalCasePropertiesPanel.java @@ -382,12 +382,13 @@ final class OptionalCasePropertiesPanel extends javax.swing.JPanel { orgainizationPanel.setLayout(new java.awt.GridBagLayout()); org.openide.awt.Mnemonics.setLocalizedText(lbPointOfContactPhoneLabel, org.openide.util.NbBundle.getMessage(OptionalCasePropertiesPanel.class, "OptionalCasePropertiesPanel.lbPointOfContactPhoneLabel.text")); // NOI18N - lbPointOfContactPhoneLabel.setMaximumSize(new java.awt.Dimension(82, 14)); + lbPointOfContactPhoneLabel.setMaximumSize(new java.awt.Dimension(182, 14)); lbPointOfContactPhoneLabel.setMinimumSize(new java.awt.Dimension(82, 14)); - lbPointOfContactPhoneLabel.setPreferredSize(new java.awt.Dimension(82, 14)); + lbPointOfContactPhoneLabel.setPreferredSize(new java.awt.Dimension(120, 14)); gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.gridx = 0; gridBagConstraints.gridy = 2; + gridBagConstraints.gridwidth = 2; gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL; gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST; gridBagConstraints.insets = new java.awt.Insets(7, 12, 0, 0); @@ -407,12 +408,13 @@ final class OptionalCasePropertiesPanel extends javax.swing.JPanel { orgainizationPanel.add(comboBoxOrgName, gridBagConstraints); org.openide.awt.Mnemonics.setLocalizedText(lbPointOfContactNameLabel, org.openide.util.NbBundle.getMessage(OptionalCasePropertiesPanel.class, "OptionalCasePropertiesPanel.lbPointOfContactNameLabel.text")); // NOI18N - lbPointOfContactNameLabel.setMaximumSize(new java.awt.Dimension(82, 14)); + lbPointOfContactNameLabel.setMaximumSize(new java.awt.Dimension(182, 14)); lbPointOfContactNameLabel.setMinimumSize(new java.awt.Dimension(82, 14)); - lbPointOfContactNameLabel.setPreferredSize(new java.awt.Dimension(82, 14)); + lbPointOfContactNameLabel.setPreferredSize(new java.awt.Dimension(120, 14)); gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.gridx = 0; gridBagConstraints.gridy = 1; + gridBagConstraints.gridwidth = 2; gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL; gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST; gridBagConstraints.insets = new java.awt.Insets(13, 12, 0, 5); @@ -420,9 +422,9 @@ final class OptionalCasePropertiesPanel extends javax.swing.JPanel { org.openide.awt.Mnemonics.setLocalizedText(bnNewOrganization, org.openide.util.NbBundle.getMessage(OptionalCasePropertiesPanel.class, "OptionalCasePropertiesPanel.bnNewOrganization.text")); // NOI18N bnNewOrganization.setMargin(new java.awt.Insets(2, 6, 2, 6)); - bnNewOrganization.setMaximumSize(new java.awt.Dimension(123, 23)); + bnNewOrganization.setMaximumSize(new java.awt.Dimension(160, 23)); bnNewOrganization.setMinimumSize(new java.awt.Dimension(123, 23)); - bnNewOrganization.setPreferredSize(new java.awt.Dimension(123, 23)); + bnNewOrganization.setPreferredSize(new java.awt.Dimension(140, 23)); bnNewOrganization.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { bnNewOrganizationActionPerformed(evt); @@ -436,26 +438,26 @@ final class OptionalCasePropertiesPanel extends javax.swing.JPanel { gridBagConstraints.insets = new java.awt.Insets(8, 12, 0, 18); orgainizationPanel.add(bnNewOrganization, gridBagConstraints); gridBagConstraints = new java.awt.GridBagConstraints(); - gridBagConstraints.gridx = 1; + gridBagConstraints.gridx = 2; gridBagConstraints.gridy = 3; - gridBagConstraints.gridwidth = 3; + gridBagConstraints.gridwidth = 2; gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL; gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST; gridBagConstraints.insets = new java.awt.Insets(7, 4, 13, 18); orgainizationPanel.add(lbPointOfContactEmailText, gridBagConstraints); gridBagConstraints = new java.awt.GridBagConstraints(); - gridBagConstraints.gridx = 1; + gridBagConstraints.gridx = 2; gridBagConstraints.gridy = 1; - gridBagConstraints.gridwidth = 3; + gridBagConstraints.gridwidth = 2; gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL; gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST; gridBagConstraints.insets = new java.awt.Insets(13, 4, 0, 18); orgainizationPanel.add(lbPointOfContactNameText, gridBagConstraints); org.openide.awt.Mnemonics.setLocalizedText(lbOrganizationNameLabel, org.openide.util.NbBundle.getMessage(OptionalCasePropertiesPanel.class, "OptionalCasePropertiesPanel.lbOrganizationNameLabel.text")); // NOI18N - lbOrganizationNameLabel.setMaximumSize(new java.awt.Dimension(189, 14)); + lbOrganizationNameLabel.setMaximumSize(new java.awt.Dimension(300, 14)); lbOrganizationNameLabel.setMinimumSize(new java.awt.Dimension(189, 14)); - lbOrganizationNameLabel.setPreferredSize(new java.awt.Dimension(189, 14)); + lbOrganizationNameLabel.setPreferredSize(new java.awt.Dimension(220, 14)); gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.gridx = 0; gridBagConstraints.gridy = 0; @@ -466,20 +468,21 @@ final class OptionalCasePropertiesPanel extends javax.swing.JPanel { orgainizationPanel.add(lbOrganizationNameLabel, gridBagConstraints); org.openide.awt.Mnemonics.setLocalizedText(lbPointOfContactEmailLabel, org.openide.util.NbBundle.getMessage(OptionalCasePropertiesPanel.class, "OptionalCasePropertiesPanel.lbPointOfContactEmailLabel.text")); // NOI18N - lbPointOfContactEmailLabel.setMaximumSize(new java.awt.Dimension(82, 14)); + lbPointOfContactEmailLabel.setMaximumSize(new java.awt.Dimension(182, 14)); lbPointOfContactEmailLabel.setMinimumSize(new java.awt.Dimension(82, 14)); - lbPointOfContactEmailLabel.setPreferredSize(new java.awt.Dimension(82, 14)); + lbPointOfContactEmailLabel.setPreferredSize(new java.awt.Dimension(120, 14)); gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.gridx = 0; gridBagConstraints.gridy = 3; + gridBagConstraints.gridwidth = 2; gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL; gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST; gridBagConstraints.insets = new java.awt.Insets(7, 12, 13, 0); orgainizationPanel.add(lbPointOfContactEmailLabel, gridBagConstraints); gridBagConstraints = new java.awt.GridBagConstraints(); - gridBagConstraints.gridx = 1; + gridBagConstraints.gridx = 2; gridBagConstraints.gridy = 2; - gridBagConstraints.gridwidth = 3; + gridBagConstraints.gridwidth = 2; gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL; gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST; gridBagConstraints.insets = new java.awt.Insets(7, 4, 0, 18); From 89e17ec3e2f3767e6cbccf59738fcce6340600e6 Mon Sep 17 00:00:00 2001 From: William Schaefer Date: Wed, 15 Apr 2020 09:15:46 -0400 Subject: [PATCH 126/137] 6225 second try at screenshot 17 --- .../corecomponents/DataContentViewerArtifact.form | 10 ++++++++-- .../corecomponents/DataContentViewerArtifact.java | 6 ++++-- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/Core/src/org/sleuthkit/autopsy/corecomponents/DataContentViewerArtifact.form b/Core/src/org/sleuthkit/autopsy/corecomponents/DataContentViewerArtifact.form index 1f01f76f6e..5827ce617f 100644 --- a/Core/src/org/sleuthkit/autopsy/corecomponents/DataContentViewerArtifact.form +++ b/Core/src/org/sleuthkit/autopsy/corecomponents/DataContentViewerArtifact.form @@ -82,6 +82,12 @@ + + + + + + @@ -107,13 +113,13 @@ - + - + diff --git a/Core/src/org/sleuthkit/autopsy/corecomponents/DataContentViewerArtifact.java b/Core/src/org/sleuthkit/autopsy/corecomponents/DataContentViewerArtifact.java index 6db644be4f..78ccd6e4ec 100644 --- a/Core/src/org/sleuthkit/autopsy/corecomponents/DataContentViewerArtifact.java +++ b/Core/src/org/sleuthkit/autopsy/corecomponents/DataContentViewerArtifact.java @@ -235,6 +235,8 @@ public class DataContentViewerArtifact extends javax.swing.JPanel implements Dat jPanel1.setLayout(new java.awt.GridBagLayout()); totalPageLabel.setText(org.openide.util.NbBundle.getMessage(DataContentViewerArtifact.class, "DataContentViewerArtifact.totalPageLabel.text")); // NOI18N + totalPageLabel.setMaximumSize(new java.awt.Dimension(40, 16)); + totalPageLabel.setPreferredSize(new java.awt.Dimension(25, 16)); gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.gridx = 3; gridBagConstraints.gridy = 0; @@ -253,9 +255,9 @@ public class DataContentViewerArtifact extends javax.swing.JPanel implements Dat jPanel1.add(ofLabel, gridBagConstraints); currentPageLabel.setText(org.openide.util.NbBundle.getMessage(DataContentViewerArtifact.class, "DataContentViewerArtifact.currentPageLabel.text")); // NOI18N - currentPageLabel.setMaximumSize(new java.awt.Dimension(18, 14)); + currentPageLabel.setMaximumSize(new java.awt.Dimension(38, 14)); currentPageLabel.setMinimumSize(new java.awt.Dimension(18, 14)); - currentPageLabel.setPreferredSize(new java.awt.Dimension(18, 14)); + currentPageLabel.setPreferredSize(new java.awt.Dimension(20, 14)); gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.gridx = 1; gridBagConstraints.gridy = 0; From f1735512784d15a4d6e21c88f48b55de92e11d01 Mon Sep 17 00:00:00 2001 From: Mark McKinnon Date: Wed, 15 Apr 2020 09:17:14 -0400 Subject: [PATCH 127/137] Update Running_Linux_OSX.txt Add Gatekeper troubleshooting tip --- Running_Linux_OSX.txt | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Running_Linux_OSX.txt b/Running_Linux_OSX.txt index a45553b246..60b81bc50a 100644 --- a/Running_Linux_OSX.txt +++ b/Running_Linux_OSX.txt @@ -80,6 +80,11 @@ Autopsy depends on a specific version of The Sleuth Kit. You need the Java libr (a) confirm that you have a version of Java 8 installed and (b) confirm that your JAVA_HOME environment variable is set correctly: % echo $JAVA_HOME + +- If you see something like "cannot be opened because the developer cannot be verified." it is an indication + that Gatekeeper is running and is stopping a file from being executed. To fix this open a new terminal window + and enter the following command "sudo spctl --master-disable", you will be required to enter your password. + This will allow any program to be be downloaded from anywhere and executed. * Limitations (Updated May 2018) * - Timeline does not work on OS X From 61d8a05b64f96a46b314f8d1aa0ace566ad10f02 Mon Sep 17 00:00:00 2001 From: Richard Cordovano Date: Wed, 15 Apr 2020 12:49:31 -0400 Subject: [PATCH 128/137] Get stack trace in TextFileExtractor.isSupported --- .../org/sleuthkit/autopsy/textextractors/TextFileExtractor.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Core/src/org/sleuthkit/autopsy/textextractors/TextFileExtractor.java b/Core/src/org/sleuthkit/autopsy/textextractors/TextFileExtractor.java index af31797b52..9c71b14ecc 100644 --- a/Core/src/org/sleuthkit/autopsy/textextractors/TextFileExtractor.java +++ b/Core/src/org/sleuthkit/autopsy/textextractors/TextFileExtractor.java @@ -86,7 +86,7 @@ public final class TextFileExtractor implements TextExtractor { try { fileTypeDetector = new FileTypeDetector(); } catch (FileTypeDetector.FileTypeDetectorInitException ex) { - logger.log(Level.SEVERE, "Unable to create file type detector for determining MIME type."); + logger.log(Level.SEVERE, "Unable to create file type detector for determining MIME type", ex); return false; } mimeType = fileTypeDetector.getMIMEType(file); From 02b2315ac0ef1f3234fdaaaa3a23f400ba0f9fc9 Mon Sep 17 00:00:00 2001 From: Mark McKinnon Date: Wed, 15 Apr 2020 09:17:14 -0400 Subject: [PATCH 129/137] Update Running_Linux_OSX.txt Add Gatekeper troubleshooting tip --- Running_Linux_OSX.txt | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Running_Linux_OSX.txt b/Running_Linux_OSX.txt index 521fa6e9f1..39ea10441c 100644 --- a/Running_Linux_OSX.txt +++ b/Running_Linux_OSX.txt @@ -80,6 +80,11 @@ Autopsy depends on a specific version of The Sleuth Kit. You need the Java libr (a) confirm that you have a version of Java 8 installed and (b) confirm that your JAVA_HOME environment variable is set correctly: % echo $JAVA_HOME + +- If you see something like "cannot be opened because the developer cannot be verified." it is an indication + that Gatekeeper is running and is stopping a file from being executed. To fix this open a new terminal window + and enter the following command "sudo spctl --master-disable", you will be required to enter your password. + This will allow any program to be be downloaded from anywhere and executed. * Limitations (Updated May 2018) * - Timeline does not work on OS X From 47d6f83f6f1ad3545f87f548221341ddbdb4dc98 Mon Sep 17 00:00:00 2001 From: Andrea Lazzarotto Date: Sun, 12 Apr 2020 15:15:06 +0200 Subject: [PATCH 130/137] Update installation instructions for macOS On macOS one has to install the liberica-jdk8-full package in order to have OpenJFX. --- Running_Linux_OSX.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Running_Linux_OSX.txt b/Running_Linux_OSX.txt index 39ea10441c..60b81bc50a 100644 --- a/Running_Linux_OSX.txt +++ b/Running_Linux_OSX.txt @@ -27,7 +27,7 @@ The following need to be done at least once. They do not need to be repeated for -- OS X: 1. Install BellSoft Java 8. % brew tap bell-sw/liberica - % brew cask install liberica-jdk8 + % brew cask install liberica-jdk8-full 2. Set JAVA_HOME environment variable to location of JRE installation. e.g. add the following to ~/.bashrc export JAVA_HOME=$(/usr/libexec/java_home -v 1.8) From 7640c0f54911eab1b47ac5778c1e3492dca8a2c0 Mon Sep 17 00:00:00 2001 From: Greg DiCristofaro Date: Wed, 15 Apr 2020 13:01:48 -0400 Subject: [PATCH 131/137] return nothing if json cannot be parsed --- .../communications/relationships/AccountSummary.java | 1 - .../relationships/AttachmentThumbnailsChildren.java | 1 - .../autopsy/communications/relationships/MessageNode.java | 8 +++++--- .../autopsy/contentviewers/MessageContentViewer.java | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/Core/src/org/sleuthkit/autopsy/communications/relationships/AccountSummary.java b/Core/src/org/sleuthkit/autopsy/communications/relationships/AccountSummary.java index d8f74fcc66..719fad80ec 100755 --- a/Core/src/org/sleuthkit/autopsy/communications/relationships/AccountSummary.java +++ b/Core/src/org/sleuthkit/autopsy/communications/relationships/AccountSummary.java @@ -156,7 +156,6 @@ class AccountSummary { countFromMessageAttachments(attachmentsAttr, artifact); } catch (BlackboardJsonAttrUtil.InvalidJsonException ex) { logger.log(Level.WARNING, String.format("Unable to parse json for MessageAttachments object in artifact: %s", artifact.getName()), ex); - countFromArtifactChildren(artifact); } } else { countFromArtifactChildren(artifact); diff --git a/Core/src/org/sleuthkit/autopsy/communications/relationships/AttachmentThumbnailsChildren.java b/Core/src/org/sleuthkit/autopsy/communications/relationships/AttachmentThumbnailsChildren.java index c703d34d84..64225e4fc2 100755 --- a/Core/src/org/sleuthkit/autopsy/communications/relationships/AttachmentThumbnailsChildren.java +++ b/Core/src/org/sleuthkit/autopsy/communications/relationships/AttachmentThumbnailsChildren.java @@ -134,7 +134,6 @@ final class AttachmentThumbnailsChildren extends Children.Keys { addMessageAttachmentThumbnails(bba, attachmentsAttr, thumbnails); } catch (BlackboardJsonAttrUtil.InvalidJsonException ex) { LOGGER.log(Level.WARNING, String.format("Unable to parse json for MessageAttachments object in artifact: %s", bba.getName()), ex); - addChildrenThumbnails(bba, thumbnails); } } else { // backward compatibility - email message attachments are derived files, children of the message. addChildrenThumbnails(bba, thumbnails); diff --git a/Core/src/org/sleuthkit/autopsy/communications/relationships/MessageNode.java b/Core/src/org/sleuthkit/autopsy/communications/relationships/MessageNode.java index 58c84406e0..6d5d5785f6 100755 --- a/Core/src/org/sleuthkit/autopsy/communications/relationships/MessageNode.java +++ b/Core/src/org/sleuthkit/autopsy/communications/relationships/MessageNode.java @@ -159,10 +159,12 @@ class MessageNode extends BlackboardArtifactNode { return msgAttachments.getAttachmentsCount(); } catch (BlackboardJsonAttrUtil.InvalidJsonException ex) { logger.log(Level.WARNING, String.format("Unable to parse json for MessageAttachments object in artifact: %s", artifact.getName()), ex); + return 0; } } - - // legacy attachments may be children of message artifact. - return artifact.getChildrenCount(); + else { + // legacy attachments may be children of message artifact. + return artifact.getChildrenCount(); + } } } diff --git a/Core/src/org/sleuthkit/autopsy/contentviewers/MessageContentViewer.java b/Core/src/org/sleuthkit/autopsy/contentviewers/MessageContentViewer.java index 64ec0f60c0..032cb75e5f 100644 --- a/Core/src/org/sleuthkit/autopsy/contentviewers/MessageContentViewer.java +++ b/Core/src/org/sleuthkit/autopsy/contentviewers/MessageContentViewer.java @@ -692,7 +692,7 @@ public class MessageContentViewer extends javax.swing.JPanel implements DataCont attachments = getAttachmentsFromMessageAttachments(attachmentsAttr); } catch (BlackboardJsonAttrUtil.InvalidJsonException ex) { LOGGER.log(Level.WARNING, String.format("Unable to parse json for MessageAttachments object in artifact: %s", artifact.getName()), ex); - attachments = getAttachmentsFromChildren(artifact); + attachments = new HashSet<>(); } } else { attachments = getAttachmentsFromChildren(artifact); From 82f7324b30d7c5ebc8bba9b9d52baf5cbc472b40 Mon Sep 17 00:00:00 2001 From: Greg DiCristofaro Date: Wed, 15 Apr 2020 13:30:27 -0400 Subject: [PATCH 132/137] updated logic --- .../relationships/AccountSummary.java | 148 ++++++------------ .../AttachmentThumbnailsChildren.java | 60 ++----- .../relationships/MessageNode.java | 48 +++--- .../contentviewers/MessageContentViewer.java | 92 ++++------- 4 files changed, 120 insertions(+), 228 deletions(-) diff --git a/Core/src/org/sleuthkit/autopsy/communications/relationships/AccountSummary.java b/Core/src/org/sleuthkit/autopsy/communications/relationships/AccountSummary.java index 719fad80ec..ff6607a84e 100755 --- a/Core/src/org/sleuthkit/autopsy/communications/relationships/AccountSummary.java +++ b/Core/src/org/sleuthkit/autopsy/communications/relationships/AccountSummary.java @@ -36,7 +36,7 @@ import org.sleuthkit.datamodel.CommunicationsUtils; import org.sleuthkit.datamodel.blackboardutils.attributes.BlackboardJsonAttrUtil; /** - * + * * Class representing the Summary data for a given account. */ class AccountSummary { @@ -56,9 +56,9 @@ class AccountSummary { /** * Summary constructor. - * + * * @param selectedAccount Selected account object - * @param artifacts List of relationship source artifacts + * @param artifacts List of relationship source artifacts */ AccountSummary(Account selectedAccount, Set artifacts) { this.selectedAccount = selectedAccount; @@ -67,8 +67,7 @@ class AccountSummary { } /** - * Initialize the counts based on the selected account and the given - * artifacts. + * Initialize the counts based on the selected account and the given artifacts. */ private void initCounts() { for (BlackboardArtifact artifact : artifacts) { @@ -87,18 +86,18 @@ class AccountSummary { case TSK_CONTACT: if (selectedAccount.getAccountType() != Account.Type.DEVICE) { String typeSpecificID = selectedAccount.getTypeSpecificID(); - + List attributes = null; - - try { + + try{ attributes = artifact.getAttributes(); - } catch (TskCoreException ex) { + } catch(TskCoreException ex) { logger.log(Level.WARNING, String.format("Unable to getAttributes for artifact: %d", artifact.getArtifactID()), ex); break; } - + boolean isReference = false; - + for (BlackboardAttribute attribute : attributes) { String attributeTypeName = attribute.getAttributeType().getTypeName(); @@ -109,7 +108,7 @@ class AccountSummary { } else if (attributeTypeName.contains("EMAIL")) { attributeValue = CommunicationsUtils.normalizeEmailAddress(attributeValue); } - + if (typeSpecificID.equals(attributeValue)) { isReference = true; break; @@ -134,88 +133,46 @@ class AccountSummary { break; } } - handleMessageAttachments(artifact); - } - } - - /** - * Handles incrementing attachmentCnt and mediaCnt variables based on the - * attachments and media present in an artifact. - * - * @param artifact The artifact whose MessageAttachments will be used for - * this tally. If no MessageAttachments object can be found, - * then the count of the children of the artifact will be - * used instead. - */ - private void handleMessageAttachments(BlackboardArtifact artifact) { - try { - // count the attachments from the TSK_ATTACHMENTS attribute. - BlackboardAttribute attachmentsAttr = artifact.getAttribute(new BlackboardAttribute.Type(BlackboardAttribute.ATTRIBUTE_TYPE.TSK_ATTACHMENTS)); - if (attachmentsAttr != null) { - try { - countFromMessageAttachments(attachmentsAttr, artifact); - } catch (BlackboardJsonAttrUtil.InvalidJsonException ex) { - logger.log(Level.WARNING, String.format("Unable to parse json for MessageAttachments object in artifact: %s", artifact.getName()), ex); - } - } else { - countFromArtifactChildren(artifact); - } - } catch (TskCoreException ex) { - logger.log(Level.WARNING, String.format("Exception thrown " - + "from getChildrenCount artifactID: %d", - artifact.getArtifactID()), ex); //NON-NLS - } - } - - /** - * Increments attachment and media counts based on the children of the - * BlackboardArtifact. - * - * @param artifact The artifact whose children will be counted. - * - * @throws TskCoreException - */ - private void countFromArtifactChildren(BlackboardArtifact artifact) throws TskCoreException { - // backward compatibility - email message attachments are derived files, children of the message. - attachmentCnt += artifact.getChildrenCount(); - for (Content childContent : artifact.getChildren()) { - if (ImageUtils.thumbnailSupported(childContent)) { - mediaCnt++; - } - } - } - - /** - * Increments attachment and media counts based on the file attachments in - * the parsed MessageAttachments object. - * - * @param attachmentsAttr The attribute representing the MessageAttachments - * object. - * @param artifact The artifact for this attribute. - * - * @throws TskCoreException - * @throws BlackboardJsonAttrUtil.InvalidJsonException - */ - private void countFromMessageAttachments(BlackboardAttribute attachmentsAttr, BlackboardArtifact artifact) - throws TskCoreException, BlackboardJsonAttrUtil.InvalidJsonException { - - MessageAttachments msgAttachments = BlackboardJsonAttrUtil.fromAttribute(attachmentsAttr, MessageAttachments.class); - Collection fileAttachments = msgAttachments.getFileAttachments(); - for (FileAttachment fileAttachment : fileAttachments) { - attachmentCnt++; - long attachedFileObjId = fileAttachment.getObjectId(); - if (attachedFileObjId >= 0) { - AbstractFile attachedFile = artifact.getSleuthkitCase().getAbstractFileById(attachedFileObjId); - if (ImageUtils.thumbnailSupported(attachedFile)) { - mediaCnt++; + try { + // count the attachments from the TSK_ATTACHMENTS attribute. + BlackboardAttribute attachmentsAttr = artifact.getAttribute(new BlackboardAttribute.Type(BlackboardAttribute.ATTRIBUTE_TYPE.TSK_ATTACHMENTS)); + if (attachmentsAttr != null) { + try { + MessageAttachments msgAttachments = BlackboardJsonAttrUtil.fromAttribute(attachmentsAttr, MessageAttachments.class); + Collection fileAttachments = msgAttachments.getFileAttachments(); + for (FileAttachment fileAttachment : fileAttachments) { + attachmentCnt++; + long attachedFileObjId = fileAttachment.getObjectId(); + if (attachedFileObjId >= 0) { + AbstractFile attachedFile = artifact.getSleuthkitCase().getAbstractFileById(attachedFileObjId); + if (ImageUtils.thumbnailSupported(attachedFile)) { + mediaCnt++; + } + } + } + } + catch (BlackboardJsonAttrUtil.InvalidJsonException ex) { + logger.log(Level.WARNING, String.format("Unable to parse json for MessageAttachments object in artifact: %s", artifact.getName()), ex); + } + } else { // backward compatibility - email message attachments are derived files, children of the message. + attachmentCnt += artifact.getChildrenCount(); + for (Content childContent : artifact.getChildren()) { + if (ImageUtils.thumbnailSupported(childContent)) { + mediaCnt++; + } + } } + } catch (TskCoreException ex) { + logger.log(Level.WARNING, String.format("Exception thrown " + + "from getChildrenCount artifactID: %d", + artifact.getArtifactID()), ex); //NON-NLS } } } /** * Total number of attachments that this account is referenced. - * + * * @return Attachment count */ public int getAttachmentCnt() { @@ -224,7 +181,7 @@ class AccountSummary { /** * Total number of messages that this account is referenced. - * + * * @return Message count */ public int getMessagesCnt() { @@ -233,7 +190,7 @@ class AccountSummary { /** * Total number of Emails that this account is referenced. - * + * * @return Email count */ public int getEmailCnt() { @@ -242,7 +199,7 @@ class AccountSummary { /** * Total number of call logs that this account is referenced. - * + * * @return call log count */ public int getCallLogCnt() { @@ -251,7 +208,7 @@ class AccountSummary { /** * Total number of contacts in this accounts contact book. - * + * * @return contact count */ public int getContactsCnt() { @@ -259,18 +216,17 @@ class AccountSummary { } /** - * Total number of thumbnail\media attachments that this account is - * referenced. - * + * Total number of thumbnail\media attachments that this account is referenced. + * * @return Thumbnail count */ public int getThumbnailCnt() { return mediaCnt; } - + /** * Total number of contacts that this account is referenced. - * + * * @return Contact count */ public int getReferenceCnt() { diff --git a/Core/src/org/sleuthkit/autopsy/communications/relationships/AttachmentThumbnailsChildren.java b/Core/src/org/sleuthkit/autopsy/communications/relationships/AttachmentThumbnailsChildren.java index 64225e4fc2..1daffda703 100755 --- a/Core/src/org/sleuthkit/autopsy/communications/relationships/AttachmentThumbnailsChildren.java +++ b/Core/src/org/sleuthkit/autopsy/communications/relationships/AttachmentThumbnailsChildren.java @@ -69,47 +69,6 @@ final class AttachmentThumbnailsChildren extends Children.Keys { return new Node[]{new AttachementThumbnailNode(t)}; } - /** - * Adds thumbnails based on MessageAttachments parsed in the - * BlackboardAttribute. - * - * @param bba The pertinent BlackboardArtifact. - * @param attachmentsAttr The appropriate attribute for MessageAttachments. - * @param thumbnails Parsed thumbnails will be added to this set. - * - * @throws BlackboardJsonAttrUtil.InvalidJsonException - * @throws TskCoreException - */ - private static void addMessageAttachmentThumbnails(BlackboardArtifact bba, BlackboardAttribute attachmentsAttr, - Set thumbnails) throws BlackboardJsonAttrUtil.InvalidJsonException, TskCoreException { - - MessageAttachments msgAttachments = BlackboardJsonAttrUtil.fromAttribute(attachmentsAttr, MessageAttachments.class); - Collection fileAttachments = msgAttachments.getFileAttachments(); - for (FileAttachment fileAttachment : fileAttachments) { - long attachedFileObjId = fileAttachment.getObjectId(); - if (attachedFileObjId >= 0) { - AbstractFile attachedFile = bba.getSleuthkitCase().getAbstractFileById(attachedFileObjId); - thumbnails.add(attachedFile); - } - } - } - - /** - * Adds thumbnails based on children in the BlackboardArtifact. - * - * @param bba The BlackboardArtifact whose children will be used. - * @param thumbnails Thumbnails will be added to this set. - * - * @throws TskCoreException - */ - private static void addChildrenThumbnails(BlackboardArtifact bba, Set thumbnails) throws TskCoreException { - for (Content childContent : bba.getChildren()) { - if (childContent instanceof AbstractFile) { - thumbnails.add((AbstractFile) childContent); - } - } - } - @Override protected void addNotify() { super.addNotify(); @@ -131,12 +90,25 @@ final class AttachmentThumbnailsChildren extends Children.Keys { BlackboardAttribute attachmentsAttr = bba.getAttribute(new BlackboardAttribute.Type(BlackboardAttribute.ATTRIBUTE_TYPE.TSK_ATTACHMENTS)); if (attachmentsAttr != null) { try { - addMessageAttachmentThumbnails(bba, attachmentsAttr, thumbnails); - } catch (BlackboardJsonAttrUtil.InvalidJsonException ex) { + MessageAttachments msgAttachments = BlackboardJsonAttrUtil.fromAttribute(attachmentsAttr, MessageAttachments.class); + Collection fileAttachments = msgAttachments.getFileAttachments(); + for (FileAttachment fileAttachment : fileAttachments) { + long attachedFileObjId = fileAttachment.getObjectId(); + if (attachedFileObjId >= 0) { + AbstractFile attachedFile = bba.getSleuthkitCase().getAbstractFileById(attachedFileObjId); + thumbnails.add(attachedFile); + } + } + } + catch (BlackboardJsonAttrUtil.InvalidJsonException ex) { LOGGER.log(Level.WARNING, String.format("Unable to parse json for MessageAttachments object in artifact: %s", bba.getName()), ex); } } else { // backward compatibility - email message attachments are derived files, children of the message. - addChildrenThumbnails(bba, thumbnails); + for (Content childContent : bba.getChildren()) { + if (childContent instanceof AbstractFile) { + thumbnails.add((AbstractFile) childContent); + } + } } } catch (TskCoreException ex) { diff --git a/Core/src/org/sleuthkit/autopsy/communications/relationships/MessageNode.java b/Core/src/org/sleuthkit/autopsy/communications/relationships/MessageNode.java index 6d5d5785f6..5070181e08 100755 --- a/Core/src/org/sleuthkit/autopsy/communications/relationships/MessageNode.java +++ b/Core/src/org/sleuthkit/autopsy/communications/relationships/MessageNode.java @@ -48,22 +48,22 @@ import org.sleuthkit.datamodel.blackboardutils.attributes.MessageAttachments; class MessageNode extends BlackboardArtifactNode { public static final String UNTHREADED_ID = ""; - + private static final Logger logger = Logger.getLogger(MessageNode.class.getName()); - + private final String threadID; - + private final Action preferredAction; - MessageNode(BlackboardArtifact artifact, String threadID, Action preferredAction) { + MessageNode(BlackboardArtifact artifact, String threadID, Action preferredAction) { super(artifact); - + this.preferredAction = preferredAction; final String stripEnd = StringUtils.stripEnd(artifact.getDisplayName(), "s"); // NON-NLS String removeEndIgnoreCase = StringUtils.removeEndIgnoreCase(stripEnd, "message"); // NON-NLS setDisplayName(removeEndIgnoreCase.isEmpty() ? stripEnd : removeEndIgnoreCase); - + this.threadID = threadID; } @@ -75,7 +75,7 @@ class MessageNode extends BlackboardArtifactNode { "MessageNode_Node_Property_Subject=Subject", "MessageNode_Node_Property_Attms=Attachments" }) - + @Override protected Sheet createSheet() { Sheet sheet = super.createSheet(); @@ -89,22 +89,22 @@ class MessageNode extends BlackboardArtifactNode { final BlackboardArtifact artifact = getArtifact(); BlackboardArtifact.ARTIFACT_TYPE fromID = BlackboardArtifact.ARTIFACT_TYPE.fromID(artifact.getArtifactTypeID()); - - if (fromID == null - || (fromID != TSK_EMAIL_MSG - && fromID != TSK_MESSAGE)) { + + if(fromID == null || + (fromID != TSK_EMAIL_MSG && + fromID != TSK_MESSAGE)) { return sheet; } - - sheetSet.put(new NodeProperty<>("ThreadID", "ThreadID", "", threadID == null ? UNTHREADED_ID : threadID)); //NON-NLS + + sheetSet.put(new NodeProperty<>("ThreadID", "ThreadID","",threadID == null ? UNTHREADED_ID : threadID)); //NON-NLS sheetSet.put(new NodeProperty<>("Subject", Bundle.MessageNode_Node_Property_Subject(), "", - getAttributeDisplayString(artifact, TSK_SUBJECT))); //NON-NLS + getAttributeDisplayString(artifact, TSK_SUBJECT))); //NON-NLS try { sheetSet.put(new NodeProperty<>("Attms", Bundle.MessageNode_Node_Property_Attms(), "", getAttachmentsCount())); //NON-NLS } catch (TskCoreException ex) { logger.log(Level.WARNING, "Error loading attachment count for " + artifact, ex); //NON-NLS } - + switch (fromID) { case TSK_EMAIL_MSG: sheetSet.put(new NodeProperty<>("From", Bundle.MessageNode_Node_Property_From(), "", @@ -138,18 +138,19 @@ class MessageNode extends BlackboardArtifactNode { public String getSourceName() { return getDisplayName(); } - + String getThreadID() { return threadID; } - + @Override public Action getPreferredAction() { return preferredAction; } - + private int getAttachmentsCount() throws TskCoreException { final BlackboardArtifact artifact = getArtifact(); + int attachmentsCount; // Attachments are specified in an attribute TSK_ATTACHMENTS as JSON attribute BlackboardAttribute attachmentsAttr = artifact.getAttribute(new BlackboardAttribute.Type(BlackboardAttribute.ATTRIBUTE_TYPE.TSK_ATTACHMENTS)); @@ -157,14 +158,15 @@ class MessageNode extends BlackboardArtifactNode { try { MessageAttachments msgAttachments = BlackboardJsonAttrUtil.fromAttribute(attachmentsAttr, MessageAttachments.class); return msgAttachments.getAttachmentsCount(); - } catch (BlackboardJsonAttrUtil.InvalidJsonException ex) { + } + catch (BlackboardJsonAttrUtil.InvalidJsonException ex) { logger.log(Level.WARNING, String.format("Unable to parse json for MessageAttachments object in artifact: %s", artifact.getName()), ex); return 0; } + } else { // legacy attachments may be children of message artifact. + attachmentsCount = artifact.getChildrenCount(); } - else { - // legacy attachments may be children of message artifact. - return artifact.getChildrenCount(); - } + + return attachmentsCount; } } diff --git a/Core/src/org/sleuthkit/autopsy/contentviewers/MessageContentViewer.java b/Core/src/org/sleuthkit/autopsy/contentviewers/MessageContentViewer.java index 032cb75e5f..d314201f23 100644 --- a/Core/src/org/sleuthkit/autopsy/contentviewers/MessageContentViewer.java +++ b/Core/src/org/sleuthkit/autopsy/contentviewers/MessageContentViewer.java @@ -32,7 +32,6 @@ import java.util.logging.Level; import javax.swing.JScrollPane; import javax.swing.text.JTextComponent; import org.apache.commons.lang3.StringUtils; -import static org.apache.poi.hwpf.model.FileInformationBlock.logger; import org.jsoup.Jsoup; import org.jsoup.nodes.Document; import org.openide.explorer.ExplorerManager; @@ -90,8 +89,7 @@ import org.sleuthkit.datamodel.blackboardutils.attributes.MessageAttachments.URL public class MessageContentViewer extends javax.swing.JPanel implements DataContentViewer { /** - * This is a text component viewer to be a child component to be placed in a - * {@link TranslatablePanel TranslatablePanel}. + * This is a text component viewer to be a child component to be placed in a {@link TranslatablePanel TranslatablePanel}. */ class TextComponent implements TranslatablePanel.ContentComponent { @@ -441,11 +439,11 @@ public class MessageContentViewer extends javax.swing.JPanel implements DataCont * Get the artifact associated with the given artifact, if there is one. * * @param artifact The artifact to get the associated artifact from. Must - * not be null + * not be null * * @throws TskCoreException If there is a critical error querying the DB. * @return An optional containing the artifact associated with the given - * artifact, if there is one. + * artifact, if there is one. */ private static Optional getAssociatedArtifact(final BlackboardArtifact artifact) throws TskCoreException { BlackboardAttribute attribute = artifact.getAttribute(TSK_ASSOCIATED_TYPE); @@ -525,10 +523,10 @@ public class MessageContentViewer extends javax.swing.JPanel implements DataCont * Is the given artifact one that can be shown in this viewer? * * @param nodeArtifact An artifact that might be a message. Must not be - * null. + * null. * * @return True if the given artifact can be shown as a message in this - * viewer. + * viewer. */ private static boolean isMessageArtifact(BlackboardArtifact nodeArtifact) { final int artifactTypeID = nodeArtifact.getArtifactTypeID(); @@ -545,7 +543,6 @@ public class MessageContentViewer extends javax.swing.JPanel implements DataCont * the file, that artifact is returned. * * @param node Node to check. - * * @return Blackboard artifact for the node, null if there isn't any. */ private BlackboardArtifact getNodeArtifact(Node node) { @@ -595,7 +592,7 @@ public class MessageContentViewer extends javax.swing.JPanel implements DataCont * Configure the text area at the given index to show the content of the * given type. * - * @param type The ATTRIBUT_TYPE to show in the indexed tab. + * @param type The ATTRIBUT_TYPE to show in the indexed tab. * @param index The index of the text area to configure. * * @throws TskCoreException @@ -631,71 +628,36 @@ public class MessageContentViewer extends javax.swing.JPanel implements DataCont datetimeText.setEnabled(true); } - /** - * Retrieves the set of attachments present in the children of the - * BlackboardArtifact. - * - * @param artifact The artifact whose children will be used for attachments. - * - * @return The attachments found in the BlackboardArtifact. - * - * @throws TskCoreException - */ - private static Set getAttachmentsFromChildren(BlackboardArtifact artifact) throws TskCoreException { - // For backward compatibility - email attachements are derived files and children of the email message artifact - Set attachments = new HashSet<>(); - for (Content child : artifact.getChildren()) { - if (child instanceof AbstractFile) { - attachments.add(new FileAttachment((AbstractFile) child)); - } - } - return attachments; - } - - /** - * Retrieves the set of attachments present in the MessageAttachments object - * parsed from the blackboard attribute. - * - * @param attachmentsAttr The blackboard attribute to be parsed to a - * MessageAttachments object. - * - * @return The set of attachments present in the MessageAttachments object. - * - * @throws BlackboardJsonAttrUtil.InvalidJsonException If the - * BlackboardAttribute - * cannot be parsed to a - * MessageAttachments - * object. - */ - private static Set getAttachmentsFromMessageAttachments(BlackboardAttribute attachmentsAttr) throws BlackboardJsonAttrUtil.InvalidJsonException { - Set attachments = new HashSet<>(); - MessageAttachments msgAttachments = BlackboardJsonAttrUtil.fromAttribute(attachmentsAttr, MessageAttachments.class); - Collection fileAttachments = msgAttachments.getFileAttachments(); - for (FileAttachment fileAttachment : fileAttachments) { - attachments.add(fileAttachment); - } - Collection urlAttachments = msgAttachments.getUrlAttachments(); - for (URLAttachment urlAttachment : urlAttachments) { - attachments.add(urlAttachment); - } - return attachments; - } - private void configureAttachments() throws TskCoreException { - Set attachments; + final Set attachments; // Attachments are specified in an attribute TSK_ATTACHMENTS as JSON attribute BlackboardAttribute attachmentsAttr = artifact.getAttribute(new BlackboardAttribute.Type(BlackboardAttribute.ATTRIBUTE_TYPE.TSK_ATTACHMENTS)); if (attachmentsAttr != null) { + + attachments = new HashSet<>(); try { - attachments = getAttachmentsFromMessageAttachments(attachmentsAttr); - } catch (BlackboardJsonAttrUtil.InvalidJsonException ex) { + MessageAttachments msgAttachments = BlackboardJsonAttrUtil.fromAttribute(attachmentsAttr, MessageAttachments.class); + Collection fileAttachments = msgAttachments.getFileAttachments(); + for (FileAttachment fileAttachment : fileAttachments) { + attachments.add(fileAttachment); + } + Collection urlAttachments = msgAttachments.getUrlAttachments(); + for (URLAttachment urlAttachment : urlAttachments) { + attachments.add(urlAttachment); + } + } + catch (BlackboardJsonAttrUtil.InvalidJsonException ex) { LOGGER.log(Level.WARNING, String.format("Unable to parse json for MessageAttachments object in artifact: %s", artifact.getName()), ex); - attachments = new HashSet<>(); } - } else { - attachments = getAttachmentsFromChildren(artifact); + } else { // For backward compatibility - email attachements are derived files and children of the email message artifact + attachments = new HashSet<>(); + for (Content child : artifact.getChildren()) { + if (child instanceof AbstractFile) { + attachments.add(new FileAttachment((AbstractFile) child)); + } + } } final int numberOfAttachments = attachments.size(); From a3eb2062ac44c8e86eee082da740f053a7e030f2 Mon Sep 17 00:00:00 2001 From: Dennis Date: Thu, 16 Apr 2020 08:31:46 +0200 Subject: [PATCH 133/137] Update modDev.dox Add hint for unchanged method signatures. --- docs/doxygen/modDev.dox | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/doxygen/modDev.dox b/docs/doxygen/modDev.dox index ed2c3f34ea..2d8f1d313d 100644 --- a/docs/doxygen/modDev.dox +++ b/docs/doxygen/modDev.dox @@ -81,7 +81,7 @@ As you will read in the later sections about the different module types, each Au \subsection mod_dev_aut_run1 Running Your Module During Development -When you are developing your Autopsy module, you can simply choose "Run" on the module and it will launch the Autopsy platform with the module enabled in it. This is also how you can debug the module. If you want to apply changes during debugging, you can use the "Apply Code Changes" function in NetBeans. +When you are developing your Autopsy module, you can simply choose "Run" on the module and it will launch the Autopsy platform with the module enabled in it. This is also how you can debug the module. If you want to apply changes during debugging and have not changed any method signatures, you can use the "Apply Code Changes" function in NetBeans. \subsection mod_dev_aut_deploy Deploying Your Module From 9a423825adf55ca6f70878387b42d2f3ec91bd81 Mon Sep 17 00:00:00 2001 From: Greg DiCristofaro Date: Thu, 16 Apr 2020 07:47:32 -0400 Subject: [PATCH 134/137] updated hgap to horizontalGap and vgap to verticalGap --- .../autopsy/guiutils/WrapLayout.java | 89 ++++++++++--------- 1 file changed, 45 insertions(+), 44 deletions(-) diff --git a/Core/src/org/sleuthkit/autopsy/guiutils/WrapLayout.java b/Core/src/org/sleuthkit/autopsy/guiutils/WrapLayout.java index b4208faa6c..8cf4d208ce 100644 --- a/Core/src/org/sleuthkit/autopsy/guiutils/WrapLayout.java +++ b/Core/src/org/sleuthkit/autopsy/guiutils/WrapLayout.java @@ -54,21 +54,19 @@ public class WrapLayout implements LayoutManager, java.io.Serializable { * subcomponents as well as the spacing between subcomponents and the * borders of the target component. * - * @serial - * @see #getHgap() - * @see #setHgap(int) + * @see #getHorizontalGap() + * @see #setHorizontalGap(int) */ - private int hgap = 0; + private int horizontalGap = 0; /** * The vertical gap between neighboring rows as well as the spacing between * rows and the borders of the target component. * - * @serial - * @see #getVgap() - * @see #setVgap(int) + * @see #getVerticalGap() + * @see #setVerticalGap(int) */ - private int vgap = 0; + private int verticalGap = 0; /** * If true, subcomponents will be aligned on their bottom edge. Otherwise, @@ -94,15 +92,16 @@ public class WrapLayout implements LayoutManager, java.io.Serializable { /** * Constructs a new WrapLayout. * - * @param vgap The vertical gap spacing between rows of subcomponents as - * well as the spacing between the target component and rows. - * @param hgap The horizontal gap spacing between neighboring subcomponents - * as well as the spacing between the subcomponents and the - * target component's border. + * @param verticalGap The vertical gap spacing between rows of + * subcomponents as well as the spacing between the + * target component and rows. + * @param horizontalGap The horizontal gap spacing between neighboring + * subcomponents as well as the spacing between the + * subcomponents and the target component's border. */ - public WrapLayout(int vgap, int hgap) { - this.vgap = vgap; - this.hgap = hgap; + public WrapLayout(int verticalGap, int horizontalGap) { + this.verticalGap = verticalGap; + this.horizontalGap = horizontalGap; } /** @@ -137,19 +136,20 @@ public class WrapLayout implements LayoutManager, java.io.Serializable { * @return The horizontal gap between components and between the components * and the borders of the Container. */ - public int getHgap() { - return hgap; + public int getHorizontalGap() { + return horizontalGap; } /** * Sets the horizontal gap between neighboring subcomponents as well as the * spacing between subcomponents and the borders of the target component. * - * @param hgap The horizontal gap between components and between the - * components and the borders of the Container. + * @param horizontalGap The horizontal gap between components and between + * the components and the borders of the + * Container. */ - public void setHgap(int hgap) { - this.hgap = hgap; + public void setHorizontalGap(int horizontalGap) { + this.horizontalGap = horizontalGap; } /** @@ -159,19 +159,20 @@ public class WrapLayout implements LayoutManager, java.io.Serializable { * @return The vertical gap between components and between the components * and the borders of the Container. */ - public int getVgap() { - return vgap; + public int getVerticalGap() { + return verticalGap; } /** * Sets the vertical gap between neighboring rows as well as the spacing * between rows and the borders of the target component. * - * @param vgap The vertical gap between components and between the - * components and the borders of the Container. + * @param verticalGap The vertical gap between components and between the + * components and the borders of the + * Container. */ - public void setVgap(int vgap) { - this.vgap = vgap; + public void setVerticalGap(int verticalGap) { + this.verticalGap = verticalGap; } /** @@ -296,9 +297,9 @@ public class WrapLayout implements LayoutManager, java.io.Serializable { boolean ltr = target.getComponentOrientation().isLeftToRight(); boolean useBaseline = getAlignOnBaseline(); - int rowY = targetDims.getInsets().top + getVgap(); - int leftX = targetDims.getInsets().left + getHgap(); - int rightX = targetDims.getOuterWidth() - targetDims.getInsets().right - getHgap(); + int rowY = targetDims.getInsets().top + getVerticalGap(); + int leftX = targetDims.getInsets().left + getHorizontalGap(); + int rightX = targetDims.getOuterWidth() - targetDims.getInsets().right - getHorizontalGap(); for (WrapLayoutRow row : rows) { int rowHeight = row.getHeight(); @@ -306,7 +307,7 @@ public class WrapLayout implements LayoutManager, java.io.Serializable { int curX = 0; if (row.getComponents() != null) { for (Component origComp : row.getComponents()) { - curX += setComponentDims(origComp, useBaseline, ltr, rowY, rowHeight, leftX, rightX, curX) + getHgap(); + curX += setComponentDims(origComp, useBaseline, ltr, rowY, rowHeight, leftX, rightX, curX) + getHorizontalGap(); } } @@ -315,11 +316,11 @@ public class WrapLayout implements LayoutManager, java.io.Serializable { // reverse opposite aligned for layout purposes since flipping ltr Collections.reverse(row.getOppositeAligned()); for (Component oppAlignedComp : row.getOppositeAligned()) { - curX += setComponentDims(oppAlignedComp, useBaseline, !ltr, rowY, rowHeight, leftX, rightX, curX) + getHgap(); + curX += setComponentDims(oppAlignedComp, useBaseline, !ltr, rowY, rowHeight, leftX, rightX, curX) + getHorizontalGap(); } } - rowY += rowHeight + getVgap(); + rowY += rowHeight + getVerticalGap(); } } @@ -331,7 +332,7 @@ public class WrapLayout implements LayoutManager, java.io.Serializable { @Override public Dimension minimumLayoutSize(Container target) { Dimension minimum = layoutSize(target, false); - minimum.width -= (getHgap() + 1); + minimum.width -= (getHorizontalGap() + 1); return minimum; } @@ -408,7 +409,7 @@ public class WrapLayout implements LayoutManager, java.io.Serializable { } Insets insets = container.getInsets(); - int horizontalInsetsAndGap = insets.left + insets.right + (getHgap() * 2); + int horizontalInsetsAndGap = insets.left + insets.right + (getHorizontalGap() * 2); int maxWidth = targetWidth - horizontalInsetsAndGap; return new ParentDimensions(targetWidth, maxWidth, insets); @@ -431,13 +432,13 @@ public class WrapLayout implements LayoutManager, java.io.Serializable { Integer containerHeight = rows.stream().map((r) -> r.getHeight()).reduce(0, Integer::sum); // add in vertical gap between rows if (rows.size() > 1) { - containerHeight += (rows.size() - 1) * getVgap(); + containerHeight += (rows.size() - 1) * getVerticalGap(); } containerHeight += targetDims.getInsets().top + targetDims.getInsets().bottom; Integer containerWidth = rows.stream().map((r) -> r.getWidth()).reduce(0, Math::max); - containerWidth += targetDims.getInsets().left + targetDims.getInsets().right + (getHgap() * 2); + containerWidth += targetDims.getInsets().left + targetDims.getInsets().right + (getHorizontalGap() * 2); // When using a scroll pane or the DecoratedLookAndFeel we need to // make sure the preferred size is less than the size of the @@ -446,7 +447,7 @@ public class WrapLayout implements LayoutManager, java.io.Serializable { Container scrollPane = SwingUtilities.getAncestorOfClass(JScrollPane.class, target); if (scrollPane != null && target.isValid()) { - containerWidth -= (getHgap() + 1); + containerWidth -= (getHorizontalGap() + 1); } return new Dimension(containerWidth, containerHeight); @@ -473,7 +474,7 @@ public class WrapLayout implements LayoutManager, java.io.Serializable { * @param height The maximum height of the row. * @param width The total width of the row. */ - WrapLayoutRow(List components, List oppositeAligned, + WrapLayoutRow(List components, List oppositeAligned, int height, int width) { this.components = components; this.oppositeAligned = oppositeAligned; @@ -537,7 +538,7 @@ public class WrapLayout implements LayoutManager, java.io.Serializable { * * @return The list of rows ordered from top to bottom. */ - private List getAllRows(List components, + private List getAllRows(List components, boolean preferred, int maxWidth) { List originalComp = components @@ -572,7 +573,7 @@ public class WrapLayout implements LayoutManager, java.io.Serializable { WrapLayoutRow lastOrig = originalRowSet.get(originalRowSet.size() - 1); WrapLayoutRow firstOpp = oppositeRowSet.get(0); - int proposedRowWidth = lastOrig.getWidth() + firstOpp.getWidth() + getHgap(); + int proposedRowWidth = lastOrig.getWidth() + firstOpp.getWidth() + getHorizontalGap(); if (proposedRowWidth <= maxWidth) { WrapLayoutRow middleRow = new WrapLayoutRow(lastOrig.getComponents(), firstOpp.getOppositeAligned(), Math.max(lastOrig.getHeight(), firstOpp.getHeight()), proposedRowWidth); @@ -601,7 +602,7 @@ public class WrapLayout implements LayoutManager, java.io.Serializable { * * @return The list of rows determined. */ - private List getRowSet(List components, + private List getRowSet(List components, boolean preferred, int maxWidth) { List rows = new ArrayList<>(); @@ -623,7 +624,7 @@ public class WrapLayout implements LayoutManager, java.io.Serializable { // Add a horizontal gap for all components after the first if (rowWidth != 0) { - rowWidth += getHgap(); + rowWidth += getHorizontalGap(); } rowComponents.add(m); From 70050f275ae3e5d857c7bc6c98cfdd868fbf48d2 Mon Sep 17 00:00:00 2001 From: Greg DiCristofaro Date: Thu, 16 Apr 2020 07:54:30 -0400 Subject: [PATCH 135/137] preload reports modules as well --- Core/src/org/sleuthkit/autopsy/core/Installer.java | 1 + Core/src/org/sleuthkit/autopsy/python/JythonModuleLoader.java | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/Core/src/org/sleuthkit/autopsy/core/Installer.java b/Core/src/org/sleuthkit/autopsy/core/Installer.java index 1d554b062b..8131539e6d 100644 --- a/Core/src/org/sleuthkit/autopsy/core/Installer.java +++ b/Core/src/org/sleuthkit/autopsy/core/Installer.java @@ -402,6 +402,7 @@ public class Installer extends ModuleInstall { Runnable loader = () -> { try { JythonModuleLoader.getIngestModuleFactories(); + JythonModuleLoader.getGeneralReportModules(); } catch (Exception ex) { logger.log(Level.SEVERE, "There was an error while doing an initial load of python plugins.", ex); diff --git a/Core/src/org/sleuthkit/autopsy/python/JythonModuleLoader.java b/Core/src/org/sleuthkit/autopsy/python/JythonModuleLoader.java index e16e98d62c..f58adbfc0d 100644 --- a/Core/src/org/sleuthkit/autopsy/python/JythonModuleLoader.java +++ b/Core/src/org/sleuthkit/autopsy/python/JythonModuleLoader.java @@ -66,7 +66,7 @@ public final class JythonModuleLoader { * @return A list of objects that implement the GeneralReportModule * interface. */ - public static List getGeneralReportModules() { + public static synchronized List getGeneralReportModules() { return getInterfaceImplementations(new GeneralReportModuleDefFilter(), GeneralReportModule.class); } @Messages({"JythonModuleLoader.pythonInterpreterError.title=Python Modules", From 2c3465269346999d1bc8eeca6fd4680bd683c05b Mon Sep 17 00:00:00 2001 From: Greg DiCristofaro Date: Thu, 16 Apr 2020 09:36:15 -0400 Subject: [PATCH 136/137] isAlignOnBaseline method change --- Core/src/org/sleuthkit/autopsy/guiutils/WrapLayout.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Core/src/org/sleuthkit/autopsy/guiutils/WrapLayout.java b/Core/src/org/sleuthkit/autopsy/guiutils/WrapLayout.java index 8cf4d208ce..d43df6a39e 100644 --- a/Core/src/org/sleuthkit/autopsy/guiutils/WrapLayout.java +++ b/Core/src/org/sleuthkit/autopsy/guiutils/WrapLayout.java @@ -195,7 +195,7 @@ public class WrapLayout implements LayoutManager, java.io.Serializable { * @return If components are to be vertically aligned along their bottom * edge. */ - public boolean getAlignOnBaseline() { + public boolean isAlignOnBaseline() { return alignOnBaseline; } @@ -295,7 +295,7 @@ public class WrapLayout implements LayoutManager, java.io.Serializable { List rows = getAllRows(components, true, targetDims.getInnerWidth()); boolean ltr = target.getComponentOrientation().isLeftToRight(); - boolean useBaseline = getAlignOnBaseline(); + boolean useBaseline = isAlignOnBaseline(); int rowY = targetDims.getInsets().top + getVerticalGap(); int leftX = targetDims.getInsets().left + getHorizontalGap(); From 6609f458983165f90e8e9cdf4ed1ec782e7768c8 Mon Sep 17 00:00:00 2001 From: Greg DiCristofaro Date: Thu, 16 Apr 2020 10:37:16 -0400 Subject: [PATCH 137/137] adding comment for exception firewall --- Core/src/org/sleuthkit/autopsy/core/Installer.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Core/src/org/sleuthkit/autopsy/core/Installer.java b/Core/src/org/sleuthkit/autopsy/core/Installer.java index 8131539e6d..2d2357374a 100644 --- a/Core/src/org/sleuthkit/autopsy/core/Installer.java +++ b/Core/src/org/sleuthkit/autopsy/core/Installer.java @@ -405,6 +405,8 @@ public class Installer extends ModuleInstall { JythonModuleLoader.getGeneralReportModules(); } catch (Exception ex) { + // This is a firewall exception to ensure that any possible exception caused + // by this initial load of the Jython modules are caught and logged. logger.log(Level.SEVERE, "There was an error while doing an initial load of python plugins.", ex); }