From e4d1994f226d3e2b29cee3b33a0b4bd8b44da19f Mon Sep 17 00:00:00 2001 From: Greg DiCristofaro Date: Tue, 8 Sep 2020 11:24:35 -0400 Subject: [PATCH] fixing merge conflict --- .../ui/Bundle.properties-MERGED | 33 ++--- .../ui/DataSourceSummaryTabbedPane.java | 16 +-- .../uiutils/JTablePanel.java | 128 +----------------- 3 files changed, 17 insertions(+), 160 deletions(-) diff --git a/Core/src/org/sleuthkit/autopsy/datasourcesummary/ui/Bundle.properties-MERGED b/Core/src/org/sleuthkit/autopsy/datasourcesummary/ui/Bundle.properties-MERGED index e7a3a3db4f..fdcfd2ad9b 100644 --- a/Core/src/org/sleuthkit/autopsy/datasourcesummary/ui/Bundle.properties-MERGED +++ b/Core/src/org/sleuthkit/autopsy/datasourcesummary/ui/Bundle.properties-MERGED @@ -39,16 +39,10 @@ DataSourceSummaryNode.column.status.header=Ingest Status DataSourceSummaryNode.column.tags.header=Tags DataSourceSummaryNode.column.type.header=Type DataSourceSummaryNode.viewDataSourceAction.text=Go to Data Source -<<<<<<< HEAD -DataSourceSummaryTabbedPane_detailsTab_title=Details -DataSourceSummaryTabbedPane_ingestHistoryTab_title=Ingest History -DataSourceSummaryTabbedPane_typesTab_title=Types -======= -DataSourceSummaryTabbedPane_countsTab_title=Counts DataSourceSummaryTabbedPane_detailsTab_title=Container DataSourceSummaryTabbedPane_ingestHistoryTab_title=Ingest History DataSourceSummaryTabbedPane_recentFileTab_title=Recent Files ->>>>>>> fa0ae98de088d3573878927c94690af0154e5b00 +DataSourceSummaryTabbedPane_typesTab_title=Types DataSourceSummaryTabbedPane_userActivityTab_title=User Activity DataSourceSummaryUserActivityPanel.programsRunLabel.text=Recent Programs DataSourceSummaryUserActivityPanel.recentAccountsLabel.text=Recent Accounts @@ -69,7 +63,17 @@ DataSourceSummaryUserActivityPanel_TopProgramsTableModel_count_header=Run Times DataSourceSummaryUserActivityPanel_TopProgramsTableModel_folder_header=Folder DataSourceSummaryUserActivityPanel_TopProgramsTableModel_lastrun_header=Last Run DataSourceSummaryUserActivityPanel_TopProgramsTableModel_name_header=Program -<<<<<<< HEAD +DataSourceSummaryUserActivityPanel_TopWebSearchTableModel_dateAccessed_header=Date Accessed +DataSourceSummaryUserActivityPanel_TopWebSearchTableModel_searchString_header=Search String +DataSourceSummaryUserActivityPanel_TopWebSearchTableModel_translatedResult_header=Translated +RecentFilePanel_col_header_domain=Domain +RecentFilePanel_col_header_path=Path +RecentFilePanel_col_header_sender=Sender +RecentFilePanel_no_open_documents=No recently open documents found. +RecentFilesPanel.openDocsLabel.text=Recently Opened Documents +RecentFilesPanel.downloadLabel.text=Recent Downloads +RecentFilesPanel.attachmentLabel.text=Recent Attachements +RecentFilesPanel_col_head_date=Date SizeRepresentationUtil_units_bytes=\ bytes SizeRepresentationUtil_units_gigabytes=\ GB SizeRepresentationUtil_units_kilobytes=\ kB @@ -92,17 +96,4 @@ TypesPanel_filesByCategoryTable_unallocatedRow_title=Unallocated Files TypesPanel_osLabel_title=OS TypesPanel_sizeLabel_title=Size TypesPanel_usageLabel_title=Usage -======= -DataSourceSummaryUserActivityPanel_TopWebSearchTableModel_dateAccessed_header=Date Accessed -DataSourceSummaryUserActivityPanel_TopWebSearchTableModel_searchString_header=Search String -DataSourceSummaryUserActivityPanel_TopWebSearchTableModel_translatedResult_header=Translated -RecentFilePanel_col_header_domain=Domain -RecentFilePanel_col_header_path=Path -RecentFilePanel_col_header_sender=Sender -RecentFilePanel_no_open_documents=No recently open documents found. -RecentFilesPanel.openDocsLabel.text=Recently Opened Documents -RecentFilesPanel.downloadLabel.text=Recent Downloads -RecentFilesPanel.attachmentLabel.text=Recent Attachements -RecentFilesPanel_col_head_date=Date ->>>>>>> fa0ae98de088d3573878927c94690af0154e5b00 ViewSummaryInformationAction.name.text=View Summary Information diff --git a/Core/src/org/sleuthkit/autopsy/datasourcesummary/ui/DataSourceSummaryTabbedPane.java b/Core/src/org/sleuthkit/autopsy/datasourcesummary/ui/DataSourceSummaryTabbedPane.java index bb5e6f6386..2e8b28914a 100644 --- a/Core/src/org/sleuthkit/autopsy/datasourcesummary/ui/DataSourceSummaryTabbedPane.java +++ b/Core/src/org/sleuthkit/autopsy/datasourcesummary/ui/DataSourceSummaryTabbedPane.java @@ -33,13 +33,8 @@ import org.sleuthkit.datamodel.DataSource; * IngestJobInfoPanel. */ @Messages({ -<<<<<<< HEAD "DataSourceSummaryTabbedPane_typesTab_title=Types", - "DataSourceSummaryTabbedPane_detailsTab_title=Details", -======= - "DataSourceSummaryTabbedPane_countsTab_title=Counts", "DataSourceSummaryTabbedPane_detailsTab_title=Container", ->>>>>>> fa0ae98de088d3573878927c94690af0154e5b00 "DataSourceSummaryTabbedPane_userActivityTab_title=User Activity", "DataSourceSummaryTabbedPane_ingestHistoryTab_title=Ingest History", "DataSourceSummaryTabbedPane_recentFileTab_title=Recent Files" @@ -49,19 +44,12 @@ public class DataSourceSummaryTabbedPane extends JTabbedPane { private static final long serialVersionUID = 1L; // A pair of the tab name and the corresponding BaseDataSourceSummaryTabs to be displayed. -<<<<<<< HEAD - private final List> tabs = Arrays.asList( - Pair.of(Bundle.DataSourceSummaryTabbedPane_detailsTab_title(), new DataSourceSummaryDetailsPanel()), - Pair.of(Bundle.DataSourceSummaryTabbedPane_typesTab_title(), new TypesPanel()), - Pair.of(Bundle.DataSourceSummaryTabbedPane_detailsTab_title(), new DataSourceSummaryUserActivityPanel()) - ); -======= + private final List> tabs = new ArrayList<>(Arrays.asList( - Pair.of(Bundle.DataSourceSummaryTabbedPane_countsTab_title(), new DataSourceSummaryCountsPanel()), + Pair.of(Bundle.DataSourceSummaryTabbedPane_typesTab_title(), new TypesPanel()), Pair.of(Bundle.DataSourceSummaryTabbedPane_userActivityTab_title(), new DataSourceSummaryUserActivityPanel()), Pair.of(Bundle.DataSourceSummaryTabbedPane_recentFileTab_title(), new RecentFilesPanel()) )); ->>>>>>> fa0ae98de088d3573878927c94690af0154e5b00 private final IngestJobInfoPanel ingestHistoryPanel = new IngestJobInfoPanel(); diff --git a/Core/src/org/sleuthkit/autopsy/datasourcesummary/uiutils/JTablePanel.java b/Core/src/org/sleuthkit/autopsy/datasourcesummary/uiutils/JTablePanel.java index 9770c950cd..1d32a2a5db 100644 --- a/Core/src/org/sleuthkit/autopsy/datasourcesummary/uiutils/JTablePanel.java +++ b/Core/src/org/sleuthkit/autopsy/datasourcesummary/uiutils/JTablePanel.java @@ -184,7 +184,7 @@ public class JTablePanel extends AbstractLoadableComponent> { .map((colModel) -> colModel.getCellRenderer()) .collect(Collectors.toList()); - return new DefaultListTableModel<>(columnRenderers); + return new DefaultListTableModel(columnRenderers); } /** @@ -201,31 +201,10 @@ public class JTablePanel extends AbstractLoadableComponent> { return resultTable.setColumnModel(getTableColumnModel(columns)); } -<<<<<<< HEAD - private final JScrollPane tableScrollPane; - private final Overlay overlayLayer; - private final ListTableModel tableModel; - private final JTable table; -======= - /** - * @return The default error message. - */ - public static String getDefaultErrorMessage() { - return DEFAULT_ERROR_MESSAGE; - } - - /** - * @return The default message for no results. - */ - public static String getDefaultNoResultsMessage() { - return DEFAULT_NO_RESULTS_MESSAGE; - } - private JScrollPane tableScrollPane; private Overlay overlayLayer; private ListTableModel tableModel; private JTable table; ->>>>>>> fa0ae98de088d3573878927c94690af0154e5b00 /** * Panel constructor. @@ -258,7 +237,8 @@ public class JTablePanel extends AbstractLoadableComponent> { this.tableModel = tableModel; table.setModel(tableModel); } - + + /** * @return The underlying JTable's column model. */ @@ -278,23 +258,8 @@ public class JTablePanel extends AbstractLoadableComponent> { return this; } -<<<<<<< HEAD @Override protected void setResults(List data) { -======= - /** - * Sets the data to be shown in the JTable. Repaint is not handled in this - * method and should be handled separately. - * - * @param data The list of data objects to be shown. - */ - private void setResultList(List data) { - - if(tableModel == null) { - throw new IllegalStateException("ListTableModel has not be initialized"); - } - ->>>>>>> fa0ae98de088d3573878927c94690af0154e5b00 // set the list of data to be shown as either the data or an empty list // on null. List dataToSet = (data == null) ? Collections.emptyList() : data; @@ -311,92 +276,6 @@ public class JTablePanel extends AbstractLoadableComponent> { this.overlayLayer.setVisible(visible); this.overlayLayer.setMessage(message); } -<<<<<<< HEAD -======= - - /** - * Clears the results from the underlying JTable and shows the provided - * message. - * - * @param message The message to be shown. - */ - public synchronized void showMessage(String message) { - setResultList(null); - setOverlay(true, message); - repaint(); - } - - /** - * Shows a default loading message on the table. This will clear any results - * in the table. - */ - public void showDefaultLoadingMessage() { - showMessage(DEFAULT_LOADING_MESSAGE); - } - - /** - * Shows the list as rows of data in the table. If overlay message will be - * cleared if present. - * - * @param data The data to be shown where each item represents a row of - * data. - */ - public synchronized void showResults(List data) { - setOverlay(false, null); - setResultList(data); - repaint(); - } - - /** - * Shows the data in a DataFetchResult. If there was an error during the - * operation, the errorMessage will be displayed. If the operation completed - * successfully and no data is present, noResultsMessage will be shown. - * Otherwise, the data will be shown as rows in the table. - * - * @param result The DataFetchResult. - * @param errorMessage The error message to be shown in the event of an - * error. - * @param noResultsMessage The message to be shown if there are no results - * but the operation completed successfully. - */ - public void showDataFetchResult(DataFetchResult> result, String errorMessage, String noResultsMessage) { - if (result == null) { - logger.log(Level.SEVERE, "Null data processor result received."); - return; - } - - switch (result.getResultType()) { - case SUCCESS: - if (result.getData() == null || result.getData().isEmpty()) { - showMessage(noResultsMessage); - } else { - showResults(result.getData()); - } - break; - case ERROR: - // if there is an error, log accordingly, set result list to - // empty and display error message - logger.log(Level.WARNING, "An exception was caused while results were loaded.", result.getException()); - showMessage(errorMessage); - break; - default: - // an unknown loading state was specified. log accordingly. - logger.log(Level.SEVERE, "No known loading state was found in result."); - break; - } - } - - /** - * Shows the data in a DataFetchResult. If there was an error during the - * operation, the DEFAULT_ERROR_MESSAGE will be displayed. If the operation - * completed successfully and no data is present, DEFAULT_NO_RESULTS_MESSAGE - * will be shown. Otherwise, the data will be shown as rows in the table. - * - * @param result The DataFetchResult. - */ - public void showDataFetchResult(DataFetchResult> result) { - showDataFetchResult(result, DEFAULT_ERROR_MESSAGE, DEFAULT_NO_RESULTS_MESSAGE); - } /** * Initialize the gui components. @@ -411,5 +290,4 @@ public class JTablePanel extends AbstractLoadableComponent> { setLayout(new BorderLayout()); add(dualLayer, BorderLayout.CENTER); } ->>>>>>> fa0ae98de088d3573878927c94690af0154e5b00 }