Autopsy  4.21.0
Graphical digital forensics platform for The Sleuth Kit and other tools.
IngestMessageMainPanel.java
Go to the documentation of this file.
1 /*
2  * Autopsy Forensic Browser
3  *
4  * Copyright 2011-2018 Basis Technology Corp.
5  * Contact: carrier <at> sleuthkit <dot> org
6  *
7  * Licensed under the Apache License, Version 2.0 (the "License");
8  * you may not use this file except in compliance with the License.
9  * You may obtain a copy of the License at
10  *
11  * http://www.apache.org/licenses/LICENSE-2.0
12  *
13  * Unless required by applicable law or agreed to in writing, software
14  * distributed under the License is distributed on an "AS IS" BASIS,
15  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16  * See the License for the specific language governing permissions and
17  * limitations under the License.
18  */
19 package org.sleuthkit.autopsy.ingest;
20 
21 import java.awt.CardLayout;
23 
28 @SuppressWarnings("PMD.SingularField") // UI widgets cause lots of false positives
29 class IngestMessageMainPanel extends javax.swing.JPanel {
30 
31  private IngestMessagePanel messagePanel;
32  private IngestMessageDetailsPanel detailsPanel;
33  private Logger logger = Logger.getLogger(IngestMessageMainPanel.class.getName());
34  //the 2 layer names
35  private static final String MESSAGES_VIEWER_LAYER = "MESSAGES"; //NON-NLS
36  private static final String DETAILS_VIEWER_LAYER = "DETAILS"; //NON-NLS
37 
41  public IngestMessageMainPanel() {
42  initComponents();
43  customizeComponents();
44  }
45 
46  public void markAllSeen() {
47  messagePanel.markAllSeen();
48  }
49 
50  private void customizeComponents() {
51  messagePanel = new IngestMessagePanel(this);
52  detailsPanel = new IngestMessageDetailsPanel(this);
53 
54  messagePanel.setOpaque(true);
55  detailsPanel.setOpaque(true);
56 
57  add(messagePanel, MESSAGES_VIEWER_LAYER);
58  add(detailsPanel, DETAILS_VIEWER_LAYER);
59 
60  this.setOpaque(true);
61  }
62 
63  IngestMessagePanel getMessagePanel() {
64  return messagePanel;
65  }
66 
67  IngestMessageDetailsPanel getDetailsPanel() {
68  return detailsPanel;
69  }
70 
71  void showMessages() {
72  CardLayout layout = (CardLayout) this.getLayout();
73  layout.show(this, MESSAGES_VIEWER_LAYER);
74  }
75 
76  void showDetails(int rowNumber) {
77  detailsPanel.showDetails(rowNumber);
78  CardLayout layout = (CardLayout) this.getLayout();
79  layout.show(this, DETAILS_VIEWER_LAYER);
80  }
81 
82  public void addMessage(IngestMessage ingestMessage) {
83  messagePanel.addMessage(ingestMessage);
84  }
85 
86  public void clearMessages() {
87  messagePanel.clearMessages();
88  }
89 
90  public int getMessagesCount() {
91  return messagePanel.getMessagesCount();
92  }
93 
99  @SuppressWarnings("unchecked")
100  // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
101  private void initComponents() {
102 
103  setLayout(new java.awt.CardLayout());
104  }// </editor-fold>//GEN-END:initComponents
105  // Variables declaration - do not modify//GEN-BEGIN:variables
106  // End of variables declaration//GEN-END:variables
107 }
synchronized static Logger getLogger(String name)
Definition: Logger.java:124

Copyright © 2012-2022 Basis Technology. Generated on: Tue Feb 6 2024
This work is licensed under a Creative Commons Attribution-Share Alike 3.0 United States License.