Autopsy  4.11.0
Graphical digital forensics platform for The Sleuth Kit and other tools.
ContactDetailsPane.java
Go to the documentation of this file.
1 /*
2  * Autopsy Forensic Browser
3  *
4  * Copyright 2019 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.communications.relationships;
20 
21 import org.openide.explorer.ExplorerManager;
22 import org.openide.nodes.Node;
23 
27 public final class ContactDetailsPane extends javax.swing.JPanel implements ExplorerManager.Provider {
28 
29  final private ExplorerManager explorerManager = new ExplorerManager();
30 
34  public ContactDetailsPane() {
36  this.setEnabled(false);
37 
38  nameLabel.setText("");
39  }
40 
46  public void setNode(Node[] nodes) {
47  if (nodes != null && nodes.length == 1) {
48  nameLabel.setText(nodes[0].getDisplayName());
49  propertySheet.setNodes(nodes);
50  } else {
51  nameLabel.setText("");
52  propertySheet.setNodes(null);
53  }
54  }
55 
56  @Override
57  public ExplorerManager getExplorerManager() {
58  return explorerManager;
59  }
60 
61  @Override
62  public void setEnabled(boolean enabled) {
63  super.setEnabled(enabled);
64  nameLabel.setEnabled(enabled);
65  propertySheet.setEnabled(enabled);
66  }
67 
73  @SuppressWarnings("unchecked")
74  // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
75  private void initComponents() {
76  java.awt.GridBagConstraints gridBagConstraints;
77 
79  nameLabel = new javax.swing.JLabel();
80  propertySheet = new org.openide.explorer.propertysheet.PropertySheet();
81 
82  setLayout(new java.awt.GridBagLayout());
83 
84  nameLabel.setFont(new java.awt.Font("Tahoma", 0, 24)); // NOI18N
85  org.openide.awt.Mnemonics.setLocalizedText(nameLabel, org.openide.util.NbBundle.getMessage(ContactDetailsPane.class, "ContactDetailsPane.nameLabel.text")); // NOI18N
86  gridBagConstraints = new java.awt.GridBagConstraints();
87  gridBagConstraints.gridx = 0;
88  gridBagConstraints.gridy = 0;
89  gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
90  gridBagConstraints.anchor = java.awt.GridBagConstraints.FIRST_LINE_START;
91  gridBagConstraints.weightx = 1.0;
92  gridBagConstraints.insets = new java.awt.Insets(16, 15, 15, 15);
93  add(nameLabel, gridBagConstraints);
94 
95  propertySheet.setDescriptionAreaVisible(false);
96  gridBagConstraints = new java.awt.GridBagConstraints();
97  gridBagConstraints.gridx = 0;
98  gridBagConstraints.gridy = 1;
99  gridBagConstraints.gridwidth = 2;
100  gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
101  gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
102  gridBagConstraints.weightx = 1.0;
103  gridBagConstraints.weighty = 1.0;
104  gridBagConstraints.insets = new java.awt.Insets(9, 15, 16, 15);
105  add(propertySheet, gridBagConstraints);
106  }// </editor-fold>//GEN-END:initComponents
107 
108 
109  // Variables declaration - do not modify//GEN-BEGIN:variables
111  private javax.swing.JLabel nameLabel;
112  private org.openide.explorer.propertysheet.PropertySheet propertySheet;
113  // End of variables declaration//GEN-END:variables
114 }
org.openide.explorer.propertysheet.PropertySheet propertySheet
org.sleuthkit.autopsy.contentviewers.MessageContentViewer messageContentViewer1

Copyright © 2012-2018 Basis Technology. Generated on: Fri Jun 21 2019
This work is licensed under a Creative Commons Attribution-Share Alike 3.0 United States License.