Autopsy  4.19.3
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  memField.setEnabled(false);
510  heapDumpFileField.setText(DEFAULT_HEAP_DUMP_FILE_FIELD);
511  }
512  memField.setText(initialMemValue);
513  }
514 
515  heapDumpBrowseButton.setEnabled(confLoaded);
516  heapDumpFileField.setEnabled(confLoaded);
517 
518  setTempDirEnabled();
519  valid(); //ensure the error messages are up to date
520  }
521 
522  private void setTempDirEnabled() {
523  boolean enabled = !Case.isCaseOpen();
524 
525  this.tempCaseRadio.setEnabled(enabled);
526  this.tempCustomRadio.setEnabled(enabled);
527  this.tempLocalRadio.setEnabled(enabled);
528 
529  this.tempDirectoryWarningLabel.setVisible(!enabled);
530  evaluateTempDirState();
531  }
532 
540  private void updateAgencyLogo(String path) throws IOException {
541  agencyLogoPathField.setText(path);
542  ImageIcon agencyLogoIcon = new ImageIcon();
543  agencyLogoPreview.setText(NbBundle.getMessage(AutopsyOptionsPanel.class, "AutopsyOptionsPanel.agencyLogoPreview.text"));
544  if (!agencyLogoPathField.getText().isEmpty()) {
545  File file = new File(agencyLogoPathField.getText());
546  if (file.exists()) {
547  BufferedImage image = ImageIO.read(file); //create it as an image first to support BMP files
548  if (image == null) {
549  throw new IOException("Unable to read file as a BufferedImage for file " + file.toString());
550  }
551  agencyLogoIcon = new ImageIcon(image.getScaledInstance(64, 64, 4));
552  agencyLogoPreview.setText("");
553  }
554  }
555  agencyLogoPreview.setIcon(agencyLogoIcon);
556  agencyLogoPreview.repaint();
557  }
558 
559  @Messages({
560  "AutopsyOptionsPanel_storeTempDir_onError_title=Error Saving Temporary Directory",
561  "# {0} - path",
562  "AutopsyOptionsPanel_storeTempDir_onError_description=There was an error creating the temporary directory on the filesystem at: {0}.",
563  "AutopsyOptionsPanel_storeTempDir_onChoiceError_title=Error Saving Temporary Directory Choice",
564  "AutopsyOptionsPanel_storeTempDir_onChoiceError_description=There was an error updating temporary directory choice selection.",})
565  private void storeTempDir() {
566  String tempDirectoryPath = tempCustomField.getText();
567  if (!UserMachinePreferences.getCustomTempDirectory().equals(tempDirectoryPath)) {
568  try {
569  UserMachinePreferences.setCustomTempDirectory(tempDirectoryPath);
570  } catch (UserMachinePreferencesException ex) {
571  logger.log(Level.WARNING, "There was an error creating the temporary directory defined by the user: " + tempDirectoryPath, ex);
572  SwingUtilities.invokeLater(() -> {
573  JOptionPane.showMessageDialog(this,
574  String.format("<html>%s</html>", Bundle.AutopsyOptionsPanel_storeTempDir_onError_description(tempDirectoryPath)),
575  Bundle.AutopsyOptionsPanel_storeTempDir_onError_title(),
576  JOptionPane.ERROR_MESSAGE);
577  });
578  }
579  }
580 
581  TempDirChoice choice;
582  if (tempCaseRadio.isSelected()) {
583  choice = TempDirChoice.CASE;
584  } else if (tempCustomRadio.isSelected()) {
585  choice = TempDirChoice.CUSTOM;
586  } else {
587  choice = TempDirChoice.SYSTEM;
588  }
589 
590  if (!choice.equals(UserMachinePreferences.getTempDirChoice())) {
591  try {
592  UserMachinePreferences.setTempDirChoice(choice);
593  } catch (UserMachinePreferencesException ex) {
594  logger.log(Level.WARNING, "There was an error updating choice to: " + choice.name(), ex);
595  SwingUtilities.invokeLater(() -> {
596  JOptionPane.showMessageDialog(this,
597  String.format("<html>%s</html>", Bundle.AutopsyOptionsPanel_storeTempDir_onChoiceError_description()),
598  Bundle.AutopsyOptionsPanel_storeTempDir_onChoiceError_title(),
599  JOptionPane.ERROR_MESSAGE);
600  });
601  }
602  }
603  }
604 
608  void store() {
609  UserPreferences.setLogFileCount(Integer.parseInt(logFileCount.getText()));
610  storeTempDir();
611 
612  if (!agencyLogoPathField.getText().isEmpty()) {
613  File file = new File(agencyLogoPathField.getText());
614  if (file.exists()) {
615  reportBranding.setAgencyLogoPath(agencyLogoPathField.getText());
616  }
617  } else {
618  reportBranding.setAgencyLogoPath("");
619  }
620  UserPreferences.setMaxSolrVMSize((int) solrMaxHeapSpinner.getValue());
621  if (isJVMHeapSettingsCapable()) { //if the field could of been changed we need to try and save it
622  try {
623  writeEtcConfFile();
624  } catch (IOException ex) {
625  logger.log(Level.WARNING, "Unable to save config file to " + PlatformUtil.getUserDirectory() + "\\" + ETC_FOLDER_NAME, ex);
626  }
627  }
628  }
629 
635  boolean valid() {
636  boolean agencyValid = isAgencyLogoPathValid();
637  boolean memFieldValid = isMemFieldValid();
638  boolean logNumValid = isLogNumFieldValid();
639  boolean heapPathValid = isHeapPathValid();
640 
641  return agencyValid && memFieldValid && logNumValid && heapPathValid;
642  }
643 
650  boolean isAgencyLogoPathValid() {
651  boolean valid = true;
652 
653  if (defaultLogoRB.isSelected()) {
654  agencyLogoPathFieldValidationLabel.setText("");
655  } else {
656  String agencyLogoPath = agencyLogoPathField.getText();
657  if (agencyLogoPath.isEmpty()) {
658  agencyLogoPathFieldValidationLabel.setText(Bundle.AutopsyOptionsPanel_agencyLogoPathFieldValidationLabel_pathNotSet_text());
659  valid = false;
660  } else {
661  File file = new File(agencyLogoPathField.getText());
662  if (file.exists() && file.isFile()) {
663  BufferedImage image;
664  try { //ensure the image can be read
665  image = ImageIO.read(file); //create it as an image first to support BMP files
666  if (image == null) {
667  throw new IOException("Unable to read file as a BufferedImage for file " + file.toString());
668  }
669  agencyLogoPathFieldValidationLabel.setText("");
670  } catch (IOException | IndexOutOfBoundsException ignored) {
671  agencyLogoPathFieldValidationLabel.setText(Bundle.AutopsyOptionsPanel_agencyLogoPathFieldValidationLabel_invalidImageSpecified_text());
672  valid = false;
673  }
674  } else {
675  agencyLogoPathFieldValidationLabel.setText(Bundle.AutopsyOptionsPanel_agencyLogoPathFieldValidationLabel_invalidPath_text());
676  valid = false;
677  }
678  }
679  }
680 
681  return valid;
682  }
683 
689  private boolean isMemFieldValid() {
690  String memText = memField.getText();
691  memFieldValidationLabel.setText("");
692  if (!PlatformUtil.is64BitJVM()) {
693  memFieldValidationLabel.setText(Bundle.AutopsyOptionsPanel_memFieldValidationLabel_not64BitInstall_text());
694  //the panel should be valid when it is a 32 bit jvm because the memfield will be disabled.
695  return true;
696  }
697  if (Version.getBuildType() == Version.Type.DEVELOPMENT) {
698  memFieldValidationLabel.setText(Bundle.AutopsyOptionsPanel_memFieldValidationLabel_developerMode_text());
699  //the panel should be valid when you are running in developer mode because the memfield will be disabled
700  return true;
701  }
702  if (memText.length() == 0) {
703  memFieldValidationLabel.setText(Bundle.AutopsyOptionsPanel_memFieldValidationLabel_noValueEntered_text());
704  return false;
705  }
706  if (memText.replaceAll("[^\\d]", "").length() != memText.length()) {
707  memFieldValidationLabel.setText(Bundle.AutopsyOptionsPanel_memFieldValidationLabel_invalidCharacters_text());
708  return false;
709  }
710  int parsedInt = Integer.parseInt(memText);
711  if (parsedInt < MIN_MEMORY_IN_GB) {
712  memFieldValidationLabel.setText(Bundle.AutopsyOptionsPanel_memFieldValidationLabel_underMinMemory_text(MIN_MEMORY_IN_GB));
713  return false;
714  }
715  if (parsedInt > getSystemMemoryInGB()) {
716  memFieldValidationLabel.setText(Bundle.AutopsyOptionsPanel_memFieldValidationLabel_overMaxMemory_text(getSystemMemoryInGB()));
717  return false;
718  }
719  return true;
720  }
721 
727  private boolean isLogNumFieldValid() {
728  String count = logFileCount.getText();
729  logNumAlert.setText("");
730  try {
731  int count_num = Integer.parseInt(count);
732  if (count_num < 1) {
733  logNumAlert.setText(Bundle.AutopsyOptionsPanel_logNumAlert_invalidInput_text());
734  return false;
735  }
736  } catch (NumberFormatException e) {
737  logNumAlert.setText(Bundle.AutopsyOptionsPanel_logNumAlert_invalidInput_text());
738  return false;
739  }
740  return true;
741  }
742 
747  private class TextFieldListener implements DocumentListener {
748  private final Runnable onChange;
749 
750 
755  TextFieldListener(Runnable onChange) {
756  this.onChange = onChange;
757  }
758 
759  private void baseOnChange() {
760  if (onChange != null) {
761  onChange.run();
762  }
763 
764  firePropertyChange(OptionsPanelController.PROP_CHANGED, null, null);
765  }
766 
767  @Override
768  public void changedUpdate(DocumentEvent e) {
769  baseOnChange();
770  }
771 
772  @Override
773  public void removeUpdate(DocumentEvent e) {
774  baseOnChange();
775  }
776 
777  @Override
778  public void insertUpdate(DocumentEvent e) {
779  baseOnChange();
780  }
781 
782 
783  }
784 
790  // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
791  private void initComponents() {
792  java.awt.GridBagConstraints gridBagConstraints;
793 
794  fileSelectionButtonGroup = new javax.swing.ButtonGroup();
795  displayTimesButtonGroup = new javax.swing.ButtonGroup();
796  logoSourceButtonGroup = new javax.swing.ButtonGroup();
797  tempDirChoiceGroup = new javax.swing.ButtonGroup();
798  jScrollPane1 = new javax.swing.JScrollPane();
799  javax.swing.JPanel mainPanel = new javax.swing.JPanel();
800  logoPanel = new javax.swing.JPanel();
801  agencyLogoPathField = new javax.swing.JTextField();
802  browseLogosButton = new javax.swing.JButton();
803  agencyLogoPreview = new javax.swing.JLabel();
804  defaultLogoRB = new javax.swing.JRadioButton();
805  specifyLogoRB = new javax.swing.JRadioButton();
806  agencyLogoPathFieldValidationLabel = new javax.swing.JLabel();
807  runtimePanel = new javax.swing.JPanel();
808  maxMemoryLabel = new javax.swing.JLabel();
809  maxMemoryUnitsLabel = new javax.swing.JLabel();
810  totalMemoryLabel = new javax.swing.JLabel();
811  systemMemoryTotal = new javax.swing.JLabel();
812  restartNecessaryWarning = new javax.swing.JLabel();
813  memField = new javax.swing.JTextField();
814  memFieldValidationLabel = new javax.swing.JLabel();
815  maxMemoryUnitsLabel1 = new javax.swing.JLabel();
816  maxLogFileCount = new javax.swing.JLabel();
817  logFileCount = new javax.swing.JTextField();
818  logNumAlert = new javax.swing.JTextField();
819  maxSolrMemoryLabel = new javax.swing.JLabel();
820  maxMemoryUnitsLabel2 = new javax.swing.JLabel();
821  solrMaxHeapSpinner = new javax.swing.JSpinner();
822  solrJVMHeapWarning = new javax.swing.JLabel();
823  heapFileLabel = new javax.swing.JLabel();
824  heapDumpFileField = new javax.swing.JTextField();
825  heapDumpBrowseButton = new javax.swing.JButton();
826  heapFieldValidationLabel = new javax.swing.JLabel();
827  tempDirectoryPanel = new javax.swing.JPanel();
828  tempCustomField = new javax.swing.JTextField();
829  tempDirectoryBrowseButton = new javax.swing.JButton();
830  tempDirectoryWarningLabel = new javax.swing.JLabel();
831  tempLocalRadio = new javax.swing.JRadioButton();
832  tempCaseRadio = new javax.swing.JRadioButton();
833  tempCustomRadio = new javax.swing.JRadioButton();
834  tempOnCustomNoPath = new javax.swing.JLabel();
835  rdpPanel = new javax.swing.JPanel();
836  javax.swing.JScrollPane sizingScrollPane = new javax.swing.JScrollPane();
837  javax.swing.JTextPane sizingTextPane = new javax.swing.JTextPane();
838  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));
839  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));
840 
841  jScrollPane1.setBorder(null);
842 
843  mainPanel.setMinimumSize(new java.awt.Dimension(648, 382));
844  mainPanel.setLayout(new java.awt.GridBagLayout());
845 
846  logoPanel.setBorder(javax.swing.BorderFactory.createTitledBorder(org.openide.util.NbBundle.getMessage(AutopsyOptionsPanel.class, "AutopsyOptionsPanel.logoPanel.border.title"))); // NOI18N
847 
848  agencyLogoPathField.setText(org.openide.util.NbBundle.getMessage(AutopsyOptionsPanel.class, "AutopsyOptionsPanel.agencyLogoPathField.text")); // NOI18N
849 
850  org.openide.awt.Mnemonics.setLocalizedText(browseLogosButton, org.openide.util.NbBundle.getMessage(AutopsyOptionsPanel.class, "AutopsyOptionsPanel.browseLogosButton.text")); // NOI18N
851  browseLogosButton.addActionListener(new java.awt.event.ActionListener() {
852  public void actionPerformed(java.awt.event.ActionEvent evt) {
853  browseLogosButtonActionPerformed(evt);
854  }
855  });
856 
857  agencyLogoPreview.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
858  org.openide.awt.Mnemonics.setLocalizedText(agencyLogoPreview, org.openide.util.NbBundle.getMessage(AutopsyOptionsPanel.class, "AutopsyOptionsPanel.agencyLogoPreview.text")); // NOI18N
859  agencyLogoPreview.setBorder(javax.swing.BorderFactory.createEtchedBorder());
860  agencyLogoPreview.setMaximumSize(new java.awt.Dimension(64, 64));
861  agencyLogoPreview.setMinimumSize(new java.awt.Dimension(64, 64));
862  agencyLogoPreview.setPreferredSize(new java.awt.Dimension(64, 64));
863 
864  logoSourceButtonGroup.add(defaultLogoRB);
865  org.openide.awt.Mnemonics.setLocalizedText(defaultLogoRB, org.openide.util.NbBundle.getMessage(AutopsyOptionsPanel.class, "AutopsyOptionsPanel.defaultLogoRB.text")); // NOI18N
866  defaultLogoRB.addActionListener(new java.awt.event.ActionListener() {
867  public void actionPerformed(java.awt.event.ActionEvent evt) {
868  defaultLogoRBActionPerformed(evt);
869  }
870  });
871 
872  logoSourceButtonGroup.add(specifyLogoRB);
873  org.openide.awt.Mnemonics.setLocalizedText(specifyLogoRB, org.openide.util.NbBundle.getMessage(AutopsyOptionsPanel.class, "AutopsyOptionsPanel.specifyLogoRB.text")); // NOI18N
874  specifyLogoRB.addActionListener(new java.awt.event.ActionListener() {
875  public void actionPerformed(java.awt.event.ActionEvent evt) {
876  specifyLogoRBActionPerformed(evt);
877  }
878  });
879 
880  agencyLogoPathFieldValidationLabel.setForeground(new java.awt.Color(255, 0, 0));
881  org.openide.awt.Mnemonics.setLocalizedText(agencyLogoPathFieldValidationLabel, org.openide.util.NbBundle.getMessage(AutopsyOptionsPanel.class, "AutopsyOptionsPanel.agencyLogoPathFieldValidationLabel.text")); // NOI18N
882 
883  javax.swing.GroupLayout logoPanelLayout = new javax.swing.GroupLayout(logoPanel);
884  logoPanel.setLayout(logoPanelLayout);
885  logoPanelLayout.setHorizontalGroup(
886  logoPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
887  .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, logoPanelLayout.createSequentialGroup()
888  .addContainerGap()
889  .addGroup(logoPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
890  .addComponent(specifyLogoRB)
891  .addComponent(defaultLogoRB))
892  .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
893  .addGroup(logoPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
894  .addComponent(agencyLogoPathFieldValidationLabel)
895  .addGroup(logoPanelLayout.createSequentialGroup()
896  .addComponent(agencyLogoPathField, javax.swing.GroupLayout.PREFERRED_SIZE, 270, javax.swing.GroupLayout.PREFERRED_SIZE)
897  .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
898  .addComponent(browseLogosButton)))
899  .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
900  .addComponent(agencyLogoPreview, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
901  .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
902  );
903  logoPanelLayout.setVerticalGroup(
904  logoPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
905  .addGroup(logoPanelLayout.createSequentialGroup()
906  .addGap(6, 6, 6)
907  .addGroup(logoPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
908  .addComponent(defaultLogoRB)
909  .addComponent(agencyLogoPathFieldValidationLabel))
910  .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
911  .addGroup(logoPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
912  .addComponent(specifyLogoRB)
913  .addComponent(agencyLogoPathField)
914  .addComponent(browseLogosButton)))
915  .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, logoPanelLayout.createSequentialGroup()
916  .addComponent(agencyLogoPreview, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
917  .addGap(0, 0, Short.MAX_VALUE))
918  );
919 
920  gridBagConstraints = new java.awt.GridBagConstraints();
921  gridBagConstraints.gridx = 0;
922  gridBagConstraints.gridy = 2;
923  gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
924  gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
925  mainPanel.add(logoPanel, gridBagConstraints);
926 
927  runtimePanel.setBorder(javax.swing.BorderFactory.createTitledBorder(org.openide.util.NbBundle.getMessage(AutopsyOptionsPanel.class, "AutopsyOptionsPanel.runtimePanel.border.title"))); // NOI18N
928 
929  org.openide.awt.Mnemonics.setLocalizedText(maxMemoryLabel, org.openide.util.NbBundle.getMessage(AutopsyOptionsPanel.class, "AutopsyOptionsPanel.maxMemoryLabel.text")); // NOI18N
930 
931  org.openide.awt.Mnemonics.setLocalizedText(maxMemoryUnitsLabel, org.openide.util.NbBundle.getMessage(AutopsyOptionsPanel.class, "AutopsyOptionsPanel.maxMemoryUnitsLabel.text")); // NOI18N
932 
933  org.openide.awt.Mnemonics.setLocalizedText(totalMemoryLabel, org.openide.util.NbBundle.getMessage(AutopsyOptionsPanel.class, "AutopsyOptionsPanel.totalMemoryLabel.text")); // NOI18N
934 
935  systemMemoryTotal.setHorizontalAlignment(javax.swing.SwingConstants.TRAILING);
936 
937  restartNecessaryWarning.setIcon(new javax.swing.ImageIcon(getClass().getResource("/org/sleuthkit/autopsy/corecomponents/warning16.png"))); // NOI18N
938  org.openide.awt.Mnemonics.setLocalizedText(restartNecessaryWarning, org.openide.util.NbBundle.getMessage(AutopsyOptionsPanel.class, "AutopsyOptionsPanel.restartNecessaryWarning.text")); // NOI18N
939 
940  memField.setHorizontalAlignment(javax.swing.JTextField.TRAILING);
941  memField.addKeyListener(new java.awt.event.KeyAdapter() {
942  public void keyReleased(java.awt.event.KeyEvent evt) {
943  memFieldKeyReleased(evt);
944  }
945  });
946 
947  memFieldValidationLabel.setForeground(new java.awt.Color(255, 0, 0));
948 
949  org.openide.awt.Mnemonics.setLocalizedText(maxMemoryUnitsLabel1, org.openide.util.NbBundle.getMessage(AutopsyOptionsPanel.class, "AutopsyOptionsPanel.maxMemoryUnitsLabel.text")); // NOI18N
950 
951  org.openide.awt.Mnemonics.setLocalizedText(maxLogFileCount, org.openide.util.NbBundle.getMessage(AutopsyOptionsPanel.class, "AutopsyOptionsPanel.maxLogFileCount.text")); // NOI18N
952 
953  logFileCount.setHorizontalAlignment(javax.swing.JTextField.TRAILING);
954  logFileCount.addKeyListener(new java.awt.event.KeyAdapter() {
955  public void keyReleased(java.awt.event.KeyEvent evt) {
956  logFileCountKeyReleased(evt);
957  }
958  });
959 
960  logNumAlert.setEditable(false);
961  logNumAlert.setForeground(new java.awt.Color(255, 0, 0));
962  logNumAlert.setText(org.openide.util.NbBundle.getMessage(AutopsyOptionsPanel.class, "AutopsyOptionsPanel.logNumAlert.text")); // NOI18N
963  logNumAlert.setBorder(null);
964 
965  org.openide.awt.Mnemonics.setLocalizedText(maxSolrMemoryLabel, org.openide.util.NbBundle.getMessage(AutopsyOptionsPanel.class, "AutopsyOptionsPanel.maxSolrMemoryLabel.text")); // NOI18N
966 
967  org.openide.awt.Mnemonics.setLocalizedText(maxMemoryUnitsLabel2, org.openide.util.NbBundle.getMessage(AutopsyOptionsPanel.class, "AutopsyOptionsPanel.maxMemoryUnitsLabel2.text")); // NOI18N
968 
969  solrMaxHeapSpinner.addChangeListener(new javax.swing.event.ChangeListener() {
970  public void stateChanged(javax.swing.event.ChangeEvent evt) {
971  solrMaxHeapSpinnerStateChanged(evt);
972  }
973  });
974 
975  org.openide.awt.Mnemonics.setLocalizedText(solrJVMHeapWarning, org.openide.util.NbBundle.getMessage(AutopsyOptionsPanel.class, "AutopsyOptionsPanel.solrJVMHeapWarning.text")); // NOI18N
976 
977  org.openide.awt.Mnemonics.setLocalizedText(heapFileLabel, org.openide.util.NbBundle.getMessage(AutopsyOptionsPanel.class, "AutopsyOptionsPanel.heapFileLabel.text")); // NOI18N
978 
979  heapDumpFileField.setText(org.openide.util.NbBundle.getMessage(AutopsyOptionsPanel.class, "AutopsyOptionsPanel.heapDumpFileField.text")); // NOI18N
980 
981  org.openide.awt.Mnemonics.setLocalizedText(heapDumpBrowseButton, org.openide.util.NbBundle.getMessage(AutopsyOptionsPanel.class, "AutopsyOptionsPanel.heapDumpBrowseButton.text")); // NOI18N
982  heapDumpBrowseButton.addActionListener(new java.awt.event.ActionListener() {
983  public void actionPerformed(java.awt.event.ActionEvent evt) {
984  heapDumpBrowseButtonActionPerformed(evt);
985  }
986  });
987 
988  heapFieldValidationLabel.setForeground(new java.awt.Color(255, 0, 0));
989  org.openide.awt.Mnemonics.setLocalizedText(heapFieldValidationLabel, org.openide.util.NbBundle.getMessage(AutopsyOptionsPanel.class, "AutopsyOptionsPanel.heapFieldValidationLabel.text")); // NOI18N
990 
991  javax.swing.GroupLayout runtimePanelLayout = new javax.swing.GroupLayout(runtimePanel);
992  runtimePanel.setLayout(runtimePanelLayout);
993  runtimePanelLayout.setHorizontalGroup(
994  runtimePanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
995  .addGroup(runtimePanelLayout.createSequentialGroup()
996  .addContainerGap()
997  .addGroup(runtimePanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
998  .addGroup(runtimePanelLayout.createSequentialGroup()
999  .addGroup(runtimePanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
1000  .addComponent(totalMemoryLabel)
1001  .addComponent(maxSolrMemoryLabel)
1002  .addComponent(maxMemoryLabel)
1003  .addComponent(maxLogFileCount))
1004  .addGap(12, 12, 12)
1005  .addGroup(runtimePanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
1006  .addComponent(logFileCount, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.PREFERRED_SIZE, 37, javax.swing.GroupLayout.PREFERRED_SIZE)
1007  .addComponent(solrMaxHeapSpinner, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
1008  .addComponent(memField, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.PREFERRED_SIZE, 37, javax.swing.GroupLayout.PREFERRED_SIZE)
1009  .addComponent(systemMemoryTotal, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.PREFERRED_SIZE, 37, javax.swing.GroupLayout.PREFERRED_SIZE))
1010  .addGap(18, 18, 18)
1011  .addGroup(runtimePanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
1012  .addComponent(maxMemoryUnitsLabel1)
1013  .addComponent(maxMemoryUnitsLabel)
1014  .addComponent(maxMemoryUnitsLabel2))
1015  .addGroup(runtimePanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
1016  .addGroup(runtimePanelLayout.createSequentialGroup()
1017  .addGap(23, 23, 23)
1018  .addComponent(memFieldValidationLabel, javax.swing.GroupLayout.PREFERRED_SIZE, 478, javax.swing.GroupLayout.PREFERRED_SIZE)
1019  .addContainerGap(12, Short.MAX_VALUE))
1020  .addGroup(runtimePanelLayout.createSequentialGroup()
1021  .addGap(18, 18, 18)
1022  .addComponent(solrJVMHeapWarning, javax.swing.GroupLayout.PREFERRED_SIZE, 331, javax.swing.GroupLayout.PREFERRED_SIZE)
1023  .addGap(44, 44, 44)
1024  .addComponent(logNumAlert)
1025  .addContainerGap())))
1026  .addGroup(runtimePanelLayout.createSequentialGroup()
1027  .addGroup(runtimePanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
1028  .addComponent(restartNecessaryWarning, javax.swing.GroupLayout.PREFERRED_SIZE, 615, javax.swing.GroupLayout.PREFERRED_SIZE)
1029  .addGroup(runtimePanelLayout.createSequentialGroup()
1030  .addComponent(heapFileLabel)
1031  .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
1032  .addGroup(runtimePanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
1033  .addComponent(heapFieldValidationLabel, javax.swing.GroupLayout.PREFERRED_SIZE, 478, javax.swing.GroupLayout.PREFERRED_SIZE)
1034  .addGroup(runtimePanelLayout.createSequentialGroup()
1035  .addComponent(heapDumpFileField, javax.swing.GroupLayout.PREFERRED_SIZE, 415, javax.swing.GroupLayout.PREFERRED_SIZE)
1036  .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
1037  .addComponent(heapDumpBrowseButton)))))
1038  .addGap(0, 0, Short.MAX_VALUE))))
1039  );
1040 
1041  runtimePanelLayout.linkSize(javax.swing.SwingConstants.HORIZONTAL, new java.awt.Component[] {maxLogFileCount, maxMemoryLabel, totalMemoryLabel});
1042 
1043  runtimePanelLayout.linkSize(javax.swing.SwingConstants.HORIZONTAL, new java.awt.Component[] {logFileCount, memField});
1044 
1045  runtimePanelLayout.setVerticalGroup(
1046  runtimePanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
1047  .addGroup(runtimePanelLayout.createSequentialGroup()
1048  .addContainerGap()
1049  .addGroup(runtimePanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
1050  .addComponent(totalMemoryLabel)
1051  .addComponent(maxMemoryUnitsLabel1)
1052  .addComponent(systemMemoryTotal, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
1053  .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
1054  .addGroup(runtimePanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
1055  .addComponent(memFieldValidationLabel, javax.swing.GroupLayout.PREFERRED_SIZE, 16, javax.swing.GroupLayout.PREFERRED_SIZE)
1056  .addGroup(runtimePanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
1057  .addComponent(maxMemoryLabel)
1058  .addComponent(memField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
1059  .addComponent(maxMemoryUnitsLabel)))
1060  .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
1061  .addGroup(runtimePanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
1062  .addComponent(logNumAlert, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
1063  .addGroup(runtimePanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
1064  .addComponent(maxSolrMemoryLabel)
1065  .addComponent(maxMemoryUnitsLabel2)
1066  .addComponent(solrMaxHeapSpinner, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
1067  .addComponent(solrJVMHeapWarning)))
1068  .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
1069  .addGroup(runtimePanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
1070  .addComponent(maxLogFileCount)
1071  .addComponent(logFileCount, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
1072  .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
1073  .addGroup(runtimePanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
1074  .addComponent(heapFileLabel)
1075  .addComponent(heapDumpFileField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
1076  .addComponent(heapDumpBrowseButton))
1077  .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
1078  .addComponent(heapFieldValidationLabel, javax.swing.GroupLayout.PREFERRED_SIZE, 16, javax.swing.GroupLayout.PREFERRED_SIZE)
1079  .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
1080  .addComponent(restartNecessaryWarning)
1081  .addContainerGap())
1082  );
1083 
1084  gridBagConstraints = new java.awt.GridBagConstraints();
1085  gridBagConstraints.gridx = 0;
1086  gridBagConstraints.gridy = 0;
1087  gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
1088  gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
1089  mainPanel.add(runtimePanel, gridBagConstraints);
1090 
1091  tempDirectoryPanel.setBorder(javax.swing.BorderFactory.createTitledBorder(org.openide.util.NbBundle.getMessage(AutopsyOptionsPanel.class, "AutopsyOptionsPanel.tempDirectoryPanel.border.title"))); // NOI18N
1092  tempDirectoryPanel.setName(org.openide.util.NbBundle.getMessage(AutopsyOptionsPanel.class, "AutopsyOptionsPanel.tempDirectoryPanel.name")); // NOI18N
1093 
1094  tempCustomField.setText(org.openide.util.NbBundle.getMessage(AutopsyOptionsPanel.class, "AutopsyOptionsPanel.tempCustomField.text")); // NOI18N
1095 
1096  org.openide.awt.Mnemonics.setLocalizedText(tempDirectoryBrowseButton, org.openide.util.NbBundle.getMessage(AutopsyOptionsPanel.class, "AutopsyOptionsPanel.tempDirectoryBrowseButton.text")); // NOI18N
1097  tempDirectoryBrowseButton.addActionListener(new java.awt.event.ActionListener() {
1098  public void actionPerformed(java.awt.event.ActionEvent evt) {
1099  tempDirectoryBrowseButtonActionPerformed(evt);
1100  }
1101  });
1102 
1103  tempDirectoryWarningLabel.setIcon(new javax.swing.ImageIcon(getClass().getResource("/org/sleuthkit/autopsy/corecomponents/warning16.png"))); // NOI18N
1104  org.openide.awt.Mnemonics.setLocalizedText(tempDirectoryWarningLabel, org.openide.util.NbBundle.getMessage(AutopsyOptionsPanel.class, "AutopsyOptionsPanel.tempDirectoryWarningLabel.text")); // NOI18N
1105 
1106  tempDirChoiceGroup.add(tempLocalRadio);
1107  org.openide.awt.Mnemonics.setLocalizedText(tempLocalRadio, org.openide.util.NbBundle.getMessage(AutopsyOptionsPanel.class, "AutopsyOptionsPanel.tempLocalRadio.text")); // NOI18N
1108  tempLocalRadio.addActionListener(new java.awt.event.ActionListener() {
1109  public void actionPerformed(java.awt.event.ActionEvent evt) {
1110  tempLocalRadioActionPerformed(evt);
1111  }
1112  });
1113 
1114  tempDirChoiceGroup.add(tempCaseRadio);
1115  org.openide.awt.Mnemonics.setLocalizedText(tempCaseRadio, org.openide.util.NbBundle.getMessage(AutopsyOptionsPanel.class, "AutopsyOptionsPanel.tempCaseRadio.text")); // NOI18N
1116  tempCaseRadio.addActionListener(new java.awt.event.ActionListener() {
1117  public void actionPerformed(java.awt.event.ActionEvent evt) {
1118  tempCaseRadioActionPerformed(evt);
1119  }
1120  });
1121 
1122  tempDirChoiceGroup.add(tempCustomRadio);
1123  org.openide.awt.Mnemonics.setLocalizedText(tempCustomRadio, org.openide.util.NbBundle.getMessage(AutopsyOptionsPanel.class, "AutopsyOptionsPanel.tempCustomRadio.text")); // NOI18N
1124  tempCustomRadio.addActionListener(new java.awt.event.ActionListener() {
1125  public void actionPerformed(java.awt.event.ActionEvent evt) {
1126  tempCustomRadioActionPerformed(evt);
1127  }
1128  });
1129 
1130  tempOnCustomNoPath.setForeground(java.awt.Color.RED);
1131  org.openide.awt.Mnemonics.setLocalizedText(tempOnCustomNoPath, org.openide.util.NbBundle.getMessage(AutopsyOptionsPanel.class, "AutopsyOptionsPanel.tempOnCustomNoPath.text")); // NOI18N
1132 
1133  javax.swing.GroupLayout tempDirectoryPanelLayout = new javax.swing.GroupLayout(tempDirectoryPanel);
1134  tempDirectoryPanel.setLayout(tempDirectoryPanelLayout);
1135  tempDirectoryPanelLayout.setHorizontalGroup(
1136  tempDirectoryPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
1137  .addGroup(tempDirectoryPanelLayout.createSequentialGroup()
1138  .addContainerGap()
1139  .addGroup(tempDirectoryPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
1140  .addComponent(tempLocalRadio)
1141  .addComponent(tempCaseRadio)
1142  .addComponent(tempDirectoryWarningLabel, javax.swing.GroupLayout.PREFERRED_SIZE, 615, javax.swing.GroupLayout.PREFERRED_SIZE)
1143  .addGroup(tempDirectoryPanelLayout.createSequentialGroup()
1144  .addComponent(tempCustomRadio)
1145  .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
1146  .addGroup(tempDirectoryPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
1147  .addComponent(tempOnCustomNoPath)
1148  .addGroup(tempDirectoryPanelLayout.createSequentialGroup()
1149  .addComponent(tempCustomField, javax.swing.GroupLayout.PREFERRED_SIZE, 459, javax.swing.GroupLayout.PREFERRED_SIZE)
1150  .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
1151  .addComponent(tempDirectoryBrowseButton)))))
1152  .addContainerGap(164, Short.MAX_VALUE))
1153  );
1154  tempDirectoryPanelLayout.setVerticalGroup(
1155  tempDirectoryPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
1156  .addGroup(tempDirectoryPanelLayout.createSequentialGroup()
1157  .addContainerGap()
1158  .addComponent(tempLocalRadio)
1159  .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
1160  .addComponent(tempCaseRadio)
1161  .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
1162  .addGroup(tempDirectoryPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
1163  .addComponent(tempCustomRadio)
1164  .addComponent(tempCustomField)
1165  .addComponent(tempDirectoryBrowseButton))
1166  .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
1167  .addComponent(tempOnCustomNoPath)
1168  .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
1169  .addComponent(tempDirectoryWarningLabel)
1170  .addGap(14, 14, 14))
1171  );
1172 
1173  gridBagConstraints = new java.awt.GridBagConstraints();
1174  gridBagConstraints.gridx = 0;
1175  gridBagConstraints.gridy = 1;
1176  gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
1177  gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
1178  mainPanel.add(tempDirectoryPanel, gridBagConstraints);
1179  tempDirectoryPanel.getAccessibleContext().setAccessibleName(org.openide.util.NbBundle.getMessage(AutopsyOptionsPanel.class, "AutopsyOptionsPanel.tempDirectoryPanel.AccessibleContext.accessibleName")); // NOI18N
1180 
1181  rdpPanel.setBorder(javax.swing.BorderFactory.createTitledBorder(org.openide.util.NbBundle.getMessage(AutopsyOptionsPanel.class, "AutopsyOptionsPanel.rdpPanel.border.title"))); // NOI18N
1182  rdpPanel.setMinimumSize(new java.awt.Dimension(33, 100));
1183  rdpPanel.setPreferredSize(new java.awt.Dimension(100, 150));
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.setOpaque(false);
1192  sizingScrollPane.setViewportView(sizingTextPane);
1193 
1194  gridBagConstraints = new java.awt.GridBagConstraints();
1195  gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
1196  gridBagConstraints.weightx = 1.0;
1197  gridBagConstraints.weighty = 1.0;
1198  rdpPanel.add(sizingScrollPane, gridBagConstraints);
1199 
1200  gridBagConstraints = new java.awt.GridBagConstraints();
1201  gridBagConstraints.gridy = 3;
1202  gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
1203  mainPanel.add(rdpPanel, gridBagConstraints);
1204  gridBagConstraints = new java.awt.GridBagConstraints();
1205  gridBagConstraints.gridx = 1;
1206  gridBagConstraints.gridy = 0;
1207  gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
1208  gridBagConstraints.weightx = 1.0;
1209  mainPanel.add(filler1, gridBagConstraints);
1210  gridBagConstraints = new java.awt.GridBagConstraints();
1211  gridBagConstraints.gridx = 0;
1212  gridBagConstraints.gridy = 4;
1213  gridBagConstraints.fill = java.awt.GridBagConstraints.VERTICAL;
1214  gridBagConstraints.weighty = 1.0;
1215  mainPanel.add(filler2, gridBagConstraints);
1216 
1217  jScrollPane1.setViewportView(mainPanel);
1218 
1219  javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);
1220  this.setLayout(layout);
1221  layout.setHorizontalGroup(
1222  layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
1223  .addComponent(jScrollPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 860, Short.MAX_VALUE)
1224  );
1225  layout.setVerticalGroup(
1226  layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
1227  .addComponent(jScrollPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 620, Short.MAX_VALUE)
1228  );
1229  }// </editor-fold>//GEN-END:initComponents
1230 
1231  @Messages({
1232  "AutopsyOptionsPanel_tempDirectoryBrowseButtonActionPerformed_onInvalidPath_title=Path cannot be used",
1233  "# {0} - path",
1234  "AutopsyOptionsPanel_tempDirectoryBrowseButtonActionPerformed_onInvalidPath_description=Unable to create temporary directory within specified path: {0}",})
1235  private void tempDirectoryBrowseButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_tempDirectoryBrowseButtonActionPerformed
1236  if(tempDirChooser == null) {
1237  tempDirChooser = tempChooserHelper.getChooser();
1238  tempDirChooser.setFileSelectionMode(JFileChooser.DIRECTORIES_ONLY);
1239  tempDirChooser.setMultiSelectionEnabled(false);
1240  }
1241  int returnState = tempDirChooser.showOpenDialog(this);
1242  if (returnState == JFileChooser.APPROVE_OPTION) {
1243  String specifiedPath = tempDirChooser.getSelectedFile().getPath();
1244  try {
1245  File f = new File(specifiedPath);
1246  if (!f.exists() && !f.mkdirs()) {
1247  throw new InvalidPathException(specifiedPath, "Unable to create parent directories leading to " + specifiedPath);
1248  }
1249  tempCustomField.setText(specifiedPath);
1250  firePropertyChange(OptionsPanelController.PROP_CHANGED, null, null);
1251  } catch (InvalidPathException ex) {
1252  logger.log(Level.WARNING, "Unable to create temporary directory in " + specifiedPath, ex);
1253  JOptionPane.showMessageDialog(this,
1254  Bundle.AutopsyOptionsPanel_tempDirectoryBrowseButtonActionPerformed_onInvalidPath_description(specifiedPath),
1255  Bundle.AutopsyOptionsPanel_tempDirectoryBrowseButtonActionPerformed_onInvalidPath_title(),
1256  JOptionPane.ERROR_MESSAGE);
1257  }
1258  }
1259  }//GEN-LAST:event_tempDirectoryBrowseButtonActionPerformed
1260 
1261  private void solrMaxHeapSpinnerStateChanged(javax.swing.event.ChangeEvent evt) {//GEN-FIRST:event_solrMaxHeapSpinnerStateChanged
1262  int value = (int) solrMaxHeapSpinner.getValue();
1263  if (value == UserPreferences.getMaxSolrVMSize()) {
1264  // if the value hasn't changed there's nothing to do.
1265  return;
1266  }
1267  firePropertyChange(OptionsPanelController.PROP_CHANGED, null, null);
1268  }//GEN-LAST:event_solrMaxHeapSpinnerStateChanged
1269 
1270  private void logFileCountKeyReleased(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_logFileCountKeyReleased
1271  String count = logFileCount.getText();
1272  if (count.equals(String.valueOf(UserPreferences.getDefaultLogFileCount()))) {
1273  //if it is still the default value don't fire change
1274  return;
1275  }
1276  firePropertyChange(OptionsPanelController.PROP_CHANGED, null, null);
1277  }//GEN-LAST:event_logFileCountKeyReleased
1278 
1279  private void memFieldKeyReleased(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_memFieldKeyReleased
1280  String memText = memField.getText();
1281  if (memText.equals(initialMemValue)) {
1282  //if it is still the initial value don't fire change
1283  return;
1284  }
1285  firePropertyChange(OptionsPanelController.PROP_CHANGED, null, null);
1286  }//GEN-LAST:event_memFieldKeyReleased
1287 
1288  private void specifyLogoRBActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_specifyLogoRBActionPerformed
1289  agencyLogoPathField.setEnabled(true);
1290  browseLogosButton.setEnabled(true);
1291  try {
1292  if (agencyLogoPathField.getText().isEmpty()) {
1293  String path = reportBranding.getAgencyLogoPath();
1294  if (path != null && !path.isEmpty()) {
1295  updateAgencyLogo(path);
1296  }
1297  }
1298  } catch (IOException ex) {
1299  logger.log(Level.WARNING, "Error loading image from previously saved agency logo path.", ex);
1300  }
1301  firePropertyChange(OptionsPanelController.PROP_CHANGED, null, null);
1302  }//GEN-LAST:event_specifyLogoRBActionPerformed
1303 
1304  private void defaultLogoRBActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_defaultLogoRBActionPerformed
1305  agencyLogoPathField.setEnabled(false);
1306  browseLogosButton.setEnabled(false);
1307  try {
1308  updateAgencyLogo("");
1309  } catch (IOException ex) {
1310  // This should never happen since we're not reading from a file.
1311  logger.log(Level.SEVERE, "Unexpected error occurred while updating the agency logo.", ex);
1312  }
1313  firePropertyChange(OptionsPanelController.PROP_CHANGED, null, null);
1314  }//GEN-LAST:event_defaultLogoRBActionPerformed
1315 
1316  private void browseLogosButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_browseLogosButtonActionPerformed
1317  if(logoFileChooser == null) {
1318  logoFileChooser = logoChooserHelper.getChooser();
1319  logoFileChooser.setFileSelectionMode(JFileChooser.FILES_ONLY);
1320  logoFileChooser.setMultiSelectionEnabled(false);
1321  logoFileChooser.setAcceptAllFileFilterUsed(false);
1322  logoFileChooser.setFileFilter(new GeneralFilter(GeneralFilter.GRAPHIC_IMAGE_EXTS, GeneralFilter.GRAPHIC_IMG_DECR));
1323  }
1324  String oldLogoPath = agencyLogoPathField.getText();
1325  int returnState = logoFileChooser.showOpenDialog(this);
1326  if (returnState == JFileChooser.APPROVE_OPTION) {
1327  String path = logoFileChooser.getSelectedFile().getPath();
1328  try {
1329  updateAgencyLogo(path);
1330  firePropertyChange(OptionsPanelController.PROP_CHANGED, null, null);
1331  } catch (IOException | IndexOutOfBoundsException ex) {
1332  JOptionPane.showMessageDialog(this,
1333  NbBundle.getMessage(this.getClass(),
1334  "AutopsyOptionsPanel.invalidImageFile.msg"),
1335  NbBundle.getMessage(this.getClass(), "AutopsyOptionsPanel.invalidImageFile.title"),
1336  JOptionPane.ERROR_MESSAGE);
1337  try {
1338  updateAgencyLogo(oldLogoPath); //restore previous setting if new one is invalid
1339  } catch (IOException ex1) {
1340  logger.log(Level.WARNING, "Error loading image from previously saved agency logo path", ex1);
1341  }
1342  }
1343  }
1344  }//GEN-LAST:event_browseLogosButtonActionPerformed
1345 
1346  private void tempLocalRadioActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_tempLocalRadioActionPerformed
1347  firePropertyChange(OptionsPanelController.PROP_CHANGED, null, null);
1348  evaluateTempDirState();
1349  }//GEN-LAST:event_tempLocalRadioActionPerformed
1350 
1351  private void tempCaseRadioActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_tempCaseRadioActionPerformed
1352  firePropertyChange(OptionsPanelController.PROP_CHANGED, null, null);
1353  evaluateTempDirState();
1354  }//GEN-LAST:event_tempCaseRadioActionPerformed
1355 
1356  private void tempCustomRadioActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_tempCustomRadioActionPerformed
1357  firePropertyChange(OptionsPanelController.PROP_CHANGED, null, null);
1358  evaluateTempDirState();
1359  }//GEN-LAST:event_tempCustomRadioActionPerformed
1360 
1361  @Messages({
1362  "AutopsyOptionsPanel_heapDumpBrowseButtonActionPerformed_fileAlreadyExistsTitle=File Already Exists",
1363  "AutopsyOptionsPanel_heapDumpBrowseButtonActionPerformed_fileAlreadyExistsMessage=File already exists. Please select a new location."
1364  })
1365  private void heapDumpBrowseButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_heapDumpBrowseButtonActionPerformed
1366  if(heapFileChooser == null) {
1367  heapFileChooser = heapChooserHelper.getChooser();
1368  heapFileChooser.setFileSelectionMode(JFileChooser.DIRECTORIES_ONLY);
1369  heapFileChooser.setMultiSelectionEnabled(false);
1370  }
1371  String oldHeapPath = heapDumpFileField.getText();
1372  if (!StringUtils.isBlank(oldHeapPath)) {
1373  heapFileChooser.setCurrentDirectory(new File(oldHeapPath));
1374  }
1375 
1376  int returnState = heapFileChooser.showOpenDialog(this);
1377  if (returnState == JFileChooser.APPROVE_OPTION) {
1378  File selectedDirectory = heapFileChooser.getSelectedFile();
1379  heapDumpFileField.setText(selectedDirectory.getAbsolutePath());
1380  firePropertyChange(OptionsPanelController.PROP_CHANGED, null, null);
1381  }
1382  }//GEN-LAST:event_heapDumpBrowseButtonActionPerformed
1383 
1384  // Variables declaration - do not modify//GEN-BEGIN:variables
1385  private javax.swing.JTextField agencyLogoPathField;
1386  private javax.swing.JLabel agencyLogoPathFieldValidationLabel;
1387  private javax.swing.JLabel agencyLogoPreview;
1388  private javax.swing.JButton browseLogosButton;
1389  private javax.swing.JRadioButton defaultLogoRB;
1390  private javax.swing.ButtonGroup displayTimesButtonGroup;
1391  private javax.swing.ButtonGroup fileSelectionButtonGroup;
1392  private javax.swing.JButton heapDumpBrowseButton;
1393  private javax.swing.JTextField heapDumpFileField;
1394  private javax.swing.JLabel heapFieldValidationLabel;
1395  private javax.swing.JLabel heapFileLabel;
1396  private javax.swing.JScrollPane jScrollPane1;
1397  private javax.swing.JTextField logFileCount;
1398  private javax.swing.JTextField logNumAlert;
1399  private javax.swing.JPanel logoPanel;
1400  private javax.swing.ButtonGroup logoSourceButtonGroup;
1401  private javax.swing.JLabel maxLogFileCount;
1402  private javax.swing.JLabel maxMemoryLabel;
1403  private javax.swing.JLabel maxMemoryUnitsLabel;
1404  private javax.swing.JLabel maxMemoryUnitsLabel1;
1405  private javax.swing.JLabel maxMemoryUnitsLabel2;
1406  private javax.swing.JLabel maxSolrMemoryLabel;
1407  private javax.swing.JTextField memField;
1408  private javax.swing.JLabel memFieldValidationLabel;
1409  private javax.swing.JPanel rdpPanel;
1410  private javax.swing.JLabel restartNecessaryWarning;
1411  private javax.swing.JPanel runtimePanel;
1412  private javax.swing.JLabel solrJVMHeapWarning;
1413  private javax.swing.JSpinner solrMaxHeapSpinner;
1414  private javax.swing.JRadioButton specifyLogoRB;
1415  private javax.swing.JLabel systemMemoryTotal;
1416  private javax.swing.JRadioButton tempCaseRadio;
1417  private javax.swing.JTextField tempCustomField;
1418  private javax.swing.JRadioButton tempCustomRadio;
1419  private javax.swing.ButtonGroup tempDirChoiceGroup;
1420  private javax.swing.JButton tempDirectoryBrowseButton;
1421  private javax.swing.JPanel tempDirectoryPanel;
1422  private javax.swing.JLabel tempDirectoryWarningLabel;
1423  private javax.swing.JRadioButton tempLocalRadio;
1424  private javax.swing.JLabel tempOnCustomNoPath;
1425  private javax.swing.JLabel totalMemoryLabel;
1426  // End of variables declaration//GEN-END:variables
1427 
1428 }

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