19 package org.sleuthkit.autopsy.contentviewers.artifactviewers;
22 import java.awt.Color;
23 import java.awt.Component;
24 import java.awt.ComponentOrientation;
25 import java.awt.Cursor;
26 import java.util.Arrays;
27 import java.util.List;
29 import java.util.concurrent.ExecutionException;
30 import java.util.logging.Level;
31 import javax.swing.JScrollPane;
32 import javax.swing.text.JTextComponent;
33 import org.apache.commons.lang3.StringUtils;
34 import org.openide.explorer.ExplorerManager;
35 import org.openide.nodes.AbstractNode;
36 import org.openide.nodes.Children;
37 import org.openide.nodes.Node;
38 import org.openide.util.NbBundle;
39 import org.openide.util.lookup.ServiceProvider;
52 import static org.
sleuthkit.datamodel.BlackboardArtifact.ARTIFACT_TYPE.TSK_EMAIL_MSG;
53 import static org.
sleuthkit.datamodel.BlackboardArtifact.ARTIFACT_TYPE.TSK_KEYWORD_HIT;
54 import static org.
sleuthkit.datamodel.BlackboardArtifact.ARTIFACT_TYPE.TSK_MESSAGE;
56 import static org.
sleuthkit.datamodel.BlackboardAttribute.ATTRIBUTE_TYPE.TSK_ASSOCIATED_ARTIFACT;
57 import static org.
sleuthkit.datamodel.BlackboardAttribute.ATTRIBUTE_TYPE.TSK_DATETIME;
58 import static org.
sleuthkit.datamodel.BlackboardAttribute.ATTRIBUTE_TYPE.TSK_DATETIME_RCVD;
59 import static org.
sleuthkit.datamodel.BlackboardAttribute.ATTRIBUTE_TYPE.TSK_DIRECTION;
60 import static org.
sleuthkit.datamodel.BlackboardAttribute.ATTRIBUTE_TYPE.TSK_EMAIL_CC;
61 import static org.
sleuthkit.datamodel.BlackboardAttribute.ATTRIBUTE_TYPE.TSK_EMAIL_CONTENT_HTML;
62 import static org.
sleuthkit.datamodel.BlackboardAttribute.ATTRIBUTE_TYPE.TSK_EMAIL_CONTENT_PLAIN;
63 import static org.
sleuthkit.datamodel.BlackboardAttribute.ATTRIBUTE_TYPE.TSK_EMAIL_CONTENT_RTF;
64 import static org.
sleuthkit.datamodel.BlackboardAttribute.ATTRIBUTE_TYPE.TSK_EMAIL_FROM;
65 import static org.
sleuthkit.datamodel.BlackboardAttribute.ATTRIBUTE_TYPE.TSK_EMAIL_TO;
66 import static org.
sleuthkit.datamodel.BlackboardAttribute.ATTRIBUTE_TYPE.TSK_HEADERS;
67 import static org.
sleuthkit.datamodel.BlackboardAttribute.ATTRIBUTE_TYPE.TSK_PHONE_NUMBER_FROM;
68 import static org.
sleuthkit.datamodel.BlackboardAttribute.ATTRIBUTE_TYPE.TSK_PHONE_NUMBER_TO;
69 import static org.
sleuthkit.datamodel.BlackboardAttribute.ATTRIBUTE_TYPE.TSK_SUBJECT;
70 import static org.
sleuthkit.datamodel.BlackboardAttribute.ATTRIBUTE_TYPE.TSK_TEXT;
72 import org.
sleuthkit.datamodel.blackboardutils.attributes.MessageAttachments.Attachment;
77 @ServiceProvider(service = ArtifactContentViewer.class)
78 @SuppressWarnings(
"PMD.SingularField")
87 private final Component rootComponent;
92 childTextComponent.setEditable(
false);
94 JScrollPane parentComponent =
new JScrollPane();
95 parentComponent.setHorizontalScrollBarPolicy(javax.swing.ScrollPaneConstants.HORIZONTAL_SCROLLBAR_NEVER);
96 parentComponent.setVerticalScrollBarPolicy(javax.swing.ScrollPaneConstants.VERTICAL_SCROLLBAR_AS_NEEDED);
97 parentComponent.setViewportView(childTextComponent);
98 rootComponent = parentComponent;
102 public Component getRootComponent() {
103 return rootComponent;
108 childTextComponent.
setText(content == null ?
"" : content);
109 childTextComponent.setComponentOrientation(orientation);
110 childTextComponent.setCaretPosition(0);
114 private static final long serialVersionUID = 1L;
116 private static final BlackboardAttribute.Type TSK_ASSOCIATED_TYPE =
new BlackboardAttribute.Type(TSK_ASSOCIATED_ARTIFACT);
118 private static final int HDR_TAB_INDEX = 0;
119 private static final int TEXT_TAB_INDEX = 1;
120 private static final int HTML_TAB_INDEX = 2;
121 private static final int RTF_TAB_INDEX = 3;
122 private static final int ATTM_TAB_INDEX = 4;
123 private static final int ACCT_TAB_INDEX = 5;
140 this.textAreas = textAreas;
147 @NbBundle.Messages(
"MessageArtifactViewer.AttachmentPanel.title=Attachments")
150 accountsPanel =
new MessageAccountPanel();
152 htmlPane.add(htmlPanel);
153 envelopePanel.setBackground(
new Color(0, 0, 0, 38));
155 attachmentsScrollPane.setViewportView(drp);
157 msgbodyTabbedPane.insertTab(NbBundle.getMessage(
MessageArtifactViewer.class,
"MessageArtifactViewer.textbodyScrollPane.TabConstraints.tabTitle"),
163 msgbodyTabbedPane.setEnabledAt(ATTM_TAB_INDEX,
true);
165 accountScrollPane.setViewportView(accountsPanel);
172 textAreas = Arrays.asList(headersTextArea, null, null, rtfbodyTextPane);
185 drpExplorerManager.addPropertyChangeListener(evt
186 -> viewInNewWindowButton.setEnabled(drpExplorerManager.getSelectedNodes().length == 1));
194 @SuppressWarnings(
"unchecked")
196 private
void initComponents() {
198 envelopePanel =
new javax.swing.JPanel();
199 fromLabel =
new javax.swing.JLabel();
200 datetimeText =
new javax.swing.JLabel();
201 fromText =
new javax.swing.JLabel();
202 toLabel =
new javax.swing.JLabel();
203 toText =
new javax.swing.JLabel();
204 ccLabel =
new javax.swing.JLabel();
205 ccText =
new javax.swing.JLabel();
206 subjectLabel =
new javax.swing.JLabel();
207 subjectText =
new javax.swing.JLabel();
208 directionText =
new javax.swing.JLabel();
209 msgbodyTabbedPane =
new javax.swing.JTabbedPane();
210 headersScrollPane =
new javax.swing.JScrollPane();
211 headersTextArea =
new javax.swing.JTextArea();
212 htmlPane =
new javax.swing.JPanel();
213 rtfbodyScrollPane =
new javax.swing.JScrollPane();
214 rtfbodyTextPane =
new javax.swing.JTextPane();
215 attachmentsPanel =
new javax.swing.JPanel();
216 viewInNewWindowButton =
new javax.swing.JButton();
217 attachmentsScrollPane =
new javax.swing.JScrollPane();
218 accountsTab =
new javax.swing.JPanel();
219 accountScrollPane =
new javax.swing.JScrollPane();
221 envelopePanel.setBackground(
new java.awt.Color(204, 204, 204));
223 org.openide.awt.Mnemonics.setLocalizedText(fromLabel,
org.openide.util.NbBundle.getMessage(
MessageArtifactViewer.class,
"MessageArtifactViewer.fromLabel.text"));
225 datetimeText.setHorizontalAlignment(javax.swing.SwingConstants.RIGHT);
226 org.openide.awt.Mnemonics.setLocalizedText(datetimeText,
org.openide.util.NbBundle.getMessage(
MessageArtifactViewer.class,
"MessageArtifactViewer.datetimeText.text"));
228 org.openide.awt.Mnemonics.setLocalizedText(fromText,
org.openide.util.NbBundle.getMessage(
MessageArtifactViewer.class,
"MessageArtifactViewer.fromText.text"));
230 org.openide.awt.Mnemonics.setLocalizedText(toLabel,
org.openide.util.NbBundle.getMessage(
MessageArtifactViewer.class,
"MessageArtifactViewer.toLabel.text"));
232 org.openide.awt.Mnemonics.setLocalizedText(toText,
org.openide.util.NbBundle.getMessage(
MessageArtifactViewer.class,
"MessageArtifactViewer.toText.text"));
233 toText.setAutoscrolls(
true);
234 toText.setMinimumSize(
new java.awt.Dimension(27, 14));
236 org.openide.awt.Mnemonics.setLocalizedText(ccLabel,
org.openide.util.NbBundle.getMessage(
MessageArtifactViewer.class,
"MessageArtifactViewer.ccLabel.text"));
238 org.openide.awt.Mnemonics.setLocalizedText(ccText,
org.openide.util.NbBundle.getMessage(
MessageArtifactViewer.class,
"MessageArtifactViewer.ccText.text"));
239 ccText.setMinimumSize(
new java.awt.Dimension(27, 14));
241 org.openide.awt.Mnemonics.setLocalizedText(subjectLabel,
org.openide.util.NbBundle.getMessage(
MessageArtifactViewer.class,
"MessageArtifactViewer.subjectLabel.text"));
243 org.openide.awt.Mnemonics.setLocalizedText(subjectText,
org.openide.util.NbBundle.getMessage(
MessageArtifactViewer.class,
"MessageArtifactViewer.subjectText.text"));
244 subjectText.setMinimumSize(
new java.awt.Dimension(26, 14));
246 directionText.setHorizontalAlignment(javax.swing.SwingConstants.RIGHT);
247 org.openide.awt.Mnemonics.setLocalizedText(directionText,
org.openide.util.NbBundle.getMessage(
MessageArtifactViewer.class,
"MessageArtifactViewer.directionText.text"));
249 javax.swing.GroupLayout envelopePanelLayout =
new javax.swing.GroupLayout(envelopePanel);
250 envelopePanel.setLayout(envelopePanelLayout);
251 envelopePanelLayout.setHorizontalGroup(
252 envelopePanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
253 .addGroup(envelopePanelLayout.createSequentialGroup()
255 .addGroup(envelopePanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
256 .addGroup(envelopePanelLayout.createSequentialGroup()
257 .addGroup(envelopePanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
258 .addComponent(fromLabel)
259 .addComponent(toLabel))
260 .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
261 .addGroup(envelopePanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
262 .addGroup(envelopePanelLayout.createSequentialGroup()
263 .addComponent(toText, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
264 .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
265 .addComponent(directionText, javax.swing.GroupLayout.PREFERRED_SIZE, 66, javax.swing.GroupLayout.PREFERRED_SIZE))
266 .addGroup(envelopePanelLayout.createSequentialGroup()
267 .addComponent(fromText, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
268 .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
269 .addComponent(datetimeText, javax.swing.GroupLayout.PREFERRED_SIZE, 140, javax.swing.GroupLayout.PREFERRED_SIZE))))
270 .addGroup(envelopePanelLayout.createSequentialGroup()
271 .addComponent(ccLabel)
273 .addComponent(ccText, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
274 .addGroup(envelopePanelLayout.createSequentialGroup()
275 .addComponent(subjectLabel)
276 .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
277 .addComponent(subjectText, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)))
280 envelopePanelLayout.setVerticalGroup(
281 envelopePanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
282 .addGroup(envelopePanelLayout.createSequentialGroup()
284 .addGroup(envelopePanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
285 .addComponent(fromLabel)
286 .addComponent(datetimeText)
287 .addComponent(fromText))
288 .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
289 .addGroup(envelopePanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
290 .addComponent(toLabel)
291 .addComponent(toText, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
292 .addComponent(directionText))
293 .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
294 .addGroup(envelopePanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
295 .addComponent(ccLabel)
296 .addComponent(ccText, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
297 .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
298 .addGroup(envelopePanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
299 .addComponent(subjectLabel)
300 .addComponent(subjectText, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
304 headersScrollPane.setHorizontalScrollBarPolicy(javax.swing.ScrollPaneConstants.HORIZONTAL_SCROLLBAR_NEVER);
305 headersScrollPane.setVerticalScrollBarPolicy(javax.swing.ScrollPaneConstants.VERTICAL_SCROLLBAR_ALWAYS);
307 headersTextArea.setEditable(
false);
308 headersTextArea.setColumns(20);
309 headersTextArea.setLineWrap(
true);
310 headersTextArea.setRows(5);
311 headersTextArea.setWrapStyleWord(
true);
312 headersScrollPane.setViewportView(headersTextArea);
314 msgbodyTabbedPane.addTab(
org.openide.util.NbBundle.getMessage(
MessageArtifactViewer.class,
"MessageArtifactViewer.headersScrollPane.TabConstraints.tabTitle"), headersScrollPane);
316 htmlPane.setLayout(
new java.awt.BorderLayout());
317 msgbodyTabbedPane.addTab(
org.openide.util.NbBundle.getMessage(
MessageArtifactViewer.class,
"MessageArtifactViewer.htmlPane.TabConstraints.tabTitle"), htmlPane);
319 rtfbodyScrollPane.setVerticalScrollBarPolicy(javax.swing.ScrollPaneConstants.VERTICAL_SCROLLBAR_ALWAYS);
321 rtfbodyTextPane.setEditable(
false);
322 rtfbodyScrollPane.setViewportView(rtfbodyTextPane);
324 msgbodyTabbedPane.addTab(
org.openide.util.NbBundle.getMessage(
MessageArtifactViewer.class,
"MessageArtifactViewer.rtfbodyScrollPane.TabConstraints.tabTitle"), rtfbodyScrollPane);
326 org.openide.awt.Mnemonics.setLocalizedText(viewInNewWindowButton,
org.openide.util.NbBundle.getMessage(
MessageArtifactViewer.class,
"MessageArtifactViewer.viewInNewWindowButton.text"));
327 viewInNewWindowButton.addActionListener(
new java.awt.event.ActionListener() {
328 public void actionPerformed(java.awt.event.ActionEvent evt) {
329 viewInNewWindowButtonActionPerformed(evt);
333 javax.swing.GroupLayout attachmentsPanelLayout =
new javax.swing.GroupLayout(attachmentsPanel);
334 attachmentsPanel.setLayout(attachmentsPanelLayout);
335 attachmentsPanelLayout.setHorizontalGroup(
336 attachmentsPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
337 .addGroup(attachmentsPanelLayout.createSequentialGroup()
339 .addGroup(attachmentsPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
340 .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, attachmentsPanelLayout.createSequentialGroup()
341 .addComponent(viewInNewWindowButton)
343 .addComponent(attachmentsScrollPane, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, 647, Short.MAX_VALUE)))
345 attachmentsPanelLayout.setVerticalGroup(
346 attachmentsPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
347 .addGroup(attachmentsPanelLayout.createSequentialGroup()
349 .addComponent(viewInNewWindowButton)
350 .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
351 .addComponent(attachmentsScrollPane, javax.swing.GroupLayout.DEFAULT_SIZE, 333, Short.MAX_VALUE)
355 msgbodyTabbedPane.addTab(
org.openide.util.NbBundle.getMessage(
MessageArtifactViewer.class,
"MessageArtifactViewer.attachmentsPanel.TabConstraints.tabTitle"), attachmentsPanel);
357 accountsTab.setLayout(
new java.awt.BorderLayout());
358 accountsTab.add(accountScrollPane, java.awt.BorderLayout.CENTER);
360 msgbodyTabbedPane.addTab(
org.openide.util.NbBundle.getMessage(
MessageArtifactViewer.class,
"MessageArtifactViewer.accountsTab.TabConstraints.tabTitle"), accountsTab);
362 javax.swing.GroupLayout layout =
new javax.swing.GroupLayout(
this);
363 this.setLayout(layout);
364 layout.setHorizontalGroup(
365 layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
366 .addGroup(layout.createSequentialGroup()
368 .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
369 .addComponent(msgbodyTabbedPane)
370 .addComponent(envelopePanel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
373 layout.setVerticalGroup(
374 layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
375 .addGroup(layout.createSequentialGroup()
377 .addComponent(envelopePanel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
378 .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
379 .addComponent(msgbodyTabbedPane)
385 new NewWindowViewAction(
"View in new window", drpExplorerManager.getSelectedNodes()[0]).actionPerformed(evt);
418 if (worker != null) {
423 if (artifact == null) {
427 worker =
new MessageArtifactWorker(artifact) {
435 MesssageArtifactData data =
get();
437 if (data.getArtifact().getArtifactTypeID() == TSK_MESSAGE.getTypeID()) {
439 }
else if (data.getArtifact().getArtifactTypeID() == TSK_EMAIL_MSG.getTypeID()) {
440 displayEmailMsg(data);
445 msgbodyTabbedPane.setEnabledAt(ACCT_TAB_INDEX,
true);
446 accountsPanel.setArtifact(data.getArtifact());
447 setCursor(Cursor.getPredefinedCursor(Cursor.DEFAULT_CURSOR));
449 }
catch (InterruptedException | ExecutionException ex) {
450 LOGGER.log(Level.SEVERE, String.format(
"Failed to update message viewer for artifact (%d)", artifact.getId(), ex));
455 setCursor(Cursor.getPredefinedCursor(Cursor.WAIT_CURSOR));
466 fromText.setText(
"");
467 fromLabel.setEnabled(
false);
469 toLabel.setEnabled(
false);
471 ccLabel.setEnabled(
false);
472 subjectText.setText(
"");
473 subjectLabel.setEnabled(
false);
474 datetimeText.setText(
"");
475 datetimeText.setEnabled(
false);
476 directionText.setText(
"");
477 directionText.setEnabled(
false);
479 headersTextArea.setText(
"");
480 rtfbodyTextPane.setText(
"");
483 msgbodyTabbedPane.setEnabled(
false);
489 if (artifact == null) {
493 if (artifact.getArtifactTypeID() == TSK_KEYWORD_HIT.getTypeID()) {
498 }
catch (TskCoreException ex) {
499 LOGGER.log(Level.SEVERE,
"error getting associated artifact", ex);
502 return isMessageArtifact(artifact);
515 final int artifactTypeID = nodeArtifact.getArtifactTypeID();
516 return artifactTypeID == TSK_EMAIL_MSG.getTypeID()
517 || artifactTypeID == TSK_MESSAGE.getTypeID();
530 if (index == HTML_TAB_INDEX && StringUtils.isNotBlank(text)) {
531 htmlPanel.setHtmlText(text);
532 }
else if (index == TEXT_TAB_INDEX && StringUtils.isNotBlank(text)) {
533 textPanel.
setContent(text, artifact.toString());
535 JTextComponent textComponent = textAreas.get(index);
536 if (textComponent != null) {
537 textComponent.setText(text);
538 textComponent.setCaretPosition(0);
542 final boolean hasText = text.length() > 0;
544 msgbodyTabbedPane.setEnabledAt(index, hasText);
546 msgbodyTabbedPane.setSelectedIndex(index);
551 msgbodyTabbedPane.setEnabled(
true);
552 fromLabel.setEnabled(
true);
553 toLabel.setEnabled(
true);
554 subjectLabel.setEnabled(
true);
555 datetimeText.setEnabled(
true);
559 int numberOfAttachments = attachments.size();
561 msgbodyTabbedPane.setEnabledAt(ATTM_TAB_INDEX, numberOfAttachments > 0);
562 msgbodyTabbedPane.setTitleAt(ATTM_TAB_INDEX,
"Attachments (" + numberOfAttachments +
")");
568 enableCommonFields();
570 directionText.setEnabled(
false);
571 ccLabel.setEnabled(
true);
573 this.fromText.setText(artifactData.getAttributeDisplayString( TSK_EMAIL_FROM));
574 this.fromText.setToolTipText(artifactData.getAttributeDisplayString(TSK_EMAIL_FROM));
575 this.toText.setText(artifactData.getAttributeDisplayString(TSK_EMAIL_TO));
576 this.toText.setToolTipText(artifactData.getAttributeDisplayString(TSK_EMAIL_TO));
577 this.directionText.setText(
"");
578 this.ccText.setText(artifactData.getAttributeDisplayString(TSK_EMAIL_CC));
579 this.ccText.setToolTipText(artifactData.getAttributeDisplayString(TSK_EMAIL_CC));
580 this.subjectText.setText(artifactData.getAttributeDisplayString(TSK_SUBJECT));
581 this.datetimeText.setText(artifactData.getAttributeDisplayString(TSK_DATETIME_RCVD));
583 configureTextArea(artifactData.getAttributeDisplayString(TSK_HEADERS), HDR_TAB_INDEX);
584 configureTextArea(artifactData.getAttributeDisplayString(TSK_EMAIL_CONTENT_PLAIN), TEXT_TAB_INDEX);
585 configureTextArea(artifactData.getAttributeDisplayString(TSK_EMAIL_CONTENT_HTML), HTML_TAB_INDEX);
586 configureTextArea(artifactData.getAttributeDisplayString(TSK_EMAIL_CONTENT_RTF), RTF_TAB_INDEX);
587 configureAttachments(artifactData.getAttachements());
591 enableCommonFields();
593 directionText.setEnabled(
true);
594 ccLabel.setEnabled(
false);
596 this.fromText.setText(artifactData.getAttributeDisplayString(TSK_PHONE_NUMBER_FROM));
597 this.toText.setText(artifactData.getAttributeDisplayString(TSK_PHONE_NUMBER_TO));
598 this.directionText.setText(artifactData.getAttributeDisplayString(TSK_DIRECTION));
599 this.ccText.setText(
"");
600 this.subjectText.setText(artifactData.getAttributeDisplayString(TSK_SUBJECT));
601 this.datetimeText.setText(artifactData.getAttributeDisplayString(TSK_DATETIME));
603 msgbodyTabbedPane.setEnabledAt(HTML_TAB_INDEX,
false);
604 msgbodyTabbedPane.setEnabledAt(RTF_TAB_INDEX,
false);
605 msgbodyTabbedPane.setEnabledAt(HDR_TAB_INDEX,
false);
606 msgbodyTabbedPane.setEnabledAt(HDR_TAB_INDEX,
false);
607 configureTextArea(artifactData.getAttributeDisplayString(TSK_TEXT), TEXT_TAB_INDEX);
608 configureAttachments(artifactData.getAttachements());
619 this.attachments = attachments;
630 setKeys(attachments);
static void configureTextPaneAsRtf(JTextPane pane)
javax.swing.JLabel subjectLabel
void enableCommonFields()
MessageArtifactWorker worker
javax.swing.JTextPane rtfbodyTextPane
void setText(String text)
javax.swing.JScrollPane headersScrollPane
javax.swing.JLabel ccLabel
BlackboardArtifact artifact
void displayEmailMsg(MesssageArtifactData artifactData)
javax.swing.JPanel htmlPane
javax.swing.JLabel toText
javax.swing.JLabel ccText
javax.swing.JLabel datetimeText
void setArtifact(BlackboardArtifact artifact)
ExplorerManager drpExplorerManager
void setContent(String content, String contentDescriptor)
ExplorerManager getExplorerManager()
void setNode(Node rootNode)
void configureTextArea(String text, int index)
javax.swing.JPanel envelopePanel
MessageArtifactViewer(List< JTextComponent > textAreas, DataResultPanel drp)
static DataResultPanel createInstanceUninitialized(String title, String description, Node currentRootNode, int childNodeCount, DataContent customContentView)
boolean isSupported(BlackboardArtifact artifact)
javax.swing.JLabel fromText
javax.swing.JTabbedPane msgbodyTabbedPane
javax.swing.JScrollPane attachmentsScrollPane
void viewInNewWindowButtonActionPerformed(java.awt.event.ActionEvent evt)
final DataResultPanel drp
javax.swing.JPanel accountsTab
javax.swing.JTextArea headersTextArea
javax.swing.JScrollPane accountScrollPane
javax.swing.JLabel directionText
MessageAccountPanel accountsPanel
static boolean isMessageArtifact(BlackboardArtifact nodeArtifact)
javax.swing.JScrollPane rtfbodyScrollPane
Node[] createNodes(Attachment t)
void configureAttachments(Set< Attachment > attachments)
javax.swing.JLabel fromLabel
void displayMsg(MesssageArtifactData artifactData)
synchronized static Logger getLogger(String name)
javax.swing.JButton viewInNewWindowButton
final Set< Attachment > attachments
javax.swing.JPanel attachmentsPanel
javax.swing.JLabel subjectText
final List< JTextComponent > textAreas
javax.swing.JLabel toLabel
static boolean isEnabled()