Autopsy  4.21.0
Graphical digital forensics platform for The Sleuth Kit and other tools.
AutopsyOptionsPanel.java
Go to the documentation of this file.
1 /*
2  * Autopsy Forensic Browser
3  *
4  * Copyright 2011-2021 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.corecomponents;
20 
21 import java.awt.image.BufferedImage;
22 import java.io.File;
23 import java.io.IOException;
24 import java.lang.management.ManagementFactory;
25 import java.nio.charset.Charset;
26 import java.nio.file.Files;
27 import java.nio.file.InvalidPathException;
28 import java.nio.file.Path;
29 import java.util.ArrayList;
30 import java.util.List;
31 import java.util.Optional;
32 import java.util.logging.Level;
33 import java.util.regex.Matcher;
34 import java.util.regex.Pattern;
35 import java.util.stream.Collectors;
36 import java.util.stream.Stream;
37 import javax.imageio.ImageIO;
38 import javax.swing.ImageIcon;
39 import javax.swing.JFileChooser;
40 import javax.swing.JOptionPane;
41 import javax.swing.SwingUtilities;
42 import javax.swing.event.DocumentEvent;
43 import javax.swing.event.DocumentListener;
44 import org.apache.commons.io.FileUtils;
45 import org.apache.commons.lang3.StringUtils;
46 import org.apache.tools.ant.types.Commandline;
47 import org.netbeans.spi.options.OptionsPanelController;
48 import org.openide.util.NbBundle;
50 import org.openide.util.NbBundle.Messages;
61 
65 @Messages({
66  "AutopsyOptionsPanel.invalidImageFile.msg=The selected file was not able to be used as an agency logo.",
67  "AutopsyOptionsPanel.invalidImageFile.title=Invalid Image File",
68  "AutopsyOptionsPanel.memFieldValidationLabel.not64BitInstall.text=JVM memory settings only enabled for 64 bit version",
69  "AutopsyOptionsPanel.memFieldValidationLabel.noValueEntered.text=No value entered",
70  "AutopsyOptionsPanel.memFieldValidationLabel.invalidCharacters.text=Invalid characters, value must be a positive integer",
71  "# {0} - minimumMemory",
72  "AutopsyOptionsPanel.memFieldValidationLabel.underMinMemory.text=Value must be at least {0}GB",
73  "# {0} - systemMemory",
74  "AutopsyOptionsPanel.memFieldValidationLabel.overMaxMemory.text=Value must be less than the total system memory of {0}GB",
75  "AutopsyOptionsPanel.memFieldValidationLabel.developerMode.text=Memory settings are not available while running in developer mode",
76  "AutopsyOptionsPanel.agencyLogoPathFieldValidationLabel.invalidPath.text=Path is not valid.",
77  "AutopsyOptionsPanel.agencyLogoPathFieldValidationLabel.invalidImageSpecified.text=Invalid image file specified.",
78  "AutopsyOptionsPanel.agencyLogoPathFieldValidationLabel.pathNotSet.text=Agency logo path must be set.",
79  "AutopsyOptionsPanel.logNumAlert.invalidInput.text=A positive integer is required here."
80 })
81 @SuppressWarnings("PMD.SingularField") // UI widgets cause lots of false positives
82 final class AutopsyOptionsPanel extends javax.swing.JPanel {
83 
84  private static final long serialVersionUID = 1L;
85  private static final String DEFAULT_HEAP_DUMP_FILE_FIELD = "";
86  private JFileChooser logoFileChooser;
87  private JFileChooser tempDirChooser;
88  private static final String ETC_FOLDER_NAME = "etc";
89  private static final String CONFIG_FILE_EXTENSION = ".conf";
90  private static final long ONE_BILLION = 1000000000L; //used to roughly convert system memory from bytes to gigabytes
91  private static final int MEGA_IN_GIGA = 1024; //used to convert memory settings saved as megabytes to gigabytes
92  private static final int JVM_MEMORY_STEP_SIZE_MB = 512;
93  private static final int MIN_MEMORY_IN_GB = 2; //the enforced minimum memory in gigabytes
94  private static final Logger logger = Logger.getLogger(AutopsyOptionsPanel.class.getName());
95  private String initialMemValue = Long.toString(Runtime.getRuntime().maxMemory() / ONE_BILLION);
96 
97  private final ReportBranding reportBranding;
98  private JFileChooser heapFileChooser;
99 
100  private final JFileChooserFactory logoChooserHelper = new JFileChooserFactory();
101  private final JFileChooserFactory heapChooserHelper = new JFileChooserFactory();
102  private final JFileChooserFactory tempChooserHelper = new JFileChooserFactory();
103 
107  AutopsyOptionsPanel() {
108  initComponents();
109  if (!isJVMHeapSettingsCapable()) {
110  //32 bit JVM has a max heap size of 1.4 gb to 4 gb depending on OS
111  //So disabling the setting of heap size when the JVM is not 64 bit
112  //Is the safest course of action
113  //And the file won't exist in the install folder when running through netbeans
114  memField.setEnabled(false);
115  heapDumpFileField.setEnabled(false);
116  heapDumpBrowseButton.setEnabled(false);
117  solrMaxHeapSpinner.setEnabled(false);
118  }
119  systemMemoryTotal.setText(Long.toString(getSystemMemoryInGB()));
120  // The cast to int in the following is to ensure that the correct SpinnerNumberModel
121  // constructor is called.
122  solrMaxHeapSpinner.setModel(new javax.swing.SpinnerNumberModel(UserPreferences.getMaxSolrVMSize(),
123  JVM_MEMORY_STEP_SIZE_MB, ((int) getSystemMemoryInGB()) * MEGA_IN_GIGA, JVM_MEMORY_STEP_SIZE_MB));
124 
125  agencyLogoPathField.getDocument().addDocumentListener(new TextFieldListener(null));
126  heapDumpFileField.getDocument().addDocumentListener(new TextFieldListener(this::isHeapPathValid));
127  tempCustomField.getDocument().addDocumentListener(new TextFieldListener(this::evaluateTempDirState));
128  logFileCount.setText(String.valueOf(UserPreferences.getLogFileCount()));
129 
130  reportBranding = new ReportBranding();
131  }
132 
137  private static boolean isJVMHeapSettingsCapable() {
138  return PlatformUtil.is64BitJVM() && Version.getBuildType() != Version.Type.DEVELOPMENT;
139  }
140 
147  private long getSystemMemoryInGB() {
148  long memorySize = ((com.sun.management.OperatingSystemMXBean) ManagementFactory
149  .getOperatingSystemMXBean()).getTotalPhysicalMemorySize();
150  return memorySize / ONE_BILLION;
151  }
152 
160  private long getCurrentJvmMaxMemoryInGB(String confFileMemValue) throws IOException {
161  char units = '-';
162  Long value = 0L;
163  if (confFileMemValue.length() > 1) {
164  units = confFileMemValue.charAt(confFileMemValue.length() - 1);
165  try {
166  value = Long.parseLong(confFileMemValue.substring(0, confFileMemValue.length() - 1));
167  } catch (NumberFormatException ex) {
168  throw new IOException("Unable to properly parse memory number.", ex);
169  }
170  } else {
171  throw new IOException("No memory setting found in String: " + confFileMemValue);
172  }
173  //some older .conf files might have the units as megabytes instead of gigabytes
174  switch (units) {
175  case 'g':
176  case 'G':
177  return value;
178  case 'm':
179  case 'M':
180  return value / MEGA_IN_GIGA;
181  default:
182  throw new IOException("Units were not recognized as parsed: " + units);
183  }
184  }
185 
186 
195  private static File getInstallFolderConfFile() throws IOException {
196  String confFileName = UserPreferences.getAppName() + CONFIG_FILE_EXTENSION;
197  String installFolder = PlatformUtil.getInstallPath();
198  File installFolderEtc = new File(installFolder, ETC_FOLDER_NAME);
199  File installFolderConfigFile = new File(installFolderEtc, confFileName);
200  if (!installFolderConfigFile.exists()) {
201  throw new IOException("Conf file could not be found" + installFolderConfigFile.toString());
202  }
203  return installFolderConfigFile;
204  }
205 
213  private static File getUserFolderConfFile() {
214  String confFileName = UserPreferences.getAppName() + CONFIG_FILE_EXTENSION;
215  File userFolder = PlatformUtil.getUserDirectory();
216  File userEtcFolder = new File(userFolder, ETC_FOLDER_NAME);
217  if (!userEtcFolder.exists()) {
218  userEtcFolder.mkdir();
219  }
220  return new File(userEtcFolder, confFileName);
221  }
222 
223  private static final String JVM_SETTINGS_REGEX_PARAM = "options";
224  private static final String JVM_SETTINGS_REGEX_STR = "^\\s*default_options\\s*=\\s*\"?(?<" + JVM_SETTINGS_REGEX_PARAM + ">.+?)\"?\\s*$";
225  private static final Pattern JVM_SETTINGS_REGEX = Pattern.compile(JVM_SETTINGS_REGEX_STR);
226  private static final String XMX_REGEX_PARAM = "mem";
227  private static final String XMX_REGEX_STR = "^\\s*\\-J\\-Xmx(?<" + XMX_REGEX_PARAM + ">.+?)\\s*$";
228  private static final Pattern XMX_REGEX = Pattern.compile(XMX_REGEX_STR);
229  private static final String HEAP_DUMP_REGEX_PARAM = "path";
230  private static final String HEAP_DUMP_REGEX_STR = "^\\s*\\-J\\-XX:HeapDumpPath=(\\\")?\\s*(?<" + HEAP_DUMP_REGEX_PARAM + ">.+?)\\s*(\\\")?$";
231  private static final Pattern HEAP_DUMP_REGEX = Pattern.compile(HEAP_DUMP_REGEX_STR);
232 
244  private static String updateConfLine(String line, String memText, String heapText) {
245  Matcher match = JVM_SETTINGS_REGEX.matcher(line);
246  if (match.find()) {
247  // split on command line arguments
248  String[] parsedArgs = Commandline.translateCommandline(match.group(JVM_SETTINGS_REGEX_PARAM));
249 
250  String memString = "-J-Xmx" + memText.replaceAll("[^\\d]", "") + "g";
251 
252  // only add in heap path argument if a heap path is specified
253  String heapString = null;
254  if (StringUtils.isNotBlank(heapText)) {
255  while (heapText.endsWith("\\") && heapText.length() > 0) {
256  heapText = heapText.substring(0, heapText.length() - 1);
257  }
258 
259  heapString = String.format("-J-XX:HeapDumpPath=\"%s\"", heapText);
260  }
261 
262  Stream<String> argsNoMemHeap = Stream.of(parsedArgs)
263  // remove saved version of memory and heap dump path
264  .filter(s -> !s.matches(XMX_REGEX_STR) && !s.matches(HEAP_DUMP_REGEX_STR));
265 
266  String newArgs = Stream.concat(argsNoMemHeap, Stream.of(memString, heapString))
267  .filter(s -> s != null)
268  .collect(Collectors.joining(" "));
269 
270  return String.format("default_options=\"%s\"", newArgs);
271  };
272 
273  return line;
274  }
275 
276 
285  private void writeEtcConfFile() throws IOException {
286  String fileText = readConfFile(getInstallFolderConfFile()).stream()
287  .map((line) -> updateConfLine(line, memField.getText(), heapDumpFileField.getText()))
288  .collect(Collectors.joining("\n"));
289 
290  FileUtils.writeStringToFile(getUserFolderConfFile(), fileText, "UTF-8");
291  }
292 
293 
297  private static class ConfValues {
298  private final String XmxVal;
299  private final String heapDumpPath;
300 
306  ConfValues(String XmxVal, String heapDumpPath) {
307  this.XmxVal = XmxVal;
308  this.heapDumpPath = heapDumpPath;
309  }
310 
315  String getXmxVal() {
316  return XmxVal;
317  }
318 
323  String getHeapDumpPath() {
324  return heapDumpPath;
325  }
326  }
327 
333  private ConfValues getEtcConfValues() throws IOException {
334  File userConfFile = getUserFolderConfFile();
335  String[] args = userConfFile.exists() ?
336  getDefaultsFromFileContents(readConfFile(userConfFile)) :
337  getDefaultsFromFileContents(readConfFile(getInstallFolderConfFile()));
338 
339  String heapFile = "";
340  String memSize = "";
341 
342  for (String arg : args) {
343  Matcher memMatch = XMX_REGEX.matcher(arg);
344  if (memMatch.find()) {
345  memSize = memMatch.group(XMX_REGEX_PARAM);
346  continue;
347  }
348 
349  Matcher heapFileMatch = HEAP_DUMP_REGEX.matcher(arg);
350  if (heapFileMatch.find()) {
351  heapFile = heapFileMatch.group(HEAP_DUMP_REGEX_PARAM);
352  continue;
353  }
354  }
355 
356  return new ConfValues(memSize, heapFile);
357  }
358 
359 
360 
365  @Messages({
366  "AutopsyOptionsPanel_isHeapPathValid_selectValidDirectory=Please select an existing directory.",
367  "AutopsyOptionsPanel_isHeapPathValid_developerMode=Cannot change heap dump path while in developer mode.",
368  "AutopsyOptionsPanel_isHeapPathValid_not64BitMachine=Changing heap dump path settings only enabled for 64 bit version.",
369  "AutopsyOPtionsPanel_isHeapPathValid_illegalCharacters=Please select a path with no quotes."
370  })
371  private boolean isHeapPathValid() {
372  if (Version.getBuildType() == Version.Type.DEVELOPMENT) {
373  heapFieldValidationLabel.setVisible(true);
374  heapFieldValidationLabel.setText(Bundle.AutopsyOptionsPanel_isHeapPathValid_developerMode());
375  return true;
376  }
377 
378  if (!PlatformUtil.is64BitJVM()) {
379  heapFieldValidationLabel.setVisible(true);
380  heapFieldValidationLabel.setText(Bundle.AutopsyOptionsPanel_isHeapPathValid_not64BitMachine());
381  return true;
382  }
383 
384  //allow blank field as the default will be used
385  if (StringUtils.isNotBlank(heapDumpFileField.getText())) {
386  String heapText = heapDumpFileField.getText().trim();
387  if (heapText.contains("\"") || heapText.contains("'")) {
388  heapFieldValidationLabel.setVisible(true);
389  heapFieldValidationLabel.setText(Bundle.AutopsyOPtionsPanel_isHeapPathValid_illegalCharacters());
390  return false;
391  }
392 
393  File curHeapFile = new File(heapText);
394  if (!curHeapFile.exists() || !curHeapFile.isDirectory()) {
395  heapFieldValidationLabel.setVisible(true);
396  heapFieldValidationLabel.setText(Bundle.AutopsyOptionsPanel_isHeapPathValid_selectValidDirectory());
397  return false;
398  }
399  }
400 
401  heapFieldValidationLabel.setVisible(false);
402  heapFieldValidationLabel.setText("");
403  return true;
404  }
405 
415  private static List<String> readConfFile(File configFile) {
416  List<String> lines = new ArrayList<>();
417  if (null != configFile) {
418  Path filePath = configFile.toPath();
419  Charset charset = Charset.forName("UTF-8");
420  try {
421  lines = Files.readAllLines(filePath, charset);
422  } catch (IOException e) {
423  logger.log(Level.SEVERE, "Error reading config file contents. {}", configFile.getAbsolutePath());
424  }
425  }
426  return lines;
427  }
428 
440  private static String[] getDefaultsFromFileContents(List<String> list) {
441  Optional<String> defaultSettings = list.stream()
442  .filter(line -> line.matches(JVM_SETTINGS_REGEX_STR))
443  .findFirst();
444 
445  if (defaultSettings.isPresent()) {
446  Matcher match = JVM_SETTINGS_REGEX.matcher(defaultSettings.get());
447  if (match.find()) {
448  return Commandline.translateCommandline(match.group(JVM_SETTINGS_REGEX_PARAM));
449  }
450  }
451 
452  return new String[]{};
453  }
454 
455  private void evaluateTempDirState() {
456  boolean caseOpen = Case.isCaseOpen();
457  boolean customSelected = tempCustomRadio.isSelected();
458 
459  tempDirectoryBrowseButton.setEnabled(!caseOpen && customSelected);
460  tempCustomField.setEnabled(!caseOpen && customSelected);
461 
462  tempOnCustomNoPath.setVisible(customSelected && StringUtils.isBlank(tempCustomField.getText()));
463  }
464 
468  void load() {
469  String path = reportBranding.getAgencyLogoPath();
470  boolean useDefault = (path == null || path.isEmpty());
471  defaultLogoRB.setSelected(useDefault);
472  specifyLogoRB.setSelected(!useDefault);
473  agencyLogoPathField.setEnabled(!useDefault);
474  browseLogosButton.setEnabled(!useDefault);
475 
476  tempCustomField.setText(UserMachinePreferences.getCustomTempDirectory());
477  switch (UserMachinePreferences.getTempDirChoice()) {
478  case CASE:
479  tempCaseRadio.setSelected(true);
480  break;
481  case CUSTOM:
482  tempCustomRadio.setSelected(true);
483  break;
484  default:
485  case SYSTEM:
486  tempLocalRadio.setSelected(true);
487  break;
488  }
489 
490  evaluateTempDirState();
491 
492  logFileCount.setText(String.valueOf(UserPreferences.getLogFileCount()));
493  solrMaxHeapSpinner.setValue(UserPreferences.getMaxSolrVMSize());
494  try {
495  updateAgencyLogo(path);
496  } catch (IOException ex) {
497  logger.log(Level.WARNING, "Error loading image from previously saved agency logo path", ex);
498  }
499 
500  boolean confLoaded = false;
501  if (isJVMHeapSettingsCapable()) {
502  try {
503  ConfValues confValues = getEtcConfValues();
504  heapDumpFileField.setText(confValues.getHeapDumpPath());
505  initialMemValue = Long.toString(getCurrentJvmMaxMemoryInGB(confValues.getXmxVal()));
506  confLoaded = true;
507  } catch (IOException ex) {
508  logger.log(Level.SEVERE, "Can't read current Jvm max memory setting from file", ex);
509  heapDumpFileField.setText(DEFAULT_HEAP_DUMP_FILE_FIELD);
510  }
511  memField.setText(initialMemValue);
512  }
513 
514  heapDumpBrowseButton.setEnabled(confLoaded);
515  heapDumpFileField.setEnabled(confLoaded);
516 
517  setTempDirEnabled();
518  valid(); //ensure the error messages are up to date
519  }
520 
521  private void setTempDirEnabled() {
522  boolean enabled = !Case.isCaseOpen();
523 
524  this.tempCaseRadio.setEnabled(enabled);
525  this.tempCustomRadio.setEnabled(enabled);
526  this.tempLocalRadio.setEnabled(enabled);
527 
528  this.tempDirectoryWarningLabel.setVisible(!enabled);
529  evaluateTempDirState();
530  }
531 
539  private void updateAgencyLogo(String path) throws IOException {
540  agencyLogoPathField.setText(path);
541  ImageIcon agencyLogoIcon = new ImageIcon();
542  agencyLogoPreview.setText(NbBundle.getMessage(AutopsyOptionsPanel.class, "AutopsyOptionsPanel.agencyLogoPreview.text"));
543  if (!agencyLogoPathField.getText().isEmpty()) {
544  File file = new File(agencyLogoPathField.getText());
545  if (file.exists()) {
546  BufferedImage image = ImageIO.read(file); //create it as an image first to support BMP files
547  if (image == null) {
548  throw new IOException("Unable to read file as a BufferedImage for file " + file.toString());
549  }
550  agencyLogoIcon = new ImageIcon(image.getScaledInstance(64, 64, 4));
551  agencyLogoPreview.setText("");
552  }
553  }
554  agencyLogoPreview.setIcon(agencyLogoIcon);
555  agencyLogoPreview.repaint();
556  }
557 
558  @Messages({
559  "AutopsyOptionsPanel_storeTempDir_onError_title=Error Saving Temporary Directory",
560  "# {0} - path",
561  "AutopsyOptionsPanel_storeTempDir_onError_description=There was an error creating the temporary directory on the filesystem at: {0}.",
562  "AutopsyOptionsPanel_storeTempDir_onChoiceError_title=Error Saving Temporary Directory Choice",
563  "AutopsyOptionsPanel_storeTempDir_onChoiceError_description=There was an error updating temporary directory choice selection.",})
564  private void storeTempDir() {
565  String tempDirectoryPath = tempCustomField.getText();
566  if (!UserMachinePreferences.getCustomTempDirectory().equals(tempDirectoryPath)) {
567  try {
568  UserMachinePreferences.setCustomTempDirectory(tempDirectoryPath);
569  } catch (UserMachinePreferencesException ex) {
570  logger.log(Level.WARNING, "There was an error creating the temporary directory defined by the user: " + tempDirectoryPath, ex);
571  SwingUtilities.invokeLater(() -> {
572  JOptionPane.showMessageDialog(this,
573  String.format("<html>%s</html>", Bundle.AutopsyOptionsPanel_storeTempDir_onError_description(tempDirectoryPath)),
574  Bundle.AutopsyOptionsPanel_storeTempDir_onError_title(),
575  JOptionPane.ERROR_MESSAGE);
576  });
577  }
578  }
579 
580  TempDirChoice choice;
581  if (tempCaseRadio.isSelected()) {
582  choice = TempDirChoice.CASE;
583  } else if (tempCustomRadio.isSelected()) {
584  choice = TempDirChoice.CUSTOM;
585  } else {
586  choice = TempDirChoice.SYSTEM;
587  }
588 
589  if (!choice.equals(UserMachinePreferences.getTempDirChoice())) {
590  try {
591  UserMachinePreferences.setTempDirChoice(choice);
592  } catch (UserMachinePreferencesException ex) {
593  logger.log(Level.WARNING, "There was an error updating choice to: " + choice.name(), ex);
594  SwingUtilities.invokeLater(() -> {
595  JOptionPane.showMessageDialog(this,
596  String.format("<html>%s</html>", Bundle.AutopsyOptionsPanel_storeTempDir_onChoiceError_description()),
597  Bundle.AutopsyOptionsPanel_storeTempDir_onChoiceError_title(),
598  JOptionPane.ERROR_MESSAGE);
599  });
600  }
601  }
602  }
603 
607  void store() {
608  UserPreferences.setLogFileCount(Integer.parseInt(logFileCount.getText()));
609  storeTempDir();
610 
611  if (!agencyLogoPathField.getText().isEmpty()) {
612  File file = new File(agencyLogoPathField.getText());
613  if (file.exists()) {
614  reportBranding.setAgencyLogoPath(agencyLogoPathField.getText());
615  }
616  } else {
617  reportBranding.setAgencyLogoPath("");
618  }
619  UserPreferences.setMaxSolrVMSize((int) solrMaxHeapSpinner.getValue());
620  if (isJVMHeapSettingsCapable()) { //if the field could of been changed we need to try and save it
621  try {
622  writeEtcConfFile();
623  } catch (IOException ex) {
624  logger.log(Level.WARNING, "Unable to save config file to " + PlatformUtil.getUserDirectory() + "\\" + ETC_FOLDER_NAME, ex);
625  }
626  }
627  }
628 
634  boolean valid() {
635  boolean agencyValid = isAgencyLogoPathValid();
636  boolean memFieldValid = isMemFieldValid();
637  boolean logNumValid = isLogNumFieldValid();
638  boolean heapPathValid = isHeapPathValid();
639 
640  return agencyValid && memFieldValid && logNumValid && heapPathValid;
641  }
642 
649  boolean isAgencyLogoPathValid() {
650  boolean valid = true;
651 
652  if (defaultLogoRB.isSelected()) {
653  agencyLogoPathFieldValidationLabel.setText("");
654  } else {
655  String agencyLogoPath = agencyLogoPathField.getText();
656  if (agencyLogoPath.isEmpty()) {
657  agencyLogoPathFieldValidationLabel.setText(Bundle.AutopsyOptionsPanel_agencyLogoPathFieldValidationLabel_pathNotSet_text());
658  valid = false;
659  } else {
660  File file = new File(agencyLogoPathField.getText());
661  if (file.exists() && file.isFile()) {
662  BufferedImage image;
663  try { //ensure the image can be read
664  image = ImageIO.read(file); //create it as an image first to support BMP files
665  if (image == null) {
666  throw new IOException("Unable to read file as a BufferedImage for file " + file.toString());
667  }
668  agencyLogoPathFieldValidationLabel.setText("");
669  } catch (IOException | IndexOutOfBoundsException ignored) {
670  agencyLogoPathFieldValidationLabel.setText(Bundle.AutopsyOptionsPanel_agencyLogoPathFieldValidationLabel_invalidImageSpecified_text());
671  valid = false;
672  }
673  } else {
674  agencyLogoPathFieldValidationLabel.setText(Bundle.AutopsyOptionsPanel_agencyLogoPathFieldValidationLabel_invalidPath_text());
675  valid = false;
676  }
677  }
678  }
679 
680  return valid;
681  }
682 
688  private boolean isMemFieldValid() {
689  String memText = memField.getText();
690  memFieldValidationLabel.setText("");
691  if (!PlatformUtil.is64BitJVM()) {
692  memFieldValidationLabel.setText(Bundle.AutopsyOptionsPanel_memFieldValidationLabel_not64BitInstall_text());
693  //the panel should be valid when it is a 32 bit jvm because the memfield will be disabled.
694  return true;
695  }
696  if (Version.getBuildType() == Version.Type.DEVELOPMENT) {
697  memFieldValidationLabel.setText(Bundle.AutopsyOptionsPanel_memFieldValidationLabel_developerMode_text());
698  //the panel should be valid when you are running in developer mode because the memfield will be disabled
699  return true;
700  }
701  if (memText.length() == 0) {
702  memFieldValidationLabel.setText(Bundle.AutopsyOptionsPanel_memFieldValidationLabel_noValueEntered_text());
703  return false;
704  }
705  if (memText.replaceAll("[^\\d]", "").length() != memText.length()) {
706  memFieldValidationLabel.setText(Bundle.AutopsyOptionsPanel_memFieldValidationLabel_invalidCharacters_text());
707  return false;
708  }
709  int parsedInt = Integer.parseInt(memText);
710  if (parsedInt < MIN_MEMORY_IN_GB) {
711  memFieldValidationLabel.setText(Bundle.AutopsyOptionsPanel_memFieldValidationLabel_underMinMemory_text(MIN_MEMORY_IN_GB));
712  return false;
713  }
714  if (parsedInt > getSystemMemoryInGB()) {
715  memFieldValidationLabel.setText(Bundle.AutopsyOptionsPanel_memFieldValidationLabel_overMaxMemory_text(getSystemMemoryInGB()));
716  return false;
717  }
718  return true;
719  }
720 
726  private boolean isLogNumFieldValid() {
727  String count = logFileCount.getText();
728  logNumAlert.setText("");
729  try {
730  int count_num = Integer.parseInt(count);
731  if (count_num < 1) {
732  logNumAlert.setText(Bundle.AutopsyOptionsPanel_logNumAlert_invalidInput_text());
733  return false;
734  }
735  } catch (NumberFormatException e) {
736  logNumAlert.setText(Bundle.AutopsyOptionsPanel_logNumAlert_invalidInput_text());
737  return false;
738  }
739  return true;
740  }
741 
746  private class TextFieldListener implements DocumentListener {
747  private final Runnable onChange;
748 
749 
754  TextFieldListener(Runnable onChange) {
755  this.onChange = onChange;
756  }
757 
758  private void baseOnChange() {
759  if (onChange != null) {
760  onChange.run();
761  }
762 
763  firePropertyChange(OptionsPanelController.PROP_CHANGED, null, null);
764  }
765 
766  @Override
767  public void changedUpdate(DocumentEvent e) {
768  baseOnChange();
769  }
770 
771  @Override
772  public void removeUpdate(DocumentEvent e) {
773  baseOnChange();
774  }
775 
776  @Override
777  public void insertUpdate(DocumentEvent e) {
778  baseOnChange();
779  }
780 
781 
782  }
783 
789  // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
790  private void initComponents() {
791  java.awt.GridBagConstraints gridBagConstraints;
792 
793  fileSelectionButtonGroup = new javax.swing.ButtonGroup();
794  displayTimesButtonGroup = new javax.swing.ButtonGroup();
795  logoSourceButtonGroup = new javax.swing.ButtonGroup();
796  tempDirChoiceGroup = new javax.swing.ButtonGroup();
797  jScrollPane1 = new javax.swing.JScrollPane();
798  javax.swing.JPanel mainPanel = new javax.swing.JPanel();
799  logoPanel = new javax.swing.JPanel();
800  agencyLogoPathField = new javax.swing.JTextField();
801  browseLogosButton = new javax.swing.JButton();
802  agencyLogoPreview = new javax.swing.JLabel();
803  defaultLogoRB = new javax.swing.JRadioButton();
804  specifyLogoRB = new javax.swing.JRadioButton();
805  agencyLogoPathFieldValidationLabel = new javax.swing.JLabel();
806  runtimePanel = new javax.swing.JPanel();
807  maxMemoryLabel = new javax.swing.JLabel();
808  maxMemoryUnitsLabel = new javax.swing.JLabel();
809  totalMemoryLabel = new javax.swing.JLabel();
810  systemMemoryTotal = new javax.swing.JLabel();
811  restartNecessaryWarning = new javax.swing.JLabel();
812  memField = new javax.swing.JTextField();
813  memFieldValidationLabel = new javax.swing.JLabel();
814  maxMemoryUnitsLabel1 = new javax.swing.JLabel();
815  maxLogFileCount = new javax.swing.JLabel();
816  logFileCount = new javax.swing.JTextField();
817  logNumAlert = new javax.swing.JTextField();
818  maxSolrMemoryLabel = new javax.swing.JLabel();
819  maxMemoryUnitsLabel2 = new javax.swing.JLabel();
820  solrMaxHeapSpinner = new javax.swing.JSpinner();
821  solrJVMHeapWarning = new javax.swing.JLabel();
822  heapFileLabel = new javax.swing.JLabel();
823  heapDumpFileField = new javax.swing.JTextField();
824  heapDumpBrowseButton = new javax.swing.JButton();
825  heapFieldValidationLabel = new javax.swing.JLabel();
826  tempDirectoryPanel = new javax.swing.JPanel();
827  tempCustomField = new javax.swing.JTextField();
828  tempDirectoryBrowseButton = new javax.swing.JButton();
829  tempDirectoryWarningLabel = new javax.swing.JLabel();
830  tempLocalRadio = new javax.swing.JRadioButton();
831  tempCaseRadio = new javax.swing.JRadioButton();
832  tempCustomRadio = new javax.swing.JRadioButton();
833  tempOnCustomNoPath = new javax.swing.JLabel();
834  rdpPanel = new javax.swing.JPanel();
835  javax.swing.JScrollPane sizingScrollPane = new javax.swing.JScrollPane();
836  javax.swing.JTextPane sizingTextPane = new javax.swing.JTextPane();
837  javax.swing.Box.Filler filler1 = new javax.swing.Box.Filler(new java.awt.Dimension(0, 0), new java.awt.Dimension(0, 0), new java.awt.Dimension(32767, 0));
838  javax.swing.Box.Filler filler2 = new javax.swing.Box.Filler(new java.awt.Dimension(0, 0), new java.awt.Dimension(0, 0), new java.awt.Dimension(0, 32767));
839 
840  jScrollPane1.setBorder(null);
841 
842  mainPanel.setMinimumSize(new java.awt.Dimension(648, 382));
843  mainPanel.setLayout(new java.awt.GridBagLayout());
844 
845  logoPanel.setBorder(javax.swing.BorderFactory.createTitledBorder(org.openide.util.NbBundle.getMessage(AutopsyOptionsPanel.class, "AutopsyOptionsPanel.logoPanel.border.title"))); // NOI18N
846 
847  agencyLogoPathField.setText(org.openide.util.NbBundle.getMessage(AutopsyOptionsPanel.class, "AutopsyOptionsPanel.agencyLogoPathField.text")); // NOI18N
848 
849  org.openide.awt.Mnemonics.setLocalizedText(browseLogosButton, org.openide.util.NbBundle.getMessage(AutopsyOptionsPanel.class, "AutopsyOptionsPanel.browseLogosButton.text")); // NOI18N
850  browseLogosButton.addActionListener(new java.awt.event.ActionListener() {
851  public void actionPerformed(java.awt.event.ActionEvent evt) {
852  browseLogosButtonActionPerformed(evt);
853  }
854  });
855 
856  agencyLogoPreview.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
857  org.openide.awt.Mnemonics.setLocalizedText(agencyLogoPreview, org.openide.util.NbBundle.getMessage(AutopsyOptionsPanel.class, "AutopsyOptionsPanel.agencyLogoPreview.text")); // NOI18N
858  agencyLogoPreview.setBorder(javax.swing.BorderFactory.createEtchedBorder());
859  agencyLogoPreview.setMaximumSize(new java.awt.Dimension(64, 64));
860  agencyLogoPreview.setMinimumSize(new java.awt.Dimension(64, 64));
861  agencyLogoPreview.setPreferredSize(new java.awt.Dimension(64, 64));
862 
863  logoSourceButtonGroup.add(defaultLogoRB);
864  org.openide.awt.Mnemonics.setLocalizedText(defaultLogoRB, org.openide.util.NbBundle.getMessage(AutopsyOptionsPanel.class, "AutopsyOptionsPanel.defaultLogoRB.text")); // NOI18N
865  defaultLogoRB.addActionListener(new java.awt.event.ActionListener() {
866  public void actionPerformed(java.awt.event.ActionEvent evt) {
867  defaultLogoRBActionPerformed(evt);
868  }
869  });
870 
871  logoSourceButtonGroup.add(specifyLogoRB);
872  org.openide.awt.Mnemonics.setLocalizedText(specifyLogoRB, org.openide.util.NbBundle.getMessage(AutopsyOptionsPanel.class, "AutopsyOptionsPanel.specifyLogoRB.text")); // NOI18N
873  specifyLogoRB.addActionListener(new java.awt.event.ActionListener() {
874  public void actionPerformed(java.awt.event.ActionEvent evt) {
875  specifyLogoRBActionPerformed(evt);
876  }
877  });
878 
879  agencyLogoPathFieldValidationLabel.setForeground(new java.awt.Color(255, 0, 0));
880  org.openide.awt.Mnemonics.setLocalizedText(agencyLogoPathFieldValidationLabel, org.openide.util.NbBundle.getMessage(AutopsyOptionsPanel.class, "AutopsyOptionsPanel.agencyLogoPathFieldValidationLabel.text")); // NOI18N
881 
882  javax.swing.GroupLayout logoPanelLayout = new javax.swing.GroupLayout(logoPanel);
883  logoPanel.setLayout(logoPanelLayout);
884  logoPanelLayout.setHorizontalGroup(
885  logoPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
886  .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, logoPanelLayout.createSequentialGroup()
887  .addContainerGap()
888  .addGroup(logoPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
889  .addComponent(specifyLogoRB)
890  .addComponent(defaultLogoRB))
891  .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
892  .addGroup(logoPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
893  .addComponent(agencyLogoPathFieldValidationLabel)
894  .addGroup(logoPanelLayout.createSequentialGroup()
895  .addComponent(agencyLogoPathField, javax.swing.GroupLayout.PREFERRED_SIZE, 270, javax.swing.GroupLayout.PREFERRED_SIZE)
896  .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
897  .addComponent(browseLogosButton)))
898  .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
899  .addComponent(agencyLogoPreview, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
900  .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
901  );
902  logoPanelLayout.setVerticalGroup(
903  logoPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
904  .addGroup(logoPanelLayout.createSequentialGroup()
905  .addGap(6, 6, 6)
906  .addGroup(logoPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
907  .addComponent(defaultLogoRB)
908  .addComponent(agencyLogoPathFieldValidationLabel))
909  .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
910  .addGroup(logoPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
911  .addComponent(specifyLogoRB)
912  .addComponent(agencyLogoPathField)
913  .addComponent(browseLogosButton)))
914  .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, logoPanelLayout.createSequentialGroup()
915  .addComponent(agencyLogoPreview, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
916  .addGap(0, 0, Short.MAX_VALUE))
917  );
918 
919  gridBagConstraints = new java.awt.GridBagConstraints();
920  gridBagConstraints.gridx = 0;
921  gridBagConstraints.gridy = 2;
922  gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
923  gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
924  mainPanel.add(logoPanel, gridBagConstraints);
925 
926  runtimePanel.setBorder(javax.swing.BorderFactory.createTitledBorder(org.openide.util.NbBundle.getMessage(AutopsyOptionsPanel.class, "AutopsyOptionsPanel.runtimePanel.border.title"))); // NOI18N
927 
928  org.openide.awt.Mnemonics.setLocalizedText(maxMemoryLabel, org.openide.util.NbBundle.getMessage(AutopsyOptionsPanel.class, "AutopsyOptionsPanel.maxMemoryLabel.text")); // NOI18N
929 
930  org.openide.awt.Mnemonics.setLocalizedText(maxMemoryUnitsLabel, org.openide.util.NbBundle.getMessage(AutopsyOptionsPanel.class, "AutopsyOptionsPanel.maxMemoryUnitsLabel.text")); // NOI18N
931 
932  org.openide.awt.Mnemonics.setLocalizedText(totalMemoryLabel, org.openide.util.NbBundle.getMessage(AutopsyOptionsPanel.class, "AutopsyOptionsPanel.totalMemoryLabel.text")); // NOI18N
933 
934  systemMemoryTotal.setHorizontalAlignment(javax.swing.SwingConstants.TRAILING);
935 
936  restartNecessaryWarning.setIcon(new javax.swing.ImageIcon(getClass().getResource("/org/sleuthkit/autopsy/corecomponents/warning16.png"))); // NOI18N
937  org.openide.awt.Mnemonics.setLocalizedText(restartNecessaryWarning, org.openide.util.NbBundle.getMessage(AutopsyOptionsPanel.class, "AutopsyOptionsPanel.restartNecessaryWarning.text")); // NOI18N
938 
939  memField.setHorizontalAlignment(javax.swing.JTextField.TRAILING);
940  memField.addKeyListener(new java.awt.event.KeyAdapter() {
941  public void keyReleased(java.awt.event.KeyEvent evt) {
942  memFieldKeyReleased(evt);
943  }
944  });
945 
946  memFieldValidationLabel.setForeground(new java.awt.Color(255, 0, 0));
947 
948  org.openide.awt.Mnemonics.setLocalizedText(maxMemoryUnitsLabel1, org.openide.util.NbBundle.getMessage(AutopsyOptionsPanel.class, "AutopsyOptionsPanel.maxMemoryUnitsLabel.text")); // NOI18N
949 
950  org.openide.awt.Mnemonics.setLocalizedText(maxLogFileCount, org.openide.util.NbBundle.getMessage(AutopsyOptionsPanel.class, "AutopsyOptionsPanel.maxLogFileCount.text")); // NOI18N
951 
952  logFileCount.setHorizontalAlignment(javax.swing.JTextField.TRAILING);
953  logFileCount.addKeyListener(new java.awt.event.KeyAdapter() {
954  public void keyReleased(java.awt.event.KeyEvent evt) {
955  logFileCountKeyReleased(evt);
956  }
957  });
958 
959  logNumAlert.setEditable(false);
960  logNumAlert.setForeground(new java.awt.Color(255, 0, 0));
961  logNumAlert.setText(org.openide.util.NbBundle.getMessage(AutopsyOptionsPanel.class, "AutopsyOptionsPanel.logNumAlert.text")); // NOI18N
962  logNumAlert.setBorder(null);
963 
964  org.openide.awt.Mnemonics.setLocalizedText(maxSolrMemoryLabel, org.openide.util.NbBundle.getMessage(AutopsyOptionsPanel.class, "AutopsyOptionsPanel.maxSolrMemoryLabel.text")); // NOI18N
965 
966  org.openide.awt.Mnemonics.setLocalizedText(maxMemoryUnitsLabel2, org.openide.util.NbBundle.getMessage(AutopsyOptionsPanel.class, "AutopsyOptionsPanel.maxMemoryUnitsLabel2.text")); // NOI18N
967 
968  solrMaxHeapSpinner.addChangeListener(new javax.swing.event.ChangeListener() {
969  public void stateChanged(javax.swing.event.ChangeEvent evt) {
970  solrMaxHeapSpinnerStateChanged(evt);
971  }
972  });
973 
974  org.openide.awt.Mnemonics.setLocalizedText(solrJVMHeapWarning, org.openide.util.NbBundle.getMessage(AutopsyOptionsPanel.class, "AutopsyOptionsPanel.solrJVMHeapWarning.text")); // NOI18N
975 
976  org.openide.awt.Mnemonics.setLocalizedText(heapFileLabel, org.openide.util.NbBundle.getMessage(AutopsyOptionsPanel.class, "AutopsyOptionsPanel.heapFileLabel.text")); // NOI18N
977 
978  heapDumpFileField.setText(org.openide.util.NbBundle.getMessage(AutopsyOptionsPanel.class, "AutopsyOptionsPanel.heapDumpFileField.text")); // NOI18N
979 
980  org.openide.awt.Mnemonics.setLocalizedText(heapDumpBrowseButton, org.openide.util.NbBundle.getMessage(AutopsyOptionsPanel.class, "AutopsyOptionsPanel.heapDumpBrowseButton.text")); // NOI18N
981  heapDumpBrowseButton.addActionListener(new java.awt.event.ActionListener() {
982  public void actionPerformed(java.awt.event.ActionEvent evt) {
983  heapDumpBrowseButtonActionPerformed(evt);
984  }
985  });
986 
987  heapFieldValidationLabel.setForeground(new java.awt.Color(255, 0, 0));
988  org.openide.awt.Mnemonics.setLocalizedText(heapFieldValidationLabel, org.openide.util.NbBundle.getMessage(AutopsyOptionsPanel.class, "AutopsyOptionsPanel.heapFieldValidationLabel.text")); // NOI18N
989 
990  javax.swing.GroupLayout runtimePanelLayout = new javax.swing.GroupLayout(runtimePanel);
991  runtimePanel.setLayout(runtimePanelLayout);
992  runtimePanelLayout.setHorizontalGroup(
993  runtimePanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
994  .addGroup(runtimePanelLayout.createSequentialGroup()
995  .addContainerGap()
996  .addGroup(runtimePanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
997  .addGroup(runtimePanelLayout.createSequentialGroup()
998  .addGroup(runtimePanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
999  .addComponent(totalMemoryLabel)
1000  .addComponent(maxSolrMemoryLabel)
1001  .addComponent(maxMemoryLabel)
1002  .addComponent(maxLogFileCount))
1003  .addGap(12, 12, 12)
1004  .addGroup(runtimePanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
1005  .addComponent(logFileCount, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.PREFERRED_SIZE, 37, javax.swing.GroupLayout.PREFERRED_SIZE)
1006  .addComponent(solrMaxHeapSpinner, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
1007  .addComponent(memField, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.PREFERRED_SIZE, 37, javax.swing.GroupLayout.PREFERRED_SIZE)
1008  .addComponent(systemMemoryTotal, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.PREFERRED_SIZE, 37, javax.swing.GroupLayout.PREFERRED_SIZE))
1009  .addGap(18, 18, 18)
1010  .addGroup(runtimePanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
1011  .addComponent(maxMemoryUnitsLabel1)
1012  .addComponent(maxMemoryUnitsLabel)
1013  .addComponent(maxMemoryUnitsLabel2))
1014  .addGroup(runtimePanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
1015  .addGroup(runtimePanelLayout.createSequentialGroup()
1016  .addGap(23, 23, 23)
1017  .addComponent(memFieldValidationLabel, javax.swing.GroupLayout.PREFERRED_SIZE, 478, javax.swing.GroupLayout.PREFERRED_SIZE)
1018  .addContainerGap(117, Short.MAX_VALUE))
1019  .addGroup(runtimePanelLayout.createSequentialGroup()
1020  .addGap(18, 18, 18)
1021  .addComponent(solrJVMHeapWarning, javax.swing.GroupLayout.PREFERRED_SIZE, 331, javax.swing.GroupLayout.PREFERRED_SIZE)
1022  .addGap(44, 44, 44)
1023  .addComponent(logNumAlert)
1024  .addContainerGap())))
1025  .addGroup(runtimePanelLayout.createSequentialGroup()
1026  .addGroup(runtimePanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
1027  .addComponent(restartNecessaryWarning, javax.swing.GroupLayout.PREFERRED_SIZE, 615, javax.swing.GroupLayout.PREFERRED_SIZE)
1028  .addGroup(runtimePanelLayout.createSequentialGroup()
1029  .addComponent(heapFileLabel)
1030  .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
1031  .addGroup(runtimePanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
1032  .addComponent(heapFieldValidationLabel, javax.swing.GroupLayout.PREFERRED_SIZE, 478, javax.swing.GroupLayout.PREFERRED_SIZE)
1033  .addGroup(runtimePanelLayout.createSequentialGroup()
1034  .addComponent(heapDumpFileField, javax.swing.GroupLayout.PREFERRED_SIZE, 415, javax.swing.GroupLayout.PREFERRED_SIZE)
1035  .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
1036  .addComponent(heapDumpBrowseButton)))))
1037  .addGap(0, 0, Short.MAX_VALUE))))
1038  );
1039 
1040  runtimePanelLayout.linkSize(javax.swing.SwingConstants.HORIZONTAL, new java.awt.Component[] {maxLogFileCount, maxMemoryLabel, totalMemoryLabel});
1041 
1042  runtimePanelLayout.linkSize(javax.swing.SwingConstants.HORIZONTAL, new java.awt.Component[] {logFileCount, memField});
1043 
1044  runtimePanelLayout.setVerticalGroup(
1045  runtimePanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
1046  .addGroup(runtimePanelLayout.createSequentialGroup()
1047  .addContainerGap()
1048  .addGroup(runtimePanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
1049  .addComponent(totalMemoryLabel)
1050  .addComponent(maxMemoryUnitsLabel1)
1051  .addComponent(systemMemoryTotal, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
1052  .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
1053  .addGroup(runtimePanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
1054  .addComponent(memFieldValidationLabel, javax.swing.GroupLayout.PREFERRED_SIZE, 16, javax.swing.GroupLayout.PREFERRED_SIZE)
1055  .addGroup(runtimePanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
1056  .addComponent(maxMemoryLabel)
1057  .addComponent(memField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
1058  .addComponent(maxMemoryUnitsLabel)))
1059  .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
1060  .addGroup(runtimePanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
1061  .addComponent(logNumAlert, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
1062  .addGroup(runtimePanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
1063  .addComponent(maxSolrMemoryLabel)
1064  .addComponent(maxMemoryUnitsLabel2)
1065  .addComponent(solrMaxHeapSpinner, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
1066  .addComponent(solrJVMHeapWarning)))
1067  .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
1068  .addGroup(runtimePanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
1069  .addComponent(maxLogFileCount)
1070  .addComponent(logFileCount, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
1071  .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
1072  .addGroup(runtimePanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
1073  .addComponent(heapFileLabel)
1074  .addComponent(heapDumpFileField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
1075  .addComponent(heapDumpBrowseButton))
1076  .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
1077  .addComponent(heapFieldValidationLabel, javax.swing.GroupLayout.PREFERRED_SIZE, 16, javax.swing.GroupLayout.PREFERRED_SIZE)
1078  .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
1079  .addComponent(restartNecessaryWarning)
1080  .addContainerGap())
1081  );
1082 
1083  gridBagConstraints = new java.awt.GridBagConstraints();
1084  gridBagConstraints.gridx = 0;
1085  gridBagConstraints.gridy = 0;
1086  gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
1087  gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
1088  mainPanel.add(runtimePanel, gridBagConstraints);
1089 
1090  tempDirectoryPanel.setBorder(javax.swing.BorderFactory.createTitledBorder(org.openide.util.NbBundle.getMessage(AutopsyOptionsPanel.class, "AutopsyOptionsPanel.tempDirectoryPanel.border.title"))); // NOI18N
1091  tempDirectoryPanel.setName(org.openide.util.NbBundle.getMessage(AutopsyOptionsPanel.class, "AutopsyOptionsPanel.tempDirectoryPanel.name")); // NOI18N
1092 
1093  tempCustomField.setText(org.openide.util.NbBundle.getMessage(AutopsyOptionsPanel.class, "AutopsyOptionsPanel.tempCustomField.text")); // NOI18N
1094 
1095  org.openide.awt.Mnemonics.setLocalizedText(tempDirectoryBrowseButton, org.openide.util.NbBundle.getMessage(AutopsyOptionsPanel.class, "AutopsyOptionsPanel.tempDirectoryBrowseButton.text")); // NOI18N
1096  tempDirectoryBrowseButton.addActionListener(new java.awt.event.ActionListener() {
1097  public void actionPerformed(java.awt.event.ActionEvent evt) {
1098  tempDirectoryBrowseButtonActionPerformed(evt);
1099  }
1100  });
1101 
1102  tempDirectoryWarningLabel.setIcon(new javax.swing.ImageIcon(getClass().getResource("/org/sleuthkit/autopsy/corecomponents/warning16.png"))); // NOI18N
1103  org.openide.awt.Mnemonics.setLocalizedText(tempDirectoryWarningLabel, org.openide.util.NbBundle.getMessage(AutopsyOptionsPanel.class, "AutopsyOptionsPanel.tempDirectoryWarningLabel.text")); // NOI18N
1104 
1105  tempDirChoiceGroup.add(tempLocalRadio);
1106  org.openide.awt.Mnemonics.setLocalizedText(tempLocalRadio, org.openide.util.NbBundle.getMessage(AutopsyOptionsPanel.class, "AutopsyOptionsPanel.tempLocalRadio.text")); // NOI18N
1107  tempLocalRadio.addActionListener(new java.awt.event.ActionListener() {
1108  public void actionPerformed(java.awt.event.ActionEvent evt) {
1109  tempLocalRadioActionPerformed(evt);
1110  }
1111  });
1112 
1113  tempDirChoiceGroup.add(tempCaseRadio);
1114  org.openide.awt.Mnemonics.setLocalizedText(tempCaseRadio, org.openide.util.NbBundle.getMessage(AutopsyOptionsPanel.class, "AutopsyOptionsPanel.tempCaseRadio.text")); // NOI18N
1115  tempCaseRadio.addActionListener(new java.awt.event.ActionListener() {
1116  public void actionPerformed(java.awt.event.ActionEvent evt) {
1117  tempCaseRadioActionPerformed(evt);
1118  }
1119  });
1120 
1121  tempDirChoiceGroup.add(tempCustomRadio);
1122  org.openide.awt.Mnemonics.setLocalizedText(tempCustomRadio, org.openide.util.NbBundle.getMessage(AutopsyOptionsPanel.class, "AutopsyOptionsPanel.tempCustomRadio.text")); // NOI18N
1123  tempCustomRadio.addActionListener(new java.awt.event.ActionListener() {
1124  public void actionPerformed(java.awt.event.ActionEvent evt) {
1125  tempCustomRadioActionPerformed(evt);
1126  }
1127  });
1128 
1129  tempOnCustomNoPath.setForeground(java.awt.Color.RED);
1130  org.openide.awt.Mnemonics.setLocalizedText(tempOnCustomNoPath, org.openide.util.NbBundle.getMessage(AutopsyOptionsPanel.class, "AutopsyOptionsPanel.tempOnCustomNoPath.text")); // NOI18N
1131 
1132  javax.swing.GroupLayout tempDirectoryPanelLayout = new javax.swing.GroupLayout(tempDirectoryPanel);
1133  tempDirectoryPanel.setLayout(tempDirectoryPanelLayout);
1134  tempDirectoryPanelLayout.setHorizontalGroup(
1135  tempDirectoryPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
1136  .addGroup(tempDirectoryPanelLayout.createSequentialGroup()
1137  .addContainerGap()
1138  .addGroup(tempDirectoryPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
1139  .addComponent(tempLocalRadio)
1140  .addComponent(tempCaseRadio)
1141  .addComponent(tempDirectoryWarningLabel, javax.swing.GroupLayout.PREFERRED_SIZE, 615, javax.swing.GroupLayout.PREFERRED_SIZE)
1142  .addGroup(tempDirectoryPanelLayout.createSequentialGroup()
1143  .addComponent(tempCustomRadio)
1144  .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
1145  .addGroup(tempDirectoryPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
1146  .addComponent(tempOnCustomNoPath)
1147  .addGroup(tempDirectoryPanelLayout.createSequentialGroup()
1148  .addComponent(tempCustomField, javax.swing.GroupLayout.PREFERRED_SIZE, 459, javax.swing.GroupLayout.PREFERRED_SIZE)
1149  .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
1150  .addComponent(tempDirectoryBrowseButton)))))
1151  .addContainerGap(269, Short.MAX_VALUE))
1152  );
1153  tempDirectoryPanelLayout.setVerticalGroup(
1154  tempDirectoryPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
1155  .addGroup(tempDirectoryPanelLayout.createSequentialGroup()
1156  .addContainerGap()
1157  .addComponent(tempLocalRadio)
1158  .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
1159  .addComponent(tempCaseRadio)
1160  .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
1161  .addGroup(tempDirectoryPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
1162  .addComponent(tempCustomRadio)
1163  .addComponent(tempCustomField)
1164  .addComponent(tempDirectoryBrowseButton))
1165  .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
1166  .addComponent(tempOnCustomNoPath)
1167  .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
1168  .addComponent(tempDirectoryWarningLabel)
1169  .addGap(14, 14, 14))
1170  );
1171 
1172  gridBagConstraints = new java.awt.GridBagConstraints();
1173  gridBagConstraints.gridx = 0;
1174  gridBagConstraints.gridy = 1;
1175  gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
1176  gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
1177  mainPanel.add(tempDirectoryPanel, gridBagConstraints);
1178  tempDirectoryPanel.getAccessibleContext().setAccessibleName(org.openide.util.NbBundle.getMessage(AutopsyOptionsPanel.class, "AutopsyOptionsPanel.tempDirectoryPanel.AccessibleContext.accessibleName")); // NOI18N
1179 
1180  rdpPanel.setBorder(javax.swing.BorderFactory.createTitledBorder(org.openide.util.NbBundle.getMessage(AutopsyOptionsPanel.class, "AutopsyOptionsPanel.rdpPanel.border.title"))); // NOI18N
1181  rdpPanel.setMaximumSize(new java.awt.Dimension(300, 175));
1182  rdpPanel.setMinimumSize(new java.awt.Dimension(300, 175));
1183  rdpPanel.setPreferredSize(new java.awt.Dimension(300, 175));
1184  rdpPanel.setLayout(new java.awt.GridBagLayout());
1185 
1186  sizingScrollPane.setBorder(null);
1187 
1188  sizingTextPane.setEditable(false);
1189  sizingTextPane.setBorder(null);
1190  sizingTextPane.setText(org.openide.util.NbBundle.getMessage(AutopsyOptionsPanel.class, "AutopsyOptionsPanel.sizingTextPane.text")); // NOI18N
1191  sizingTextPane.setAutoscrolls(false);
1192  sizingTextPane.setMinimumSize(new java.awt.Dimension(453, 220));
1193  sizingTextPane.setOpaque(false);
1194  sizingTextPane.setPreferredSize(new java.awt.Dimension(453, 220));
1195  sizingTextPane.setSelectionStart(0);
1196  sizingScrollPane.setViewportView(sizingTextPane);
1197 
1198  gridBagConstraints = new java.awt.GridBagConstraints();
1199  gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
1200  gridBagConstraints.weightx = 1.0;
1201  gridBagConstraints.weighty = 1.0;
1202  rdpPanel.add(sizingScrollPane, gridBagConstraints);
1203 
1204  gridBagConstraints = new java.awt.GridBagConstraints();
1205  gridBagConstraints.gridy = 3;
1206  gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
1207  mainPanel.add(rdpPanel, gridBagConstraints);
1208  gridBagConstraints = new java.awt.GridBagConstraints();
1209  gridBagConstraints.gridx = 1;
1210  gridBagConstraints.gridy = 0;
1211  gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
1212  gridBagConstraints.weightx = 1.0;
1213  mainPanel.add(filler1, gridBagConstraints);
1214  gridBagConstraints = new java.awt.GridBagConstraints();
1215  gridBagConstraints.gridx = 0;
1216  gridBagConstraints.gridy = 4;
1217  gridBagConstraints.fill = java.awt.GridBagConstraints.VERTICAL;
1218  gridBagConstraints.weighty = 1.0;
1219  mainPanel.add(filler2, gridBagConstraints);
1220 
1221  jScrollPane1.setViewportView(mainPanel);
1222 
1223  javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);
1224  this.setLayout(layout);
1225  layout.setHorizontalGroup(
1226  layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
1227  .addComponent(jScrollPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 955, Short.MAX_VALUE)
1228  );
1229  layout.setVerticalGroup(
1230  layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
1231  .addComponent(jScrollPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 699, Short.MAX_VALUE)
1232  );
1233  }// </editor-fold>//GEN-END:initComponents
1234 
1235  @Messages({
1236  "AutopsyOptionsPanel_tempDirectoryBrowseButtonActionPerformed_onInvalidPath_title=Path cannot be used",
1237  "# {0} - path",
1238  "AutopsyOptionsPanel_tempDirectoryBrowseButtonActionPerformed_onInvalidPath_description=Unable to create temporary directory within specified path: {0}",})
1239  private void tempDirectoryBrowseButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_tempDirectoryBrowseButtonActionPerformed
1240  if(tempDirChooser == null) {
1241  tempDirChooser = tempChooserHelper.getChooser();
1242  tempDirChooser.setFileSelectionMode(JFileChooser.DIRECTORIES_ONLY);
1243  tempDirChooser.setMultiSelectionEnabled(false);
1244  }
1245  int returnState = tempDirChooser.showOpenDialog(this);
1246  if (returnState == JFileChooser.APPROVE_OPTION) {
1247  String specifiedPath = tempDirChooser.getSelectedFile().getPath();
1248  try {
1249  File f = new File(specifiedPath);
1250  if (!f.exists() && !f.mkdirs()) {
1251  throw new InvalidPathException(specifiedPath, "Unable to create parent directories leading to " + specifiedPath);
1252  }
1253  tempCustomField.setText(specifiedPath);
1254  firePropertyChange(OptionsPanelController.PROP_CHANGED, null, null);
1255  } catch (InvalidPathException ex) {
1256  logger.log(Level.WARNING, "Unable to create temporary directory in " + specifiedPath, ex);
1257  JOptionPane.showMessageDialog(this,
1258  Bundle.AutopsyOptionsPanel_tempDirectoryBrowseButtonActionPerformed_onInvalidPath_description(specifiedPath),
1259  Bundle.AutopsyOptionsPanel_tempDirectoryBrowseButtonActionPerformed_onInvalidPath_title(),
1260  JOptionPane.ERROR_MESSAGE);
1261  }
1262  }
1263  }//GEN-LAST:event_tempDirectoryBrowseButtonActionPerformed
1264 
1265  private void solrMaxHeapSpinnerStateChanged(javax.swing.event.ChangeEvent evt) {//GEN-FIRST:event_solrMaxHeapSpinnerStateChanged
1266  int value = (int) solrMaxHeapSpinner.getValue();
1267  if (value == UserPreferences.getMaxSolrVMSize()) {
1268  // if the value hasn't changed there's nothing to do.
1269  return;
1270  }
1271  firePropertyChange(OptionsPanelController.PROP_CHANGED, null, null);
1272  }//GEN-LAST:event_solrMaxHeapSpinnerStateChanged
1273 
1274  private void logFileCountKeyReleased(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_logFileCountKeyReleased
1275  String count = logFileCount.getText();
1276  if (count.equals(String.valueOf(UserPreferences.getDefaultLogFileCount()))) {
1277  //if it is still the default value don't fire change
1278  return;
1279  }
1280  firePropertyChange(OptionsPanelController.PROP_CHANGED, null, null);
1281  }//GEN-LAST:event_logFileCountKeyReleased
1282 
1283  private void memFieldKeyReleased(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_memFieldKeyReleased
1284  String memText = memField.getText();
1285  if (memText.equals(initialMemValue)) {
1286  //if it is still the initial value don't fire change
1287  return;
1288  }
1289  firePropertyChange(OptionsPanelController.PROP_CHANGED, null, null);
1290  }//GEN-LAST:event_memFieldKeyReleased
1291 
1292  private void specifyLogoRBActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_specifyLogoRBActionPerformed
1293  agencyLogoPathField.setEnabled(true);
1294  browseLogosButton.setEnabled(true);
1295  try {
1296  if (agencyLogoPathField.getText().isEmpty()) {
1297  String path = reportBranding.getAgencyLogoPath();
1298  if (path != null && !path.isEmpty()) {
1299  updateAgencyLogo(path);
1300  }
1301  }
1302  } catch (IOException ex) {
1303  logger.log(Level.WARNING, "Error loading image from previously saved agency logo path.", ex);
1304  }
1305  firePropertyChange(OptionsPanelController.PROP_CHANGED, null, null);
1306  }//GEN-LAST:event_specifyLogoRBActionPerformed
1307 
1308  private void defaultLogoRBActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_defaultLogoRBActionPerformed
1309  agencyLogoPathField.setEnabled(false);
1310  browseLogosButton.setEnabled(false);
1311  try {
1312  updateAgencyLogo("");
1313  } catch (IOException ex) {
1314  // This should never happen since we're not reading from a file.
1315  logger.log(Level.SEVERE, "Unexpected error occurred while updating the agency logo.", ex);
1316  }
1317  firePropertyChange(OptionsPanelController.PROP_CHANGED, null, null);
1318  }//GEN-LAST:event_defaultLogoRBActionPerformed
1319 
1320  private void browseLogosButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_browseLogosButtonActionPerformed
1321  if(logoFileChooser == null) {
1322  logoFileChooser = logoChooserHelper.getChooser();
1323  logoFileChooser.setFileSelectionMode(JFileChooser.FILES_ONLY);
1324  logoFileChooser.setMultiSelectionEnabled(false);
1325  logoFileChooser.setAcceptAllFileFilterUsed(false);
1326  logoFileChooser.setFileFilter(new GeneralFilter(GeneralFilter.GRAPHIC_IMAGE_EXTS, GeneralFilter.GRAPHIC_IMG_DECR));
1327  }
1328  String oldLogoPath = agencyLogoPathField.getText();
1329  int returnState = logoFileChooser.showOpenDialog(this);
1330  if (returnState == JFileChooser.APPROVE_OPTION) {
1331  String path = logoFileChooser.getSelectedFile().getPath();
1332  try {
1333  updateAgencyLogo(path);
1334  firePropertyChange(OptionsPanelController.PROP_CHANGED, null, null);
1335  } catch (IOException | IndexOutOfBoundsException ex) {
1336  JOptionPane.showMessageDialog(this,
1337  NbBundle.getMessage(this.getClass(),
1338  "AutopsyOptionsPanel.invalidImageFile.msg"),
1339  NbBundle.getMessage(this.getClass(), "AutopsyOptionsPanel.invalidImageFile.title"),
1340  JOptionPane.ERROR_MESSAGE);
1341  try {
1342  updateAgencyLogo(oldLogoPath); //restore previous setting if new one is invalid
1343  } catch (IOException ex1) {
1344  logger.log(Level.WARNING, "Error loading image from previously saved agency logo path", ex1);
1345  }
1346  }
1347  }
1348  }//GEN-LAST:event_browseLogosButtonActionPerformed
1349 
1350  private void tempLocalRadioActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_tempLocalRadioActionPerformed
1351  firePropertyChange(OptionsPanelController.PROP_CHANGED, null, null);
1352  evaluateTempDirState();
1353  }//GEN-LAST:event_tempLocalRadioActionPerformed
1354 
1355  private void tempCaseRadioActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_tempCaseRadioActionPerformed
1356  firePropertyChange(OptionsPanelController.PROP_CHANGED, null, null);
1357  evaluateTempDirState();
1358  }//GEN-LAST:event_tempCaseRadioActionPerformed
1359 
1360  private void tempCustomRadioActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_tempCustomRadioActionPerformed
1361  firePropertyChange(OptionsPanelController.PROP_CHANGED, null, null);
1362  evaluateTempDirState();
1363  }//GEN-LAST:event_tempCustomRadioActionPerformed
1364 
1365  @Messages({
1366  "AutopsyOptionsPanel_heapDumpBrowseButtonActionPerformed_fileAlreadyExistsTitle=File Already Exists",
1367  "AutopsyOptionsPanel_heapDumpBrowseButtonActionPerformed_fileAlreadyExistsMessage=File already exists. Please select a new location."
1368  })
1369  private void heapDumpBrowseButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_heapDumpBrowseButtonActionPerformed
1370  if(heapFileChooser == null) {
1371  heapFileChooser = heapChooserHelper.getChooser();
1372  heapFileChooser.setFileSelectionMode(JFileChooser.DIRECTORIES_ONLY);
1373  heapFileChooser.setMultiSelectionEnabled(false);
1374  }
1375  String oldHeapPath = heapDumpFileField.getText();
1376  if (!StringUtils.isBlank(oldHeapPath)) {
1377  heapFileChooser.setCurrentDirectory(new File(oldHeapPath));
1378  }
1379 
1380  int returnState = heapFileChooser.showOpenDialog(this);
1381  if (returnState == JFileChooser.APPROVE_OPTION) {
1382  File selectedDirectory = heapFileChooser.getSelectedFile();
1383  heapDumpFileField.setText(selectedDirectory.getAbsolutePath());
1384  firePropertyChange(OptionsPanelController.PROP_CHANGED, null, null);
1385  }
1386  }//GEN-LAST:event_heapDumpBrowseButtonActionPerformed
1387 
1388  // Variables declaration - do not modify//GEN-BEGIN:variables
1389  private javax.swing.JTextField agencyLogoPathField;
1390  private javax.swing.JLabel agencyLogoPathFieldValidationLabel;
1391  private javax.swing.JLabel agencyLogoPreview;
1392  private javax.swing.JButton browseLogosButton;
1393  private javax.swing.JRadioButton defaultLogoRB;
1394  private javax.swing.ButtonGroup displayTimesButtonGroup;
1395  private javax.swing.ButtonGroup fileSelectionButtonGroup;
1396  private javax.swing.JButton heapDumpBrowseButton;
1397  private javax.swing.JTextField heapDumpFileField;
1398  private javax.swing.JLabel heapFieldValidationLabel;
1399  private javax.swing.JLabel heapFileLabel;
1400  private javax.swing.JScrollPane jScrollPane1;
1401  private javax.swing.JTextField logFileCount;
1402  private javax.swing.JTextField logNumAlert;
1403  private javax.swing.JPanel logoPanel;
1404  private javax.swing.ButtonGroup logoSourceButtonGroup;
1405  private javax.swing.JLabel maxLogFileCount;
1406  private javax.swing.JLabel maxMemoryLabel;
1407  private javax.swing.JLabel maxMemoryUnitsLabel;
1408  private javax.swing.JLabel maxMemoryUnitsLabel1;
1409  private javax.swing.JLabel maxMemoryUnitsLabel2;
1410  private javax.swing.JLabel maxSolrMemoryLabel;
1411  private javax.swing.JTextField memField;
1412  private javax.swing.JLabel memFieldValidationLabel;
1413  private javax.swing.JPanel rdpPanel;
1414  private javax.swing.JLabel restartNecessaryWarning;
1415  private javax.swing.JPanel runtimePanel;
1416  private javax.swing.JLabel solrJVMHeapWarning;
1417  private javax.swing.JSpinner solrMaxHeapSpinner;
1418  private javax.swing.JRadioButton specifyLogoRB;
1419  private javax.swing.JLabel systemMemoryTotal;
1420  private javax.swing.JRadioButton tempCaseRadio;
1421  private javax.swing.JTextField tempCustomField;
1422  private javax.swing.JRadioButton tempCustomRadio;
1423  private javax.swing.ButtonGroup tempDirChoiceGroup;
1424  private javax.swing.JButton tempDirectoryBrowseButton;
1425  private javax.swing.JPanel tempDirectoryPanel;
1426  private javax.swing.JLabel tempDirectoryWarningLabel;
1427  private javax.swing.JRadioButton tempLocalRadio;
1428  private javax.swing.JLabel tempOnCustomNoPath;
1429  private javax.swing.JLabel totalMemoryLabel;
1430  // End of variables declaration//GEN-END:variables
1431 
1432 }

Copyright © 2012-2022 Basis Technology. Generated on: Tue Feb 6 2024
This work is licensed under a Creative Commons Attribution-Share Alike 3.0 United States License.