19 package org.sleuthkit.autopsy.ingest;
21 import java.awt.CardLayout;
28 @SuppressWarnings(
"PMD.SingularField")
29 class IngestMessageMainPanel extends javax.swing.JPanel {
31 private IngestMessagePanel messagePanel;
32 private IngestMessageDetailsPanel detailsPanel;
33 private Logger logger = Logger.
getLogger(IngestMessageMainPanel.class.getName());
35 private static final String MESSAGES_VIEWER_LAYER =
"MESSAGES";
36 private static final String DETAILS_VIEWER_LAYER =
"DETAILS";
41 public IngestMessageMainPanel() {
43 customizeComponents();
46 public void markAllSeen() {
47 messagePanel.markAllSeen();
50 private void customizeComponents() {
51 messagePanel =
new IngestMessagePanel(
this);
52 detailsPanel =
new IngestMessageDetailsPanel(
this);
54 messagePanel.setOpaque(
true);
55 detailsPanel.setOpaque(
true);
57 add(messagePanel, MESSAGES_VIEWER_LAYER);
58 add(detailsPanel, DETAILS_VIEWER_LAYER);
63 IngestMessagePanel getMessagePanel() {
67 IngestMessageDetailsPanel getDetailsPanel() {
72 CardLayout layout = (CardLayout) this.getLayout();
73 layout.show(
this, MESSAGES_VIEWER_LAYER);
76 void showDetails(
int rowNumber) {
77 detailsPanel.showDetails(rowNumber);
78 CardLayout layout = (CardLayout) this.getLayout();
79 layout.show(
this, DETAILS_VIEWER_LAYER);
82 public void addMessage(IngestMessage ingestMessage) {
83 messagePanel.addMessage(ingestMessage);
86 public void clearMessages() {
87 messagePanel.clearMessages();
90 public int getMessagesCount() {
91 return messagePanel.getMessagesCount();
99 @SuppressWarnings(
"unchecked")
101 private
void initComponents() {
103 setLayout(
new java.awt.CardLayout());
synchronized static Logger getLogger(String name)