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

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