Autopsy 4.22.1
Graphical digital forensics platform for The Sleuth Kit and other tools.
AllCasesSearchDialog.java
Go to the documentation of this file.
1/*
2 * Autopsy Forensic Browser
3 *
4 * Copyright 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 */
19package org.sleuthkit.autopsy.allcasessearch;
20
21import java.awt.Color;
22import java.awt.event.ItemEvent;
23import java.awt.event.ItemListener;
24import java.text.Collator;
25import java.util.ArrayList;
26import java.util.Collection;
27import java.util.Collections;
28import java.util.List;
29import java.util.concurrent.ExecutionException;
30import java.util.logging.Level;
31import javax.swing.JFrame;
32import javax.swing.SwingWorker;
33import javax.swing.event.DocumentEvent;
34import javax.swing.event.DocumentListener;
35import org.apache.commons.lang3.StringUtils;
36import org.openide.nodes.Node;
37import org.openide.util.NbBundle.Messages;
38import org.openide.windows.TopComponent;
39import org.openide.windows.WindowManager;
40import org.sleuthkit.autopsy.centralrepository.datamodel.CorrelationAttributeInstance;
41import org.sleuthkit.autopsy.centralrepository.datamodel.CorrelationAttributeNormalizationException;
42import org.sleuthkit.autopsy.centralrepository.datamodel.CorrelationAttributeNormalizer;
43import org.sleuthkit.autopsy.centralrepository.datamodel.CentralRepoException;
44import org.sleuthkit.autopsy.corecomponentinterfaces.DataResultViewer;
45import org.sleuthkit.autopsy.corecomponents.DataResultTopComponent;
46import org.sleuthkit.autopsy.corecomponents.DataResultViewerTable;
47import org.sleuthkit.autopsy.corecomponents.TableFilterNode;
48import org.sleuthkit.autopsy.corecomponents.TextPrompt;
49import org.sleuthkit.autopsy.coreutils.Logger;
50import org.sleuthkit.autopsy.datamodel.EmptyNode;
51import org.sleuthkit.autopsy.centralrepository.datamodel.CentralRepository;
52
53@Messages({
54 "AllCasesSearchDialog.dialogTitle.text=Search Central Repository",
55 "AllCasesSearchDialog.resultsTitle.text=All Cases",
56 "AllCasesSearchDialog.resultsDescription.text=Search Central Repository",
57 "AllCasesSearchDialog.emptyNode.text=No results found.",
58 "AllCasesSearchDialog.validation.invalidHash=The supplied value is not a valid MD5 hash.",
59 "AllCasesSearchDialog.validation.invalidEmail=The supplied value is not a valid e-mail address.",
60 "AllCasesSearchDialog.validation.invalidDomain=The supplied value is not a valid domain.",
61 "AllCasesSearchDialog.validation.invalidPhone=The supplied value is not a valid phone number.",
62 "AllCasesSearchDialog.validation.invalidSsid=The supplied value is not a valid wireless network.",
63 "AllCasesSearchDialog.validation.invalidMac=The supplied value is not a valid MAC address.",
64 "AllCasesSearchDialog.validation.invalidImei=The supplied value is not a valid IMEI number.",
65 "AllCasesSearchDialog.validation.invalidImsi=The supplied value is not a valid IMSI number.",
66 "AllCasesSearchDialog.validation.invalidIccid=The supplied value is not a valid ICCID number.",
67 "AllCasesSearchDialog.validation.genericMessage=The supplied value is not valid.",
68 "# {0} - number of cases",
69 "AllCasesSearchDialog.caseLabel.text=The Central Repository contains {0} case(s)."
70})
75@SuppressWarnings("PMD.SingularField") // UI widgets cause lots of false positives
76 final class AllCasesSearchDialog extends javax.swing.JDialog {
77
78 private static final Logger logger = Logger.getLogger(AllCasesSearchDialog.class.getName());
79 private static final long serialVersionUID = 1L;
80
81 private final List<CorrelationAttributeInstance.Type> correlationTypes;
82 private CorrelationAttributeInstance.Type selectedCorrelationType;
83 private TextPrompt correlationValueTextFieldPrompt;
84
88 AllCasesSearchDialog() {
89 super((JFrame) WindowManager.getDefault().getMainWindow(), Bundle.AllCasesSearchDialog_dialogTitle_text(), true);
90 this.correlationTypes = new ArrayList<>();
91 initComponents();
92 customizeComponents();
93 }
94
101 private void search(CorrelationAttributeInstance.Type type, String[] values) {
102 new SwingWorker<List<CorrelationAttributeInstance>, Void>() {
103
104 @Override
105 protected List<CorrelationAttributeInstance> doInBackground() {
106 List<CorrelationAttributeInstance> correlationInstances = new ArrayList<>();
107
108 for (String value : values) {
109 try {
110 correlationInstances.addAll(CentralRepository.getInstance().getArtifactInstancesByTypeValue(type, value));
111 } catch (CentralRepoException ex) {
112 logger.log(Level.SEVERE, "Unable to connect to the Central Repository database.", ex);
114 logger.log(Level.WARNING, "Unable to retrieve data from the Central Repository.", ex);
115 }
116 }
117
118 return correlationInstances;
119 }
120
121 @Override
122 protected void done() {
123 try {
124 super.done();
125 List<CorrelationAttributeInstance> correlationInstances = this.get();
127 Collection<DataResultViewer> viewers = new ArrayList<>(1);
128 viewers.add(table);
129
130 AllCasesSearchNode searchNode = new AllCasesSearchNode(correlationInstances);
131 TableFilterNode tableFilterNode = new TableFilterNode(searchNode, true, searchNode.getName());
132
133 String resultsText = String.format("%s (%s)",
134 Bundle.AllCasesSearchDialog_resultsTitle_text(), type.getDisplayName());
135 final TopComponent searchResultWin;
136 if (correlationInstances.isEmpty()) {
137 Node emptyNode = new TableFilterNode(
138 new EmptyNode(Bundle.AllCasesSearchDialog_emptyNode_text()), true);
139 searchResultWin = DataResultTopComponent.createInstance(
140 resultsText, Bundle.AllCasesSearchDialog_resultsDescription_text(), emptyNode, 0);
141 } else {
142 searchResultWin = DataResultTopComponent.createInstance(
143 resultsText, Bundle.AllCasesSearchDialog_resultsDescription_text(), tableFilterNode, correlationInstances.size(), viewers);
144 }
145 searchResultWin.requestActive(); // make it the active top component
146 } catch (ExecutionException | InterruptedException ex) {
147 logger.log(Level.SEVERE, "Unable to get CorrelationAttributeInstances.", ex);
148 }
149 }
150 }.execute();
151 }
152
158 @SuppressWarnings("unchecked")
159 // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
160 private void initComponents() {
161
162 correlationValueLabel = new javax.swing.JLabel();
163 searchButton = new javax.swing.JButton();
164 correlationTypeComboBox = new javax.swing.JComboBox<>();
165 correlationTypeLabel = new javax.swing.JLabel();
166 errorLabel = new javax.swing.JLabel();
167 descriptionLabel = new javax.swing.JLabel();
168 casesLabel = new javax.swing.JLabel();
169 correlationValueScrollPane = new javax.swing.JScrollPane();
170 correlationValueTextArea = new javax.swing.JTextArea();
171 normalizedLabel = new javax.swing.JLabel();
172
173 setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);
174 setResizable(false);
175
176 org.openide.awt.Mnemonics.setLocalizedText(correlationValueLabel, org.openide.util.NbBundle.getMessage(AllCasesSearchDialog.class, "AllCasesSearchDialog.correlationValueLabel.text")); // NOI18N
177
178 org.openide.awt.Mnemonics.setLocalizedText(searchButton, org.openide.util.NbBundle.getMessage(AllCasesSearchDialog.class, "AllCasesSearchDialog.searchButton.text")); // NOI18N
179 searchButton.addActionListener(new java.awt.event.ActionListener() {
180 public void actionPerformed(java.awt.event.ActionEvent evt) {
181 searchButtonActionPerformed(evt);
182 }
183 });
184
185 correlationTypeComboBox.addActionListener(new java.awt.event.ActionListener() {
186 public void actionPerformed(java.awt.event.ActionEvent evt) {
187 correlationTypeComboBoxActionPerformed(evt);
188 }
189 });
190
191 org.openide.awt.Mnemonics.setLocalizedText(correlationTypeLabel, org.openide.util.NbBundle.getMessage(AllCasesSearchDialog.class, "AllCasesSearchDialog.correlationTypeLabel.text")); // NOI18N
192
193 errorLabel.setForeground(new java.awt.Color(255, 0, 0));
194 org.openide.awt.Mnemonics.setLocalizedText(errorLabel, org.openide.util.NbBundle.getMessage(AllCasesSearchDialog.class, "AllCasesSearchDialog.errorLabel.text")); // NOI18N
195
196 org.openide.awt.Mnemonics.setLocalizedText(descriptionLabel, org.openide.util.NbBundle.getMessage(AllCasesSearchDialog.class, "AllCasesSearchDialog.descriptionLabel.text")); // NOI18N
197
198 casesLabel.setHorizontalAlignment(javax.swing.SwingConstants.LEFT);
199 org.openide.awt.Mnemonics.setLocalizedText(casesLabel, org.openide.util.NbBundle.getMessage(AllCasesSearchDialog.class, "AllCasesSearchDialog.casesLabel.text")); // NOI18N
200
201 correlationValueTextArea.setColumns(20);
202 correlationValueTextArea.setRows(5);
203 correlationValueTextArea.setText(org.openide.util.NbBundle.getMessage(AllCasesSearchDialog.class, "AllCasesSearchDialog.correlationValueTextArea.text")); // NOI18N
204 correlationValueScrollPane.setViewportView(correlationValueTextArea);
205
206 org.openide.awt.Mnemonics.setLocalizedText(normalizedLabel, org.openide.util.NbBundle.getMessage(AllCasesSearchDialog.class, "AllCasesSearchDialog.normalizedLabel.text")); // NOI18N
207
208 javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
209 getContentPane().setLayout(layout);
210 layout.setHorizontalGroup(
211 layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
212 .addGroup(layout.createSequentialGroup()
213 .addContainerGap()
214 .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
215 .addComponent(descriptionLabel)
216 .addGroup(layout.createSequentialGroup()
217 .addComponent(casesLabel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
218 .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
219 .addComponent(searchButton))
220 .addGroup(layout.createSequentialGroup()
221 .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
222 .addComponent(correlationValueLabel)
223 .addComponent(correlationTypeLabel))
224 .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
225 .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
226 .addGroup(layout.createSequentialGroup()
227 .addComponent(normalizedLabel)
228 .addGap(0, 0, Short.MAX_VALUE))
229 .addGroup(layout.createSequentialGroup()
230 .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
231 .addComponent(correlationTypeComboBox, 0, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
232 .addGroup(layout.createSequentialGroup()
233 .addComponent(correlationValueScrollPane, javax.swing.GroupLayout.PREFERRED_SIZE, 379, javax.swing.GroupLayout.PREFERRED_SIZE)
234 .addGap(0, 0, Short.MAX_VALUE)))
235 .addGap(142, 142, 142))
236 .addComponent(errorLabel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))))
237 .addContainerGap())
238 );
239 layout.setVerticalGroup(
240 layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
241 .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
242 .addContainerGap()
243 .addComponent(descriptionLabel, javax.swing.GroupLayout.PREFERRED_SIZE, 39, javax.swing.GroupLayout.PREFERRED_SIZE)
244 .addGap(18, 18, 18)
245 .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
246 .addComponent(correlationTypeComboBox, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
247 .addComponent(correlationTypeLabel))
248 .addGap(18, 18, 18)
249 .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
250 .addComponent(correlationValueLabel)
251 .addComponent(correlationValueScrollPane, javax.swing.GroupLayout.PREFERRED_SIZE, 190, javax.swing.GroupLayout.PREFERRED_SIZE))
252 .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
253 .addComponent(normalizedLabel)
254 .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 19, Short.MAX_VALUE)
255 .addComponent(errorLabel)
256 .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
257 .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
258 .addComponent(casesLabel, javax.swing.GroupLayout.Alignment.TRAILING)
259 .addComponent(searchButton, javax.swing.GroupLayout.Alignment.TRAILING))
260 .addContainerGap())
261 );
262
263 searchButton.getAccessibleContext().setAccessibleName(org.openide.util.NbBundle.getMessage(AllCasesSearchDialog.class, "AllCasesSearchDialog.searchButton.AccessibleContext.accessibleName")); // NOI18N
264 searchButton.getAccessibleContext().setAccessibleDescription(org.openide.util.NbBundle.getMessage(AllCasesSearchDialog.class, "AllCasesSearchDialog.searchButton.AccessibleContext.accessibleDescription")); // NOI18N
265
266 pack();
267 }// </editor-fold>//GEN-END:initComponents
268
269 private void searchButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_searchButtonActionPerformed
270 CorrelationAttributeInstance.Type correlationType = selectedCorrelationType;
271 String correlationValue = correlationValueTextArea.getText().trim();
272
273 String[] correlationValueLines = correlationValue.split("\r\n|\n|\r");
274// for (String correlationValueLine : lines) {
275
276 if (validateInputs(correlationType, correlationValueLines)) {
277 search(correlationType, correlationValueLines);
278 dispose();
279 } else {
280 String validationMessage;
281 switch (correlationType.getId()) {
282 case CorrelationAttributeInstance.FILES_TYPE_ID:
283 validationMessage = Bundle.AllCasesSearchDialog_validation_invalidHash();
284 break;
285 case CorrelationAttributeInstance.DOMAIN_TYPE_ID:
286 validationMessage = Bundle.AllCasesSearchDialog_validation_invalidDomain();
287 break;
288 case CorrelationAttributeInstance.EMAIL_TYPE_ID:
289 validationMessage = Bundle.AllCasesSearchDialog_validation_invalidEmail();
290 break;
291 case CorrelationAttributeInstance.PHONE_TYPE_ID:
292 validationMessage = Bundle.AllCasesSearchDialog_validation_invalidPhone();
293 break;
294 case CorrelationAttributeInstance.SSID_TYPE_ID:
295 validationMessage = Bundle.AllCasesSearchDialog_validation_invalidSsid();
296 break;
297 case CorrelationAttributeInstance.MAC_TYPE_ID:
298 validationMessage = Bundle.AllCasesSearchDialog_validation_invalidMac();
299 break;
300 case CorrelationAttributeInstance.IMEI_TYPE_ID:
301 validationMessage = Bundle.AllCasesSearchDialog_validation_invalidImei();
302 break;
303 case CorrelationAttributeInstance.IMSI_TYPE_ID:
304 validationMessage = Bundle.AllCasesSearchDialog_validation_invalidImsi();
305 break;
306 case CorrelationAttributeInstance.ICCID_TYPE_ID:
307 validationMessage = Bundle.AllCasesSearchDialog_validation_invalidIccid();
308 break;
309 default:
310 validationMessage = Bundle.AllCasesSearchDialog_validation_genericMessage();
311 break;
312
313 }
314
315 errorLabel.setText(validationMessage);
316 searchButton.setEnabled(false);
317 correlationValueTextArea.grabFocus();
318 }
319 // }
320 }//GEN-LAST:event_searchButtonActionPerformed
321
322 private void correlationTypeComboBoxActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_correlationTypeComboBoxActionPerformed
323 //make error message go away when combo box is selected
324 errorLabel.setText("");
325 }//GEN-LAST:event_correlationTypeComboBoxActionPerformed
326
335 private boolean validateInputs(CorrelationAttributeInstance.Type type, String[] values) {
336 try {
337 for (String value : values) {
338 CorrelationAttributeNormalizer.normalize(type, value);
339 }
340 } catch (CorrelationAttributeNormalizationException | CentralRepoException ex) {
341 // No need to log this.
342 return false;
343 }
344
345 return true;
346 }
347
351 private void customizeComponents() {
352 searchButton.setEnabled(false);
353
354 /*
355 * Add correlation types to the combo-box.
356 */
357 try {
358 CentralRepository dbManager = CentralRepository.getInstance();
359 correlationTypes.clear();
360 correlationTypes.addAll(dbManager.getDefinedCorrelationTypes());
361// correlationTypes.addAll(java.util.Collections.sort(dbManager.getDefinedCorrelationTypes(), Collator.getInstance()));
362 int numberOfCases = dbManager.getCases().size();
363 casesLabel.setText(Bundle.AllCasesSearchDialog_caseLabel_text(numberOfCases));
364 } catch (CentralRepoException ex) {
365 logger.log(Level.SEVERE, "Unable to connect to the Central Repository database.", ex);
366 }
367
368 List<String> displayNames = new ArrayList<>();
369 for (CorrelationAttributeInstance.Type type : correlationTypes) {
370 String displayName = type.getDisplayName();
371 if (displayName.toLowerCase().contains("addresses")) {
372 type.setDisplayName(displayName.replace("Addresses", "Address"));
373 } else if (displayName.toLowerCase().equals("files")) {
374 type.setDisplayName("File MD5");
375 } else if (displayName.toLowerCase().endsWith("s") && !displayName.toLowerCase().endsWith("address")) {
376 type.setDisplayName(StringUtils.substring(displayName, 0, displayName.length() - 1));
377 } else {
378 type.setDisplayName(displayName);
379 }
380
381 displayNames.add(type.getDisplayName());
382 }
383 Collections.sort(displayNames);
384 for (String displayName : displayNames) {
385 correlationTypeComboBox.addItem(displayName);
386 }
387
388 correlationTypeComboBox.setSelectedIndex(0);
389
390 correlationTypeComboBox.addItemListener(new ItemListener() {
391 @Override
392 public void itemStateChanged(ItemEvent e) {
393 updateSelectedType();
394 updateCorrelationValueTextFieldPrompt();
395 updateSearchButton();
396 }
397 });
398
399 updateSelectedType();
400
401 /*
402 * Create listener for text input.
403 */
404 correlationValueTextArea.getDocument().addDocumentListener(new DocumentListener() {
405 @Override
406 public void changedUpdate(DocumentEvent e) {
407 updateSearchButton();
408 }
409
410 @Override
411 public void insertUpdate(DocumentEvent e) {
412 updateSearchButton();
413 }
414
415 @Override
416 public void removeUpdate(DocumentEvent e) {
417 updateSearchButton();
418 }
419 });
420
421 updateCorrelationValueTextFieldPrompt();
422 }
423
424 @Messages({
425 "AllCasesSearchDialog.correlationValueTextField.filesExample=Example: \"f0e1d2c3b4a5968778695a4b3c2d1e0f\"",
426 "AllCasesSearchDialog.correlationValueTextField.domainExample=Example: \"domain.com\"",
427 "AllCasesSearchDialog.correlationValueTextField.emailExample=Example: \"user@host.com\"",
428 "AllCasesSearchDialog.correlationValueTextField.phoneExample=Example: \"(800)123-4567\"",
429 "AllCasesSearchDialog.correlationValueTextField.usbExample=Example: \"4&1234567&0\"",
430 "AllCasesSearchDialog.correlationValueTextField.ssidExample=Example: \"WirelessNetwork-5G\"",
431 "AllCasesSearchDialog.correlationValueTextField.macExample=Example: \"0C-14-F2-01-AF-45\"",
432 "AllCasesSearchDialog.correlationValueTextField.imeiExample=Example: \"351756061523999\"",
433 "AllCasesSearchDialog.correlationValueTextField.imsiExample=Example: \"310150123456789\"",
434 "AllCasesSearchDialog.correlationValueTextField.iccidExample=Example: \"89 91 19 1299 99 329451 0\""
435 })
440 private void updateCorrelationValueTextFieldPrompt() {
444 String text;
445 switch (selectedCorrelationType.getId()) {
446 case CorrelationAttributeInstance.FILES_TYPE_ID:
447 text = Bundle.AllCasesSearchDialog_correlationValueTextField_filesExample();
448 break;
449 case CorrelationAttributeInstance.DOMAIN_TYPE_ID:
450 text = Bundle.AllCasesSearchDialog_correlationValueTextField_domainExample();
451 break;
452 case CorrelationAttributeInstance.EMAIL_TYPE_ID:
453 text = Bundle.AllCasesSearchDialog_correlationValueTextField_emailExample();
454 break;
455 case CorrelationAttributeInstance.PHONE_TYPE_ID:
456 text = Bundle.AllCasesSearchDialog_correlationValueTextField_phoneExample();
457 break;
458 case CorrelationAttributeInstance.USBID_TYPE_ID:
459 text = Bundle.AllCasesSearchDialog_correlationValueTextField_usbExample();
460 break;
461 case CorrelationAttributeInstance.SSID_TYPE_ID:
462 text = Bundle.AllCasesSearchDialog_correlationValueTextField_ssidExample();
463 break;
464 case CorrelationAttributeInstance.MAC_TYPE_ID:
465 text = Bundle.AllCasesSearchDialog_correlationValueTextField_macExample();
466 break;
467 case CorrelationAttributeInstance.IMEI_TYPE_ID:
468 text = Bundle.AllCasesSearchDialog_correlationValueTextField_imeiExample();
469 break;
470 case CorrelationAttributeInstance.IMSI_TYPE_ID:
471 text = Bundle.AllCasesSearchDialog_correlationValueTextField_imsiExample();
472 break;
473 case CorrelationAttributeInstance.ICCID_TYPE_ID:
474 text = Bundle.AllCasesSearchDialog_correlationValueTextField_iccidExample();
475 break;
476 default:
477 text = "";
478 break;
479 }
480 correlationValueTextFieldPrompt = new TextPrompt(text, correlationValueTextArea);
481
485 correlationValueTextFieldPrompt.setForeground(Color.LIGHT_GRAY);
486 correlationValueTextFieldPrompt.changeAlpha(0.9f); // Mostly opaque
487
488 validate();
489 repaint();
490 }
491
496 private void updateSelectedType() {
497 for (CorrelationAttributeInstance.Type type : correlationTypes) {
498 if (type.getDisplayName().equals((String) correlationTypeComboBox.getSelectedItem())) {
499 selectedCorrelationType = type;
500 break;
501 }
502 }
503 }
504
509 private void updateSearchButton() {
510 searchButton.setEnabled(correlationValueTextArea.getText().isEmpty() == false);
511 }
512
516 public void display() {
517 this.setLocationRelativeTo(WindowManager.getDefault().getMainWindow());
518 setVisible(true);
519 }
520
521 // Variables declaration - do not modify//GEN-BEGIN:variables
522 private javax.swing.JLabel casesLabel;
523 private javax.swing.JComboBox<String> correlationTypeComboBox;
524 private javax.swing.JLabel correlationTypeLabel;
525 private javax.swing.JLabel correlationValueLabel;
526 private javax.swing.JScrollPane correlationValueScrollPane;
527 private javax.swing.JTextArea correlationValueTextArea;
528 private javax.swing.JLabel descriptionLabel;
529 private javax.swing.JLabel errorLabel;
530 private javax.swing.JLabel normalizedLabel;
531 private javax.swing.JButton searchButton;
532 // End of variables declaration//GEN-END:variables
533}
static DataResultTopComponent createInstance(String title, String description, Node node, int childNodeCount)
synchronized static Logger getLogger(String name)
Definition Logger.java:124
List< CorrelationAttributeInstance > getArtifactInstancesByTypeValue(CorrelationAttributeInstance.Type type, String value)

Copyright © 2012-2024 Sleuth Kit Labs. Generated on:
This work is licensed under a Creative Commons Attribution-Share Alike 3.0 United States License.