19 package org.sleuthkit.autopsy.datasourcesummary.ui;
21 import java.util.Arrays;
22 import java.util.List;
23 import org.apache.commons.lang3.tuple.Pair;
24 import org.openide.util.NbBundle.Messages;
41 "PastCasesPanel_caseColumn_title=Case",
42 "PastCasesPanel_countColumn_title=Count",
43 "PastCasesPanel_onNoCrIngest_message=No results will be shown because the Central Repository module was not run.",
44 "PastCasesPanel_notableFileTable_tabName=Cases with Common Notable Items at Time Of Ingest",
45 "PastCasesPanel_sameIdsTable_tabName=Past Cases with the Same Devices",})
48 private static final long serialVersionUID = 1L;
52 Bundle.PastCasesPanel_caseColumn_title(),
59 Bundle.PastCasesPanel_countColumn_title(),
66 = Arrays.asList(CASE_COL, COUNT_COL);
72 private final List<JTablePanel<?>> tables = Arrays.asList(
93 this.pastCasesFetcher = (dataSource) -> pastCaseData.
getPastCasesData(dataSource);
96 dataFetchComponents = Arrays.asList(
99 (result) -> handleResult(result))
118 fetchInformation(dataFetchComponents, dataSource);
123 onNewDataSource(dataFetchComponents, tables, dataSource);
137 @SuppressWarnings(
"unchecked")
139 private
void initComponents() {
141 javax.swing.JScrollPane mainScrollPane =
new javax.swing.JScrollPane();
142 javax.swing.JPanel mainContentPanel =
new javax.swing.JPanel();
143 javax.swing.JPanel ingestRunningPanel = ingestRunningLabel;
144 javax.swing.JLabel notableFileLabel =
new javax.swing.JLabel();
145 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));
146 javax.swing.JPanel notableFilePanel = notableFileTable;
147 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));
148 javax.swing.JLabel sameIdLabel =
new javax.swing.JLabel();
149 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));
150 javax.swing.JPanel sameIdPanel = sameIdTable;
151 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));
153 mainContentPanel.setBorder(javax.swing.BorderFactory.createEmptyBorder(10, 10, 10, 10));
154 mainContentPanel.setLayout(
new javax.swing.BoxLayout(mainContentPanel, javax.swing.BoxLayout.PAGE_AXIS));
156 ingestRunningPanel.setAlignmentX(0.0F);
157 ingestRunningPanel.setMaximumSize(
new java.awt.Dimension(32767, 25));
158 ingestRunningPanel.setMinimumSize(
new java.awt.Dimension(10, 25));
159 ingestRunningPanel.setPreferredSize(
new java.awt.Dimension(10, 25));
160 mainContentPanel.add(ingestRunningPanel);
162 org.openide.awt.Mnemonics.setLocalizedText(notableFileLabel,
org.openide.util.NbBundle.getMessage(
PastCasesPanel.class,
"PastCasesPanel.notableFileLabel.text"));
163 mainContentPanel.add(notableFileLabel);
164 notableFileLabel.getAccessibleContext().setAccessibleName(
org.openide.util.NbBundle.getMessage(
PastCasesPanel.class,
"PastCasesPanel.notableFileLabel.text"));
166 filler1.setAlignmentX(0.0F);
167 mainContentPanel.add(filler1);
169 notableFilePanel.setAlignmentX(0.0F);
170 notableFilePanel.setMaximumSize(
new java.awt.Dimension(32767, 106));
171 notableFilePanel.setMinimumSize(
new java.awt.Dimension(100, 106));
172 notableFilePanel.setPreferredSize(
new java.awt.Dimension(100, 106));
173 mainContentPanel.add(notableFilePanel);
175 filler2.setAlignmentX(0.0F);
176 mainContentPanel.add(filler2);
178 org.openide.awt.Mnemonics.setLocalizedText(sameIdLabel,
org.openide.util.NbBundle.getMessage(
PastCasesPanel.class,
"PastCasesPanel.sameIdLabel.text"));
179 mainContentPanel.add(sameIdLabel);
181 filler3.setAlignmentX(0.0F);
182 mainContentPanel.add(filler3);
184 sameIdPanel.setAlignmentX(0.0F);
185 sameIdPanel.setMaximumSize(
new java.awt.Dimension(32767, 106));
186 sameIdPanel.setMinimumSize(
new java.awt.Dimension(100, 106));
187 sameIdPanel.setPreferredSize(
new java.awt.Dimension(100, 106));
188 mainContentPanel.add(sameIdPanel);
190 filler5.setAlignmentX(0.0F);
191 mainContentPanel.add(filler5);
193 mainScrollPane.setViewportView(mainContentPanel);
195 javax.swing.GroupLayout layout =
new javax.swing.GroupLayout(
this);
196 this.setLayout(layout);
197 layout.setHorizontalGroup(
198 layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
199 .addComponent(mainScrollPane, javax.swing.GroupLayout.DEFAULT_SIZE, 400, Short.MAX_VALUE)
201 layout.setVerticalGroup(
202 layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
203 .addComponent(mainScrollPane, javax.swing.GroupLayout.DEFAULT_SIZE, 300, Short.MAX_VALUE)
void handleResult(DataFetchResult< PastCasesResult > result)
static< I, O > DataFetchResult< O > getSubResult(DataFetchResult< I > inputResult, Function< I, O > getSubResult)
void showDataFetchResult(DataFetchResult< T > result, String errorMessage, String noResultsMessage)
static< T, CextendsGuiCellModel > JTablePanel< T > getJTablePanel(List< ColumnModel< T, C >> columns)
PastCasesResult getPastCasesData(DataSource dataSource)
void onNewDataSource(DataSource dataSource)
PastCasesPanel(PastCasesSummaryGetter pastCaseData)
final List< DataFetchComponents< DataSource,?> > dataFetchComponents
final DataFetcher< DataSource, PastCasesResult > pastCasesFetcher
void fetchInformation(DataSource dataSource)