Autopsy  4.18.0
Graphical digital forensics platform for The Sleuth Kit and other tools.
FilesSetRulePanel.java
Go to the documentation of this file.
1 /*
2  * Autopsy Forensic Browser
3  *
4  * Copyright 2014-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  */
19 package org.sleuthkit.autopsy.modules.interestingitems;
20 
21 import java.awt.Color;
22 import java.awt.event.ActionEvent;
23 import java.util.Arrays;
24 import java.util.List;
25 import java.util.SortedSet;
26 import java.util.logging.Level;
27 import java.util.regex.Pattern;
28 import java.util.regex.PatternSyntaxException;
29 import javax.swing.JButton;
30 import javax.swing.JComponent;
31 import javax.swing.JOptionPane;
32 import org.openide.DialogDisplayer;
33 import org.openide.NotifyDescriptor;
34 import org.openide.util.NbBundle;
35 import org.openide.util.NbBundle.Messages;
40 
44 @SuppressWarnings("PMD.SingularField") // UI widgets cause lots of false positives
45 final class FilesSetRulePanel extends javax.swing.JPanel {
46 
47  @Messages({
48  "FilesSetRulePanel.bytes=Bytes",
49  "FilesSetRulePanel.kiloBytes=Kilobytes",
50  "FilesSetRulePanel.megaBytes=Megabytes",
51  "FilesSetRulePanel.gigaBytes=Gigabytes",
52  "FilesSetRulePanel.nameTextField.fullNameExample=Example: \"file.exe\"",
53  "FilesSetRulePanel.nameTextField.extensionExample=Examples: \"jpg\" or \"jpg,jpeg,gif\"",
54  "FilesSetRulePanel.NoConditionError=Must have at least one condition to make a rule.",
55  "FilesSetRulePanel.NoMimeTypeError=Please select a valid MIME type.",
56  "FilesSetRulePanel.NoNameError=Name cannot be empty",
57  "FilesSetRulePanel.NoPathError=Path cannot be empty",
58  "FilesSetRulePanel.DaysIncludedEmptyError=Number of days included cannot be empty.",
59  "FilesSetRulePanel.DaysIncludedInvalidError=Number of days included must be a positive integer.",
60  "FilesSetRulePanel.ZeroFileSizeError=File size condition value must not be 0 (Unless = is selected).",
61  "# {0} - regex",
62  "FilesSetRulePanel.CommaInRegexWarning=Warning: Comma(s) in the file extension field will be interpreted as part of a regex and will not split the entry into multiple extensions (Entered: \"{0}\")",
63  })
64 
65  private static final long serialVersionUID = 1L;
66  private static final Logger logger = Logger.getLogger(FilesSetRulePanel.class.getName());
67  private static final String SLEUTHKIT_PATH_SEPARATOR = "/"; // NON-NLS
68  private static final List<String> ILLEGAL_FILE_NAME_CHARS = FilesSetsManager.getIllegalFileNameChars();
69  private static final List<String> ILLEGAL_FILE_PATH_CHARS = FilesSetsManager.getIllegalFilePathChars();
70  private JButton okButton;
71  private JButton cancelButton;
72  private TextPrompt nameTextFieldPrompt;
73 
77  FilesSetRulePanel(JButton okButton, JButton cancelButton, PANEL_TYPE panelType) {
78  initComponents();
79  if (panelType == FilesSetDefsPanel.PANEL_TYPE.FILE_INGEST_FILTERS) { //Hide the mimetype settings when this is displaying a FileSet rule instead of a interesting item rule
80  mimeTypeComboBox.setVisible(false);
81  mimeCheck.setVisible(false);
82  jLabel1.setVisible(false);
83  filesRadioButton.setVisible(false);
84  dirsRadioButton.setVisible(false);
85  allRadioButton.setVisible(false);
86  org.openide.awt.Mnemonics.setLocalizedText(jLabel5, org.openide.util.NbBundle.getMessage(FilesSetRulePanel.class, "FilesSetRulePanel.ingest.jLabel5.text")); // NOI18N
87 
88  } else {
89  populateMimeTypesComboBox();
90  }
91  this.dateCheckActionPerformed(null);
92  populateComponentsWithDefaultValues();
93  this.setButtons(okButton, cancelButton);
94 
95  updateNameTextFieldPrompt();
96  }
97 
103  FilesSetRulePanel(FilesSet.Rule rule, JButton okButton, JButton cancelButton, PANEL_TYPE panelType) {
104  initComponents();
105  if (panelType == FilesSetDefsPanel.PANEL_TYPE.FILE_INGEST_FILTERS) { //Hide the mimetype settings when this is displaying a FileSet rule instead of a interesting item rule
106  mimeTypeComboBox.setVisible(false);
107  mimeCheck.setVisible(false);
108  jLabel1.setVisible(false);
109  filesRadioButton.setVisible(false);
110  dirsRadioButton.setVisible(false);
111  allRadioButton.setVisible(false);
112  } else {
113  populateMimeTypesComboBox();
114  populateMimeConditionComponents(rule);
115  }
116  populateMimeTypesComboBox();
117  populateRuleNameComponent(rule);
118  populateTypeConditionComponents(rule);
119  populateNameConditionComponents(rule);
120  populatePathConditionComponents(rule);
121  populateDateConditionComponents(rule);
122  populateSizeConditionComponents(rule);
123  this.setButtons(okButton, cancelButton);
124 
125  updateNameTextFieldPrompt();
126  setComponentsForSearchType();
127  }
128 
133  private void updateNameTextFieldPrompt() {
137  String text;
138  if (fullNameRadioButton.isSelected()) {
139  text = Bundle.FilesSetRulePanel_nameTextField_fullNameExample();
140  } else {
141  text = Bundle.FilesSetRulePanel_nameTextField_extensionExample();
142  }
143  nameTextFieldPrompt = new TextPrompt(text, nameTextField);
144 
148  nameTextFieldPrompt.setForeground(Color.LIGHT_GRAY);
149  nameTextFieldPrompt.changeAlpha(0.9f); // Mostly opaque
150 
151  validate();
152  repaint();
153  }
154 
158  private void populateComponentsWithDefaultValues() {
159  this.filesRadioButton.setSelected(true);
160  this.fullNameRadioButton.setSelected(true);
161  this.equalitySymbolComboBox.setSelectedItem(FilesSet.Rule.FileSizeCondition.COMPARATOR.GREATER_THAN_EQUAL.getSymbol());
162  this.fileSizeComboBox.setSelectedItem(FilesSet.Rule.FileSizeCondition.SIZE_UNIT.KILOBYTE.getName());
163  this.mimeTypeComboBox.setSelectedIndex(0);
164  }
165 
166  private void populateMimeTypesComboBox() {
167  try {
168  SortedSet<String> detectableMimeTypes = FileTypeDetector.getDetectedTypes();
169  detectableMimeTypes.forEach((type) -> {
170  mimeTypeComboBox.addItem(type);
171  });
172  } catch (FileTypeDetector.FileTypeDetectorInitException ex) {
173  logger.log(Level.SEVERE, "Unable to get detectable file types", ex);
174  }
175  this.setOkButton();
176  }
177 
183  private void populateRuleNameComponent(FilesSet.Rule rule) {
184  this.ruleNameTextField.setText(rule.getName());
185  }
186 
187  private void populateMimeConditionComponents(FilesSet.Rule rule) {
188  FilesSet.Rule.MimeTypeCondition mimeTypeCondition = rule.getMimeTypeCondition();
189  if (mimeTypeCondition != null) {
190  this.mimeCheck.setSelected(true);
191  this.mimeCheckActionPerformed(null);
192  this.mimeTypeComboBox.setSelectedItem(mimeTypeCondition.getMimeType());
193  }
194  }
195 
196  private void populateSizeConditionComponents(FilesSet.Rule rule) {
197  FilesSet.Rule.FileSizeCondition fileSizeCondition = rule.getFileSizeCondition();
198  if (fileSizeCondition != null) {
199  this.fileSizeCheck.setSelected(true);
200  this.fileSizeCheckActionPerformed(null);
201  this.fileSizeSpinner.setValue(fileSizeCondition.getSizeValue());
202  this.fileSizeComboBox.setSelectedItem(fileSizeCondition.getUnit().getName());
203  this.equalitySymbolComboBox.setSelectedItem(fileSizeCondition.getComparator().getSymbol());
204  }
205  }
206 
211  private void setOkButton() {
212  if (this.okButton != null) {
213  this.okButton.setEnabled(this.fileSizeCheck.isSelected() || this.mimeCheck.isSelected()
214  || this.nameCheck.isSelected() || this.pathCheck.isSelected() || this.dateCheck.isSelected());
215  }
216  }
217 
225  private JOptionPane getOptionPane(JComponent parent) {
226  JOptionPane pane;
227  if (!(parent instanceof JOptionPane)) {
228  pane = getOptionPane((JComponent) parent.getParent());
229  } else {
230  pane = (JOptionPane) parent;
231  }
232  return pane;
233  }
234 
241  private void setButtons(JButton ok, JButton cancel) {
242  this.okButton = ok;
243  this.cancelButton = cancel;
244  okButton.addActionListener((ActionEvent e) -> {
245  JOptionPane pane = getOptionPane(okButton);
246  pane.setValue(okButton);
247  });
248  cancelButton.addActionListener((ActionEvent e) -> {
249  JOptionPane pane = getOptionPane(cancelButton);
250  pane.setValue(cancelButton);
251  });
252  this.setOkButton();
253  }
254 
261  private void populateTypeConditionComponents(FilesSet.Rule rule) {
262  FilesSet.Rule.MetaTypeCondition typeCondition = rule.getMetaTypeCondition();
263  switch (typeCondition.getMetaType()) {
264  case FILES:
265  this.filesRadioButton.setSelected(true);
266  break;
267  case DIRECTORIES:
268  this.dirsRadioButton.setSelected(true);
269  break;
270  case ALL:
271  this.allRadioButton.setSelected(true);
272  break;
273  }
274  }
275 
281  private void populateNameConditionComponents(FilesSet.Rule rule) {
282  FilesSet.Rule.FileNameCondition nameCondition = rule.getFileNameCondition();
283  if (nameCondition != null) {
284  this.nameCheck.setSelected(true);
285  this.nameCheckActionPerformed(null);
286  this.nameTextField.setText(nameCondition.getTextToMatch());
287  this.nameRegexCheckbox.setSelected(nameCondition.isRegex());
288  if (nameCondition instanceof FilesSet.Rule.FullNameCondition) {
289  this.fullNameRadioButton.setSelected(true);
290  } else {
291  this.extensionRadioButton.setSelected(true);
292  }
293  }
294  }
295 
302  private void populatePathConditionComponents(FilesSet.Rule rule) {
303  FilesSet.Rule.ParentPathCondition pathCondition = rule.getPathCondition();
304  if (pathCondition != null) {
305  this.pathCheck.setSelected(true);
306  this.pathCheckActionPerformed(null);
307  this.pathTextField.setText(pathCondition.getTextToMatch());
308  this.pathRegexCheckBox.setSelected(pathCondition.isRegex());
309  }
310  }
311 
318  private void populateDateConditionComponents(FilesSet.Rule rule) {
319  FilesSet.Rule.DateCondition dateCondition = rule.getDateCondition();
320  if (dateCondition != null) {
321  this.dateCheck.setSelected(true);
322  this.dateCheckActionPerformed(null);
323  this.daysIncludedTextField.setText(Integer.toString(dateCondition.getDaysIncluded()));
324  }
325  }
326 
334  boolean isValidRuleDefinition() {
335 
336  if (!(this.mimeCheck.isSelected() || this.fileSizeCheck.isSelected() || this.pathCheck.isSelected() || this.nameCheck.isSelected() || this.dateCheck.isSelected())) {
337  NotifyDescriptor notifyDesc = new NotifyDescriptor.Message(
338  Bundle.FilesSetRulePanel_NoConditionError(),
339  NotifyDescriptor.WARNING_MESSAGE);
340  DialogDisplayer.getDefault().notify(notifyDesc);
341  return false;
342  }
343 
344  if (this.nameCheck.isSelected()) {
345  // The name condition must either be a regular expression that compiles or
346  // a string without illegal file name chars.
347  if (this.nameTextField.getText().isEmpty()) {
348  NotifyDescriptor notifyDesc = new NotifyDescriptor.Message(
349  Bundle.FilesSetRulePanel_NoNameError(),
350  NotifyDescriptor.WARNING_MESSAGE);
351  DialogDisplayer.getDefault().notify(notifyDesc);
352  return false;
353  }
354  if (this.nameRegexCheckbox.isSelected()) {
355 
356  // If extension is also selected and the regex contains a comma, display a warning
357  // since it is unclear whether the comma is part of a regex or is separating extensions.
358  if (this.extensionRadioButton.isSelected() && this.nameTextField.getText().contains(",")) {
359  NotifyDescriptor notifyDesc = new NotifyDescriptor.Message(
360  Bundle.FilesSetRulePanel_CommaInRegexWarning(this.nameTextField.getText()),
361  NotifyDescriptor.WARNING_MESSAGE);
362  DialogDisplayer.getDefault().notify(notifyDesc);
363  }
364 
365  try {
366  Pattern.compile(this.nameTextField.getText());
367  } catch (PatternSyntaxException ex) {
368  NotifyDescriptor notifyDesc = new NotifyDescriptor.Message(
369  NbBundle.getMessage(FilesSetPanel.class, "FilesSetRulePanel.messages.invalidNameRegex", ex.getLocalizedMessage()),
370  NotifyDescriptor.WARNING_MESSAGE);
371  DialogDisplayer.getDefault().notify(notifyDesc);
372  return false;
373  }
374  } else if (this.nameTextField.getText().isEmpty() || !FilesSetRulePanel.containsOnlyLegalChars(this.nameTextField.getText(), FilesSetRulePanel.ILLEGAL_FILE_NAME_CHARS)) {
375  NotifyDescriptor notifyDesc = new NotifyDescriptor.Message(
376  NbBundle.getMessage(FilesSetPanel.class, "FilesSetRulePanel.messages.invalidCharInName"),
377  NotifyDescriptor.WARNING_MESSAGE);
378  DialogDisplayer.getDefault().notify(notifyDesc);
379  return false;
380  }
381  }
382 
383  // The path condition, if specified, must either be a regular expression
384  // that compiles or a string without illegal file path chars.
385  if (this.pathCheck.isSelected()) {
386  if (this.pathTextField.getText().isEmpty()) {
387  NotifyDescriptor notifyDesc = new NotifyDescriptor.Message(
388  Bundle.FilesSetRulePanel_NoPathError(),
389  NotifyDescriptor.WARNING_MESSAGE);
390  DialogDisplayer.getDefault().notify(notifyDesc);
391  return false;
392  }
393  if (this.pathRegexCheckBox.isSelected()) {
394  try {
395  Pattern.compile(this.pathTextField.getText());
396  } catch (PatternSyntaxException ex) {
397  NotifyDescriptor notifyDesc = new NotifyDescriptor.Message(
398  NbBundle.getMessage(FilesSetPanel.class, "FilesSetRulePanel.messages.invalidPathRegex", ex.getLocalizedMessage()),
399  NotifyDescriptor.WARNING_MESSAGE);
400  DialogDisplayer.getDefault().notify(notifyDesc);
401  return false;
402  }
403  } else if (this.pathTextField.getText().isEmpty() || !FilesSetRulePanel.containsOnlyLegalChars(this.pathTextField.getText(), FilesSetRulePanel.ILLEGAL_FILE_PATH_CHARS)) {
404  NotifyDescriptor notifyDesc = new NotifyDescriptor.Message(
405  NbBundle.getMessage(FilesSetPanel.class, "FilesSetRulePanel.messages.invalidCharInPath"),
406  NotifyDescriptor.WARNING_MESSAGE);
407  DialogDisplayer.getDefault().notify(notifyDesc);
408  return false;
409  }
410  }
411  if (this.mimeCheck.isSelected()) {
412  if (this.mimeTypeComboBox.getSelectedIndex() == 0) {
413  NotifyDescriptor notifyDesc = new NotifyDescriptor.Message(
414  Bundle.FilesSetRulePanel_NoMimeTypeError(),
415  NotifyDescriptor.WARNING_MESSAGE);
416  DialogDisplayer.getDefault().notify(notifyDesc);
417  return false;
418  }
419  }
420  if (this.fileSizeCheck.isSelected()) {
421  if ((Integer) this.fileSizeSpinner.getValue() == 0 && !((String) this.equalitySymbolComboBox.getSelectedItem()).equals("=")) {
422  NotifyDescriptor notifyDesc = new NotifyDescriptor.Message(
423  Bundle.FilesSetRulePanel_ZeroFileSizeError(),
424  NotifyDescriptor.WARNING_MESSAGE);
425  DialogDisplayer.getDefault().notify(notifyDesc);
426  return false;
427  }
428  }
429 
430  if (this.dateCheck.isSelected()) {
431  if (this.daysIncludedTextField.getText().isEmpty()) {
432  NotifyDescriptor notifyDesc = new NotifyDescriptor.Message(
433  Bundle.FilesSetRulePanel_DaysIncludedEmptyError(),
434  NotifyDescriptor.WARNING_MESSAGE);
435  DialogDisplayer.getDefault().notify(notifyDesc);
436  return false;
437  }
438  try {
439  int value = Integer.parseInt(daysIncludedTextField.getText());
440  if (value < 0) {
441  throw new NumberFormatException("Negative numbers are not allowed for the within N days condition");
442  }
443  } catch (NumberFormatException e) {
444  //field did not contain an integer
445  NotifyDescriptor notifyDesc = new NotifyDescriptor.Message(
446  Bundle.FilesSetRulePanel_DaysIncludedInvalidError(),
447  NotifyDescriptor.WARNING_MESSAGE);
448  DialogDisplayer.getDefault().notify(notifyDesc);
449  return false;
450  }
451  }
452  return true;
453  }
454 
460  String getRuleName() {
461  return this.ruleNameTextField.getText();
462  }
463 
473  FilesSet.Rule.FileNameCondition getFileNameCondition() throws IllegalStateException {
474  FilesSet.Rule.FileNameCondition condition = null;
475  if (!this.nameTextField.getText().isEmpty()) {
476  if (this.nameRegexCheckbox.isSelected()) {
477  try {
478  Pattern pattern = Pattern.compile(this.nameTextField.getText(), Pattern.CASE_INSENSITIVE);
479  if (this.fullNameRadioButton.isSelected()) {
480  condition = new FilesSet.Rule.FullNameCondition(pattern);
481  } else {
482  condition = new FilesSet.Rule.ExtensionCondition(pattern);
483  }
484  } catch (PatternSyntaxException ex) {
485  logger.log(Level.SEVERE, "Attempt to get regex name condition that does not compile", ex); // NON-NLS
486  throw new IllegalStateException("The files set rule panel name condition is not in a valid state"); // NON-NLS
487  }
488  } else if (FilesSetRulePanel.containsOnlyLegalChars(this.nameTextField.getText(), FilesSetRulePanel.ILLEGAL_FILE_NAME_CHARS)) {
489  if (this.fullNameRadioButton.isSelected()) {
490  condition = new FilesSet.Rule.FullNameCondition(this.nameTextField.getText());
491  } else {
492  List<String> extensions = Arrays.asList(this.nameTextField.getText().split(","));
493  for (int i=0; i < extensions.size(); i++) {
494  // Remove leading and trailing whitespace.
495  extensions.set(i, extensions.get(i).trim());
496  }
497  condition = new FilesSet.Rule.ExtensionCondition(extensions);
498  }
499  } else {
500  logger.log(Level.SEVERE, "Attempt to get name condition with illegal chars"); // NON-NLS
501  throw new IllegalStateException("The files set rule panel name condition is not in a valid state"); // NON-NLS
502  }
503  }
504  return condition;
505  }
506 
512  FilesSet.Rule.MimeTypeCondition getMimeTypeCondition() {
513  FilesSet.Rule.MimeTypeCondition condition = null;
514  if (!this.mimeTypeComboBox.getSelectedItem().equals("")) {
515  condition = new FilesSet.Rule.MimeTypeCondition((String) this.mimeTypeComboBox.getSelectedItem());
516  }
517  return condition;
518  }
519 
525  FilesSet.Rule.FileSizeCondition getFileSizeCondition() {
526  FilesSet.Rule.FileSizeCondition condition = null;
527  if (this.fileSizeCheck.isSelected()) {
528  if ((Integer) this.fileSizeSpinner.getValue() != 0 || ((String) this.equalitySymbolComboBox.getSelectedItem()).equals("=")) {
529  FilesSet.Rule.FileSizeCondition.COMPARATOR comparator = FilesSet.Rule.FileSizeCondition.COMPARATOR.fromSymbol((String) this.equalitySymbolComboBox.getSelectedItem());
530  FilesSet.Rule.FileSizeCondition.SIZE_UNIT unit = FilesSet.Rule.FileSizeCondition.SIZE_UNIT.fromName((String) this.fileSizeComboBox.getSelectedItem());
531  int fileSizeValue = (Integer) this.fileSizeSpinner.getValue();
532  condition = new FilesSet.Rule.FileSizeCondition(comparator, unit, fileSizeValue);
533  }
534  }
535  return condition;
536  }
537 
544  FilesSet.Rule.MetaTypeCondition getMetaTypeCondition() {
545  if (this.filesRadioButton.isSelected()) {
546  return new FilesSet.Rule.MetaTypeCondition(FilesSet.Rule.MetaTypeCondition.Type.FILES);
547  } else if (this.dirsRadioButton.isSelected()) {
548  return new FilesSet.Rule.MetaTypeCondition(FilesSet.Rule.MetaTypeCondition.Type.DIRECTORIES);
549  } else {
550  return new FilesSet.Rule.MetaTypeCondition(FilesSet.Rule.MetaTypeCondition.Type.ALL);
551  }
552  }
553 
563  FilesSet.Rule.ParentPathCondition getPathCondition() throws IllegalStateException {
564  FilesSet.Rule.ParentPathCondition condition = null;
565  if (!this.pathTextField.getText().isEmpty()) {
566  if (this.pathRegexCheckBox.isSelected()) {
567  try {
568  condition = new FilesSet.Rule.ParentPathCondition(Pattern.compile(this.pathTextField.getText(), Pattern.CASE_INSENSITIVE));
569  } catch (PatternSyntaxException ex) {
570  logger.log(Level.SEVERE, "Attempt to get malformed path condition", ex); // NON-NLS
571  throw new IllegalStateException("The files set rule panel path condition is not in a valid state"); // NON-NLS
572  }
573  } else {
574  String path = this.pathTextField.getText();
575  if (FilesSetRulePanel.containsOnlyLegalChars(path, FilesSetRulePanel.ILLEGAL_FILE_PATH_CHARS)) {
576  // Add a leading path separator if omitted.
577  if (!path.startsWith(FilesSetRulePanel.SLEUTHKIT_PATH_SEPARATOR)) {
578  path = FilesSetRulePanel.SLEUTHKIT_PATH_SEPARATOR + path;
579  }
580  // Add a trailing path separator if omitted.
581  if (!path.endsWith(FilesSetRulePanel.SLEUTHKIT_PATH_SEPARATOR)) {
582  path += FilesSetRulePanel.SLEUTHKIT_PATH_SEPARATOR;
583  }
584  condition = new FilesSet.Rule.ParentPathCondition(path);
585  } else {
586  logger.log(Level.SEVERE, "Attempt to get path condition with illegal chars"); // NON-NLS
587  throw new IllegalStateException("The files set rule panel path condition is not in a valid state"); // NON-NLS
588  }
589  }
590  }
591  return condition;
592  }
593 
603  FilesSet.Rule.DateCondition getDateCondition() {
604  FilesSet.Rule.DateCondition dateCondition = null;
605  if (!daysIncludedTextField.getText().isEmpty()) {
606  dateCondition = new FilesSet.Rule.DateCondition(Integer.parseInt(daysIncludedTextField.getText()));
607  }
608  return dateCondition;
609  }
610 
620  private static boolean containsOnlyLegalChars(String toBeChecked, List<String> illegalChars) {
621  for (String illegalChar : illegalChars) {
622  if (toBeChecked.contains(illegalChar)) {
623  return false;
624  }
625  }
626  return true;
627  }
628 
633  private void setComponentsForSearchType() {
634  if (!this.filesRadioButton.isSelected()) {
635  this.fullNameRadioButton.setSelected(true);
636  this.extensionRadioButton.setEnabled(false);
637  this.mimeTypeComboBox.setEnabled(false);
638  this.mimeTypeComboBox.setSelectedIndex(0);
639  this.equalitySymbolComboBox.setEnabled(false);
640  this.fileSizeComboBox.setEnabled(false);
641  this.fileSizeSpinner.setEnabled(false);
642  this.fileSizeSpinner.setValue(0);
643  this.fileSizeCheck.setEnabled(false);
644  this.fileSizeCheck.setSelected(false);
645  this.mimeCheck.setEnabled(false);
646  this.mimeCheck.setSelected(false);
647  } else {
648  if (this.nameCheck.isSelected()) {
649  this.extensionRadioButton.setEnabled(true);
650  }
651  this.fileSizeCheck.setEnabled(true);
652  this.mimeCheck.setEnabled(true);
653  }
654  }
655 
661  @SuppressWarnings("unchecked")
662  // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
663  private void initComponents() {
664 
665  nameButtonGroup = new javax.swing.ButtonGroup();
666  typeButtonGroup = new javax.swing.ButtonGroup();
667  ruleNameLabel = new javax.swing.JLabel();
668  ruleNameTextField = new javax.swing.JTextField();
669  jLabel1 = new javax.swing.JLabel();
670  nameTextField = new javax.swing.JTextField();
671  fullNameRadioButton = new javax.swing.JRadioButton();
672  extensionRadioButton = new javax.swing.JRadioButton();
673  nameRegexCheckbox = new javax.swing.JCheckBox();
674  pathTextField = new javax.swing.JTextField();
675  pathRegexCheckBox = new javax.swing.JCheckBox();
676  pathSeparatorInfoLabel = new javax.swing.JLabel();
677  jLabel5 = new javax.swing.JLabel();
678  mimeTypeComboBox = new javax.swing.JComboBox<String>();
679  equalitySymbolComboBox = new javax.swing.JComboBox<String>();
680  fileSizeComboBox = new javax.swing.JComboBox<String>();
681  fileSizeSpinner = new javax.swing.JSpinner();
682  nameCheck = new javax.swing.JCheckBox();
683  pathCheck = new javax.swing.JCheckBox();
684  mimeCheck = new javax.swing.JCheckBox();
685  fileSizeCheck = new javax.swing.JCheckBox();
686  filesRadioButton = new javax.swing.JRadioButton();
687  dirsRadioButton = new javax.swing.JRadioButton();
688  allRadioButton = new javax.swing.JRadioButton();
689  daysIncludedTextField = new javax.swing.JTextField();
690  daysIncludedLabel = new javax.swing.JLabel();
691  dateCheck = new javax.swing.JCheckBox();
692 
693  org.openide.awt.Mnemonics.setLocalizedText(ruleNameLabel, org.openide.util.NbBundle.getMessage(FilesSetRulePanel.class, "FilesSetRulePanel.ruleNameLabel.text")); // NOI18N
694 
695  ruleNameTextField.setText(org.openide.util.NbBundle.getMessage(FilesSetRulePanel.class, "FilesSetRulePanel.ruleNameTextField.text")); // NOI18N
696 
697  org.openide.awt.Mnemonics.setLocalizedText(jLabel1, org.openide.util.NbBundle.getMessage(FilesSetRulePanel.class, "FilesSetRulePanel.jLabel1.text")); // NOI18N
698 
699  nameTextField.setText(org.openide.util.NbBundle.getMessage(FilesSetRulePanel.class, "FilesSetRulePanel.nameTextField.text")); // NOI18N
700  nameTextField.setEnabled(false);
701 
702  nameButtonGroup.add(fullNameRadioButton);
703  org.openide.awt.Mnemonics.setLocalizedText(fullNameRadioButton, org.openide.util.NbBundle.getMessage(FilesSetRulePanel.class, "FilesSetRulePanel.fullNameRadioButton.text")); // NOI18N
704  fullNameRadioButton.setEnabled(false);
705  fullNameRadioButton.addActionListener(new java.awt.event.ActionListener() {
706  public void actionPerformed(java.awt.event.ActionEvent evt) {
707  fullNameRadioButtonActionPerformed(evt);
708  }
709  });
710 
711  nameButtonGroup.add(extensionRadioButton);
712  org.openide.awt.Mnemonics.setLocalizedText(extensionRadioButton, org.openide.util.NbBundle.getMessage(FilesSetRulePanel.class, "FilesSetRulePanel.extensionRadioButton.text")); // NOI18N
713  extensionRadioButton.setEnabled(false);
714  extensionRadioButton.addActionListener(new java.awt.event.ActionListener() {
715  public void actionPerformed(java.awt.event.ActionEvent evt) {
716  extensionRadioButtonActionPerformed(evt);
717  }
718  });
719 
720  org.openide.awt.Mnemonics.setLocalizedText(nameRegexCheckbox, org.openide.util.NbBundle.getMessage(FilesSetRulePanel.class, "FilesSetRulePanel.nameRegexCheckbox.text")); // NOI18N
721  nameRegexCheckbox.setEnabled(false);
722 
723  pathTextField.setText(org.openide.util.NbBundle.getMessage(FilesSetRulePanel.class, "FilesSetRulePanel.pathTextField.text")); // NOI18N
724  pathTextField.setEnabled(false);
725 
726  org.openide.awt.Mnemonics.setLocalizedText(pathRegexCheckBox, org.openide.util.NbBundle.getMessage(FilesSetRulePanel.class, "FilesSetRulePanel.pathRegexCheckBox.text")); // NOI18N
727  pathRegexCheckBox.setEnabled(false);
728 
729  pathSeparatorInfoLabel.setIcon(new javax.swing.ImageIcon(getClass().getResource("/org/sleuthkit/autopsy/images/info-icon-16.png"))); // NOI18N
730  org.openide.awt.Mnemonics.setLocalizedText(pathSeparatorInfoLabel, org.openide.util.NbBundle.getMessage(FilesSetRulePanel.class, "FilesSetRulePanel.pathSeparatorInfoLabel.text")); // NOI18N
731  pathSeparatorInfoLabel.setEnabled(false);
732 
733  org.openide.awt.Mnemonics.setLocalizedText(jLabel5, org.openide.util.NbBundle.getMessage(FilesSetRulePanel.class, "FilesSetRulePanel.interesting.jLabel5.text")); // NOI18N
734 
735  mimeTypeComboBox.setEditable(true);
736  mimeTypeComboBox.setModel(new javax.swing.DefaultComboBoxModel<String>(new String[] {""}));
737  mimeTypeComboBox.setEnabled(false);
738 
739  equalitySymbolComboBox.setModel(new javax.swing.DefaultComboBoxModel<String>(new String[] { ">", "<" }));
740  equalitySymbolComboBox.setEnabled(false);
741 
742  fileSizeComboBox.setModel(new javax.swing.DefaultComboBoxModel<String>(new String[] { Bundle.FilesSetRulePanel_bytes(), Bundle.FilesSetRulePanel_kiloBytes(), Bundle.FilesSetRulePanel_megaBytes(), Bundle.FilesSetRulePanel_gigaBytes() }));
743  fileSizeComboBox.setEnabled(false);
744 
745  fileSizeSpinner.setModel(new javax.swing.SpinnerNumberModel(0, 0, null, 1));
746  fileSizeSpinner.setEnabled(false);
747 
748  org.openide.awt.Mnemonics.setLocalizedText(nameCheck, org.openide.util.NbBundle.getMessage(FilesSetRulePanel.class, "FilesSetRulePanel.nameCheck.text")); // NOI18N
749  nameCheck.addActionListener(new java.awt.event.ActionListener() {
750  public void actionPerformed(java.awt.event.ActionEvent evt) {
751  nameCheckActionPerformed(evt);
752  }
753  });
754 
755  org.openide.awt.Mnemonics.setLocalizedText(pathCheck, org.openide.util.NbBundle.getMessage(FilesSetRulePanel.class, "FilesSetRulePanel.pathCheck.text")); // NOI18N
756  pathCheck.addActionListener(new java.awt.event.ActionListener() {
757  public void actionPerformed(java.awt.event.ActionEvent evt) {
758  pathCheckActionPerformed(evt);
759  }
760  });
761 
762  org.openide.awt.Mnemonics.setLocalizedText(mimeCheck, org.openide.util.NbBundle.getMessage(FilesSetRulePanel.class, "FilesSetRulePanel.mimeCheck.text")); // NOI18N
763  mimeCheck.addActionListener(new java.awt.event.ActionListener() {
764  public void actionPerformed(java.awt.event.ActionEvent evt) {
765  mimeCheckActionPerformed(evt);
766  }
767  });
768 
769  org.openide.awt.Mnemonics.setLocalizedText(fileSizeCheck, org.openide.util.NbBundle.getMessage(FilesSetRulePanel.class, "FilesSetRulePanel.fileSizeCheck.text")); // NOI18N
770  fileSizeCheck.addActionListener(new java.awt.event.ActionListener() {
771  public void actionPerformed(java.awt.event.ActionEvent evt) {
772  fileSizeCheckActionPerformed(evt);
773  }
774  });
775 
776  typeButtonGroup.add(filesRadioButton);
777  org.openide.awt.Mnemonics.setLocalizedText(filesRadioButton, org.openide.util.NbBundle.getMessage(FilesSetRulePanel.class, "FilesSetRulePanel.filesRadioButton.text")); // NOI18N
778  filesRadioButton.addActionListener(new java.awt.event.ActionListener() {
779  public void actionPerformed(java.awt.event.ActionEvent evt) {
780  filesRadioButtonActionPerformed(evt);
781  }
782  });
783 
784  typeButtonGroup.add(dirsRadioButton);
785  org.openide.awt.Mnemonics.setLocalizedText(dirsRadioButton, org.openide.util.NbBundle.getMessage(FilesSetRulePanel.class, "FilesSetRulePanel.dirsRadioButton.text")); // NOI18N
786  dirsRadioButton.addActionListener(new java.awt.event.ActionListener() {
787  public void actionPerformed(java.awt.event.ActionEvent evt) {
788  dirsRadioButtonActionPerformed(evt);
789  }
790  });
791 
792  typeButtonGroup.add(allRadioButton);
793  org.openide.awt.Mnemonics.setLocalizedText(allRadioButton, org.openide.util.NbBundle.getMessage(FilesSetRulePanel.class, "FilesSetRulePanel.allRadioButton.text")); // NOI18N
794  allRadioButton.addActionListener(new java.awt.event.ActionListener() {
795  public void actionPerformed(java.awt.event.ActionEvent evt) {
796  allRadioButtonActionPerformed(evt);
797  }
798  });
799 
800  daysIncludedTextField.setEnabled(false);
801  daysIncludedTextField.setMinimumSize(new java.awt.Dimension(60, 20));
802  daysIncludedTextField.setPreferredSize(new java.awt.Dimension(60, 20));
803 
804  org.openide.awt.Mnemonics.setLocalizedText(daysIncludedLabel, org.openide.util.NbBundle.getMessage(FilesSetRulePanel.class, "FilesSetRulePanel.daysIncludedLabel.text")); // NOI18N
805 
806  org.openide.awt.Mnemonics.setLocalizedText(dateCheck, org.openide.util.NbBundle.getMessage(FilesSetRulePanel.class, "FilesSetRulePanel.dateCheck.text")); // NOI18N
807  dateCheck.addActionListener(new java.awt.event.ActionListener() {
808  public void actionPerformed(java.awt.event.ActionEvent evt) {
809  dateCheckActionPerformed(evt);
810  }
811  });
812 
813  javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);
814  this.setLayout(layout);
815  layout.setHorizontalGroup(
816  layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
817  .addGroup(layout.createSequentialGroup()
818  .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
819  .addGroup(layout.createSequentialGroup()
820  .addGap(8, 8, 8)
821  .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
822  .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
823  .addComponent(ruleNameLabel)
824  .addGap(5, 5, 5)
825  .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
826  .addComponent(mimeTypeComboBox, 0, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
827  .addComponent(pathTextField)
828  .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
829  .addComponent(equalitySymbolComboBox, 0, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
830  .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
831  .addComponent(fileSizeSpinner)
832  .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
833  .addComponent(fileSizeComboBox, 0, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
834  .addGroup(layout.createSequentialGroup()
835  .addComponent(pathRegexCheckBox)
836  .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
837  .addComponent(pathSeparatorInfoLabel))
838  .addGroup(layout.createSequentialGroup()
839  .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
840  .addComponent(ruleNameTextField)
841  .addGroup(layout.createSequentialGroup()
842  .addComponent(daysIncludedTextField, javax.swing.GroupLayout.PREFERRED_SIZE, 69, javax.swing.GroupLayout.PREFERRED_SIZE)
843  .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
844  .addComponent(daysIncludedLabel)
845  .addGap(0, 0, Short.MAX_VALUE)))
846  .addGap(1, 1, 1))
847  .addGroup(layout.createSequentialGroup()
848  .addComponent(fullNameRadioButton)
849  .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
850  .addComponent(extensionRadioButton)
851  .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
852  .addComponent(nameRegexCheckbox))))
853  .addComponent(jLabel5)
854  .addGroup(layout.createSequentialGroup()
855  .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
856  .addComponent(nameCheck, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.PREFERRED_SIZE, 95, javax.swing.GroupLayout.PREFERRED_SIZE)
857  .addComponent(jLabel1))
858  .addGap(16, 16, 16)
859  .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
860  .addGroup(layout.createSequentialGroup()
861  .addComponent(filesRadioButton)
862  .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
863  .addComponent(dirsRadioButton)
864  .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
865  .addComponent(allRadioButton))
866  .addComponent(nameTextField)))))
867  .addGroup(layout.createSequentialGroup()
868  .addContainerGap()
869  .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
870  .addComponent(pathCheck)
871  .addComponent(mimeCheck)
872  .addComponent(fileSizeCheck)
873  .addComponent(dateCheck))
874  .addGap(0, 0, Short.MAX_VALUE)))
875  .addContainerGap())
876  );
877  layout.setVerticalGroup(
878  layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
879  .addGroup(layout.createSequentialGroup()
880  .addComponent(jLabel5)
881  .addGap(3, 3, 3)
882  .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
883  .addGroup(layout.createSequentialGroup()
884  .addComponent(jLabel1)
885  .addGap(10, 10, 10)
886  .addComponent(nameCheck))
887  .addGroup(layout.createSequentialGroup()
888  .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
889  .addComponent(filesRadioButton)
890  .addComponent(dirsRadioButton)
891  .addComponent(allRadioButton))
892  .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
893  .addComponent(nameTextField, javax.swing.GroupLayout.PREFERRED_SIZE, 20, javax.swing.GroupLayout.PREFERRED_SIZE)))
894  .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
895  .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
896  .addComponent(fullNameRadioButton)
897  .addComponent(extensionRadioButton)
898  .addComponent(nameRegexCheckbox))
899  .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
900  .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
901  .addComponent(pathTextField, javax.swing.GroupLayout.PREFERRED_SIZE, 20, javax.swing.GroupLayout.PREFERRED_SIZE)
902  .addComponent(pathCheck))
903  .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
904  .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
905  .addComponent(pathRegexCheckBox)
906  .addComponent(pathSeparatorInfoLabel))
907  .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
908  .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
909  .addComponent(mimeTypeComboBox, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
910  .addComponent(mimeCheck))
911  .addGap(11, 11, 11)
912  .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
913  .addComponent(equalitySymbolComboBox, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
914  .addComponent(fileSizeComboBox, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
915  .addComponent(fileSizeSpinner, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
916  .addComponent(fileSizeCheck))
917  .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
918  .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
919  .addComponent(daysIncludedTextField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
920  .addComponent(daysIncludedLabel)
921  .addComponent(dateCheck))
922  .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
923  .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
924  .addComponent(ruleNameTextField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
925  .addComponent(ruleNameLabel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
926  .addContainerGap())
927  );
928  }// </editor-fold>//GEN-END:initComponents
929 
930  private void nameCheckActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_nameCheckActionPerformed
931  if (!this.nameCheck.isSelected()) {
932  this.nameTextField.setEnabled(false);
933  this.nameTextField.setText("");
934  this.fullNameRadioButton.setEnabled(false);
935  this.extensionRadioButton.setEnabled(false);
936  this.nameRegexCheckbox.setEnabled(false);
937  } else {
938  this.nameTextField.setEnabled(true);
939  this.fullNameRadioButton.setEnabled(true);
940  if (this.filesRadioButton.isSelected()) {
941  this.extensionRadioButton.setEnabled(true);
942  }
943  this.nameRegexCheckbox.setEnabled(true);
944  }
945  this.setOkButton();
946  }//GEN-LAST:event_nameCheckActionPerformed
947 
948  private void pathCheckActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_pathCheckActionPerformed
949  if (!this.pathCheck.isSelected()) {
950  this.pathTextField.setEnabled(false);
951  this.pathTextField.setText("");
952  this.pathRegexCheckBox.setEnabled(false);
953  this.pathSeparatorInfoLabel.setEnabled(false);
954  } else {
955  this.pathTextField.setEnabled(true);
956  this.pathRegexCheckBox.setEnabled(true);
957  this.pathSeparatorInfoLabel.setEnabled(true);
958  }
959  this.setOkButton();
960  }//GEN-LAST:event_pathCheckActionPerformed
961 
962  private void filesRadioButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_filesRadioButtonActionPerformed
963 
964  this.setComponentsForSearchType();
965  }//GEN-LAST:event_filesRadioButtonActionPerformed
966 
967  private void dirsRadioButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_dirsRadioButtonActionPerformed
968  this.setComponentsForSearchType();
969  }//GEN-LAST:event_dirsRadioButtonActionPerformed
970 
971  private void allRadioButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_allRadioButtonActionPerformed
972  this.setComponentsForSearchType();
973  }//GEN-LAST:event_allRadioButtonActionPerformed
974 
975  private void dateCheckActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_dateCheckActionPerformed
976  if (!this.dateCheck.isSelected()) {
977  this.daysIncludedTextField.setEnabled(false);
978  this.daysIncludedLabel.setEnabled(false);
979  this.daysIncludedTextField.setText("");
980  } else {
981  this.daysIncludedTextField.setEnabled(true);
982  this.daysIncludedLabel.setEnabled(true);
983  }
984  this.setOkButton();
985  }//GEN-LAST:event_dateCheckActionPerformed
986 
987  private void fileSizeCheckActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_fileSizeCheckActionPerformed
988  if (!this.fileSizeCheck.isSelected()) {
989  this.fileSizeComboBox.setEnabled(false);
990  this.fileSizeSpinner.setEnabled(false);
991  this.fileSizeSpinner.setValue(0);
992  this.equalitySymbolComboBox.setEnabled(false);
993  } else {
994  this.fileSizeComboBox.setEnabled(true);
995  this.fileSizeSpinner.setEnabled(true);
996  this.equalitySymbolComboBox.setEnabled(true);
997  }
998  this.setOkButton();
999  }//GEN-LAST:event_fileSizeCheckActionPerformed
1000 
1001  private void mimeCheckActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_mimeCheckActionPerformed
1002  if (!this.mimeCheck.isSelected()) {
1003  this.mimeTypeComboBox.setEnabled(false);
1004  this.mimeTypeComboBox.setSelectedIndex(0);
1005  } else {
1006  this.mimeTypeComboBox.setEnabled(true);
1007  }
1008  this.setOkButton();
1009  }//GEN-LAST:event_mimeCheckActionPerformed
1010 
1011  private void extensionRadioButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_extensionRadioButtonActionPerformed
1012  updateNameTextFieldPrompt();
1013  }//GEN-LAST:event_extensionRadioButtonActionPerformed
1014 
1015  private void fullNameRadioButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_fullNameRadioButtonActionPerformed
1016  updateNameTextFieldPrompt();
1017  }//GEN-LAST:event_fullNameRadioButtonActionPerformed
1018 
1019  // Variables declaration - do not modify//GEN-BEGIN:variables
1020  private javax.swing.JRadioButton allRadioButton;
1021  private javax.swing.JCheckBox dateCheck;
1022  private javax.swing.JLabel daysIncludedLabel;
1023  private javax.swing.JTextField daysIncludedTextField;
1024  private javax.swing.JRadioButton dirsRadioButton;
1025  private javax.swing.JComboBox<String> equalitySymbolComboBox;
1026  private javax.swing.JRadioButton extensionRadioButton;
1027  private javax.swing.JCheckBox fileSizeCheck;
1028  private javax.swing.JComboBox<String> fileSizeComboBox;
1029  private javax.swing.JSpinner fileSizeSpinner;
1030  private javax.swing.JRadioButton filesRadioButton;
1031  private javax.swing.JRadioButton fullNameRadioButton;
1032  private javax.swing.JLabel jLabel1;
1033  private javax.swing.JLabel jLabel5;
1034  private javax.swing.JCheckBox mimeCheck;
1035  private javax.swing.JComboBox<String> mimeTypeComboBox;
1036  private javax.swing.ButtonGroup nameButtonGroup;
1037  private javax.swing.JCheckBox nameCheck;
1038  private javax.swing.JCheckBox nameRegexCheckbox;
1039  private javax.swing.JTextField nameTextField;
1040  private javax.swing.JCheckBox pathCheck;
1041  private javax.swing.JCheckBox pathRegexCheckBox;
1042  private javax.swing.JLabel pathSeparatorInfoLabel;
1043  private javax.swing.JTextField pathTextField;
1044  private javax.swing.JLabel ruleNameLabel;
1045  private javax.swing.JTextField ruleNameTextField;
1046  private javax.swing.ButtonGroup typeButtonGroup;
1047  // End of variables declaration//GEN-END:variables
1048 }

Copyright © 2012-2021 Basis Technology. Generated on: Thu Jul 8 2021
This work is licensed under a Creative Commons Attribution-Share Alike 3.0 United States License.