Autopsy  4.1
Graphical digital forensics platform for The Sleuth Kit and other tools.
HashLookupSettingsPanel.java
Go to the documentation of this file.
1 /*
2  * Autopsy Forensic Browser
3  *
4  * Copyright 2011 - 2015 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.modules.hashdatabase;
20 
21 import java.awt.*;
22 import java.awt.event.KeyEvent;
23 import java.beans.PropertyChangeEvent;
24 import java.beans.PropertyChangeListener;
25 import java.io.File;
26 import java.util.ArrayList;
27 import java.util.List;
28 import java.util.logging.Level;
29 import javax.swing.JComponent;
30 import javax.swing.JOptionPane;
31 import javax.swing.JTable;
32 import javax.swing.ListSelectionModel;
33 import javax.swing.SwingUtilities;
34 import javax.swing.event.ListSelectionEvent;
35 import javax.swing.event.ListSelectionListener;
36 import javax.swing.table.AbstractTableModel;
37 import javax.swing.table.TableCellRenderer;
38 import org.netbeans.spi.options.OptionsPanelController;
39 import org.openide.util.NbBundle;
40 import org.openide.util.NbBundle.Messages;
49 
55 
56  private static final String NO_SELECTION_TEXT = NbBundle
57  .getMessage(HashLookupSettingsPanel.class, "HashDbConfigPanel.noSelectionText");
58  private static final String ERROR_GETTING_PATH_TEXT = NbBundle
59  .getMessage(HashLookupSettingsPanel.class, "HashDbConfigPanel.errorGettingPathText");
60  private static final String ERROR_GETTING_INDEX_STATUS_TEXT = NbBundle
61  .getMessage(HashLookupSettingsPanel.class, "HashDbConfigPanel.errorGettingIndexStatusText");
64 
69 
70  // Listen to the ingest modules to refresh the enabled/disabled state of
71  // the components in sync with file ingest.
72  IngestManager.getInstance().addIngestJobEventListener(new PropertyChangeListener() {
73  @Override
74  public void propertyChange(PropertyChangeEvent evt) {
75  if (isLocalIngestJobEvent(evt)) {
76  EventQueue.invokeLater(new Runnable() {
77  @Override
78  public void run() {
80  }
81  });
82  }
83  }
84  });
85  }
86 
87  @NbBundle.Messages({"HashLookupSettingsPanel.Title=Global Hash Lookup Settings"})
88  private void customizeComponents() {
89  setName(Bundle.HashLookupSettingsPanel_Title());
90  this.ingestWarningLabel.setVisible(false);
91  this.hashSetTable.setModel(hashSetTableModel);
92  this.hashSetTable.setTableHeader(null);
93  hashSetTable.getParent().setBackground(hashSetTable.getBackground());
94  hashSetTable.getSelectionModel().setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
95  hashSetTable.getSelectionModel().addListSelectionListener(new ListSelectionListener() {
96  @Override
97  public void valueChanged(ListSelectionEvent e) {
98  if (!e.getValueIsAdjusting()) {
100  }
101  }
102  });
103  }
104 
105  private void updateComponents() {
106  HashDb db = ((HashSetTable) hashSetTable).getSelection();
107  if (db != null) {
109  } else {
111  }
112  }
113 
115  boolean ingestIsRunning = IngestManager.getInstance().isIngestRunning();
116 
117  // Update descriptive labels.
118  hashDbNameLabel.setText(NO_SELECTION_TEXT);
119  hashDbTypeLabel.setText(NO_SELECTION_TEXT);
120  hashDbLocationLabel.setText(NO_SELECTION_TEXT);
121  indexPathLabel.setText(NO_SELECTION_TEXT);
122 
123  // Update indexing components.
124  hashDbIndexStatusLabel.setText(NO_SELECTION_TEXT);
125  hashDbIndexStatusLabel.setForeground(Color.black);
126  indexButton.setText(NbBundle.getMessage(this.getClass(), "HashDbConfigPanel.indexButtonText.index"));
127  indexButton.setEnabled(false);
128  addHashesToDatabaseButton.setEnabled(false);
129 
130  // Update ingest options.
131  sendIngestMessagesCheckBox.setSelected(false);
132  sendIngestMessagesCheckBox.setEnabled(false);
133  optionsLabel.setEnabled(false);
134  optionsSeparator.setEnabled(false);
135 
136  // Update database action buttons.
137  createDatabaseButton.setEnabled(true);
138  importDatabaseButton.setEnabled(true);
139  deleteDatabaseButton.setEnabled(false);
140 
141  // Update ingest in progress warning label.
142  ingestWarningLabel.setVisible(ingestIsRunning);
143  }
144 
146  boolean ingestIsRunning = IngestManager.getInstance().isIngestRunning();
147 
148  // Update descriptive labels.
149  hashDbNameLabel.setText(db.getHashSetName());
151 
152  try {
154  } catch (TskCoreException ex) {
155  Logger.getLogger(HashLookupSettingsPanel.class.getName()).log(Level.SEVERE, "Error getting database path of " + db.getHashSetName() + " hash database", ex); //NON-NLS
156  hashDbLocationLabel.setText(ERROR_GETTING_PATH_TEXT);
157  }
158 
159  try {
160  indexPathLabel.setText(shortenPath(db.getIndexPath()));
161  } catch (TskCoreException ex) {
162  Logger.getLogger(HashLookupSettingsPanel.class.getName()).log(Level.SEVERE, "Error getting index path of " + db.getHashSetName() + " hash database", ex); //NON-NLS
163  indexPathLabel.setText(ERROR_GETTING_PATH_TEXT);
164  }
165 
166  try {
167  addHashesToDatabaseButton.setEnabled(!ingestIsRunning && db.isUpdateable());
168  } catch (TskCoreException ex) {
169  Logger.getLogger(HashLookupSettingsPanel.class.getName()).log(Level.SEVERE, "Error identifying if the database is updateable.", ex); //NON-NLS
170  addHashesToDatabaseButton.setEnabled(false);
171  }
172 
173  // Update indexing components.
174  try {
175  if (db.isIndexing()) {
176  indexButton.setText(
177  NbBundle.getMessage(this.getClass(), "HashDbConfigPanel.indexButtonText.indexing"));
178  hashDbIndexStatusLabel.setText(
179  NbBundle.getMessage(this.getClass(), "HashDbConfigPanel.indexStatusText.indexGen"));
180  hashDbIndexStatusLabel.setForeground(Color.black);
181  indexButton.setEnabled(false);
182  } else if (db.hasIndex()) {
183  if (db.hasIndexOnly()) {
184  hashDbIndexStatusLabel.setText(
185  NbBundle.getMessage(this.getClass(), "HashDbConfigPanel.indexStatusText.indexOnly"));
186  } else {
187  hashDbIndexStatusLabel.setText(
188  NbBundle.getMessage(this.getClass(), "HashDbConfigPanel.indexStatusText.indexed"));
189  }
190  hashDbIndexStatusLabel.setForeground(Color.black);
191  if (db.canBeReIndexed()) {
192  indexButton.setText(
193  NbBundle.getMessage(this.getClass(), "HashDbConfigPanel.indexButtonText.reIndex"));
194  indexButton.setEnabled(true);
195  } else {
196  indexButton.setText(NbBundle.getMessage(this.getClass(), "HashDbConfigPanel.indexButtonText.index"));
197  indexButton.setEnabled(false);
198  }
199  } else {
200  hashDbIndexStatusLabel.setText(
201  NbBundle.getMessage(this.getClass(), "HashDbConfigPanel.indexStatusText.noIndex"));
202  hashDbIndexStatusLabel.setForeground(Color.red);
203  indexButton.setText(NbBundle.getMessage(this.getClass(), "HashDbConfigPanel.indexButtonText.index"));
204  indexButton.setEnabled(true);
205  }
206  } catch (TskCoreException ex) {
207  Logger.getLogger(HashLookupSettingsPanel.class.getName()).log(Level.SEVERE, "Error getting index state of hash database", ex); //NON-NLS
208  hashDbIndexStatusLabel.setText(ERROR_GETTING_INDEX_STATUS_TEXT);
209  hashDbIndexStatusLabel.setForeground(Color.red);
210  indexButton.setText(NbBundle.getMessage(this.getClass(), "HashDbConfigPanel.indexButtonText.index"));
211  indexButton.setEnabled(false);
212  }
213 
214  // Disable the indexing button if ingest is in progress.
215  if (ingestIsRunning) {
216  indexButton.setEnabled(false);
217  }
218 
219  // Update ingest option components.
221  sendIngestMessagesCheckBox.setEnabled(!ingestIsRunning && db.getSearchDuringIngest() && db.getKnownFilesType().equals(KnownFilesType.KNOWN_BAD));
222  optionsLabel.setEnabled(!ingestIsRunning);
223  optionsSeparator.setEnabled(!ingestIsRunning);
224 
225  // Update database action buttons.
226  createDatabaseButton.setEnabled(true);
227  importDatabaseButton.setEnabled(true);
228  deleteDatabaseButton.setEnabled(!ingestIsRunning);
229 
230  // Update ingest in progress warning label.
231  ingestWarningLabel.setVisible(ingestIsRunning);
232  }
233 
234  private static String shortenPath(String path) {
235  String shortenedPath = path;
236  if (shortenedPath.length() > 50) {
237  shortenedPath = shortenedPath.substring(0, 10 + shortenedPath.substring(10).indexOf(File.separator) + 1) + "..." + shortenedPath.substring((shortenedPath.length() - 20) + shortenedPath.substring(shortenedPath.length() - 20).indexOf(File.separator));
238  }
239  return shortenedPath;
240  }
241 
242  private boolean isLocalIngestJobEvent(PropertyChangeEvent evt) {
243  if (evt instanceof AutopsyEvent) {
244  AutopsyEvent event = (AutopsyEvent) evt;
245  if (event.getSourceType() == AutopsyEvent.SourceType.LOCAL) {
246  String eventType = event.getPropertyName();
247  return (eventType.equals(IngestManager.IngestJobEvent.STARTED.toString())
248  || eventType.equals(IngestManager.IngestJobEvent.CANCELLED.toString())
249  || eventType.equals(IngestManager.IngestJobEvent.COMPLETED.toString()));
250  }
251  }
252  return false;
253  }
254 
255  @Override
256  @Messages({"HashLookupSettingsPanel.saveFail.message=Couldn't save hash db settings.",
257  "HashLookupSettingsPanel.saveFail.title=Save Fail"})
258  public void saveSettings() {
259  //Checking for for any unindexed databases
260  List<HashDb> unindexed = new ArrayList<>();
261  for (HashDb hashSet : hashSetManager.getAllHashSets()) {
262  try {
263  if (!hashSet.hasIndex()) {
264  unindexed.add(hashSet);
265  }
266  } catch (TskCoreException ex) {
267  Logger.getLogger(HashLookupSettingsPanel.class.getName()).log(Level.SEVERE, "Error getting index info for hash database", ex); //NON-NLS
268  }
269  }
270 
271  //If unindexed ones are found, show a popup box that will either index them, or remove them.
272  if (unindexed.size() == 1) {
273  showInvalidIndex(false, unindexed);
274  } else if (unindexed.size() > 1) {
275  showInvalidIndex(true, unindexed);
276  }
277  try {
278  hashSetManager.save();
280  SwingUtilities.invokeLater(() -> {
281  JOptionPane.showMessageDialog(null, Bundle.HashLookupSettingsPanel_saveFail_message(), Bundle.HashLookupSettingsPanel_saveFail_title(), JOptionPane.ERROR_MESSAGE);
282  });
283  }
284  }
285 
286  @Override
287  public void load() {
288  hashSetTable.clearSelection();
289  hashSetTableModel.refreshModel();
290  }
291 
292  @Override
293  public void store() {
294  saveSettings();
295  }
296 
297  public void cancel() {
298  /*
299  * Revert back to last settings only if the user could have made
300  * changes. Doing this while ingest is running causes hash dbs to be
301  * closed while they are still being used.
302  */
303  if (IngestManager.getInstance().isIngestRunning() == false) {
305  }
306  }
307 
308  @Messages({"# {0} - hash lookup name", "HashLookupSettingsPanel.removeDatabaseFailure.message=Failed to remove hash lookup: {0}"})
309  void removeThese(List<HashDb> toRemove) {
310  for (HashDb hashDb : toRemove) {
311  try {
312  hashSetManager.removeHashDatabaseNoSave(hashDb);
313  } catch (HashDbManager.HashDbManagerException ex) {
314  JOptionPane.showMessageDialog(null, Bundle.HashLookupSettingsPanel_removeDatabaseFailure_message(hashDb.getHashSetName()));
315  }
316  }
317  hashSetTableModel.refreshModel();
318  }
319 
328  private void showInvalidIndex(boolean plural, List<HashDb> unindexed) {
329  String total = "";
330  String message;
331  for (HashDb hdb : unindexed) {
332  total += "\n" + hdb.getHashSetName();
333  }
334  if (plural) {
335  message = NbBundle.getMessage(this.getClass(), "HashDbConfigPanel.dbsNotIndexedMsg", total);
336  } else {
337  message = NbBundle.getMessage(this.getClass(), "HashDbConfigPanel.dbNotIndexedMsg", total);
338  }
339  int res = JOptionPane.showConfirmDialog(this, message,
340  NbBundle.getMessage(this.getClass(),
341  "HashDbConfigPanel.unindexedDbsMsg"),
342  JOptionPane.YES_NO_OPTION);
343  if (res == JOptionPane.YES_OPTION) {
344  ModalNoButtons indexingDialog = new ModalNoButtons(this, new Frame(), unindexed);
345  indexingDialog.setLocationRelativeTo(null);
346  indexingDialog.setVisible(true);
347  indexingDialog.setModal(true);
348  hashSetTableModel.refreshModel();
349  }
350  if (res == JOptionPane.NO_OPTION) {
351  JOptionPane.showMessageDialog(this, NbBundle.getMessage(this.getClass(),
352  "HashDbConfigPanel.allUnindexedDbsRmFromListMsg"));
353  removeThese(unindexed);
354  }
355  }
356 
357  boolean valid() {
358  return true;
359  }
360 
364  private class HashSetTable extends JTable {
365 
366  @Override
367  public Component prepareRenderer(TableCellRenderer renderer, int row, int column) {
368  // Use the hash set name as the cell text.
369  JComponent cellRenderer = (JComponent) super.prepareRenderer(renderer, row, column);
370  cellRenderer.setToolTipText((String) getValueAt(row, column));
371 
372  // Give the user a visual indication of any hash sets with a hash
373  // database that needs to be indexed by displaying the hash set name
374  // in red.
375  if (hashSetTableModel.indexExists(row)) {
376  cellRenderer.setForeground(Color.black);
377  } else {
378  cellRenderer.setForeground(Color.red);
379  }
380 
381  return cellRenderer;
382  }
383 
384  public HashDb getSelection() {
385  return hashSetTableModel.getHashSetAt(getSelectionModel().getMinSelectionIndex());
386  }
387 
388  public void setSelection(int index) {
389  if (index >= 0 && index < hashSetTable.getRowCount()) {
390  getSelectionModel().setSelectionInterval(index, index);
391  }
392  }
393 
394  public void selectRowByName(String name) {
395  setSelection(hashSetTableModel.getIndexByName(name));
396  }
397  }
398 
403  private class HashSetTableModel extends AbstractTableModel {
404 
405  List<HashDb> hashSets = HashDbManager.getInstance().getAllHashSets();
406 
407  @Override
408  public int getColumnCount() {
409  return 1;
410  }
411 
412  @Override
413  public int getRowCount() {
414  return hashSets.size();
415  }
416 
417  @Override
418  public String getColumnName(int column) {
419  return NbBundle.getMessage(this.getClass(), "HashDbConfigPanel.nameColLbl");
420  }
421 
422  @Override
423  public Object getValueAt(int rowIndex, int columnIndex) {
424  return hashSets.get(rowIndex).getHashSetName();
425  }
426 
427  private boolean indexExists(int rowIndex) {
428  try {
429  return hashSets.get(rowIndex).hasIndex();
430  } catch (TskCoreException ex) {
431  Logger.getLogger(HashSetTableModel.class.getName()).log(Level.SEVERE, "Error getting index info for hash database", ex); //NON-NLS
432  return false;
433  }
434  }
435 
436  @Override
437  public boolean isCellEditable(int rowIndex, int columnIndex) {
438  return false;
439  }
440 
441  @Override
442  public void setValueAt(Object aValue, int rowIndex, int columnIndex) {
443  throw new UnsupportedOperationException(
444  NbBundle.getMessage(this.getClass(), "HashDbConfigPanel.editingCellsNotSupportedMsg"));
445  }
446 
447  @Override
448  public Class<?> getColumnClass(int c) {
449  return getValueAt(0, c).getClass();
450  }
451 
452  HashDb getHashSetAt(int index) {
453  if (!hashSets.isEmpty() && index >= 0 && index < hashSets.size()) {
454  return hashSets.get(index);
455  } else {
456  return null;
457  }
458  }
459 
460  int getIndexByName(String name) {
461  for (int i = 0; i < hashSets.size(); ++i) {
462  if (hashSets.get(i).getHashSetName().equals(name)) {
463  return i;
464  }
465  }
466  return -1;
467  }
468 
469  void refreshModel() {
470  hashSets = HashDbManager.getInstance().getAllHashSets();
471  refreshDisplay();
472  }
473 
474  void refreshDisplay() {
475  fireTableDataChanged();
476  }
477  }
478 
484  // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
485  private void initComponents() {
486 
487  jLabel2 = new javax.swing.JLabel();
488  jLabel4 = new javax.swing.JLabel();
489  jLabel6 = new javax.swing.JLabel();
490  jButton3 = new javax.swing.JButton();
491  jScrollPane2 = new javax.swing.JScrollPane();
492  jPanel1 = new javax.swing.JPanel();
493  ingestWarningLabel = new javax.swing.JLabel();
494  jScrollPane1 = new javax.swing.JScrollPane();
495  hashSetTable = new HashSetTable();
496  deleteDatabaseButton = new javax.swing.JButton();
497  importDatabaseButton = new javax.swing.JButton();
498  hashDatabasesLabel = new javax.swing.JLabel();
499  nameLabel = new javax.swing.JLabel();
500  hashDbNameLabel = new javax.swing.JLabel();
501  hashDbLocationLabel = new javax.swing.JLabel();
502  locationLabel = new javax.swing.JLabel();
503  typeLabel = new javax.swing.JLabel();
504  hashDbTypeLabel = new javax.swing.JLabel();
505  hashDbIndexStatusLabel = new javax.swing.JLabel();
506  indexLabel = new javax.swing.JLabel();
507  indexButton = new javax.swing.JButton();
508  sendIngestMessagesCheckBox = new javax.swing.JCheckBox();
509  informationLabel = new javax.swing.JLabel();
510  optionsLabel = new javax.swing.JLabel();
511  informationSeparator = new javax.swing.JSeparator();
512  optionsSeparator = new javax.swing.JSeparator();
513  createDatabaseButton = new javax.swing.JButton();
514  indexPathLabelLabel = new javax.swing.JLabel();
515  indexPathLabel = new javax.swing.JLabel();
516  addHashesToDatabaseButton = new javax.swing.JButton();
517 
518  jLabel2.setFont(jLabel2.getFont().deriveFont(jLabel2.getFont().getStyle() & ~java.awt.Font.BOLD, 11));
519  org.openide.awt.Mnemonics.setLocalizedText(jLabel2, org.openide.util.NbBundle.getMessage(HashLookupSettingsPanel.class, "HashLookupSettingsPanel.jLabel2.text")); // NOI18N
520 
521  jLabel4.setFont(jLabel4.getFont().deriveFont(jLabel4.getFont().getStyle() & ~java.awt.Font.BOLD, 11));
522  org.openide.awt.Mnemonics.setLocalizedText(jLabel4, org.openide.util.NbBundle.getMessage(HashLookupSettingsPanel.class, "HashLookupSettingsPanel.jLabel4.text")); // NOI18N
523 
524  jLabel6.setFont(jLabel6.getFont().deriveFont(jLabel6.getFont().getStyle() & ~java.awt.Font.BOLD, 11));
525  org.openide.awt.Mnemonics.setLocalizedText(jLabel6, org.openide.util.NbBundle.getMessage(HashLookupSettingsPanel.class, "HashLookupSettingsPanel.jLabel6.text")); // NOI18N
526 
527  jButton3.setFont(jButton3.getFont().deriveFont(jButton3.getFont().getStyle() & ~java.awt.Font.BOLD, 14));
528  org.openide.awt.Mnemonics.setLocalizedText(jButton3, org.openide.util.NbBundle.getMessage(HashLookupSettingsPanel.class, "HashLookupSettingsPanel.jButton3.text")); // NOI18N
529 
530  ingestWarningLabel.setFont(ingestWarningLabel.getFont().deriveFont(ingestWarningLabel.getFont().getStyle() & ~java.awt.Font.BOLD, 11));
531  ingestWarningLabel.setIcon(new javax.swing.ImageIcon(getClass().getResource("/org/sleuthkit/autopsy/modules/hashdatabase/warning16.png"))); // NOI18N
532  org.openide.awt.Mnemonics.setLocalizedText(ingestWarningLabel, org.openide.util.NbBundle.getMessage(HashLookupSettingsPanel.class, "HashLookupSettingsPanel.ingestWarningLabel.text")); // NOI18N
533 
534  hashSetTable.setFont(hashSetTable.getFont().deriveFont(hashSetTable.getFont().getStyle() & ~java.awt.Font.BOLD, 11));
535  hashSetTable.setModel(new javax.swing.table.DefaultTableModel(
536  new Object [][] {
537 
538  },
539  new String [] {
540 
541  }
542  ));
543  hashSetTable.setShowHorizontalLines(false);
544  hashSetTable.setShowVerticalLines(false);
545  hashSetTable.addKeyListener(new java.awt.event.KeyAdapter() {
546  public void keyPressed(java.awt.event.KeyEvent evt) {
548  }
549  });
550  jScrollPane1.setViewportView(hashSetTable);
551 
552  deleteDatabaseButton.setFont(deleteDatabaseButton.getFont().deriveFont(deleteDatabaseButton.getFont().getStyle() & ~java.awt.Font.BOLD, 11));
553  deleteDatabaseButton.setIcon(new javax.swing.ImageIcon(getClass().getResource("/org/sleuthkit/autopsy/modules/hashdatabase/delete16.png"))); // NOI18N
554  org.openide.awt.Mnemonics.setLocalizedText(deleteDatabaseButton, org.openide.util.NbBundle.getMessage(HashLookupSettingsPanel.class, "HashLookupSettingsPanel.deleteDatabaseButton.text")); // NOI18N
555  deleteDatabaseButton.setMaximumSize(new java.awt.Dimension(140, 25));
556  deleteDatabaseButton.setMinimumSize(new java.awt.Dimension(140, 25));
557  deleteDatabaseButton.setPreferredSize(new java.awt.Dimension(140, 25));
558  deleteDatabaseButton.addActionListener(new java.awt.event.ActionListener() {
559  public void actionPerformed(java.awt.event.ActionEvent evt) {
561  }
562  });
563 
564  importDatabaseButton.setFont(importDatabaseButton.getFont().deriveFont(importDatabaseButton.getFont().getStyle() & ~java.awt.Font.BOLD, 11));
565  importDatabaseButton.setIcon(new javax.swing.ImageIcon(getClass().getResource("/org/sleuthkit/autopsy/modules/hashdatabase/import16.png"))); // NOI18N
566  org.openide.awt.Mnemonics.setLocalizedText(importDatabaseButton, org.openide.util.NbBundle.getMessage(HashLookupSettingsPanel.class, "HashLookupSettingsPanel.importDatabaseButton.text")); // NOI18N
567  importDatabaseButton.setToolTipText(org.openide.util.NbBundle.getMessage(HashLookupSettingsPanel.class, "HashLookupSettingsPanel.importDatabaseButton.toolTipText")); // NOI18N
568  importDatabaseButton.setMaximumSize(new java.awt.Dimension(140, 25));
569  importDatabaseButton.setMinimumSize(new java.awt.Dimension(140, 25));
570  importDatabaseButton.setPreferredSize(new java.awt.Dimension(140, 25));
571  importDatabaseButton.addActionListener(new java.awt.event.ActionListener() {
572  public void actionPerformed(java.awt.event.ActionEvent evt) {
574  }
575  });
576 
577  hashDatabasesLabel.setFont(hashDatabasesLabel.getFont().deriveFont(hashDatabasesLabel.getFont().getStyle() & ~java.awt.Font.BOLD, 11));
578  org.openide.awt.Mnemonics.setLocalizedText(hashDatabasesLabel, org.openide.util.NbBundle.getMessage(HashLookupSettingsPanel.class, "HashLookupSettingsPanel.hashDatabasesLabel.text")); // NOI18N
579 
580  nameLabel.setFont(nameLabel.getFont().deriveFont(nameLabel.getFont().getStyle() & ~java.awt.Font.BOLD, 11));
581  org.openide.awt.Mnemonics.setLocalizedText(nameLabel, org.openide.util.NbBundle.getMessage(HashLookupSettingsPanel.class, "HashLookupSettingsPanel.nameLabel.text")); // NOI18N
582 
583  hashDbNameLabel.setFont(hashDbNameLabel.getFont().deriveFont(hashDbNameLabel.getFont().getStyle() & ~java.awt.Font.BOLD, 11));
584  org.openide.awt.Mnemonics.setLocalizedText(hashDbNameLabel, org.openide.util.NbBundle.getMessage(HashLookupSettingsPanel.class, "HashLookupSettingsPanel.hashDbNameLabel.text")); // NOI18N
585 
586  hashDbLocationLabel.setFont(hashDbLocationLabel.getFont().deriveFont(hashDbLocationLabel.getFont().getStyle() & ~java.awt.Font.BOLD, 11));
587  org.openide.awt.Mnemonics.setLocalizedText(hashDbLocationLabel, org.openide.util.NbBundle.getMessage(HashLookupSettingsPanel.class, "HashLookupSettingsPanel.hashDbLocationLabel.text")); // NOI18N
588 
589  locationLabel.setFont(locationLabel.getFont().deriveFont(locationLabel.getFont().getStyle() & ~java.awt.Font.BOLD, 11));
590  org.openide.awt.Mnemonics.setLocalizedText(locationLabel, org.openide.util.NbBundle.getMessage(HashLookupSettingsPanel.class, "HashLookupSettingsPanel.locationLabel.text")); // NOI18N
591 
592  typeLabel.setFont(typeLabel.getFont().deriveFont(typeLabel.getFont().getStyle() & ~java.awt.Font.BOLD, 11));
593  org.openide.awt.Mnemonics.setLocalizedText(typeLabel, org.openide.util.NbBundle.getMessage(HashLookupSettingsPanel.class, "HashLookupSettingsPanel.typeLabel.text")); // NOI18N
594 
595  hashDbTypeLabel.setFont(hashDbTypeLabel.getFont().deriveFont(hashDbTypeLabel.getFont().getStyle() & ~java.awt.Font.BOLD, 11));
596  org.openide.awt.Mnemonics.setLocalizedText(hashDbTypeLabel, org.openide.util.NbBundle.getMessage(HashLookupSettingsPanel.class, "HashLookupSettingsPanel.hashDbTypeLabel.text")); // NOI18N
597 
598  hashDbIndexStatusLabel.setFont(hashDbIndexStatusLabel.getFont().deriveFont(hashDbIndexStatusLabel.getFont().getStyle() & ~java.awt.Font.BOLD, 11));
599  org.openide.awt.Mnemonics.setLocalizedText(hashDbIndexStatusLabel, org.openide.util.NbBundle.getMessage(HashLookupSettingsPanel.class, "HashLookupSettingsPanel.hashDbIndexStatusLabel.text")); // NOI18N
600 
601  indexLabel.setFont(indexLabel.getFont().deriveFont(indexLabel.getFont().getStyle() & ~java.awt.Font.BOLD, 11));
602  org.openide.awt.Mnemonics.setLocalizedText(indexLabel, org.openide.util.NbBundle.getMessage(HashLookupSettingsPanel.class, "HashLookupSettingsPanel.indexLabel.text")); // NOI18N
603 
604  indexButton.setFont(indexButton.getFont().deriveFont(indexButton.getFont().getStyle() & ~java.awt.Font.BOLD, 11));
605  org.openide.awt.Mnemonics.setLocalizedText(indexButton, org.openide.util.NbBundle.getMessage(HashLookupSettingsPanel.class, "HashLookupSettingsPanel.indexButton.text")); // NOI18N
606  indexButton.setEnabled(false);
607  indexButton.addActionListener(new java.awt.event.ActionListener() {
608  public void actionPerformed(java.awt.event.ActionEvent evt) {
610  }
611  });
612 
613  sendIngestMessagesCheckBox.setFont(sendIngestMessagesCheckBox.getFont().deriveFont(sendIngestMessagesCheckBox.getFont().getStyle() & ~java.awt.Font.BOLD, 11));
614  org.openide.awt.Mnemonics.setLocalizedText(sendIngestMessagesCheckBox, org.openide.util.NbBundle.getMessage(HashLookupSettingsPanel.class, "HashLookupSettingsPanel.sendIngestMessagesCheckBox.text")); // NOI18N
615  sendIngestMessagesCheckBox.addActionListener(new java.awt.event.ActionListener() {
616  public void actionPerformed(java.awt.event.ActionEvent evt) {
618  }
619  });
620 
621  informationLabel.setFont(informationLabel.getFont().deriveFont(informationLabel.getFont().getStyle() & ~java.awt.Font.BOLD, 11));
622  org.openide.awt.Mnemonics.setLocalizedText(informationLabel, org.openide.util.NbBundle.getMessage(HashLookupSettingsPanel.class, "HashLookupSettingsPanel.informationLabel.text")); // NOI18N
623 
624  optionsLabel.setFont(optionsLabel.getFont().deriveFont(optionsLabel.getFont().getStyle() & ~java.awt.Font.BOLD, 11));
625  org.openide.awt.Mnemonics.setLocalizedText(optionsLabel, org.openide.util.NbBundle.getMessage(HashLookupSettingsPanel.class, "HashLookupSettingsPanel.optionsLabel.text")); // NOI18N
626 
627  createDatabaseButton.setFont(createDatabaseButton.getFont().deriveFont(createDatabaseButton.getFont().getStyle() & ~java.awt.Font.BOLD, 11));
628  createDatabaseButton.setIcon(new javax.swing.ImageIcon(getClass().getResource("/org/sleuthkit/autopsy/modules/hashdatabase/new16.png"))); // NOI18N
629  org.openide.awt.Mnemonics.setLocalizedText(createDatabaseButton, org.openide.util.NbBundle.getMessage(HashLookupSettingsPanel.class, "HashLookupSettingsPanel.createDatabaseButton.text")); // NOI18N
630  createDatabaseButton.setToolTipText(org.openide.util.NbBundle.getMessage(HashLookupSettingsPanel.class, "HashLookupSettingsPanel.createDatabaseButton.toolTipText")); // NOI18N
631  createDatabaseButton.setMaximumSize(new java.awt.Dimension(140, 25));
632  createDatabaseButton.setMinimumSize(new java.awt.Dimension(140, 25));
633  createDatabaseButton.setPreferredSize(new java.awt.Dimension(140, 25));
634  createDatabaseButton.addActionListener(new java.awt.event.ActionListener() {
635  public void actionPerformed(java.awt.event.ActionEvent evt) {
637  }
638  });
639 
640  indexPathLabelLabel.setFont(indexPathLabelLabel.getFont().deriveFont(indexPathLabelLabel.getFont().getStyle() & ~java.awt.Font.BOLD, 11));
641  org.openide.awt.Mnemonics.setLocalizedText(indexPathLabelLabel, org.openide.util.NbBundle.getMessage(HashLookupSettingsPanel.class, "HashLookupSettingsPanel.indexPathLabelLabel.text")); // NOI18N
642 
643  indexPathLabel.setFont(indexPathLabel.getFont().deriveFont(indexPathLabel.getFont().getStyle() & ~java.awt.Font.BOLD, 11));
644  org.openide.awt.Mnemonics.setLocalizedText(indexPathLabel, org.openide.util.NbBundle.getMessage(HashLookupSettingsPanel.class, "HashLookupSettingsPanel.indexPathLabel.text")); // NOI18N
645 
646  addHashesToDatabaseButton.setFont(addHashesToDatabaseButton.getFont().deriveFont(addHashesToDatabaseButton.getFont().getStyle() & ~java.awt.Font.BOLD, 11));
647  org.openide.awt.Mnemonics.setLocalizedText(addHashesToDatabaseButton, org.openide.util.NbBundle.getMessage(HashLookupSettingsPanel.class, "HashLookupSettingsPanel.addHashesToDatabaseButton.text")); // NOI18N
648  addHashesToDatabaseButton.setEnabled(false);
649  addHashesToDatabaseButton.addActionListener(new java.awt.event.ActionListener() {
650  public void actionPerformed(java.awt.event.ActionEvent evt) {
652  }
653  });
654 
655  javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);
656  jPanel1.setLayout(jPanel1Layout);
657  jPanel1Layout.setHorizontalGroup(
658  jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
659  .addGroup(jPanel1Layout.createSequentialGroup()
660  .addContainerGap()
661  .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
662  .addGroup(jPanel1Layout.createSequentialGroup()
663  .addGap(1, 1, 1)
664  .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 395, javax.swing.GroupLayout.PREFERRED_SIZE)
665  .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
666  .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
667  .addGroup(jPanel1Layout.createSequentialGroup()
668  .addComponent(informationLabel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
669  .addGap(309, 309, 309))
670  .addGroup(jPanel1Layout.createSequentialGroup()
671  .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
672  .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel1Layout.createSequentialGroup()
673  .addComponent(optionsLabel)
674  .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
675  .addComponent(optionsSeparator, javax.swing.GroupLayout.PREFERRED_SIZE, 334, javax.swing.GroupLayout.PREFERRED_SIZE))
676  .addGroup(jPanel1Layout.createSequentialGroup()
677  .addGap(10, 10, 10)
678  .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
679  .addGroup(jPanel1Layout.createSequentialGroup()
680  .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
681  .addComponent(locationLabel)
682  .addComponent(indexButton, javax.swing.GroupLayout.PREFERRED_SIZE, 120, javax.swing.GroupLayout.PREFERRED_SIZE)
683  .addComponent(typeLabel)
684  .addComponent(indexLabel, javax.swing.GroupLayout.PREFERRED_SIZE, 66, javax.swing.GroupLayout.PREFERRED_SIZE)
685  .addComponent(indexPathLabelLabel))
686  .addGap(10, 10, 10)
687  .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
688  .addComponent(hashDbTypeLabel, javax.swing.GroupLayout.PREFERRED_SIZE, 225, javax.swing.GroupLayout.PREFERRED_SIZE)
689  .addComponent(hashDbLocationLabel, javax.swing.GroupLayout.PREFERRED_SIZE, 225, javax.swing.GroupLayout.PREFERRED_SIZE)
690  .addComponent(indexPathLabel, javax.swing.GroupLayout.PREFERRED_SIZE, 225, javax.swing.GroupLayout.PREFERRED_SIZE)
691  .addComponent(hashDbIndexStatusLabel, javax.swing.GroupLayout.PREFERRED_SIZE, 225, javax.swing.GroupLayout.PREFERRED_SIZE)
692  .addComponent(addHashesToDatabaseButton)))
693  .addGroup(jPanel1Layout.createSequentialGroup()
694  .addComponent(nameLabel)
695  .addGap(53, 53, 53)
696  .addComponent(hashDbNameLabel))))
697  .addGroup(jPanel1Layout.createSequentialGroup()
698  .addGap(70, 70, 70)
699  .addComponent(informationSeparator, javax.swing.GroupLayout.PREFERRED_SIZE, 305, javax.swing.GroupLayout.PREFERRED_SIZE))
700  .addGroup(jPanel1Layout.createSequentialGroup()
701  .addGap(10, 10, 10)
702  .addComponent(ingestWarningLabel))
703  .addGroup(jPanel1Layout.createSequentialGroup()
704  .addGap(25, 25, 25)
705  .addComponent(sendIngestMessagesCheckBox)))
706  .addGap(50, 50, 50))))
707  .addGroup(jPanel1Layout.createSequentialGroup()
708  .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
709  .addComponent(hashDatabasesLabel)
710  .addGroup(jPanel1Layout.createSequentialGroup()
711  .addComponent(createDatabaseButton, javax.swing.GroupLayout.PREFERRED_SIZE, 121, javax.swing.GroupLayout.PREFERRED_SIZE)
712  .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
713  .addComponent(importDatabaseButton, javax.swing.GroupLayout.PREFERRED_SIZE, 132, javax.swing.GroupLayout.PREFERRED_SIZE)
714  .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
715  .addComponent(deleteDatabaseButton, javax.swing.GroupLayout.PREFERRED_SIZE, 131, javax.swing.GroupLayout.PREFERRED_SIZE)))
716  .addGap(0, 0, Short.MAX_VALUE))))
717  );
718  jPanel1Layout.setVerticalGroup(
719  jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
720  .addGroup(jPanel1Layout.createSequentialGroup()
721  .addContainerGap()
722  .addComponent(hashDatabasesLabel)
723  .addGap(6, 6, 6)
724  .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
725  .addGroup(jPanel1Layout.createSequentialGroup()
726  .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
727  .addComponent(informationLabel)
728  .addGroup(jPanel1Layout.createSequentialGroup()
729  .addGap(7, 7, 7)
730  .addComponent(informationSeparator, javax.swing.GroupLayout.PREFERRED_SIZE, 3, javax.swing.GroupLayout.PREFERRED_SIZE)))
731  .addGap(7, 7, 7)
732  .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
733  .addComponent(nameLabel)
734  .addComponent(hashDbNameLabel))
735  .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
736  .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
737  .addComponent(typeLabel)
738  .addComponent(hashDbTypeLabel))
739  .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
740  .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
741  .addComponent(locationLabel)
742  .addComponent(hashDbLocationLabel))
743  .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
744  .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
745  .addComponent(indexPathLabelLabel)
746  .addComponent(indexPathLabel))
747  .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
748  .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
749  .addComponent(indexLabel)
750  .addComponent(hashDbIndexStatusLabel))
751  .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
752  .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
753  .addComponent(indexButton)
754  .addComponent(addHashesToDatabaseButton))
755  .addGap(18, 18, 18)
756  .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
757  .addComponent(optionsLabel)
758  .addComponent(optionsSeparator, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
759  .addGap(18, 18, 18)
760  .addComponent(sendIngestMessagesCheckBox)
761  .addGap(18, 18, 18)
762  .addComponent(ingestWarningLabel)
763  .addGap(0, 0, Short.MAX_VALUE))
764  .addComponent(jScrollPane1))
765  .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
766  .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
767  .addComponent(createDatabaseButton, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
768  .addComponent(importDatabaseButton, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
769  .addComponent(deleteDatabaseButton, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
770  .addContainerGap())
771  );
772 
773  jScrollPane2.setViewportView(jPanel1);
774 
775  javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);
776  this.setLayout(layout);
777  layout.setHorizontalGroup(
778  layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
779  .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
780  .addComponent(jScrollPane2)
781  .addContainerGap())
782  );
783  layout.setVerticalGroup(
784  layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
785  .addComponent(jScrollPane2)
786  );
787  }// </editor-fold>//GEN-END:initComponents
788 
789  private void addHashesToDatabaseButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_addHashesToDatabaseButtonActionPerformed
790 
791  HashDb hashDb = ((HashSetTable) hashSetTable).getSelection();
793  }//GEN-LAST:event_addHashesToDatabaseButtonActionPerformed
794 
795  private void createDatabaseButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_createDatabaseButtonActionPerformed
796  HashDb hashDb = new HashDbCreateDatabaseDialog().getHashDatabase();
797  if (null != hashDb) {
798  hashSetTableModel.refreshModel();
799  ((HashSetTable) hashSetTable).selectRowByName(hashDb.getHashSetName());
800  firePropertyChange(OptionsPanelController.PROP_CHANGED, null, null);
801  }
802  }//GEN-LAST:event_createDatabaseButtonActionPerformed
803 
804  private void sendIngestMessagesCheckBoxActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_sendIngestMessagesCheckBoxActionPerformed
805  HashDb hashDb = ((HashSetTable) hashSetTable).getSelection();
806  if (hashDb != null) {
807  hashDb.setSendIngestMessages(sendIngestMessagesCheckBox.isSelected());
808  firePropertyChange(OptionsPanelController.PROP_CHANGED, null, null);
809  }
810  }//GEN-LAST:event_sendIngestMessagesCheckBoxActionPerformed
811 
812  private void indexButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_indexButtonActionPerformed
813  final HashDb hashDb = ((HashSetTable) hashSetTable).getSelection();
814  assert hashDb != null;
815 
816  // Add a listener for the INDEXING_DONE event. This listener will update
817  // the UI.
818  hashDb.addPropertyChangeListener(new PropertyChangeListener() {
819  @Override
820  public void propertyChange(PropertyChangeEvent evt) {
821  if (evt.getPropertyName().equals(HashDb.Event.INDEXING_DONE.toString())) {
822  HashDb selectedHashDb = ((HashSetTable) hashSetTable).getSelection();
823  if (selectedHashDb != null && hashDb != null && hashDb.equals(selectedHashDb)) {
825  }
826  hashSetTableModel.refreshDisplay();
827  }
828  }
829  });
830 
831  // Display a modal dialog box to kick off the indexing on a worker thread
832  // and try to persuade the user to wait for the indexing task to finish.
833  // TODO: If the user waits, this defeats the purpose of doing the indexing on a worker thread.
834  // But if the user cancels the dialog, other operations on the database
835  // may be attempted when it is not in a suitable state.
836  ModalNoButtons indexDialog = new ModalNoButtons(this, new Frame(), hashDb);
837  indexDialog.setLocationRelativeTo(null);
838  indexDialog.setVisible(true);
839  indexDialog.setModal(true);
840  }//GEN-LAST:event_indexButtonActionPerformed
841 
842  private void importDatabaseButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_importDatabaseButtonActionPerformed
843  HashDb hashDb = new HashDbImportDatabaseDialog().getHashDatabase();
844  if (null != hashDb) {
845  hashSetTableModel.refreshModel();
846  ((HashSetTable) hashSetTable).selectRowByName(hashDb.getHashSetName());
847  firePropertyChange(OptionsPanelController.PROP_CHANGED, null, null);
848  }
849  }//GEN-LAST:event_importDatabaseButtonActionPerformed
850 
851  @Messages({})
852  private void deleteDatabaseButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_deleteDatabaseButtonActionPerformed
853  if (JOptionPane.showConfirmDialog(null,
854  NbBundle.getMessage(this.getClass(),
855  "HashDbConfigPanel.deleteDbActionConfirmMsg"),
856  NbBundle.getMessage(this.getClass(), "HashDbConfigPanel.deleteDbActionMsg"),
857  JOptionPane.YES_NO_OPTION,
858  JOptionPane.WARNING_MESSAGE) == JOptionPane.YES_OPTION) {
859  HashDb hashDb = ((HashSetTable) hashSetTable).getSelection();
860  if (hashDb != null) {
861  try {
862  hashSetManager.removeHashDatabaseNoSave(hashDb);
864  JOptionPane.showMessageDialog(null, Bundle.HashLookupSettingsPanel_removeDatabaseFailure_message(hashDb.getHashSetName()));
865  }
866  hashSetTableModel.refreshModel();
867  firePropertyChange(OptionsPanelController.PROP_CHANGED, null, null);
868  }
869  }
870  }//GEN-LAST:event_deleteDatabaseButtonActionPerformed
871 
872  private void hashSetTableKeyPressed(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_hashSetTableKeyPressed
873  if (evt.getKeyCode() == KeyEvent.VK_DELETE) {
874  HashDb hashDb = ((HashSetTable) hashSetTable).getSelection();
875  if (hashDb != null) {
876  try {
877  hashSetManager.removeHashDatabaseNoSave(hashDb);
879  JOptionPane.showMessageDialog(null, Bundle.HashLookupSettingsPanel_removeDatabaseFailure_message(hashDb.getHashSetName()));
880  }
881  hashSetTableModel.refreshModel();
882  firePropertyChange(OptionsPanelController.PROP_CHANGED, null, null);
883  }
884  }
885  }//GEN-LAST:event_hashSetTableKeyPressed
886 
887  // Variables declaration - do not modify//GEN-BEGIN:variables
888  private javax.swing.JButton addHashesToDatabaseButton;
889  private javax.swing.JButton createDatabaseButton;
890  private javax.swing.JButton deleteDatabaseButton;
891  private javax.swing.JLabel hashDatabasesLabel;
892  private javax.swing.JLabel hashDbIndexStatusLabel;
893  private javax.swing.JLabel hashDbLocationLabel;
894  private javax.swing.JLabel hashDbNameLabel;
895  private javax.swing.JLabel hashDbTypeLabel;
896  private javax.swing.JTable hashSetTable;
897  private javax.swing.JButton importDatabaseButton;
898  private javax.swing.JButton indexButton;
899  private javax.swing.JLabel indexLabel;
900  private javax.swing.JLabel indexPathLabel;
901  private javax.swing.JLabel indexPathLabelLabel;
902  private javax.swing.JLabel informationLabel;
903  private javax.swing.JSeparator informationSeparator;
904  private javax.swing.JLabel ingestWarningLabel;
905  private javax.swing.JButton jButton3;
906  private javax.swing.JLabel jLabel2;
907  private javax.swing.JLabel jLabel4;
908  private javax.swing.JLabel jLabel6;
909  private javax.swing.JPanel jPanel1;
910  private javax.swing.JScrollPane jScrollPane1;
911  private javax.swing.JScrollPane jScrollPane2;
912  private javax.swing.JLabel locationLabel;
913  private javax.swing.JLabel nameLabel;
914  private javax.swing.JLabel optionsLabel;
915  private javax.swing.JSeparator optionsSeparator;
916  private javax.swing.JCheckBox sendIngestMessagesCheckBox;
917  private javax.swing.JLabel typeLabel;
918  // End of variables declaration//GEN-END:variables
919 }
static synchronized IngestManager getInstance()
Component prepareRenderer(TableCellRenderer renderer, int row, int column)
void addIngestJobEventListener(final PropertyChangeListener listener)
synchronized static Logger getLogger(String name)
Definition: Logger.java:161

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