19 package org.sleuthkit.autopsy.centralrepository.optionspanel;
21 import java.awt.Cursor;
22 import java.awt.EventQueue;
24 import java.beans.PropertyChangeEvent;
25 import java.beans.PropertyChangeListener;
26 import java.util.EnumSet;
28 import javax.swing.JOptionPane;
29 import javax.swing.SwingUtilities;
30 import org.netbeans.spi.options.OptionsPanelController;
31 import org.openide.util.NbBundle;
32 import org.openide.util.NbBundle.Messages;
48 @SuppressWarnings(
"PMD.SingularField")
51 private static final long serialVersionUID = 1L;
63 customizeComponents();
64 addIngestJobEventsListener();
67 ingestStateUpdated(evt.getNewValue() != null);
72 setName(NbBundle.getMessage(
GlobalSettingsPanel.class,
"GlobalSettingsPanel.pnCorrelationProperties.border.title"));
80 @Messages({
"GlobalSettingsPanel.updateFailed.title=Central repository disabled"})
86 setCursor(Cursor.getPredefinedCursor(Cursor.WAIT_CURSOR));
90 setCursor(Cursor.getPredefinedCursor(Cursor.DEFAULT_CURSOR));
92 setCursor(Cursor.getPredefinedCursor(Cursor.DEFAULT_CURSOR));
93 JOptionPane.showMessageDialog(
this,
95 NbBundle.getMessage(this.getClass(),
96 "GlobalSettingsPanel.updateFailed.title"),
97 JOptionPane.WARNING_MESSAGE);
99 setCursor(Cursor.getPredefinedCursor(Cursor.DEFAULT_CURSOR));
108 @SuppressWarnings(
"unchecked")
110 private
void initComponents() {
112 jScrollPane1 =
new javax.swing.JScrollPane();
113 jPanel1 =
new javax.swing.JPanel();
114 lbCentralRepository =
new javax.swing.JLabel();
115 cbUseCentralRepo =
new javax.swing.JCheckBox();
116 pnDatabaseConfiguration =
new javax.swing.JPanel();
117 lbDbPlatformTypeLabel =
new javax.swing.JLabel();
118 lbDbNameLabel =
new javax.swing.JLabel();
119 lbDbLocationLabel =
new javax.swing.JLabel();
120 bnDbConfigure =
new javax.swing.JButton();
121 lbDbPlatformValue =
new javax.swing.JLabel();
122 lbDbNameValue =
new javax.swing.JLabel();
123 lbDbLocationValue =
new javax.swing.JLabel();
124 pnCorrelationProperties =
new javax.swing.JPanel();
125 bnManageTypes =
new javax.swing.JButton();
126 correlationPropertiesScrollPane =
new javax.swing.JScrollPane();
127 correlationPropertiesTextArea =
new javax.swing.JTextArea();
128 organizationPanel =
new javax.swing.JPanel();
129 manageOrganizationButton =
new javax.swing.JButton();
130 organizationScrollPane =
new javax.swing.JScrollPane();
131 organizationTextArea =
new javax.swing.JTextArea();
132 casesPanel =
new javax.swing.JPanel();
133 showCasesButton =
new javax.swing.JButton();
134 casesScrollPane =
new javax.swing.JScrollPane();
135 casesTextArea =
new javax.swing.JTextArea();
136 tbOops =
new javax.swing.JTextField();
137 ingestRunningWarningLabel =
new javax.swing.JLabel();
140 setPreferredSize(
new java.awt.Dimension(1022, 488));
142 jScrollPane1.setBorder(null);
143 jScrollPane1.setPreferredSize(
new java.awt.Dimension(1022, 407));
145 jPanel1.setMinimumSize(
new java.awt.Dimension(0, 0));
146 jPanel1.setPreferredSize(
new java.awt.Dimension(1020, 407));
148 org.openide.awt.Mnemonics.setLocalizedText(lbCentralRepository,
org.openide.util.NbBundle.getMessage(
GlobalSettingsPanel.class,
"GlobalSettingsPanel.lbCentralRepository.text"));
150 org.openide.awt.Mnemonics.setLocalizedText(cbUseCentralRepo,
org.openide.util.NbBundle.getMessage(
GlobalSettingsPanel.class,
"GlobalSettingsPanel.cbUseCentralRepo.text"));
151 cbUseCentralRepo.addActionListener(
new java.awt.event.ActionListener() {
152 public void actionPerformed(java.awt.event.ActionEvent evt) {
153 cbUseCentralRepoActionPerformed(evt);
157 pnDatabaseConfiguration.setBorder(javax.swing.BorderFactory.createTitledBorder(null,
org.openide.util.NbBundle.getMessage(
GlobalSettingsPanel.class,
"GlobalSettingsPanel.pnDatabaseConfiguration.title"), javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION,
new java.awt.Font(
"Tahoma", 0, 12)));
159 org.openide.awt.Mnemonics.setLocalizedText(lbDbPlatformTypeLabel,
org.openide.util.NbBundle.getMessage(
GlobalSettingsPanel.class,
"GlobalSettingsPanel.lbDbPlatformTypeLabel.text"));
161 org.openide.awt.Mnemonics.setLocalizedText(lbDbNameLabel,
org.openide.util.NbBundle.getMessage(
GlobalSettingsPanel.class,
"GlobalSettingsPanel.lbDbNameLabel.text"));
163 org.openide.awt.Mnemonics.setLocalizedText(lbDbLocationLabel,
org.openide.util.NbBundle.getMessage(
GlobalSettingsPanel.class,
"GlobalSettingsPanel.lbDbLocationLabel.text"));
165 org.openide.awt.Mnemonics.setLocalizedText(bnDbConfigure,
org.openide.util.NbBundle.getMessage(
GlobalSettingsPanel.class,
"GlobalSettingsPanel.bnDbConfigure.text"));
166 bnDbConfigure.addActionListener(
new java.awt.event.ActionListener() {
167 public void actionPerformed(java.awt.event.ActionEvent evt) {
168 bnDbConfigureActionPerformed(evt);
172 javax.swing.GroupLayout pnDatabaseConfigurationLayout =
new javax.swing.GroupLayout(pnDatabaseConfiguration);
173 pnDatabaseConfiguration.setLayout(pnDatabaseConfigurationLayout);
174 pnDatabaseConfigurationLayout.setHorizontalGroup(
175 pnDatabaseConfigurationLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
176 .addGroup(pnDatabaseConfigurationLayout.createSequentialGroup()
178 .addGroup(pnDatabaseConfigurationLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
179 .addGroup(pnDatabaseConfigurationLayout.createSequentialGroup()
180 .addComponent(bnDbConfigure)
181 .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
182 .addGroup(pnDatabaseConfigurationLayout.createSequentialGroup()
183 .addGroup(pnDatabaseConfigurationLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING,
false)
184 .addComponent(lbDbPlatformTypeLabel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
185 .addComponent(lbDbNameLabel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
186 .addComponent(lbDbLocationLabel))
187 .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
188 .addGroup(pnDatabaseConfigurationLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
189 .addComponent(lbDbNameValue, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, 936, Short.MAX_VALUE)
190 .addComponent(lbDbPlatformValue, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
191 .addComponent(lbDbLocationValue, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)))))
193 pnDatabaseConfigurationLayout.setVerticalGroup(
194 pnDatabaseConfigurationLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
195 .addGroup(pnDatabaseConfigurationLayout.createSequentialGroup()
197 .addGroup(pnDatabaseConfigurationLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING,
false)
198 .addComponent(lbDbPlatformTypeLabel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
199 .addComponent(lbDbPlatformValue, javax.swing.GroupLayout.PREFERRED_SIZE, 14, javax.swing.GroupLayout.PREFERRED_SIZE))
200 .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
201 .addGroup(pnDatabaseConfigurationLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING,
false)
202 .addComponent(lbDbNameLabel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
203 .addComponent(lbDbNameValue, javax.swing.GroupLayout.PREFERRED_SIZE, 14, javax.swing.GroupLayout.PREFERRED_SIZE))
204 .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
205 .addGroup(pnDatabaseConfigurationLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING,
false)
206 .addComponent(lbDbLocationLabel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
207 .addComponent(lbDbLocationValue, javax.swing.GroupLayout.PREFERRED_SIZE, 14, javax.swing.GroupLayout.PREFERRED_SIZE))
208 .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
209 .addComponent(bnDbConfigure)
213 pnCorrelationProperties.setBorder(javax.swing.BorderFactory.createTitledBorder(null,
org.openide.util.NbBundle.getMessage(
GlobalSettingsPanel.class,
"GlobalSettingsPanel.pnCorrelationProperties.border.title"), javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION,
new java.awt.Font(
"Tahoma", 0, 12)));
214 pnCorrelationProperties.setPreferredSize(
new java.awt.Dimension(674, 93));
216 org.openide.awt.Mnemonics.setLocalizedText(bnManageTypes,
org.openide.util.NbBundle.getMessage(
GlobalSettingsPanel.class,
"GlobalSettingsPanel.bnManageProperties.text"));
217 bnManageTypes.addActionListener(
new java.awt.event.ActionListener() {
218 public void actionPerformed(java.awt.event.ActionEvent evt) {
219 bnManageTypesActionPerformed(evt);
223 correlationPropertiesScrollPane.setBorder(null);
225 correlationPropertiesTextArea.setEditable(
false);
226 correlationPropertiesTextArea.setBackground(
new java.awt.Color(240, 240, 240));
227 correlationPropertiesTextArea.setColumns(20);
228 correlationPropertiesTextArea.setFont(
new java.awt.Font(
"Tahoma", 0, 11));
229 correlationPropertiesTextArea.setLineWrap(
true);
230 correlationPropertiesTextArea.setRows(1);
231 correlationPropertiesTextArea.setText(
org.openide.util.NbBundle.getMessage(
GlobalSettingsPanel.class,
"GlobalSettingsPanel.correlationPropertiesTextArea.text"));
232 correlationPropertiesTextArea.setToolTipText(
"");
233 correlationPropertiesTextArea.setWrapStyleWord(
true);
234 correlationPropertiesTextArea.setBorder(null);
235 correlationPropertiesTextArea.setOpaque(
false);
236 correlationPropertiesScrollPane.setViewportView(correlationPropertiesTextArea);
238 javax.swing.GroupLayout pnCorrelationPropertiesLayout =
new javax.swing.GroupLayout(pnCorrelationProperties);
239 pnCorrelationProperties.setLayout(pnCorrelationPropertiesLayout);
240 pnCorrelationPropertiesLayout.setHorizontalGroup(
241 pnCorrelationPropertiesLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
242 .addGroup(pnCorrelationPropertiesLayout.createSequentialGroup()
244 .addGroup(pnCorrelationPropertiesLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
245 .addGroup(pnCorrelationPropertiesLayout.createSequentialGroup()
246 .addComponent(bnManageTypes)
247 .addGap(0, 0, Short.MAX_VALUE))
248 .addComponent(correlationPropertiesScrollPane))
251 pnCorrelationPropertiesLayout.setVerticalGroup(
252 pnCorrelationPropertiesLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
253 .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, pnCorrelationPropertiesLayout.createSequentialGroup()
254 .addComponent(correlationPropertiesScrollPane, javax.swing.GroupLayout.DEFAULT_SIZE, 32, Short.MAX_VALUE)
255 .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
256 .addComponent(bnManageTypes)
260 organizationPanel.setBorder(javax.swing.BorderFactory.createTitledBorder(null,
org.openide.util.NbBundle.getMessage(
GlobalSettingsPanel.class,
"GlobalSettingsPanel.organizationPanel.border.title"), javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION,
new java.awt.Font(
"Tahoma", 0, 12)));
262 org.openide.awt.Mnemonics.setLocalizedText(manageOrganizationButton,
org.openide.util.NbBundle.getMessage(
GlobalSettingsPanel.class,
"GlobalSettingsPanel.manageOrganizationButton.text"));
263 manageOrganizationButton.addActionListener(
new java.awt.event.ActionListener() {
264 public void actionPerformed(java.awt.event.ActionEvent evt) {
265 manageOrganizationButtonActionPerformed(evt);
269 organizationScrollPane.setBorder(null);
271 organizationTextArea.setEditable(
false);
272 organizationTextArea.setBackground(
new java.awt.Color(240, 240, 240));
273 organizationTextArea.setColumns(20);
274 organizationTextArea.setFont(
new java.awt.Font(
"Tahoma", 0, 11));
275 organizationTextArea.setLineWrap(
true);
276 organizationTextArea.setRows(2);
277 organizationTextArea.setText(
org.openide.util.NbBundle.getMessage(
GlobalSettingsPanel.class,
"GlobalSettingsPanel.organizationTextArea.text"));
278 organizationTextArea.setWrapStyleWord(
true);
279 organizationTextArea.setBorder(null);
280 organizationTextArea.setOpaque(
false);
281 organizationScrollPane.setViewportView(organizationTextArea);
283 javax.swing.GroupLayout organizationPanelLayout =
new javax.swing.GroupLayout(organizationPanel);
284 organizationPanel.setLayout(organizationPanelLayout);
285 organizationPanelLayout.setHorizontalGroup(
286 organizationPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
287 .addGroup(organizationPanelLayout.createSequentialGroup()
289 .addGroup(organizationPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
290 .addComponent(organizationScrollPane)
291 .addGroup(organizationPanelLayout.createSequentialGroup()
292 .addComponent(manageOrganizationButton)
293 .addGap(0, 0, Short.MAX_VALUE)))
296 organizationPanelLayout.setVerticalGroup(
297 organizationPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
298 .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, organizationPanelLayout.createSequentialGroup()
300 .addComponent(organizationScrollPane, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
301 .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
302 .addComponent(manageOrganizationButton)
306 casesPanel.setBorder(javax.swing.BorderFactory.createTitledBorder(null,
org.openide.util.NbBundle.getMessage(
GlobalSettingsPanel.class,
"GlobalSettingsPanel.casesPanel.border.title"), javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION,
new java.awt.Font(
"Tahoma", 0, 12)));
307 casesPanel.setName(
"Case Details");
309 org.openide.awt.Mnemonics.setLocalizedText(showCasesButton,
org.openide.util.NbBundle.getMessage(
GlobalSettingsPanel.class,
"GlobalSettingsPanel.showCasesButton.text"));
310 showCasesButton.addActionListener(
new java.awt.event.ActionListener() {
311 public void actionPerformed(java.awt.event.ActionEvent evt) {
312 showCasesButtonActionPerformed(evt);
316 casesScrollPane.setBorder(null);
318 casesTextArea.setEditable(
false);
319 casesTextArea.setBackground(
new java.awt.Color(240, 240, 240));
320 casesTextArea.setColumns(20);
321 casesTextArea.setFont(
new java.awt.Font(
"Tahoma", 0, 11));
322 casesTextArea.setLineWrap(
true);
323 casesTextArea.setRows(2);
324 casesTextArea.setText(
org.openide.util.NbBundle.getMessage(
GlobalSettingsPanel.class,
"GlobalSettingsPanel.casesTextArea.text"));
325 casesTextArea.setWrapStyleWord(
true);
326 casesTextArea.setBorder(null);
327 casesTextArea.setOpaque(
false);
328 casesScrollPane.setViewportView(casesTextArea);
330 javax.swing.GroupLayout casesPanelLayout =
new javax.swing.GroupLayout(casesPanel);
331 casesPanel.setLayout(casesPanelLayout);
332 casesPanelLayout.setHorizontalGroup(
333 casesPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
334 .addGroup(casesPanelLayout.createSequentialGroup()
336 .addGroup(casesPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
337 .addComponent(casesScrollPane)
338 .addGroup(casesPanelLayout.createSequentialGroup()
339 .addComponent(showCasesButton)
340 .addGap(0, 0, Short.MAX_VALUE)))
343 casesPanelLayout.setVerticalGroup(
344 casesPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
345 .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, casesPanelLayout.createSequentialGroup()
347 .addComponent(casesScrollPane, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
348 .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
349 .addComponent(showCasesButton)
353 tbOops.setEditable(
false);
354 tbOops.setFont(tbOops.getFont().deriveFont(tbOops.getFont().getStyle() | java.awt.Font.BOLD, 12));
355 tbOops.setText(
org.openide.util.NbBundle.getMessage(
GlobalSettingsPanel.class,
"GlobalSettingsPanel.tbOops.text"));
356 tbOops.setBorder(null);
358 ingestRunningWarningLabel.setFont(ingestRunningWarningLabel.getFont().deriveFont(ingestRunningWarningLabel.getFont().getStyle() & ~java.awt.Font.BOLD, 11));
359 ingestRunningWarningLabel.setIcon(
new javax.swing.ImageIcon(getClass().getResource(
"/org/sleuthkit/autopsy/modules/filetypeid/warning16.png")));
360 org.openide.awt.Mnemonics.setLocalizedText(ingestRunningWarningLabel,
org.openide.util.NbBundle.getMessage(
GlobalSettingsPanel.class,
"GlobalSettingsPanel.ingestRunningWarningLabel.text"));
362 javax.swing.GroupLayout jPanel1Layout =
new javax.swing.GroupLayout(jPanel1);
363 jPanel1.setLayout(jPanel1Layout);
364 jPanel1Layout.setHorizontalGroup(
365 jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
366 .addComponent(lbCentralRepository, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
367 .addGroup(jPanel1Layout.createSequentialGroup()
368 .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
369 .addComponent(pnDatabaseConfiguration, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
370 .addComponent(pnCorrelationProperties, javax.swing.GroupLayout.DEFAULT_SIZE, 1012, Short.MAX_VALUE)
371 .addComponent(organizationPanel, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
372 .addComponent(casesPanel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
373 .addGroup(jPanel1Layout.createSequentialGroup()
374 .addComponent(cbUseCentralRepo, javax.swing.GroupLayout.PREFERRED_SIZE, 162, javax.swing.GroupLayout.PREFERRED_SIZE)
375 .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
376 .addComponent(ingestRunningWarningLabel, javax.swing.GroupLayout.DEFAULT_SIZE, 844, Short.MAX_VALUE))
377 .addGroup(jPanel1Layout.createSequentialGroup()
379 .addComponent(tbOops, javax.swing.GroupLayout.PREFERRED_SIZE, 974, javax.swing.GroupLayout.PREFERRED_SIZE)))
382 jPanel1Layout.setVerticalGroup(
383 jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
384 .addGroup(jPanel1Layout.createSequentialGroup()
385 .addComponent(lbCentralRepository)
386 .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
387 .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
388 .addComponent(cbUseCentralRepo)
389 .addComponent(ingestRunningWarningLabel))
390 .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
391 .addComponent(pnDatabaseConfiguration, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
393 .addComponent(pnCorrelationProperties, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
395 .addComponent(organizationPanel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
397 .addComponent(casesPanel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
399 .addComponent(tbOops, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
403 casesPanel.getAccessibleContext().setAccessibleName(
org.openide.util.NbBundle.getMessage(
GlobalSettingsPanel.class,
"GlobalSettingsPanel.Case Details.AccessibleContext.accessibleName"));
405 jScrollPane1.setViewportView(jPanel1);
407 javax.swing.GroupLayout layout =
new javax.swing.GroupLayout(
this);
408 this.setLayout(layout);
409 layout.setHorizontalGroup(
410 layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
411 .addComponent(jScrollPane1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
413 layout.setVerticalGroup(
414 layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
415 .addComponent(jScrollPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 512, Short.MAX_VALUE)
421 ManageCorrelationPropertiesDialog manageCorrelationDialog =
new ManageCorrelationPropertiesDialog();
422 firePropertyChange(OptionsPanelController.PROP_VALID, null, null);
428 if (dialog.wasConfigurationChanged()) {
431 firePropertyChange(OptionsPanelController.PROP_CHANGED, null, null);
442 ManageCasesDialog.displayManageCasesDialog();
451 firePropertyChange(OptionsPanelController.PROP_CHANGED, null, null);
455 @Messages({
"GlobalSettingsPanel.validationerrMsg.mustConfigure=Configure the database to enable this module."})
458 enableButtonSubComponents(
false);
461 switch (selectedPlatform) {
465 lbDbNameValue.setText(dbSettingsPg.
getDbName());
466 lbDbLocationValue.setText(dbSettingsPg.
getHost());
467 enableButtonSubComponents(cbUseCentralRepo.isSelected());
472 lbDbNameValue.setText(dbSettingsSqlite.
getDbName());
474 enableButtonSubComponents(cbUseCentralRepo.isSelected());
478 lbDbNameValue.setText(
"");
479 lbDbLocationValue.setText(
"");
480 tbOops.setText(Bundle.GlobalSettingsPanel_validationerrMsg_mustConfigure());
497 return !cbUseCentralRepo.isSelected() || !lbDbPlatformValue.getText().equals(DISABLED.toString());
506 @SuppressWarnings(
"FinalizeDeclaration")
507 protected
void finalize() throws Throwable {
527 if (isLocalIngestJobEvent(event)) {
528 EventQueue.invokeLater(
new Runnable() {
549 if (((AutopsyEvent) event).getSourceType() == AutopsyEvent.SourceType.LOCAL) {
550 String eventType =
event.getPropertyName();
559 @Messages({
"GlobalSettingsPanel.validationErrMsg.ingestRunning=You cannot change settings while ingest is running."})
561 if (!SwingUtilities.isEventDispatchThread()) {
562 SwingUtilities.invokeLater(() -> {
563 ingestStateUpdated(caseIsOpen);
569 cbUseCentralRepo.setEnabled(!caseIsOpen);
571 tbOops.setText(Bundle.GlobalSettingsPanel_validationErrMsg_ingestRunning());
572 tbOops.setVisible(
true);
573 enableButtonSubComponents(cbUseCentralRepo.isSelected());
576 enableDatabaseConfigureButton(cbUseCentralRepo.isSelected() && !caseIsOpen);
590 ingestRunningWarningLabel.setVisible(ingestRunning);
591 pnDatabaseConfiguration.setEnabled(enable && !ingestRunning);
592 bnDbConfigure.setEnabled(enable && !ingestRunning);
593 lbDbLocationLabel.setEnabled(enable && !ingestRunning);
594 lbDbLocationValue.setEnabled(enable && !ingestRunning);
595 lbDbNameLabel.setEnabled(enable && !ingestRunning);
596 lbDbNameValue.setEnabled(enable && !ingestRunning);
597 lbDbPlatformTypeLabel.setEnabled(enable && !ingestRunning);
598 lbDbPlatformValue.setEnabled(enable && !ingestRunning);
599 tbOops.setEnabled(enable && !ingestRunning);
612 pnCorrelationProperties.setEnabled(enable && !ingestRunning);
613 bnManageTypes.setEnabled(enable && !ingestRunning);
614 correlationPropertiesTextArea.setEnabled(enable && !ingestRunning);
615 organizationPanel.setEnabled(enable && !ingestRunning);
616 organizationTextArea.setEnabled(enable && !ingestRunning);
617 manageOrganizationButton.setEnabled(enable && !ingestRunning);
618 showCasesButton.setEnabled(enable && !ingestRunning);
619 casesPanel.setEnabled(enable && !ingestRunning);
620 casesTextArea.setEnabled(enable && !ingestRunning);
final IngestJobEventPropertyChangeListener ingestJobEventListener
javax.swing.JLabel lbDbLocationValue
javax.swing.JButton bnManageTypes
static void upgradeDatabase()
static synchronized IngestManager getInstance()
void showCasesButtonActionPerformed(java.awt.event.ActionEvent evt)
javax.swing.JScrollPane organizationScrollPane
void bnManageTypesActionPerformed(java.awt.event.ActionEvent evt)
javax.swing.JLabel ingestRunningWarningLabel
boolean isIngestRunning()
boolean isLocalIngestJobEvent(PropertyChangeEvent event)
void customizeComponents()
void cbUseCentralRepoActionPerformed(java.awt.event.ActionEvent evt)
javax.swing.JPanel pnDatabaseConfiguration
javax.swing.JPanel organizationPanel
void removeIngestJobEventListener(final PropertyChangeListener listener)
javax.swing.JTextArea correlationPropertiesTextArea
javax.swing.JCheckBox cbUseCentralRepo
void enableDatabaseConfigureButton(Boolean enable)
javax.swing.JTextField tbOops
javax.swing.JTextArea casesTextArea
javax.swing.JButton bnDbConfigure
javax.swing.JScrollPane correlationPropertiesScrollPane
void addIngestJobEventListener(final PropertyChangeListener listener)
javax.swing.JTextArea organizationTextArea
boolean enableButtonSubComponents(Boolean enable)
javax.swing.JPanel jPanel1
javax.swing.JLabel lbDbPlatformTypeLabel
javax.swing.JButton manageOrganizationButton
javax.swing.JScrollPane jScrollPane1
javax.swing.JButton showCasesButton
static void setUseCentralRepo(boolean centralRepoCheckBoxIsSelected)
javax.swing.JLabel lbDbNameValue
javax.swing.JLabel lbCentralRepository
void ingestStateUpdated(boolean caseIsOpen)
javax.swing.JPanel casesPanel
void propertyChange(PropertyChangeEvent event)
synchronized static Logger getLogger(String name)
static void addEventTypeSubscriber(Set< Events > eventTypes, PropertyChangeListener subscriber)
javax.swing.JLabel lbDbPlatformValue
javax.swing.JLabel lbDbLocationLabel
void addIngestJobEventsListener()
void manageOrganizationButtonActionPerformed(java.awt.event.ActionEvent evt)
void bnDbConfigureActionPerformed(java.awt.event.ActionEvent evt)
javax.swing.JLabel lbDbNameLabel
static boolean isCaseOpen()
javax.swing.JScrollPane casesScrollPane
static boolean allowUseOfCentralRepository()
javax.swing.JPanel pnCorrelationProperties