19 package org.sleuthkit.autopsy.datasourcesummary.ui;
21 import java.util.ArrayList;
22 import java.util.Arrays;
23 import java.util.List;
24 import java.util.function.Supplier;
25 import org.openide.util.NbBundle.Messages;
55 "RecentFilesPanel_col_head_date=Date",
56 "RecentFilePanel_col_header_domain=Domain",
57 "RecentFilePanel_col_header_path=Path",
58 "RecentFilePanel_col_header_sender=Sender",
59 "RecentFilePanel_emailParserModuleName=Email Parser"
95 List<MenuItem> toRet =
new ArrayList<>();
98 if (fileNav != null) {
103 toRet.add(getArtifactNavigateItem(record.
getArtifact()));
106 return (toRet.size() > 0) ? toRet : null;
136 "RecentFilePanel_no_open_documents=No recently open documents found."
141 @SuppressWarnings(
"unchecked")
143 List<ColumnModel<RecentFileDetails>> list = Arrays.asList(
162 tablePanelList.add(pane);
169 dataFetchComponents.add(worker);
175 @SuppressWarnings(
"unchecked")
177 List<ColumnModel<RecentDownloadDetails>> list = Arrays.asList(
178 new ColumnModel<>(Bundle.RecentFilePanel_col_header_domain(),
201 tablePanelList.add(pane);
208 dataFetchComponents.add(worker);
214 @SuppressWarnings(
"unchecked")
216 List<ColumnModel<RecentAttachmentDetails>> list = Arrays.asList(
227 new ColumnModel<>(Bundle.RecentFilePanel_col_header_sender(),
240 tablePanelList.add(pane);
248 dataFetchComponents.add(worker);
256 @SuppressWarnings(
"unchecked")
259 java.awt.GridBagConstraints gridBagConstraints;
261 javax.swing.JScrollPane scrollPane =
new javax.swing.JScrollPane();
262 javax.swing.JPanel tablePanel =
new javax.swing.JPanel();
267 javax.swing.JLabel openDocsLabel =
new javax.swing.JLabel();
268 javax.swing.JLabel downloadLabel =
new javax.swing.JLabel();
269 javax.swing.JLabel attachmentLabel =
new javax.swing.JLabel();
270 javax.swing.JLabel rightClickForMoreOptions1 =
new javax.swing.JLabel();
271 javax.swing.JLabel rightClickForMoreOptions2 =
new javax.swing.JLabel();
272 javax.swing.JLabel rightClickForMoreOptions3 =
new javax.swing.JLabel();
274 setLayout(
new java.awt.BorderLayout());
276 tablePanel.setBorder(javax.swing.BorderFactory.createEmptyBorder(10, 10, 10, 10));
277 tablePanel.setMinimumSize(
new java.awt.Dimension(400, 400));
278 tablePanel.setPreferredSize(
new java.awt.Dimension(600, 400));
279 tablePanel.setLayout(
new java.awt.GridBagLayout());
281 ingestRunningPanel.setAlignmentX(0.0F);
282 ingestRunningPanel.setMaximumSize(
new java.awt.Dimension(32767, 25));
283 ingestRunningPanel.setMinimumSize(
new java.awt.Dimension(10, 25));
284 ingestRunningPanel.setPreferredSize(
new java.awt.Dimension(10, 25));
285 gridBagConstraints =
new java.awt.GridBagConstraints();
286 gridBagConstraints.gridx = 0;
287 gridBagConstraints.gridy = 0;
288 gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
289 gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
290 tablePanel.add(ingestRunningPanel, gridBagConstraints);
291 gridBagConstraints =
new java.awt.GridBagConstraints();
292 gridBagConstraints.gridx = 0;
293 gridBagConstraints.gridy = 2;
294 gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
295 gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTH;
296 gridBagConstraints.weightx = 1.0;
297 gridBagConstraints.weighty = 1.0;
298 gridBagConstraints.insets =
new java.awt.Insets(2, 0, 0, 0);
300 gridBagConstraints =
new java.awt.GridBagConstraints();
301 gridBagConstraints.gridx = 0;
302 gridBagConstraints.gridy = 5;
303 gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
304 gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTH;
305 gridBagConstraints.weightx = 1.0;
306 gridBagConstraints.weighty = 1.0;
307 gridBagConstraints.insets =
new java.awt.Insets(2, 0, 0, 0);
308 tablePanel.add(downloadsPane, gridBagConstraints);
309 gridBagConstraints =
new java.awt.GridBagConstraints();
310 gridBagConstraints.gridx = 0;
311 gridBagConstraints.gridy = 8;
312 gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
313 gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTH;
314 gridBagConstraints.weightx = 1.0;
315 gridBagConstraints.weighty = 1.0;
316 gridBagConstraints.insets =
new java.awt.Insets(2, 0, 0, 0);
317 tablePanel.add(attachmentsPane, gridBagConstraints);
319 org.openide.awt.Mnemonics.setLocalizedText(openDocsLabel,
org.openide.util.NbBundle.getMessage(
RecentFilesPanel.class,
"RecentFilesPanel.openDocsLabel.text"));
320 gridBagConstraints =
new java.awt.GridBagConstraints();
321 gridBagConstraints.gridx = 0;
322 gridBagConstraints.gridy = 1;
323 gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
324 gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTH;
325 tablePanel.add(openDocsLabel, gridBagConstraints);
327 org.openide.awt.Mnemonics.setLocalizedText(downloadLabel,
org.openide.util.NbBundle.getMessage(
RecentFilesPanel.class,
"RecentFilesPanel.downloadLabel.text"));
328 gridBagConstraints =
new java.awt.GridBagConstraints();
329 gridBagConstraints.gridx = 0;
330 gridBagConstraints.gridy = 4;
331 gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
332 gridBagConstraints.insets =
new java.awt.Insets(20, 0, 0, 0);
333 tablePanel.add(downloadLabel, gridBagConstraints);
335 org.openide.awt.Mnemonics.setLocalizedText(attachmentLabel,
org.openide.util.NbBundle.getMessage(
RecentFilesPanel.class,
"RecentFilesPanel.attachmentLabel.text"));
336 gridBagConstraints =
new java.awt.GridBagConstraints();
337 gridBagConstraints.gridx = 0;
338 gridBagConstraints.gridy = 7;
339 gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
340 gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTH;
341 gridBagConstraints.insets =
new java.awt.Insets(20, 0, 0, 0);
342 tablePanel.add(attachmentLabel, gridBagConstraints);
344 org.openide.awt.Mnemonics.setLocalizedText(rightClickForMoreOptions1,
org.openide.util.NbBundle.getMessage(
RecentFilesPanel.class,
"RecentFilesPanel.rightClickForMoreOptions1.text"));
345 gridBagConstraints =
new java.awt.GridBagConstraints();
346 gridBagConstraints.gridx = 0;
347 gridBagConstraints.gridy = 3;
348 gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
349 gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTH;
350 tablePanel.add(rightClickForMoreOptions1, gridBagConstraints);
352 org.openide.awt.Mnemonics.setLocalizedText(rightClickForMoreOptions2,
org.openide.util.NbBundle.getMessage(
RecentFilesPanel.class,
"RecentFilesPanel.rightClickForMoreOptions2.text"));
353 gridBagConstraints =
new java.awt.GridBagConstraints();
354 gridBagConstraints.gridx = 0;
355 gridBagConstraints.gridy = 6;
356 gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
357 gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTH;
358 tablePanel.add(rightClickForMoreOptions2, gridBagConstraints);
360 org.openide.awt.Mnemonics.setLocalizedText(rightClickForMoreOptions3,
org.openide.util.NbBundle.getMessage(
RecentFilesPanel.class,
"RecentFilesPanel.rightClickForMoreOptions3.text"));
361 gridBagConstraints =
new java.awt.GridBagConstraints();
362 gridBagConstraints.gridx = 0;
363 gridBagConstraints.gridy = 9;
364 gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
365 gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTH;
366 tablePanel.add(rightClickForMoreOptions3, gridBagConstraints);
368 scrollPane.setViewportView(tablePanel);
370 add(scrollPane, java.awt.BorderLayout.CENTER);
JTablePanel< T > setColumnModel(TableColumnModel columnModel)
List< RecentFileDetails > getRecentlyOpenedDocuments(DataSource dataSource, int maxCount)
javax.swing.JPanel openedDocPane
final RecentFilesSummary dataHandler
static final long serialVersionUID
Supplier< List< MenuItem > > getPopupFunct(RecentFileDetails record)
void showDataFetchResult(DataFetchResult< T > result, String errorMessage, String noResultsMessage)
BlackboardArtifact getArtifact()
javax.swing.JPanel downloadsPane
List< RecentDownloadDetails > getRecentDownloads(DataSource dataSource, int maxCount)
JTablePanel< T > setCellListener(CellMouseListener cellListener)
void fetchInformation(DataSource dataSource)
void initalizeAttchementsTable()
javax.swing.JPanel attachmentsPane
List< RecentAttachmentDetails > getRecentAttachments(DataSource dataSource, int maxCount)
final List< JTablePanel<?> > tablePanelList
void onNewDataSource(DataSource dataSource)
void initalizeOpenDocsTable()
static< T > TableColumnModel getTableColumnModel(List< ColumnModel< T >> columns)
final List< DataFetchWorker.DataFetchComponents< DataSource,?> > dataFetchComponents
static< T > ListTableModel< T > getTableModel(List< ColumnModel< T >> columns)
void initalizeDownloadTable()
final IngestRunningLabel ingestRunningLabel
static CellMouseListener getMouseListener()
RecentFilesPanel(RecentFilesSummary dataHandler)
final JTablePanel< T > setModel(ListTableModel< T > tableModel)
JTablePanel< T > setKeyFunction(Function< T,?extends Object > keyFunction)