Autopsy  4.10.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  })
62 
63  private static final long serialVersionUID = 1L;
64  private static final Logger logger = Logger.getLogger(FilesSetRulePanel.class.getName());
65  private static final String SLEUTHKIT_PATH_SEPARATOR = "/"; // NON-NLS
66  private static final List<String> ILLEGAL_FILE_NAME_CHARS = FilesSetsManager.getIllegalFileNameChars();
67  private static final List<String> ILLEGAL_FILE_PATH_CHARS = FilesSetsManager.getIllegalFilePathChars();
68  private JButton okButton;
69  private JButton cancelButton;
70  private TextPrompt nameTextFieldPrompt;
71 
75  FilesSetRulePanel(JButton okButton, JButton cancelButton, PANEL_TYPE panelType) {
76  initComponents();
77  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
78  mimeTypeComboBox.setVisible(false);
79  mimeCheck.setVisible(false);
80  fileSizeComboBox.setVisible(false);
81  fileSizeCheck.setVisible(false);
82  equalitySymbolComboBox.setVisible(false);
83  fileSizeSpinner.setVisible(false);
84  jLabel1.setVisible(false);
85  filesRadioButton.setVisible(false);
86  dirsRadioButton.setVisible(false);
87  allRadioButton.setVisible(false);
88  org.openide.awt.Mnemonics.setLocalizedText(jLabel5, org.openide.util.NbBundle.getMessage(FilesSetRulePanel.class, "FilesSetRulePanel.ingest.jLabel5.text")); // NOI18N
89 
90  } else {
91  populateMimeTypesComboBox();
92  }
93  this.dateCheckActionPerformed(null);
94  populateComponentsWithDefaultValues();
95  this.setButtons(okButton, cancelButton);
96 
97  updateNameTextFieldPrompt();
98  }
99 
105  FilesSetRulePanel(FilesSet.Rule rule, JButton okButton, JButton cancelButton, PANEL_TYPE panelType) {
106  initComponents();
107  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
108  mimeTypeComboBox.setVisible(false);
109  mimeCheck.setVisible(false);
110  fileSizeComboBox.setVisible(false);
111  fileSizeCheck.setVisible(false);
112  equalitySymbolComboBox.setVisible(false);
113  fileSizeSpinner.setVisible(false);
114  jLabel1.setVisible(false);
115  filesRadioButton.setVisible(false);
116  dirsRadioButton.setVisible(false);
117  allRadioButton.setVisible(false);
118  } else {
119  populateMimeTypesComboBox();
120  populateMimeConditionComponents(rule);
121  populateSizeConditionComponents(rule);
122 
123  }
124  populateMimeTypesComboBox();
125  populateRuleNameComponent(rule);
126  populateTypeConditionComponents(rule);
127  populateNameConditionComponents(rule);
128  populatePathConditionComponents(rule);
129  populateDateConditionComponents(rule);
130  this.setButtons(okButton, cancelButton);
131 
132  updateNameTextFieldPrompt();
133  }
134 
139  private void updateNameTextFieldPrompt() {
143  String text;
144  if (fullNameRadioButton.isSelected()) {
145  text = Bundle.FilesSetRulePanel_nameTextField_fullNameExample();
146  } else {
147  text = Bundle.FilesSetRulePanel_nameTextField_extensionExample();
148  }
149  nameTextFieldPrompt = new TextPrompt(text, nameTextField);
150 
154  nameTextFieldPrompt.setForeground(Color.LIGHT_GRAY);
155  nameTextFieldPrompt.changeAlpha(0.9f); // Mostly opaque
156 
157  validate();
158  repaint();
159  }
160 
164  private void populateComponentsWithDefaultValues() {
165  this.filesRadioButton.setSelected(true);
166  this.fullNameRadioButton.setSelected(true);
167  this.equalitySymbolComboBox.setSelectedItem(FilesSet.Rule.FileSizeCondition.COMPARATOR.GREATER_THAN_EQUAL.getSymbol());
168  this.fileSizeComboBox.setSelectedItem(FilesSet.Rule.FileSizeCondition.SIZE_UNIT.KILOBYTE.getName());
169  this.mimeTypeComboBox.setSelectedIndex(0);
170  }
171 
172  private void populateMimeTypesComboBox() {
173  try {
174  SortedSet<String> detectableMimeTypes = FileTypeDetector.getDetectedTypes();
175  detectableMimeTypes.forEach((type) -> {
176  mimeTypeComboBox.addItem(type);
177  });
178  } catch (FileTypeDetector.FileTypeDetectorInitException ex) {
179  logger.log(Level.SEVERE, "Unable to get detectable file types", ex);
180  }
181  this.setOkButton();
182  }
183 
189  private void populateRuleNameComponent(FilesSet.Rule rule) {
190  this.ruleNameTextField.setText(rule.getName());
191  }
192 
193  private void populateMimeConditionComponents(FilesSet.Rule rule) {
194  FilesSet.Rule.MimeTypeCondition mimeTypeCondition = rule.getMimeTypeCondition();
195  if (mimeTypeCondition != null) {
196  this.mimeCheck.setSelected(true);
197  this.mimeCheckActionPerformed(null);
198  this.mimeTypeComboBox.setSelectedItem(mimeTypeCondition.getMimeType());
199  }
200  }
201 
202  private void populateSizeConditionComponents(FilesSet.Rule rule) {
203  FilesSet.Rule.FileSizeCondition fileSizeCondition = rule.getFileSizeCondition();
204  if (fileSizeCondition != null) {
205  this.fileSizeCheck.setSelected(true);
206  this.fileSizeCheckActionPerformed(null);
207  this.fileSizeSpinner.setValue(fileSizeCondition.getSizeValue());
208  this.fileSizeComboBox.setSelectedItem(fileSizeCondition.getUnit().getName());
209  this.equalitySymbolComboBox.setSelectedItem(fileSizeCondition.getComparator().getSymbol());
210  }
211  }
212 
217  private void setOkButton() {
218  if (this.okButton != null) {
219  this.okButton.setEnabled(this.fileSizeCheck.isSelected() || this.mimeCheck.isSelected()
220  || this.nameCheck.isSelected() || this.pathCheck.isSelected() || this.dateCheck.isSelected());
221  }
222  }
223 
231  private JOptionPane getOptionPane(JComponent parent) {
232  JOptionPane pane;
233  if (!(parent instanceof JOptionPane)) {
234  pane = getOptionPane((JComponent) parent.getParent());
235  } else {
236  pane = (JOptionPane) parent;
237  }
238  return pane;
239  }
240 
247  private void setButtons(JButton ok, JButton cancel) {
248  this.okButton = ok;
249  this.cancelButton = cancel;
250  okButton.addActionListener((ActionEvent e) -> {
251  JOptionPane pane = getOptionPane(okButton);
252  pane.setValue(okButton);
253  });
254  cancelButton.addActionListener((ActionEvent e) -> {
255  JOptionPane pane = getOptionPane(cancelButton);
256  pane.setValue(cancelButton);
257  });
258  this.setOkButton();
259  }
260 
267  private void populateTypeConditionComponents(FilesSet.Rule rule) {
268  FilesSet.Rule.MetaTypeCondition typeCondition = rule.getMetaTypeCondition();
269  switch (typeCondition.getMetaType()) {
270  case FILES:
271  this.filesRadioButton.setSelected(true);
272  break;
273  case DIRECTORIES:
274  this.dirsRadioButton.setSelected(true);
275  break;
276  case ALL:
277  this.allRadioButton.setSelected(true);
278  break;
279  }
280  }
281 
287  private void populateNameConditionComponents(FilesSet.Rule rule) {
288  FilesSet.Rule.FileNameCondition nameCondition = rule.getFileNameCondition();
289  if (nameCondition != null) {
290  this.nameCheck.setSelected(true);
291  this.nameCheckActionPerformed(null);
292  this.nameTextField.setText(nameCondition.getTextToMatch());
293  this.nameRegexCheckbox.setSelected(nameCondition.isRegex());
294  if (nameCondition instanceof FilesSet.Rule.FullNameCondition) {
295  this.fullNameRadioButton.setSelected(true);
296  } else {
297  this.extensionRadioButton.setSelected(true);
298  }
299  }
300  }
301 
308  private void populatePathConditionComponents(FilesSet.Rule rule) {
309  FilesSet.Rule.ParentPathCondition pathCondition = rule.getPathCondition();
310  if (pathCondition != null) {
311  this.pathCheck.setSelected(true);
312  this.pathCheckActionPerformed(null);
313  this.pathTextField.setText(pathCondition.getTextToMatch());
314  this.pathRegexCheckBox.setSelected(pathCondition.isRegex());
315  }
316  }
317 
324  private void populateDateConditionComponents(FilesSet.Rule rule) {
325  FilesSet.Rule.DateCondition dateCondition = rule.getDateCondition();
326  if (dateCondition != null) {
327  this.dateCheck.setSelected(true);
328  this.dateCheckActionPerformed(null);
329  this.daysIncludedTextField.setText(Integer.toString(dateCondition.getDaysIncluded()));
330  }
331  }
332 
340  boolean isValidRuleDefinition() {
341 
342  if (!(this.mimeCheck.isSelected() || this.fileSizeCheck.isSelected() || this.pathCheck.isSelected() || this.nameCheck.isSelected() || this.dateCheck.isSelected())) {
343  NotifyDescriptor notifyDesc = new NotifyDescriptor.Message(
344  Bundle.FilesSetRulePanel_NoConditionError(),
345  NotifyDescriptor.WARNING_MESSAGE);
346  DialogDisplayer.getDefault().notify(notifyDesc);
347  return false;
348  }
349 
350  if (this.nameCheck.isSelected()) {
351  // The name condition must either be a regular expression that compiles or
352  // a string without illegal file name chars.
353  if (this.nameTextField.getText().isEmpty()) {
354  NotifyDescriptor notifyDesc = new NotifyDescriptor.Message(
355  Bundle.FilesSetRulePanel_NoNameError(),
356  NotifyDescriptor.WARNING_MESSAGE);
357  DialogDisplayer.getDefault().notify(notifyDesc);
358  return false;
359  }
360  if (this.nameRegexCheckbox.isSelected()) {
361  try {
362  Pattern.compile(this.nameTextField.getText());
363  } catch (PatternSyntaxException ex) {
364  NotifyDescriptor notifyDesc = new NotifyDescriptor.Message(
365  NbBundle.getMessage(FilesSetPanel.class, "FilesSetRulePanel.messages.invalidNameRegex", ex.getLocalizedMessage()),
366  NotifyDescriptor.WARNING_MESSAGE);
367  DialogDisplayer.getDefault().notify(notifyDesc);
368  return false;
369  }
370  } else if (this.nameTextField.getText().isEmpty() || !FilesSetRulePanel.containsOnlyLegalChars(this.nameTextField.getText(), FilesSetRulePanel.ILLEGAL_FILE_NAME_CHARS)) {
371  NotifyDescriptor notifyDesc = new NotifyDescriptor.Message(
372  NbBundle.getMessage(FilesSetPanel.class, "FilesSetRulePanel.messages.invalidCharInName"),
373  NotifyDescriptor.WARNING_MESSAGE);
374  DialogDisplayer.getDefault().notify(notifyDesc);
375  return false;
376  }
377  }
378 
379  // The path condition, if specified, must either be a regular expression
380  // that compiles or a string without illegal file path chars.
381  if (this.pathCheck.isSelected()) {
382  if (this.pathTextField.getText().isEmpty()) {
383  NotifyDescriptor notifyDesc = new NotifyDescriptor.Message(
384  Bundle.FilesSetRulePanel_NoPathError(),
385  NotifyDescriptor.WARNING_MESSAGE);
386  DialogDisplayer.getDefault().notify(notifyDesc);
387  return false;
388  }
389  if (this.pathRegexCheckBox.isSelected()) {
390  try {
391  Pattern.compile(this.pathTextField.getText());
392  } catch (PatternSyntaxException ex) {
393  NotifyDescriptor notifyDesc = new NotifyDescriptor.Message(
394  NbBundle.getMessage(FilesSetPanel.class, "FilesSetRulePanel.messages.invalidPathRegex", ex.getLocalizedMessage()),
395  NotifyDescriptor.WARNING_MESSAGE);
396  DialogDisplayer.getDefault().notify(notifyDesc);
397  return false;
398  }
399  } else if (this.pathTextField.getText().isEmpty() || !FilesSetRulePanel.containsOnlyLegalChars(this.pathTextField.getText(), FilesSetRulePanel.ILLEGAL_FILE_PATH_CHARS)) {
400  NotifyDescriptor notifyDesc = new NotifyDescriptor.Message(
401  NbBundle.getMessage(FilesSetPanel.class, "FilesSetRulePanel.messages.invalidCharInPath"),
402  NotifyDescriptor.WARNING_MESSAGE);
403  DialogDisplayer.getDefault().notify(notifyDesc);
404  return false;
405  }
406  }
407  if (this.mimeCheck.isSelected()) {
408  if (this.mimeTypeComboBox.getSelectedIndex() == 0) {
409  NotifyDescriptor notifyDesc = new NotifyDescriptor.Message(
410  Bundle.FilesSetRulePanel_NoMimeTypeError(),
411  NotifyDescriptor.WARNING_MESSAGE);
412  DialogDisplayer.getDefault().notify(notifyDesc);
413  return false;
414  }
415  }
416  if (this.fileSizeCheck.isSelected()) {
417  if ((Integer) this.fileSizeSpinner.getValue() == 0 && !((String) this.equalitySymbolComboBox.getSelectedItem()).equals("=")) {
418  NotifyDescriptor notifyDesc = new NotifyDescriptor.Message(
419  Bundle.FilesSetRulePanel_ZeroFileSizeError(),
420  NotifyDescriptor.WARNING_MESSAGE);
421  DialogDisplayer.getDefault().notify(notifyDesc);
422  return false;
423  }
424  }
425 
426  if (this.dateCheck.isSelected()) {
427  if (this.daysIncludedTextField.getText().isEmpty()) {
428  NotifyDescriptor notifyDesc = new NotifyDescriptor.Message(
429  Bundle.FilesSetRulePanel_DaysIncludedEmptyError(),
430  NotifyDescriptor.WARNING_MESSAGE);
431  DialogDisplayer.getDefault().notify(notifyDesc);
432  return false;
433  }
434  try {
435  int value = Integer.parseInt(daysIncludedTextField.getText());
436  if (value < 0) {
437  throw new NumberFormatException("Negative numbers are not allowed for the within N days condition");
438  }
439  } catch (NumberFormatException e) {
440  //field did not contain an integer
441  NotifyDescriptor notifyDesc = new NotifyDescriptor.Message(
442  Bundle.FilesSetRulePanel_DaysIncludedInvalidError(),
443  NotifyDescriptor.WARNING_MESSAGE);
444  DialogDisplayer.getDefault().notify(notifyDesc);
445  return false;
446  }
447  }
448  return true;
449  }
450 
456  String getRuleName() {
457  return this.ruleNameTextField.getText();
458  }
459 
469  FilesSet.Rule.FileNameCondition getFileNameCondition() throws IllegalStateException {
470  FilesSet.Rule.FileNameCondition condition = null;
471  if (!this.nameTextField.getText().isEmpty()) {
472  if (this.nameRegexCheckbox.isSelected()) {
473  try {
474  Pattern pattern = Pattern.compile(this.nameTextField.getText(), Pattern.CASE_INSENSITIVE);
475  if (this.fullNameRadioButton.isSelected()) {
476  condition = new FilesSet.Rule.FullNameCondition(pattern);
477  } else {
478  condition = new FilesSet.Rule.ExtensionCondition(pattern);
479  }
480  } catch (PatternSyntaxException ex) {
481  logger.log(Level.SEVERE, "Attempt to get regex name condition that does not compile", ex); // NON-NLS
482  throw new IllegalStateException("The files set rule panel name condition is not in a valid state"); // NON-NLS
483  }
484  } else if (FilesSetRulePanel.containsOnlyLegalChars(this.nameTextField.getText(), FilesSetRulePanel.ILLEGAL_FILE_NAME_CHARS)) {
485  if (this.fullNameRadioButton.isSelected()) {
486  condition = new FilesSet.Rule.FullNameCondition(this.nameTextField.getText());
487  } else {
488  List<String> extensions = Arrays.asList(this.nameTextField.getText().split(","));
489  for (int i=0; i < extensions.size(); i++) {
490  // Remove leading and trailing whitespace.
491  extensions.set(i, extensions.get(i).trim());
492  }
493  condition = new FilesSet.Rule.ExtensionCondition(extensions);
494  }
495  } else {
496  logger.log(Level.SEVERE, "Attempt to get name condition with illegal chars"); // NON-NLS
497  throw new IllegalStateException("The files set rule panel name condition is not in a valid state"); // NON-NLS
498  }
499  }
500  return condition;
501  }
502 
508  FilesSet.Rule.MimeTypeCondition getMimeTypeCondition() {
509  FilesSet.Rule.MimeTypeCondition condition = null;
510  if (!this.mimeTypeComboBox.getSelectedItem().equals("")) {
511  condition = new FilesSet.Rule.MimeTypeCondition((String) this.mimeTypeComboBox.getSelectedItem());
512  }
513  return condition;
514  }
515 
521  FilesSet.Rule.FileSizeCondition getFileSizeCondition() {
522  FilesSet.Rule.FileSizeCondition condition = null;
523  if (this.fileSizeCheck.isSelected()) {
524  if ((Integer) this.fileSizeSpinner.getValue() != 0 || ((String) this.equalitySymbolComboBox.getSelectedItem()).equals("=")) {
525  FilesSet.Rule.FileSizeCondition.COMPARATOR comparator = FilesSet.Rule.FileSizeCondition.COMPARATOR.fromSymbol((String) this.equalitySymbolComboBox.getSelectedItem());
526  FilesSet.Rule.FileSizeCondition.SIZE_UNIT unit = FilesSet.Rule.FileSizeCondition.SIZE_UNIT.fromName((String) this.fileSizeComboBox.getSelectedItem());
527  int fileSizeValue = (Integer) this.fileSizeSpinner.getValue();
528  condition = new FilesSet.Rule.FileSizeCondition(comparator, unit, fileSizeValue);
529  }
530  }
531  return condition;
532  }
533 
540  FilesSet.Rule.MetaTypeCondition getMetaTypeCondition() {
541  if (this.filesRadioButton.isSelected()) {
542  return new FilesSet.Rule.MetaTypeCondition(FilesSet.Rule.MetaTypeCondition.Type.FILES);
543  } else if (this.dirsRadioButton.isSelected()) {
544  return new FilesSet.Rule.MetaTypeCondition(FilesSet.Rule.MetaTypeCondition.Type.DIRECTORIES);
545  } else {
546  return new FilesSet.Rule.MetaTypeCondition(FilesSet.Rule.MetaTypeCondition.Type.ALL);
547  }
548  }
549 
559  FilesSet.Rule.ParentPathCondition getPathCondition() throws IllegalStateException {
560  FilesSet.Rule.ParentPathCondition condition = null;
561  if (!this.pathTextField.getText().isEmpty()) {
562  if (this.pathRegexCheckBox.isSelected()) {
563  try {
564  condition = new FilesSet.Rule.ParentPathCondition(Pattern.compile(this.pathTextField.getText(), Pattern.CASE_INSENSITIVE));
565  } catch (PatternSyntaxException ex) {
566  logger.log(Level.SEVERE, "Attempt to get malformed path condition", ex); // NON-NLS
567  throw new IllegalStateException("The files set rule panel path condition is not in a valid state"); // NON-NLS
568  }
569  } else {
570  String path = this.pathTextField.getText();
571  if (FilesSetRulePanel.containsOnlyLegalChars(path, FilesSetRulePanel.ILLEGAL_FILE_PATH_CHARS)) {
572  // Add a leading path separator if omitted.
573  if (!path.startsWith(FilesSetRulePanel.SLEUTHKIT_PATH_SEPARATOR)) {
574  path = FilesSetRulePanel.SLEUTHKIT_PATH_SEPARATOR + path;
575  }
576  // Add a trailing path separator if omitted.
577  if (!path.endsWith(FilesSetRulePanel.SLEUTHKIT_PATH_SEPARATOR)) {
578  path += FilesSetRulePanel.SLEUTHKIT_PATH_SEPARATOR;
579  }
580  condition = new FilesSet.Rule.ParentPathCondition(path);
581  } else {
582  logger.log(Level.SEVERE, "Attempt to get path condition with illegal chars"); // NON-NLS
583  throw new IllegalStateException("The files set rule panel path condition is not in a valid state"); // NON-NLS
584  }
585  }
586  }
587  return condition;
588  }
589 
599  FilesSet.Rule.DateCondition getDateCondition() {
600  FilesSet.Rule.DateCondition dateCondition = null;
601  if (!daysIncludedTextField.getText().isEmpty()) {
602  dateCondition = new FilesSet.Rule.DateCondition(Integer.parseInt(daysIncludedTextField.getText()));
603  }
604  return dateCondition;
605  }
606 
616  private static boolean containsOnlyLegalChars(String toBeChecked, List<String> illegalChars) {
617  for (String illegalChar : illegalChars) {
618  if (toBeChecked.contains(illegalChar)) {
619  return false;
620  }
621  }
622  return true;
623  }
624 
629  private void setComponentsForSearchType() {
630  if (!this.filesRadioButton.isSelected()) {
631  this.fullNameRadioButton.setSelected(true);
632  this.extensionRadioButton.setEnabled(false);
633  this.mimeTypeComboBox.setEnabled(false);
634  this.mimeTypeComboBox.setSelectedIndex(0);
635  this.equalitySymbolComboBox.setEnabled(false);
636  this.fileSizeComboBox.setEnabled(false);
637  this.fileSizeSpinner.setEnabled(false);
638  this.fileSizeSpinner.setValue(0);
639  this.fileSizeCheck.setEnabled(false);
640  this.fileSizeCheck.setSelected(false);
641  this.mimeCheck.setEnabled(false);
642  this.mimeCheck.setSelected(false);
643  } else {
644  if (this.nameCheck.isSelected()) {
645  this.extensionRadioButton.setEnabled(true);
646  }
647  this.fileSizeCheck.setEnabled(true);
648  this.mimeCheck.setEnabled(true);
649  }
650  }
651 
657  @SuppressWarnings("unchecked")
658  // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
659  private void initComponents() {
660 
661  nameButtonGroup = new javax.swing.ButtonGroup();
662  typeButtonGroup = new javax.swing.ButtonGroup();
663  ruleNameLabel = new javax.swing.JLabel();
664  ruleNameTextField = new javax.swing.JTextField();
665  jLabel1 = new javax.swing.JLabel();
666  nameTextField = new javax.swing.JTextField();
667  fullNameRadioButton = new javax.swing.JRadioButton();
668  extensionRadioButton = new javax.swing.JRadioButton();
669  nameRegexCheckbox = new javax.swing.JCheckBox();
670  pathTextField = new javax.swing.JTextField();
671  pathRegexCheckBox = new javax.swing.JCheckBox();
672  pathSeparatorInfoLabel = new javax.swing.JLabel();
673  jLabel5 = new javax.swing.JLabel();
674  mimeTypeComboBox = new javax.swing.JComboBox<String>();
675  equalitySymbolComboBox = new javax.swing.JComboBox<String>();
676  fileSizeComboBox = new javax.swing.JComboBox<String>();
677  fileSizeSpinner = new javax.swing.JSpinner();
678  nameCheck = new javax.swing.JCheckBox();
679  pathCheck = new javax.swing.JCheckBox();
680  mimeCheck = new javax.swing.JCheckBox();
681  fileSizeCheck = new javax.swing.JCheckBox();
682  filesRadioButton = new javax.swing.JRadioButton();
683  dirsRadioButton = new javax.swing.JRadioButton();
684  allRadioButton = new javax.swing.JRadioButton();
685  daysIncludedTextField = new javax.swing.JTextField();
686  daysIncludedLabel = new javax.swing.JLabel();
687  dateCheck = new javax.swing.JCheckBox();
688 
689  org.openide.awt.Mnemonics.setLocalizedText(ruleNameLabel, org.openide.util.NbBundle.getMessage(FilesSetRulePanel.class, "FilesSetRulePanel.ruleNameLabel.text")); // NOI18N
690 
691  ruleNameTextField.setText(org.openide.util.NbBundle.getMessage(FilesSetRulePanel.class, "FilesSetRulePanel.ruleNameTextField.text")); // NOI18N
692 
693  org.openide.awt.Mnemonics.setLocalizedText(jLabel1, org.openide.util.NbBundle.getMessage(FilesSetRulePanel.class, "FilesSetRulePanel.jLabel1.text")); // NOI18N
694 
695  nameTextField.setText(org.openide.util.NbBundle.getMessage(FilesSetRulePanel.class, "FilesSetRulePanel.nameTextField.text")); // NOI18N
696  nameTextField.setEnabled(false);
697 
698  nameButtonGroup.add(fullNameRadioButton);
699  org.openide.awt.Mnemonics.setLocalizedText(fullNameRadioButton, org.openide.util.NbBundle.getMessage(FilesSetRulePanel.class, "FilesSetRulePanel.fullNameRadioButton.text")); // NOI18N
700  fullNameRadioButton.setEnabled(false);
701  fullNameRadioButton.addActionListener(new java.awt.event.ActionListener() {
702  public void actionPerformed(java.awt.event.ActionEvent evt) {
703  fullNameRadioButtonActionPerformed(evt);
704  }
705  });
706 
707  nameButtonGroup.add(extensionRadioButton);
708  org.openide.awt.Mnemonics.setLocalizedText(extensionRadioButton, org.openide.util.NbBundle.getMessage(FilesSetRulePanel.class, "FilesSetRulePanel.extensionRadioButton.text")); // NOI18N
709  extensionRadioButton.setEnabled(false);
710  extensionRadioButton.addActionListener(new java.awt.event.ActionListener() {
711  public void actionPerformed(java.awt.event.ActionEvent evt) {
712  extensionRadioButtonActionPerformed(evt);
713  }
714  });
715 
716  org.openide.awt.Mnemonics.setLocalizedText(nameRegexCheckbox, org.openide.util.NbBundle.getMessage(FilesSetRulePanel.class, "FilesSetRulePanel.nameRegexCheckbox.text")); // NOI18N
717  nameRegexCheckbox.setEnabled(false);
718 
719  pathTextField.setText(org.openide.util.NbBundle.getMessage(FilesSetRulePanel.class, "FilesSetRulePanel.pathTextField.text")); // NOI18N
720  pathTextField.setEnabled(false);
721 
722  org.openide.awt.Mnemonics.setLocalizedText(pathRegexCheckBox, org.openide.util.NbBundle.getMessage(FilesSetRulePanel.class, "FilesSetRulePanel.pathRegexCheckBox.text")); // NOI18N
723  pathRegexCheckBox.setEnabled(false);
724 
725  pathSeparatorInfoLabel.setIcon(new javax.swing.ImageIcon(getClass().getResource("/org/sleuthkit/autopsy/images/info-icon-16.png"))); // NOI18N
726  org.openide.awt.Mnemonics.setLocalizedText(pathSeparatorInfoLabel, org.openide.util.NbBundle.getMessage(FilesSetRulePanel.class, "FilesSetRulePanel.pathSeparatorInfoLabel.text")); // NOI18N
727  pathSeparatorInfoLabel.setEnabled(false);
728 
729  org.openide.awt.Mnemonics.setLocalizedText(jLabel5, org.openide.util.NbBundle.getMessage(FilesSetRulePanel.class, "FilesSetRulePanel.interesting.jLabel5.text")); // NOI18N
730 
731  mimeTypeComboBox.setEditable(true);
732  mimeTypeComboBox.setModel(new javax.swing.DefaultComboBoxModel<String>(new String[] {""}));
733  mimeTypeComboBox.setEnabled(false);
734 
735  equalitySymbolComboBox.setModel(new javax.swing.DefaultComboBoxModel<String>(new String[] { "=", ">", "≥", "<", "≤" }));
736  equalitySymbolComboBox.setEnabled(false);
737 
738  fileSizeComboBox.setModel(new javax.swing.DefaultComboBoxModel<String>(new String[] { Bundle.FilesSetRulePanel_bytes(), Bundle.FilesSetRulePanel_kiloBytes(), Bundle.FilesSetRulePanel_megaBytes(), Bundle.FilesSetRulePanel_gigaBytes() }));
739  fileSizeComboBox.setEnabled(false);
740 
741  fileSizeSpinner.setModel(new javax.swing.SpinnerNumberModel(0, 0, null, 1));
742  fileSizeSpinner.setEnabled(false);
743 
744  org.openide.awt.Mnemonics.setLocalizedText(nameCheck, org.openide.util.NbBundle.getMessage(FilesSetRulePanel.class, "FilesSetRulePanel.nameCheck.text")); // NOI18N
745  nameCheck.addActionListener(new java.awt.event.ActionListener() {
746  public void actionPerformed(java.awt.event.ActionEvent evt) {
747  nameCheckActionPerformed(evt);
748  }
749  });
750 
751  org.openide.awt.Mnemonics.setLocalizedText(pathCheck, org.openide.util.NbBundle.getMessage(FilesSetRulePanel.class, "FilesSetRulePanel.pathCheck.text")); // NOI18N
752  pathCheck.addActionListener(new java.awt.event.ActionListener() {
753  public void actionPerformed(java.awt.event.ActionEvent evt) {
754  pathCheckActionPerformed(evt);
755  }
756  });
757 
758  org.openide.awt.Mnemonics.setLocalizedText(mimeCheck, org.openide.util.NbBundle.getMessage(FilesSetRulePanel.class, "FilesSetRulePanel.mimeCheck.text")); // NOI18N
759  mimeCheck.addActionListener(new java.awt.event.ActionListener() {
760  public void actionPerformed(java.awt.event.ActionEvent evt) {
761  mimeCheckActionPerformed(evt);
762  }
763  });
764 
765  org.openide.awt.Mnemonics.setLocalizedText(fileSizeCheck, org.openide.util.NbBundle.getMessage(FilesSetRulePanel.class, "FilesSetRulePanel.fileSizeCheck.text")); // NOI18N
766  fileSizeCheck.addActionListener(new java.awt.event.ActionListener() {
767  public void actionPerformed(java.awt.event.ActionEvent evt) {
768  fileSizeCheckActionPerformed(evt);
769  }
770  });
771 
772  typeButtonGroup.add(filesRadioButton);
773  org.openide.awt.Mnemonics.setLocalizedText(filesRadioButton, org.openide.util.NbBundle.getMessage(FilesSetRulePanel.class, "FilesSetRulePanel.filesRadioButton.text")); // NOI18N
774  filesRadioButton.addActionListener(new java.awt.event.ActionListener() {
775  public void actionPerformed(java.awt.event.ActionEvent evt) {
776  filesRadioButtonActionPerformed(evt);
777  }
778  });
779 
780  typeButtonGroup.add(dirsRadioButton);
781  org.openide.awt.Mnemonics.setLocalizedText(dirsRadioButton, org.openide.util.NbBundle.getMessage(FilesSetRulePanel.class, "FilesSetRulePanel.dirsRadioButton.text")); // NOI18N
782  dirsRadioButton.addActionListener(new java.awt.event.ActionListener() {
783  public void actionPerformed(java.awt.event.ActionEvent evt) {
784  dirsRadioButtonActionPerformed(evt);
785  }
786  });
787 
788  typeButtonGroup.add(allRadioButton);
789  org.openide.awt.Mnemonics.setLocalizedText(allRadioButton, org.openide.util.NbBundle.getMessage(FilesSetRulePanel.class, "FilesSetRulePanel.allRadioButton.text")); // NOI18N
790  allRadioButton.addActionListener(new java.awt.event.ActionListener() {
791  public void actionPerformed(java.awt.event.ActionEvent evt) {
792  allRadioButtonActionPerformed(evt);
793  }
794  });
795 
796  daysIncludedTextField.setEnabled(false);
797  daysIncludedTextField.setMinimumSize(new java.awt.Dimension(60, 20));
798  daysIncludedTextField.setPreferredSize(new java.awt.Dimension(60, 20));
799 
800  org.openide.awt.Mnemonics.setLocalizedText(daysIncludedLabel, org.openide.util.NbBundle.getMessage(FilesSetRulePanel.class, "FilesSetRulePanel.daysIncludedLabel.text")); // NOI18N
801 
802  org.openide.awt.Mnemonics.setLocalizedText(dateCheck, org.openide.util.NbBundle.getMessage(FilesSetRulePanel.class, "FilesSetRulePanel.dateCheck.text")); // NOI18N
803  dateCheck.addActionListener(new java.awt.event.ActionListener() {
804  public void actionPerformed(java.awt.event.ActionEvent evt) {
805  dateCheckActionPerformed(evt);
806  }
807  });
808 
809  javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);
810  this.setLayout(layout);
811  layout.setHorizontalGroup(
812  layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
813  .addGroup(layout.createSequentialGroup()
814  .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
815  .addGroup(layout.createSequentialGroup()
816  .addGap(8, 8, 8)
817  .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
818  .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
819  .addComponent(ruleNameLabel)
820  .addGap(5, 5, 5)
821  .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
822  .addComponent(mimeTypeComboBox, 0, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
823  .addComponent(pathTextField)
824  .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
825  .addComponent(equalitySymbolComboBox, 0, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
826  .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
827  .addComponent(fileSizeSpinner)
828  .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
829  .addComponent(fileSizeComboBox, 0, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
830  .addGroup(layout.createSequentialGroup()
831  .addComponent(pathRegexCheckBox)
832  .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
833  .addComponent(pathSeparatorInfoLabel))
834  .addGroup(layout.createSequentialGroup()
835  .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
836  .addComponent(ruleNameTextField)
837  .addGroup(layout.createSequentialGroup()
838  .addComponent(daysIncludedTextField, javax.swing.GroupLayout.PREFERRED_SIZE, 69, javax.swing.GroupLayout.PREFERRED_SIZE)
839  .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
840  .addComponent(daysIncludedLabel)
841  .addGap(0, 0, Short.MAX_VALUE)))
842  .addGap(1, 1, 1))
843  .addGroup(layout.createSequentialGroup()
844  .addComponent(fullNameRadioButton)
845  .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
846  .addComponent(extensionRadioButton)
847  .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
848  .addComponent(nameRegexCheckbox))))
849  .addComponent(jLabel5)
850  .addGroup(layout.createSequentialGroup()
851  .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
852  .addComponent(nameCheck, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.PREFERRED_SIZE, 95, javax.swing.GroupLayout.PREFERRED_SIZE)
853  .addComponent(jLabel1))
854  .addGap(16, 16, 16)
855  .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
856  .addGroup(layout.createSequentialGroup()
857  .addComponent(filesRadioButton)
858  .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
859  .addComponent(dirsRadioButton)
860  .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
861  .addComponent(allRadioButton))
862  .addComponent(nameTextField)))))
863  .addGroup(layout.createSequentialGroup()
864  .addContainerGap()
865  .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
866  .addComponent(pathCheck)
867  .addComponent(mimeCheck)
868  .addComponent(fileSizeCheck)
869  .addComponent(dateCheck))
870  .addGap(0, 0, Short.MAX_VALUE)))
871  .addContainerGap())
872  );
873  layout.setVerticalGroup(
874  layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
875  .addGroup(layout.createSequentialGroup()
876  .addComponent(jLabel5)
877  .addGap(3, 3, 3)
878  .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
879  .addGroup(layout.createSequentialGroup()
880  .addComponent(jLabel1)
881  .addGap(10, 10, 10)
882  .addComponent(nameCheck))
883  .addGroup(layout.createSequentialGroup()
884  .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
885  .addComponent(filesRadioButton)
886  .addComponent(dirsRadioButton)
887  .addComponent(allRadioButton))
888  .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
889  .addComponent(nameTextField, javax.swing.GroupLayout.PREFERRED_SIZE, 20, javax.swing.GroupLayout.PREFERRED_SIZE)))
890  .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
891  .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
892  .addComponent(fullNameRadioButton)
893  .addComponent(extensionRadioButton)
894  .addComponent(nameRegexCheckbox))
895  .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
896  .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
897  .addComponent(pathTextField, javax.swing.GroupLayout.PREFERRED_SIZE, 20, javax.swing.GroupLayout.PREFERRED_SIZE)
898  .addComponent(pathCheck))
899  .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
900  .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
901  .addComponent(pathRegexCheckBox)
902  .addComponent(pathSeparatorInfoLabel))
903  .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
904  .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
905  .addComponent(mimeTypeComboBox, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
906  .addComponent(mimeCheck))
907  .addGap(11, 11, 11)
908  .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
909  .addComponent(equalitySymbolComboBox, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
910  .addComponent(fileSizeComboBox, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
911  .addComponent(fileSizeSpinner, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
912  .addComponent(fileSizeCheck))
913  .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
914  .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
915  .addComponent(daysIncludedTextField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
916  .addComponent(daysIncludedLabel)
917  .addComponent(dateCheck))
918  .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
919  .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
920  .addComponent(ruleNameTextField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
921  .addComponent(ruleNameLabel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
922  .addContainerGap())
923  );
924  }// </editor-fold>//GEN-END:initComponents
925 
926  private void nameCheckActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_nameCheckActionPerformed
927  if (!this.nameCheck.isSelected()) {
928  this.nameTextField.setEnabled(false);
929  this.nameTextField.setText("");
930  this.fullNameRadioButton.setEnabled(false);
931  this.extensionRadioButton.setEnabled(false);
932  this.nameRegexCheckbox.setEnabled(false);
933  } else {
934  this.nameTextField.setEnabled(true);
935  this.fullNameRadioButton.setEnabled(true);
936  if (this.filesRadioButton.isSelected()) {
937  this.extensionRadioButton.setEnabled(true);
938  }
939  this.nameRegexCheckbox.setEnabled(true);
940  }
941  this.setOkButton();
942  }//GEN-LAST:event_nameCheckActionPerformed
943 
944  private void pathCheckActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_pathCheckActionPerformed
945  if (!this.pathCheck.isSelected()) {
946  this.pathTextField.setEnabled(false);
947  this.pathTextField.setText("");
948  this.pathRegexCheckBox.setEnabled(false);
949  this.pathSeparatorInfoLabel.setEnabled(false);
950  } else {
951  this.pathTextField.setEnabled(true);
952  this.pathRegexCheckBox.setEnabled(true);
953  this.pathSeparatorInfoLabel.setEnabled(true);
954  }
955  this.setOkButton();
956  }//GEN-LAST:event_pathCheckActionPerformed
957 
958  private void filesRadioButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_filesRadioButtonActionPerformed
959 
960  this.setComponentsForSearchType();
961  }//GEN-LAST:event_filesRadioButtonActionPerformed
962 
963  private void dirsRadioButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_dirsRadioButtonActionPerformed
964  this.setComponentsForSearchType();
965  }//GEN-LAST:event_dirsRadioButtonActionPerformed
966 
967  private void allRadioButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_allRadioButtonActionPerformed
968  this.setComponentsForSearchType();
969  }//GEN-LAST:event_allRadioButtonActionPerformed
970 
971  private void dateCheckActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_dateCheckActionPerformed
972  if (!this.dateCheck.isSelected()) {
973  this.daysIncludedTextField.setEnabled(false);
974  this.daysIncludedLabel.setEnabled(false);
975  this.daysIncludedTextField.setText("");
976  } else {
977  this.daysIncludedTextField.setEnabled(true);
978  this.daysIncludedLabel.setEnabled(true);
979  }
980  this.setOkButton();
981  }//GEN-LAST:event_dateCheckActionPerformed
982 
983  private void fileSizeCheckActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_fileSizeCheckActionPerformed
984  if (!this.fileSizeCheck.isSelected()) {
985  this.fileSizeComboBox.setEnabled(false);
986  this.fileSizeSpinner.setEnabled(false);
987  this.fileSizeSpinner.setValue(0);
988  this.equalitySymbolComboBox.setEnabled(false);
989  } else {
990  this.fileSizeComboBox.setEnabled(true);
991  this.fileSizeSpinner.setEnabled(true);
992  this.equalitySymbolComboBox.setEnabled(true);
993  }
994  this.setOkButton();
995  }//GEN-LAST:event_fileSizeCheckActionPerformed
996 
997  private void mimeCheckActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_mimeCheckActionPerformed
998  if (!this.mimeCheck.isSelected()) {
999  this.mimeTypeComboBox.setEnabled(false);
1000  this.mimeTypeComboBox.setSelectedIndex(0);
1001  } else {
1002  this.mimeTypeComboBox.setEnabled(true);
1003  }
1004  this.setOkButton();
1005  }//GEN-LAST:event_mimeCheckActionPerformed
1006 
1007  private void extensionRadioButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_extensionRadioButtonActionPerformed
1008  updateNameTextFieldPrompt();
1009  }//GEN-LAST:event_extensionRadioButtonActionPerformed
1010 
1011  private void fullNameRadioButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_fullNameRadioButtonActionPerformed
1012  updateNameTextFieldPrompt();
1013  }//GEN-LAST:event_fullNameRadioButtonActionPerformed
1014 
1015  // Variables declaration - do not modify//GEN-BEGIN:variables
1016  private javax.swing.JRadioButton allRadioButton;
1017  private javax.swing.JCheckBox dateCheck;
1018  private javax.swing.JLabel daysIncludedLabel;
1019  private javax.swing.JTextField daysIncludedTextField;
1020  private javax.swing.JRadioButton dirsRadioButton;
1021  private javax.swing.JComboBox<String> equalitySymbolComboBox;
1022  private javax.swing.JRadioButton extensionRadioButton;
1023  private javax.swing.JCheckBox fileSizeCheck;
1024  private javax.swing.JComboBox<String> fileSizeComboBox;
1025  private javax.swing.JSpinner fileSizeSpinner;
1026  private javax.swing.JRadioButton filesRadioButton;
1027  private javax.swing.JRadioButton fullNameRadioButton;
1028  private javax.swing.JLabel jLabel1;
1029  private javax.swing.JLabel jLabel5;
1030  private javax.swing.JCheckBox mimeCheck;
1031  private javax.swing.JComboBox<String> mimeTypeComboBox;
1032  private javax.swing.ButtonGroup nameButtonGroup;
1033  private javax.swing.JCheckBox nameCheck;
1034  private javax.swing.JCheckBox nameRegexCheckbox;
1035  private javax.swing.JTextField nameTextField;
1036  private javax.swing.JCheckBox pathCheck;
1037  private javax.swing.JCheckBox pathRegexCheckBox;
1038  private javax.swing.JLabel pathSeparatorInfoLabel;
1039  private javax.swing.JTextField pathTextField;
1040  private javax.swing.JLabel ruleNameLabel;
1041  private javax.swing.JTextField ruleNameTextField;
1042  private javax.swing.ButtonGroup typeButtonGroup;
1043  // End of variables declaration//GEN-END:variables
1044 }

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