19 package org.sleuthkit.autopsy.ingest;
21 import java.awt.CardLayout;
28 class IngestMessageMainPanel
extends javax.swing.JPanel {
30 private IngestMessagePanel messagePanel;
31 private IngestMessageDetailsPanel detailsPanel;
32 private Logger logger = Logger.
getLogger(IngestMessageMainPanel.class.getName());
34 private static final String MESSAGES_VIEWER_LAYER =
"MESSAGES";
35 private static final String DETAILS_VIEWER_LAYER =
"DETAILS";
40 public IngestMessageMainPanel() {
42 customizeComponents();
45 public void markAllSeen() {
46 messagePanel.markAllSeen();
49 private void customizeComponents() {
50 messagePanel =
new IngestMessagePanel(
this);
51 detailsPanel =
new IngestMessageDetailsPanel(
this);
53 messagePanel.setOpaque(
true);
54 detailsPanel.setOpaque(
true);
56 add(messagePanel, MESSAGES_VIEWER_LAYER);
57 add(detailsPanel, DETAILS_VIEWER_LAYER);
62 IngestMessagePanel getMessagePanel() {
66 IngestMessageDetailsPanel getDetailsPanel() {
71 CardLayout layout = (CardLayout) this.getLayout();
72 layout.show(
this, MESSAGES_VIEWER_LAYER);
75 void showDetails(
int rowNumber) {
76 detailsPanel.showDetails(rowNumber);
77 CardLayout layout = (CardLayout) this.getLayout();
78 layout.show(
this, DETAILS_VIEWER_LAYER);
81 public void addMessage(IngestMessage ingestMessage) {
82 messagePanel.addMessage(ingestMessage);
85 public void clearMessages() {
86 messagePanel.clearMessages();
89 public int getMessagesCount() {
90 return messagePanel.getMessagesCount();
98 @SuppressWarnings(
"unchecked")
100 private
void initComponents() {
102 setLayout(
new java.awt.CardLayout());
synchronized static Logger getLogger(String name)