19 package org.sleuthkit.autopsy.communications.relationships;
21 import java.awt.CardLayout;
22 import java.util.List;
23 import java.util.concurrent.ExecutionException;
24 import java.util.logging.Level;
25 import javax.swing.DefaultListModel;
26 import javax.swing.JPanel;
27 import org.netbeans.swing.outline.DefaultOutlineModel;
28 import org.netbeans.swing.outline.Outline;
29 import org.openide.explorer.view.OutlineView;
30 import org.openide.nodes.AbstractNode;
31 import org.openide.nodes.Children;
32 import org.openide.util.Lookup;
33 import org.openide.util.NbBundle.Messages;
57 "SummaryViewer_TabTitle=Summary",
58 "SummaryViewer_FileRefNameColumn_Title=Path",
59 "SummaryViewer_CaseRefNameColumn_Title=Case Name",
60 "SummaryViewer_CentralRepository_Message=<Enable Central Respository to see Other Occurrences>",
61 "SummaryViewer_Creation_Date_Title=Creation Date",
62 "SummaryViewer_FileRef_Message=<Select a single account to see File References>",
63 "SummaryViewer_Device_Account_Description=This account was referenced by a device in the case.",
64 "SummaryViewer_Account_Description=This account represents a device in the case.",
65 "SummaryViewer_Account_Description_MuliSelect=Summary information is not available when multiple accounts are selected.",
66 "SummaryViewer_Country_Code=Country: ",
67 "SummaryViewer_Select_account_for_persona=<Select a single account to see Persona(s)>",
68 "SummaryViewer_loading_count_message=Loading...."
75 lookup = Lookup.getDefault();
78 fileRefListModel =
new DefaultListModel<>();
82 Outline outline = outlineView.getOutline();
83 outlineView.setPropertyColumns(
"creationDate", Bundle.SummaryViewer_Creation_Date_Title());
85 outline.setRootVisible(
false);
86 ((DefaultOutlineModel) outline.getOutlineModel()).setNodesColumnLabel(Bundle.SummaryViewer_CaseRefNameColumn_Title());
97 return Bundle.SummaryViewer_TabTitle();
114 CardLayout cardLayout = (CardLayout)
fileRefPane.getLayout();
117 fileRefListModel.removeAllElements();
121 if (info == null || info.
getAccounts().size() != 1) {
129 Account[] accountArray = info.
getAccounts().toArray(
new Account[1]);
130 Account account = accountArray[0];
132 if (account.getAccountType().getTypeName().contains(
"PHONE")) {
135 accountCountry.setText(Bundle.SummaryViewer_Country_Code() + countryCode);
143 if (account.getAccountType().equals(Account.Type.DEVICE)) {
177 super.setEnabled(enabled);
203 fileRefListModel.clear();
208 "SummaryViewer_Fetching_References=<Fetching File References>",
209 "SummaryViewer_Persona_CR_Message=<Enable Central Repository to view Personas>"
212 if (worker != null) {
216 worker =
new SummaryPanelWorker(info, account) {
218 protected void done() {
224 SummaryPanelWorker.SummaryWorkerResults results =
get();
228 if (fileRefList != null) {
229 fileRefList.forEach(value -> {
230 fileRefListModel.addElement(value);
234 CardLayout cardLayout = (CardLayout)
fileRefPane.getLayout();
237 List<Persona> personaList = results.getPersonaList();
246 AccountSummary summaryDetails = results.getAccountSummary();
250 messagesDataLabel.setText(Integer.toString(summaryDetails.getMessagesCnt() + summaryDetails.getEmailCnt()));
255 }
catch (InterruptedException | ExecutionException ex) {
256 logger.log(Level.WARNING, String.format((
"Failed to get data for account: %d"), account.getAccountID()), ex);
270 @SuppressWarnings(
"unchecked")
273 java.awt.GridBagConstraints gridBagConstraints;
295 javax.swing.JPanel fileRefScrolPanel =
new javax.swing.JPanel();
296 javax.swing.JScrollPane scrollPane =
new javax.swing.JScrollPane();
298 javax.swing.JPanel selectAccountPane =
new javax.swing.JPanel();
302 setLayout(
new java.awt.GridBagLayout());
306 org.openide.awt.Mnemonics.setLocalizedText(
accountLabel,
org.openide.util.NbBundle.getMessage(
SummaryViewer.class,
"SummaryViewer.accountLabel.text"));
307 gridBagConstraints =
new java.awt.GridBagConstraints();
308 gridBagConstraints.gridx = 0;
309 gridBagConstraints.gridy = 0;
310 gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
311 gridBagConstraints.insets =
new java.awt.Insets(15, 9, 0, 9);
315 gridBagConstraints =
new java.awt.GridBagConstraints();
316 gridBagConstraints.gridx = 0;
317 gridBagConstraints.gridy = 1;
318 gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
319 gridBagConstraints.insets =
new java.awt.Insets(0, 9, 0, 9);
323 gridBagConstraints =
new java.awt.GridBagConstraints();
324 gridBagConstraints.gridx = 0;
325 gridBagConstraints.gridy = 2;
326 gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
327 gridBagConstraints.weightx = 1.0;
328 gridBagConstraints.insets =
new java.awt.Insets(15, 9, 15, 9);
331 gridBagConstraints =
new java.awt.GridBagConstraints();
332 gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
335 countsPanel.setBorder(javax.swing.BorderFactory.createTitledBorder(
org.openide.util.NbBundle.getMessage(
SummaryViewer.class,
"SummaryViewer.countsPanel.border.title")));
336 countsPanel.setLayout(
new java.awt.GridBagLayout());
339 gridBagConstraints =
new java.awt.GridBagConstraints();
340 gridBagConstraints.gridx = 0;
341 gridBagConstraints.gridy = 0;
342 gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
343 gridBagConstraints.insets =
new java.awt.Insets(9, 15, 9, 15);
347 gridBagConstraints =
new java.awt.GridBagConstraints();
348 gridBagConstraints.gridx = 0;
349 gridBagConstraints.gridy = 1;
350 gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
351 gridBagConstraints.insets =
new java.awt.Insets(0, 15, 9, 15);
355 gridBagConstraints =
new java.awt.GridBagConstraints();
356 gridBagConstraints.gridx = 0;
357 gridBagConstraints.gridy = 2;
358 gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
359 gridBagConstraints.insets =
new java.awt.Insets(0, 15, 9, 15);
363 gridBagConstraints =
new java.awt.GridBagConstraints();
364 gridBagConstraints.gridx = 1;
365 gridBagConstraints.gridy = 2;
366 gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
367 gridBagConstraints.insets =
new java.awt.Insets(0, 0, 9, 15);
371 gridBagConstraints =
new java.awt.GridBagConstraints();
372 gridBagConstraints.gridx = 1;
373 gridBagConstraints.gridy = 0;
374 gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
375 gridBagConstraints.weightx = 1.0;
376 gridBagConstraints.insets =
new java.awt.Insets(9, 0, 9, 15);
380 gridBagConstraints =
new java.awt.GridBagConstraints();
381 gridBagConstraints.gridx = 1;
382 gridBagConstraints.gridy = 1;
383 gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
384 gridBagConstraints.insets =
new java.awt.Insets(0, 0, 9, 15);
388 gridBagConstraints =
new java.awt.GridBagConstraints();
389 gridBagConstraints.gridx = 0;
390 gridBagConstraints.gridy = 3;
391 gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
392 gridBagConstraints.insets =
new java.awt.Insets(0, 15, 9, 15);
396 gridBagConstraints =
new java.awt.GridBagConstraints();
397 gridBagConstraints.gridx = 1;
398 gridBagConstraints.gridy = 3;
399 gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
400 gridBagConstraints.insets =
new java.awt.Insets(0, 0, 9, 15);
403 gridBagConstraints =
new java.awt.GridBagConstraints();
404 gridBagConstraints.gridx = 0;
405 gridBagConstraints.gridy = 1;
406 gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
407 gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
410 contanctsPanel.setBorder(javax.swing.BorderFactory.createTitledBorder(
org.openide.util.NbBundle.getMessage(
SummaryViewer.class,
"SummaryViewer.contanctsPanel.border.title")));
415 gridBagConstraints =
new java.awt.GridBagConstraints();
416 gridBagConstraints.gridx = 0;
417 gridBagConstraints.gridy = 0;
418 gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
419 gridBagConstraints.insets =
new java.awt.Insets(9, 15, 9, 15);
423 gridBagConstraints =
new java.awt.GridBagConstraints();
424 gridBagConstraints.gridx = 1;
425 gridBagConstraints.gridy = 0;
426 gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
427 gridBagConstraints.weightx = 1.0;
428 gridBagConstraints.insets =
new java.awt.Insets(9, 9, 9, 15);
433 gridBagConstraints =
new java.awt.GridBagConstraints();
434 gridBagConstraints.gridx = 0;
435 gridBagConstraints.gridy = 1;
436 gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
437 gridBagConstraints.insets =
new java.awt.Insets(0, 15, 9, 0);
441 gridBagConstraints =
new java.awt.GridBagConstraints();
442 gridBagConstraints.gridx = 1;
443 gridBagConstraints.gridy = 1;
444 gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
445 gridBagConstraints.insets =
new java.awt.Insets(0, 9, 0, 0);
448 gridBagConstraints =
new java.awt.GridBagConstraints();
449 gridBagConstraints.gridx = 0;
450 gridBagConstraints.gridy = 2;
451 gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
452 gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
455 caseReferencesPanel.setBorder(javax.swing.BorderFactory.createTitledBorder(
org.openide.util.NbBundle.getMessage(
SummaryViewer.class,
"SummaryViewer.caseReferencesPanel.border.title")));
456 gridBagConstraints =
new java.awt.GridBagConstraints();
457 gridBagConstraints.gridx = 0;
458 gridBagConstraints.gridy = 5;
459 gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
460 gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
461 gridBagConstraints.weightx = 1.0;
462 gridBagConstraints.weighty = 1.0;
463 gridBagConstraints.insets =
new java.awt.Insets(9, 0, 0, 0);
466 fileRefPane.setBorder(javax.swing.BorderFactory.createTitledBorder(
org.openide.util.NbBundle.getMessage(
SummaryViewer.class,
"SummaryViewer.fileRefPane.border.title")));
469 fileRefScrolPanel.setLayout(
new java.awt.BorderLayout());
471 fileRefList.setModel(
new javax.swing.AbstractListModel<String>() {
472 String[] strings = {
"Item 1",
"Item 2",
"Item 3",
"Item 4",
"Item 5" };
473 public int getSize() {
return strings.length; }
474 public String getElementAt(
int i) {
return strings[i]; }
478 fileRefScrolPanel.add(scrollPane, java.awt.BorderLayout.CENTER);
480 fileRefPane.add(fileRefScrolPanel,
"listPanelCard");
482 selectAccountPane.setLayout(
new java.awt.GridBagLayout());
488 fileRefPane.add(selectAccountPane,
"selectAccountCard");
490 gridBagConstraints =
new java.awt.GridBagConstraints();
491 gridBagConstraints.gridx = 0;
492 gridBagConstraints.gridy = 4;
493 gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
494 gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
495 gridBagConstraints.weighty = 1.0;
498 personaPanel.setBorder(javax.swing.BorderFactory.createTitledBorder(
org.openide.util.NbBundle.getMessage(
SummaryViewer.class,
"SummaryViewer.personaPanel.border.title")));
499 personaPanel.setMinimumSize(
new java.awt.Dimension(35, 75));
500 personaPanel.setPreferredSize(
new java.awt.Dimension(112, 75));
501 gridBagConstraints =
new java.awt.GridBagConstraints();
502 gridBagConstraints.gridy = 3;
503 gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
javax.swing.JLabel accountCountry
javax.swing.JLabel contactsDataLabel
javax.swing.JLabel attachmentDataLabel
javax.swing.JLabel callLogsDataLabel
javax.swing.JLabel selectAccountFileRefLabel
SummaryPanelWorker worker
javax.swing.JLabel messagesDataLabel
static final Logger logger
static final long serialVersionUID
void updateOtherAccountInfo(SelectionInfo info, Account account)
javax.swing.JLabel referencesDataLabel
javax.swing.JLabel accoutDescriptionLabel
javax.swing.JLabel referencesLabel
void setEnabled(boolean enabled)
javax.swing.JLabel contactsLabel
javax.swing.JPanel contanctsPanel
javax.swing.JPanel countsPanel
javax.swing.JPanel summaryPanel
javax.swing.JLabel callLogsLabel
void setEnabled(boolean enabled)
javax.swing.JList< String > fileRefList
javax.swing.JLabel messagesLabel
javax.swing.JLabel thumbnailsDataLabel
final DefaultListModel< String > fileRefListModel
javax.swing.JPanel fileRefPane
static String getCountryCode(String phoneNumber)
javax.swing.JPanel personaPanel
org.sleuthkit.autopsy.communications.relationships.OutlineViewPanel caseReferencesPanel
static String convertToInternational(String phoneNumber)
void hideOutlineView(String message)
javax.swing.JLabel attachmentsLabel
synchronized static Logger getLogger(String name)
javax.swing.JLabel thumbnailCntLabel
OutlineView getOutlineView()
Set< Account > getAccounts()
void setSelectionInfo(SelectionInfo info)
javax.swing.JLabel accountLabel
static boolean isEnabled()