diff --git a/Core/src/org/sleuthkit/autopsy/datasourcesummary/datamodel/Installer.java b/Core/src/org/sleuthkit/autopsy/datasourcesummary/datamodel/Installer.java index fb20b2a2d1..e9bd6c4060 100644 --- a/Core/src/org/sleuthkit/autopsy/datasourcesummary/datamodel/Installer.java +++ b/Core/src/org/sleuthkit/autopsy/datasourcesummary/datamodel/Installer.java @@ -45,7 +45,7 @@ public final class Installer extends ModuleInstall { @Override public void restored() { - GeolocationSummary summary = GeolocationSummary.getInstance(); + WhereUsedSummary summary = WhereUsedSummary.getInstance(); try { summary.load(); } catch (IOException ex) { diff --git a/Core/src/org/sleuthkit/autopsy/datasourcesummary/datamodel/GeolocationSummary.java b/Core/src/org/sleuthkit/autopsy/datasourcesummary/datamodel/WhereUsedSummary.java similarity index 95% rename from Core/src/org/sleuthkit/autopsy/datasourcesummary/datamodel/GeolocationSummary.java rename to Core/src/org/sleuthkit/autopsy/datasourcesummary/datamodel/WhereUsedSummary.java index 4503536476..ee6d2d6329 100644 --- a/Core/src/org/sleuthkit/autopsy/datasourcesummary/datamodel/GeolocationSummary.java +++ b/Core/src/org/sleuthkit/autopsy/datasourcesummary/datamodel/WhereUsedSummary.java @@ -56,7 +56,7 @@ import org.sleuthkit.datamodel.DataSource; @Messages({ "GeolocationSummary_cities_noRecordFound=Other" }) -public class GeolocationSummary implements DefaultArtifactUpdateGovernor { +public class WhereUsedSummary implements DefaultArtifactUpdateGovernor { /** * A count of hits for a particular city. @@ -197,14 +197,14 @@ public class GeolocationSummary implements DefaultArtifactUpdateGovernor { .map(artifactType -> artifactType.getTypeID()) .collect(Collectors.toSet()); - private static GeolocationSummary instance = null; + private static WhereUsedSummary instance = null; /** * @return The singleton instance of this class. */ - public static GeolocationSummary getInstance() { + public static WhereUsedSummary getInstance() { if (instance == null) { - instance = new GeolocationSummary(); + instance = new WhereUsedSummary(); } return instance; @@ -217,8 +217,8 @@ public class GeolocationSummary implements DefaultArtifactUpdateGovernor { /** * Main constructor. */ - private GeolocationSummary() { - this(SleuthkitCaseProvider.DEFAULT, Logger.getLogger(GeolocationSummary.class.getName())); + private WhereUsedSummary() { + this(SleuthkitCaseProvider.DEFAULT, Logger.getLogger(WhereUsedSummary.class.getName())); } /** @@ -226,7 +226,7 @@ public class GeolocationSummary implements DefaultArtifactUpdateGovernor { * * @param provider The means of obtaining a sleuthkit case. */ - public GeolocationSummary(SleuthkitCaseProvider provider, java.util.logging.Logger logger) { + public WhereUsedSummary(SleuthkitCaseProvider provider, java.util.logging.Logger logger) { this.provider = provider; this.logger = logger; } @@ -306,7 +306,7 @@ public class GeolocationSummary implements DefaultArtifactUpdateGovernor { * Pre-loads city data. */ public void load() throws IOException { - latLngMap = new LatLngMap(parseCsvLines(GeolocationSummary.class.getResourceAsStream("worldcities.csv"), true)); + latLngMap = new LatLngMap(parseCsvLines(WhereUsedSummary.class.getResourceAsStream("worldcities.csv"), true)); } private static CityRecord OTHER_RECORD = new CityRecord(Bundle.GeolocationSummary_cities_noRecordFound(), "", 0, 0); diff --git a/Core/src/org/sleuthkit/autopsy/datasourcesummary/ui/Bundle.properties b/Core/src/org/sleuthkit/autopsy/datasourcesummary/ui/Bundle.properties index 0bc1f9a7f1..49b55e369a 100644 --- a/Core/src/org/sleuthkit/autopsy/datasourcesummary/ui/Bundle.properties +++ b/Core/src/org/sleuthkit/autopsy/datasourcesummary/ui/Bundle.properties @@ -42,4 +42,5 @@ RecentFilesPanel.attachmentLabel.text=Recent Attachments PastCasesPanel.notableFileLabel.text=Cases with Common Items That Were Tagged as Notable PastCasesPanel.sameIdLabel.text=Past Cases with the Same Device IDs DataSourceSummaryTabbedPane.noDataSourceLabel.text=No data source has been selected. -GeolocationPanel.cityCountsLabel.text=Cities +WhereUsedPanel.cityCountsLabel.text=Cities +WhereUsedPanel.viewInGeolocationBtn.text=View In Geolocation diff --git a/Core/src/org/sleuthkit/autopsy/datasourcesummary/ui/DataSourceSummaryTabbedPane.java b/Core/src/org/sleuthkit/autopsy/datasourcesummary/ui/DataSourceSummaryTabbedPane.java index 2ff4141aed..1945abcec4 100644 --- a/Core/src/org/sleuthkit/autopsy/datasourcesummary/ui/DataSourceSummaryTabbedPane.java +++ b/Core/src/org/sleuthkit/autopsy/datasourcesummary/ui/DataSourceSummaryTabbedPane.java @@ -39,7 +39,7 @@ import org.sleuthkit.datamodel.DataSource; "DataSourceSummaryTabbedPane_recentFileTab_title=Recent Files", "DataSourceSummaryTabbedPane_pastCasesTab_title=Past Cases", "DataSourceSummaryTabbedPane_analysisTab_title=Analysis", - "DataSourceSummaryTabbedPane_geolocationTab_title=Geolocation" + "DataSourceSummaryTabbedPane_whereUsedTab_title=Where Used" }) public class DataSourceSummaryTabbedPane extends javax.swing.JPanel { @@ -124,7 +124,7 @@ public class DataSourceSummaryTabbedPane extends javax.swing.JPanel { new DataSourceTab(Bundle.DataSourceSummaryTabbedPane_analysisTab_title(), new AnalysisPanel()), new DataSourceTab(Bundle.DataSourceSummaryTabbedPane_recentFileTab_title(), new RecentFilesPanel()), new DataSourceTab(Bundle.DataSourceSummaryTabbedPane_pastCasesTab_title(), new PastCasesPanel()), - new DataSourceTab(Bundle.DataSourceSummaryTabbedPane_geolocationTab_title(), new GeolocationPanel()), + new DataSourceTab(Bundle.DataSourceSummaryTabbedPane_whereUsedTab_title(), new WhereUsedPanel()), // do nothing on closing new DataSourceTab(Bundle.DataSourceSummaryTabbedPane_ingestHistoryTab_title(), ingestHistoryPanel, ingestHistoryPanel::setDataSource, () -> { }), diff --git a/Core/src/org/sleuthkit/autopsy/datasourcesummary/ui/GeolocationPanel.form b/Core/src/org/sleuthkit/autopsy/datasourcesummary/ui/WhereUsedPanel.form similarity index 78% rename from Core/src/org/sleuthkit/autopsy/datasourcesummary/ui/GeolocationPanel.form rename to Core/src/org/sleuthkit/autopsy/datasourcesummary/ui/WhereUsedPanel.form index 4016b10a7b..1a6576d3bd 100644 --- a/Core/src/org/sleuthkit/autopsy/datasourcesummary/ui/GeolocationPanel.form +++ b/Core/src/org/sleuthkit/autopsy/datasourcesummary/ui/WhereUsedPanel.form @@ -75,7 +75,7 @@ - + @@ -128,43 +128,12 @@ - + - - + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/Core/src/org/sleuthkit/autopsy/datasourcesummary/ui/GeolocationPanel.java b/Core/src/org/sleuthkit/autopsy/datasourcesummary/ui/WhereUsedPanel.java similarity index 83% rename from Core/src/org/sleuthkit/autopsy/datasourcesummary/ui/GeolocationPanel.java rename to Core/src/org/sleuthkit/autopsy/datasourcesummary/ui/WhereUsedPanel.java index 77939431f3..cf9ae0d2f9 100644 --- a/Core/src/org/sleuthkit/autopsy/datasourcesummary/ui/GeolocationPanel.java +++ b/Core/src/org/sleuthkit/autopsy/datasourcesummary/ui/WhereUsedPanel.java @@ -22,9 +22,9 @@ import java.util.Arrays; import java.util.List; import org.apache.commons.lang3.StringUtils; import org.openide.util.NbBundle.Messages; -import org.sleuthkit.autopsy.datasourcesummary.datamodel.GeolocationSummary; -import org.sleuthkit.autopsy.datasourcesummary.datamodel.GeolocationSummary.CityCount; -import org.sleuthkit.autopsy.datasourcesummary.datamodel.GeolocationSummary.CityRecord; +import org.sleuthkit.autopsy.datasourcesummary.datamodel.WhereUsedSummary; +import org.sleuthkit.autopsy.datasourcesummary.datamodel.WhereUsedSummary.CityCount; +import org.sleuthkit.autopsy.datasourcesummary.datamodel.WhereUsedSummary.CityRecord; import org.sleuthkit.autopsy.datasourcesummary.uiutils.CellModelTableCellRenderer.DefaultCellModel; import org.sleuthkit.autopsy.datasourcesummary.uiutils.DataFetchWorker; import org.sleuthkit.autopsy.datasourcesummary.uiutils.DataFetchWorker.DataFetchComponents; @@ -37,11 +37,11 @@ import org.sleuthkit.datamodel.DataSource; * A tab shown in data source summary displaying information about a data source's geolocation data. */ @Messages({ - "GeolocationPanel_cityColumn_title=City", - "GeolocationPanel_countColumn_title=Count", - "GeolocationPanel_onNoCrIngest_message=No results will be shown because the GPX Parser was not run." + "WhereUsedPanel_cityColumn_title=City", + "WhereUsedPanel_countColumn_title=Count", + "WhereUsedPanel_onNoCrIngest_message=No results will be shown because the GPX Parser was not run." }) -public class GeolocationPanel extends BaseDataSourceSummaryPanel { +public class WhereUsedPanel extends BaseDataSourceSummaryPanel { private static final long serialVersionUID = 1L; private static final String GPX_FACTORY = "org.python.proxies.GPX_Parser_Module$GPXParserFileIngestModuleFactory"; @@ -65,13 +65,13 @@ public class GeolocationPanel extends BaseDataSourceSummaryPanel { } private static final ColumnModel CITY_COL = new ColumnModel<>( - Bundle.GeolocationPanel_cityColumn_title(), + Bundle.WhereUsedPanel_cityColumn_title(), (cityCount) -> new DefaultCellModel(getCityName(cityCount.getCityRecord())), 300 ); private static final ColumnModel COUNT_COL = new ColumnModel<>( - Bundle.GeolocationPanel_countColumn_title(), + Bundle.WhereUsedPanel_countColumn_title(), (cityCount) -> new DefaultCellModel(Integer.toString(cityCount.getCount())), 100 ); @@ -93,15 +93,15 @@ public class GeolocationPanel extends BaseDataSourceSummaryPanel { /** * Main constructor. */ - public GeolocationPanel() { - this(GeolocationSummary.getInstance()); + public WhereUsedPanel() { + this(WhereUsedSummary.getInstance()); } /** * Main constructor. * @param geolocationData The GeolocationSummary instance to use. */ - public GeolocationPanel(GeolocationSummary geolocationData) { + public WhereUsedPanel(WhereUsedSummary geolocationData) { // set up data acquisition methods dataFetchComponents = Arrays.asList( new DataFetchWorker.DataFetchComponents<>( @@ -142,8 +142,7 @@ public class GeolocationPanel extends BaseDataSourceSummaryPanel { javax.swing.JLabel cityCountsLabel = new javax.swing.JLabel(); javax.swing.Box.Filler filler1 = new javax.swing.Box.Filler(new java.awt.Dimension(0, 2), new java.awt.Dimension(0, 2), new java.awt.Dimension(0, 2)); javax.swing.JPanel cityCountsPanel = cityCountsTable; - javax.swing.Box.Filler filler2 = new javax.swing.Box.Filler(new java.awt.Dimension(0, 20), new java.awt.Dimension(0, 20), new java.awt.Dimension(0, 20)); - javax.swing.Box.Filler filler3 = new javax.swing.Box.Filler(new java.awt.Dimension(0, 2), new java.awt.Dimension(0, 2), new java.awt.Dimension(0, 2)); + viewInGeolocationBtn = new javax.swing.JButton(); javax.swing.Box.Filler filler5 = new javax.swing.Box.Filler(new java.awt.Dimension(0, 0), new java.awt.Dimension(0, 0), new java.awt.Dimension(0, 32767)); mainContentPanel.setBorder(javax.swing.BorderFactory.createEmptyBorder(10, 10, 10, 10)); @@ -155,9 +154,9 @@ public class GeolocationPanel extends BaseDataSourceSummaryPanel { ingestRunningPanel.setPreferredSize(new java.awt.Dimension(10, 25)); mainContentPanel.add(ingestRunningPanel); - org.openide.awt.Mnemonics.setLocalizedText(cityCountsLabel, org.openide.util.NbBundle.getMessage(GeolocationPanel.class, "GeolocationPanel.cityCountsLabel.text")); // NOI18N + org.openide.awt.Mnemonics.setLocalizedText(cityCountsLabel, org.openide.util.NbBundle.getMessage(WhereUsedPanel.class, "WhereUsedPanel.cityCountsLabel.text")); // NOI18N mainContentPanel.add(cityCountsLabel); - cityCountsLabel.getAccessibleContext().setAccessibleName(org.openide.util.NbBundle.getMessage(GeolocationPanel.class, "PastCasesPanel.notableFileLabel.text")); // NOI18N + cityCountsLabel.getAccessibleContext().setAccessibleName(org.openide.util.NbBundle.getMessage(WhereUsedPanel.class, "PastCasesPanel.notableFileLabel.text")); // NOI18N filler1.setAlignmentX(0.0F); mainContentPanel.add(filler1); @@ -168,11 +167,8 @@ public class GeolocationPanel extends BaseDataSourceSummaryPanel { cityCountsPanel.setPreferredSize(new java.awt.Dimension(100, 212)); mainContentPanel.add(cityCountsPanel); - filler2.setAlignmentX(0.0F); - mainContentPanel.add(filler2); - - filler3.setAlignmentX(0.0F); - mainContentPanel.add(filler3); + org.openide.awt.Mnemonics.setLocalizedText(viewInGeolocationBtn, org.openide.util.NbBundle.getMessage(WhereUsedPanel.class, "WhereUsedPanel.viewInGeolocationBtn.text")); // NOI18N + mainContentPanel.add(viewInGeolocationBtn); filler5.setAlignmentX(0.0F); mainContentPanel.add(filler5); @@ -193,5 +189,6 @@ public class GeolocationPanel extends BaseDataSourceSummaryPanel { // Variables declaration - do not modify//GEN-BEGIN:variables + private javax.swing.JButton viewInGeolocationBtn; // End of variables declaration//GEN-END:variables }