Autopsy  4.6.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-2013 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 class IngestMessageMainPanel extends javax.swing.JPanel {
29 
30  private IngestMessagePanel messagePanel;
31  private IngestMessageDetailsPanel detailsPanel;
32  private Logger logger = Logger.getLogger(IngestMessageMainPanel.class.getName());
33  //the 2 layer names
34  private static final String MESSAGES_VIEWER_LAYER = "MESSAGES"; //NON-NLS
35  private static final String DETAILS_VIEWER_LAYER = "DETAILS"; //NON-NLS
36 
40  public IngestMessageMainPanel() {
41  initComponents();
42  customizeComponents();
43  }
44 
45  public void markAllSeen() {
46  messagePanel.markAllSeen();
47  }
48 
49  private void customizeComponents() {
50  messagePanel = new IngestMessagePanel(this);
51  detailsPanel = new IngestMessageDetailsPanel(this);
52 
53  messagePanel.setOpaque(true);
54  detailsPanel.setOpaque(true);
55 
56  add(messagePanel, MESSAGES_VIEWER_LAYER);
57  add(detailsPanel, DETAILS_VIEWER_LAYER);
58 
59  this.setOpaque(true);
60  }
61 
62  IngestMessagePanel getMessagePanel() {
63  return messagePanel;
64  }
65 
66  IngestMessageDetailsPanel getDetailsPanel() {
67  return detailsPanel;
68  }
69 
70  void showMessages() {
71  CardLayout layout = (CardLayout) this.getLayout();
72  layout.show(this, MESSAGES_VIEWER_LAYER);
73  }
74 
75  void showDetails(int rowNumber) {
76  detailsPanel.showDetails(rowNumber);
77  CardLayout layout = (CardLayout) this.getLayout();
78  layout.show(this, DETAILS_VIEWER_LAYER);
79  }
80 
81  public void addMessage(IngestMessage ingestMessage) {
82  messagePanel.addMessage(ingestMessage);
83  }
84 
85  public void clearMessages() {
86  messagePanel.clearMessages();
87  }
88 
89  public int getMessagesCount() {
90  return messagePanel.getMessagesCount();
91  }
92 
98  @SuppressWarnings("unchecked")
99  // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
100  private void initComponents() {
101 
102  setLayout(new java.awt.CardLayout());
103  }// </editor-fold>//GEN-END:initComponents
104  // Variables declaration - do not modify//GEN-BEGIN:variables
105  // End of variables declaration//GEN-END:variables
106 }
synchronized static Logger getLogger(String name)
Definition: Logger.java:124

Copyright © 2012-2016 Basis Technology. Generated on: Mon May 7 2018
This work is licensed under a Creative Commons Attribution-Share Alike 3.0 United States License.