Autopsy  4.10.0
Graphical digital forensics platform for The Sleuth Kit and other tools.
ViewPreferencesPanel.java
Go to the documentation of this file.
1 /*
2  * Autopsy Forensic Browser
3  *
4  * Copyright 2018 Basis Technology Corp.
5  * Contact: carrier <at> sleuthkit <dot> org
6  *
7  * Licensed under the Apache License, Version 2.0 (the "License");
8  * you may not use this file except in compliance with the License.
9  * You may obtain a copy of the License at
10  *
11  * http://www.apache.org/licenses/LICENSE-2.0
12  *
13  * Unless required by applicable law or agreed to in writing, software
14  * distributed under the License is distributed on an "AS IS" BASIS,
15  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16  * See the License for the specific language governing permissions and
17  * limitations under the License.
18  */
19 package org.sleuthkit.autopsy.corecomponents;
20 
21 import java.beans.PropertyChangeEvent;
22 import java.util.EnumSet;
23 import java.util.Objects;
24 import java.util.TimeZone;
25 import javax.swing.JPanel;
26 import org.netbeans.spi.options.OptionsPanelController;
34 
38 public class ViewPreferencesPanel extends JPanel implements OptionsPanel {
39 
40  private final boolean immediateUpdates;
41 
48  public ViewPreferencesPanel(boolean immediateUpdates) {
50  this.immediateUpdates = immediateUpdates;
51  Case.addEventTypeSubscriber(EnumSet.of(Case.Events.CURRENT_CASE), (PropertyChangeEvent evt) -> {
52  //disable when case is closed, enable when case is open
53  currentCaseSettingsPanel.setEnabled(evt.getNewValue() != null);
54  groupByDataSourceCheckbox.setEnabled(evt.getNewValue() != null);
55  });
56  this.timeZoneList.setListData(TimeZoneUtils.createTimeZoneList().stream().toArray(String[]::new));
57  }
58 
59  @Override
60  public void load() {
61  // Global Settings
62  boolean keepPreferredViewer = UserPreferences.keepPreferredContentViewer();
63  keepCurrentViewerRadioButton.setSelected(keepPreferredViewer);
64  useBestViewerRadioButton.setSelected(!keepPreferredViewer);
65 
66  boolean useLocalTime = UserPreferences.displayTimesInLocalTime();
67  timeZoneList.setEnabled(!useLocalTime);
68  timeZoneList.setSelectedValue(TimeZoneUtils.createTimeZoneString(TimeZone.getTimeZone(UserPreferences.getTimeZoneForDisplays())), true);
69  useLocalTimeRadioButton.setSelected(useLocalTime);
70  useAnotherTimeRadioButton.setSelected(!useLocalTime);
71 
74 
77 
81 
84 
87 
88  // Current Case Settings
89  boolean caseIsOpen = Case.isCaseOpen();
90  currentCaseSettingsPanel.setEnabled(caseIsOpen);
91  groupByDataSourceCheckbox.setEnabled(caseIsOpen);
92 
93  if (caseIsOpen) {
95  } else {
96  groupByDataSourceCheckbox.setSelected(false);
97  }
98 
99  // Current Session Settings
101  }
102 
103  @Override
104  public void store() {
107  if (useAnotherTimeRadioButton.isSelected()) {
108  UserPreferences.setTimeZoneForDisplays(timeZoneList.getSelectedValue().substring(11).trim());
109  }
117 
119 
121  }
122 
134  }
135  }
136 
142  @SuppressWarnings("unchecked")
143  // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
144  private void initComponents() {
145 
146  viewPreferencesScrollPane = new javax.swing.JScrollPane();
147  viewPreferencesPanel = new javax.swing.JPanel();
148  globalSettingsPanel = new javax.swing.JPanel();
149  selectFileLabel = new javax.swing.JLabel();
150  useBestViewerRadioButton = new javax.swing.JRadioButton();
151  keepCurrentViewerRadioButton = new javax.swing.JRadioButton();
152  hideKnownFilesLabel = new javax.swing.JLabel();
153  dataSourcesHideKnownCheckbox = new javax.swing.JCheckBox();
154  viewsHideKnownCheckbox = new javax.swing.JCheckBox();
155  hideSlackFilesLabel = new javax.swing.JLabel();
156  dataSourcesHideSlackCheckbox = new javax.swing.JCheckBox();
157  viewsHideSlackCheckbox = new javax.swing.JCheckBox();
158  displayTimeLabel = new javax.swing.JLabel();
159  useLocalTimeRadioButton = new javax.swing.JRadioButton();
160  useAnotherTimeRadioButton = new javax.swing.JRadioButton();
161  hideOtherUsersTagsCheckbox = new javax.swing.JCheckBox();
162  hideOtherUsersTagsLabel = new javax.swing.JLabel();
163  centralRepoLabel = new javax.swing.JLabel();
164  commentsOccurencesColumnsCheckbox = new javax.swing.JCheckBox();
165  jScrollPane1 = new javax.swing.JScrollPane();
166  timeZoneList = new javax.swing.JList<>();
167  translateTextLabel = new javax.swing.JLabel();
168  commentsOccurencesColumnWrapAroundText = new javax.swing.JLabel();
169  fileNameTranslationColumnCheckbox = new javax.swing.JCheckBox();
170  currentCaseSettingsPanel = new javax.swing.JPanel();
171  groupByDataSourceCheckbox = new javax.swing.JCheckBox();
172  currentSessionSettingsPanel = new javax.swing.JPanel();
173  hideRejectedResultsCheckbox = new javax.swing.JCheckBox();
174 
175  setPreferredSize(new java.awt.Dimension(625, 465));
176 
177  viewPreferencesScrollPane.setBorder(null);
178  viewPreferencesScrollPane.setPreferredSize(new java.awt.Dimension(625, 465));
179 
180  viewPreferencesPanel.setPreferredSize(new java.awt.Dimension(625, 465));
181 
182  globalSettingsPanel.setBorder(javax.swing.BorderFactory.createTitledBorder(org.openide.util.NbBundle.getMessage(ViewPreferencesPanel.class, "ViewPreferencesPanel.globalSettingsPanel.border.title"))); // NOI18N
183 
184  org.openide.awt.Mnemonics.setLocalizedText(selectFileLabel, org.openide.util.NbBundle.getMessage(ViewPreferencesPanel.class, "ViewPreferencesPanel.selectFileLabel.text")); // NOI18N
185 
186  org.openide.awt.Mnemonics.setLocalizedText(useBestViewerRadioButton, org.openide.util.NbBundle.getMessage(ViewPreferencesPanel.class, "ViewPreferencesPanel.useBestViewerRadioButton.text")); // NOI18N
187  useBestViewerRadioButton.setToolTipText(org.openide.util.NbBundle.getMessage(ViewPreferencesPanel.class, "ViewPreferencesPanel.useBestViewerRadioButton.toolTipText")); // NOI18N
188  useBestViewerRadioButton.addActionListener(new java.awt.event.ActionListener() {
189  public void actionPerformed(java.awt.event.ActionEvent evt) {
191  }
192  });
193 
194  org.openide.awt.Mnemonics.setLocalizedText(keepCurrentViewerRadioButton, org.openide.util.NbBundle.getMessage(ViewPreferencesPanel.class, "ViewPreferencesPanel.keepCurrentViewerRadioButton.text")); // NOI18N
195  keepCurrentViewerRadioButton.setToolTipText(org.openide.util.NbBundle.getMessage(ViewPreferencesPanel.class, "ViewPreferencesPanel.keepCurrentViewerRadioButton.toolTipText")); // NOI18N
196  keepCurrentViewerRadioButton.addActionListener(new java.awt.event.ActionListener() {
197  public void actionPerformed(java.awt.event.ActionEvent evt) {
199  }
200  });
201 
202  org.openide.awt.Mnemonics.setLocalizedText(hideKnownFilesLabel, org.openide.util.NbBundle.getMessage(ViewPreferencesPanel.class, "ViewPreferencesPanel.hideKnownFilesLabel.text")); // NOI18N
203 
204  org.openide.awt.Mnemonics.setLocalizedText(dataSourcesHideKnownCheckbox, org.openide.util.NbBundle.getMessage(ViewPreferencesPanel.class, "ViewPreferencesPanel.dataSourcesHideKnownCheckbox.text")); // NOI18N
205  dataSourcesHideKnownCheckbox.addActionListener(new java.awt.event.ActionListener() {
206  public void actionPerformed(java.awt.event.ActionEvent evt) {
208  }
209  });
210 
211  org.openide.awt.Mnemonics.setLocalizedText(viewsHideKnownCheckbox, org.openide.util.NbBundle.getMessage(ViewPreferencesPanel.class, "ViewPreferencesPanel.viewsHideKnownCheckbox.text")); // NOI18N
212  viewsHideKnownCheckbox.addActionListener(new java.awt.event.ActionListener() {
213  public void actionPerformed(java.awt.event.ActionEvent evt) {
215  }
216  });
217 
218  org.openide.awt.Mnemonics.setLocalizedText(hideSlackFilesLabel, org.openide.util.NbBundle.getMessage(ViewPreferencesPanel.class, "ViewPreferencesPanel.hideSlackFilesLabel.text")); // NOI18N
219 
220  org.openide.awt.Mnemonics.setLocalizedText(dataSourcesHideSlackCheckbox, org.openide.util.NbBundle.getMessage(ViewPreferencesPanel.class, "ViewPreferencesPanel.dataSourcesHideSlackCheckbox.text")); // NOI18N
221  dataSourcesHideSlackCheckbox.addActionListener(new java.awt.event.ActionListener() {
222  public void actionPerformed(java.awt.event.ActionEvent evt) {
224  }
225  });
226 
227  org.openide.awt.Mnemonics.setLocalizedText(viewsHideSlackCheckbox, org.openide.util.NbBundle.getMessage(ViewPreferencesPanel.class, "ViewPreferencesPanel.viewsHideSlackCheckbox.text")); // NOI18N
228  viewsHideSlackCheckbox.addActionListener(new java.awt.event.ActionListener() {
229  public void actionPerformed(java.awt.event.ActionEvent evt) {
231  }
232  });
233 
234  org.openide.awt.Mnemonics.setLocalizedText(displayTimeLabel, org.openide.util.NbBundle.getMessage(ViewPreferencesPanel.class, "ViewPreferencesPanel.displayTimeLabel.text")); // NOI18N
235 
236  org.openide.awt.Mnemonics.setLocalizedText(useLocalTimeRadioButton, org.openide.util.NbBundle.getMessage(ViewPreferencesPanel.class, "ViewPreferencesPanel.useLocalTimeRadioButton.text")); // NOI18N
237  useLocalTimeRadioButton.addActionListener(new java.awt.event.ActionListener() {
238  public void actionPerformed(java.awt.event.ActionEvent evt) {
240  }
241  });
242 
243  org.openide.awt.Mnemonics.setLocalizedText(useAnotherTimeRadioButton, org.openide.util.NbBundle.getMessage(ViewPreferencesPanel.class, "ViewPreferencesPanel.useAnotherTimeRadioButton.text")); // NOI18N
244  useAnotherTimeRadioButton.addActionListener(new java.awt.event.ActionListener() {
245  public void actionPerformed(java.awt.event.ActionEvent evt) {
247  }
248  });
249 
250  org.openide.awt.Mnemonics.setLocalizedText(hideOtherUsersTagsCheckbox, org.openide.util.NbBundle.getMessage(ViewPreferencesPanel.class, "ViewPreferencesPanel.hideOtherUsersTagsCheckbox.text")); // NOI18N
251  hideOtherUsersTagsCheckbox.addActionListener(new java.awt.event.ActionListener() {
252  public void actionPerformed(java.awt.event.ActionEvent evt) {
254  }
255  });
256 
257  org.openide.awt.Mnemonics.setLocalizedText(hideOtherUsersTagsLabel, org.openide.util.NbBundle.getMessage(ViewPreferencesPanel.class, "ViewPreferencesPanel.hideOtherUsersTagsLabel.text")); // NOI18N
258 
259  org.openide.awt.Mnemonics.setLocalizedText(centralRepoLabel, org.openide.util.NbBundle.getMessage(ViewPreferencesPanel.class, "ViewPreferencesPanel.centralRepoLabel.text")); // NOI18N
260 
261  org.openide.awt.Mnemonics.setLocalizedText(commentsOccurencesColumnsCheckbox, org.openide.util.NbBundle.getMessage(ViewPreferencesPanel.class, "ViewPreferencesPanel.commentsOccurencesColumnsCheckbox.text")); // NOI18N
262  commentsOccurencesColumnsCheckbox.setHorizontalAlignment(javax.swing.SwingConstants.TRAILING);
263  commentsOccurencesColumnsCheckbox.addActionListener(new java.awt.event.ActionListener() {
264  public void actionPerformed(java.awt.event.ActionEvent evt) {
266  }
267  });
268 
269  timeZoneList.addListSelectionListener(new javax.swing.event.ListSelectionListener() {
270  public void valueChanged(javax.swing.event.ListSelectionEvent evt) {
272  }
273  });
274  jScrollPane1.setViewportView(timeZoneList);
275 
276  org.openide.awt.Mnemonics.setLocalizedText(translateTextLabel, org.openide.util.NbBundle.getMessage(ViewPreferencesPanel.class, "ViewPreferencesPanel.translateTextLabel.text")); // NOI18N
277 
278  org.openide.awt.Mnemonics.setLocalizedText(commentsOccurencesColumnWrapAroundText, org.openide.util.NbBundle.getMessage(ViewPreferencesPanel.class, "ViewPreferencesPanel.commentsOccurencesColumnWrapAroundText.text")); // NOI18N
279 
280  org.openide.awt.Mnemonics.setLocalizedText(fileNameTranslationColumnCheckbox, org.openide.util.NbBundle.getMessage(ViewPreferencesPanel.class, "ViewPreferencesPanel.fileNameTranslationColumnCheckbox.text")); // NOI18N
281  fileNameTranslationColumnCheckbox.addActionListener(new java.awt.event.ActionListener() {
282  public void actionPerformed(java.awt.event.ActionEvent evt) {
284  }
285  });
286 
287  javax.swing.GroupLayout globalSettingsPanelLayout = new javax.swing.GroupLayout(globalSettingsPanel);
288  globalSettingsPanel.setLayout(globalSettingsPanelLayout);
289  globalSettingsPanelLayout.setHorizontalGroup(
290  globalSettingsPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
291  .addGroup(globalSettingsPanelLayout.createSequentialGroup()
292  .addContainerGap()
293  .addGroup(globalSettingsPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
294  .addGroup(globalSettingsPanelLayout.createSequentialGroup()
295  .addGap(10, 10, 10)
296  .addComponent(hideOtherUsersTagsCheckbox))
297  .addGroup(globalSettingsPanelLayout.createSequentialGroup()
298  .addComponent(centralRepoLabel)
299  .addGap(135, 135, 135)
300  .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 272, javax.swing.GroupLayout.PREFERRED_SIZE))
301  .addComponent(hideOtherUsersTagsLabel)
302  .addGroup(globalSettingsPanelLayout.createSequentialGroup()
303  .addGroup(globalSettingsPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
304  .addComponent(hideKnownFilesLabel)
305  .addGroup(globalSettingsPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
306  .addGroup(globalSettingsPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
307  .addGroup(globalSettingsPanelLayout.createSequentialGroup()
308  .addGap(10, 10, 10)
309  .addGroup(globalSettingsPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
310  .addComponent(dataSourcesHideSlackCheckbox)
311  .addComponent(viewsHideSlackCheckbox)))
312  .addComponent(hideSlackFilesLabel))
313  .addGroup(globalSettingsPanelLayout.createSequentialGroup()
314  .addGap(10, 10, 10)
315  .addGroup(globalSettingsPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
316  .addComponent(dataSourcesHideKnownCheckbox)
317  .addComponent(viewsHideKnownCheckbox))))
318  .addGroup(globalSettingsPanelLayout.createSequentialGroup()
319  .addGap(10, 10, 10)
320  .addComponent(commentsOccurencesColumnsCheckbox))
321  .addGroup(globalSettingsPanelLayout.createSequentialGroup()
322  .addGap(32, 32, 32)
324  .addGap(18, 18, 18)
325  .addGroup(globalSettingsPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
326  .addComponent(displayTimeLabel)
327  .addComponent(selectFileLabel)
328  .addComponent(translateTextLabel, javax.swing.GroupLayout.PREFERRED_SIZE, 120, javax.swing.GroupLayout.PREFERRED_SIZE)
329  .addGroup(globalSettingsPanelLayout.createSequentialGroup()
330  .addGap(10, 10, 10)
331  .addGroup(globalSettingsPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
332  .addComponent(fileNameTranslationColumnCheckbox)
333  .addComponent(keepCurrentViewerRadioButton)
334  .addComponent(useBestViewerRadioButton)
335  .addComponent(useLocalTimeRadioButton)
336  .addComponent(useAnotherTimeRadioButton))))))
337  .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
338  );
339  globalSettingsPanelLayout.setVerticalGroup(
340  globalSettingsPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
341  .addGroup(globalSettingsPanelLayout.createSequentialGroup()
342  .addContainerGap()
343  .addGroup(globalSettingsPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
344  .addGroup(globalSettingsPanelLayout.createSequentialGroup()
345  .addComponent(hideKnownFilesLabel)
346  .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
347  .addComponent(dataSourcesHideKnownCheckbox)
348  .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
349  .addComponent(viewsHideKnownCheckbox)
350  .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
351  .addComponent(hideSlackFilesLabel)
352  .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
353  .addComponent(dataSourcesHideSlackCheckbox)
354  .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
355  .addComponent(viewsHideSlackCheckbox)
356  .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
357  .addComponent(hideOtherUsersTagsLabel)
358  .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
359  .addComponent(hideOtherUsersTagsCheckbox)
360  .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
361  .addComponent(centralRepoLabel)
362  .addGap(3, 3, 3)
363  .addComponent(commentsOccurencesColumnsCheckbox, javax.swing.GroupLayout.PREFERRED_SIZE, 18, javax.swing.GroupLayout.PREFERRED_SIZE)
364  .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
366  .addGroup(globalSettingsPanelLayout.createSequentialGroup()
367  .addComponent(selectFileLabel)
368  .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
369  .addComponent(useBestViewerRadioButton)
370  .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
371  .addComponent(keepCurrentViewerRadioButton)
372  .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
373  .addComponent(displayTimeLabel)
374  .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
375  .addComponent(useLocalTimeRadioButton)
376  .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
377  .addComponent(useAnotherTimeRadioButton)
378  .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
379  .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 67, javax.swing.GroupLayout.PREFERRED_SIZE)
380  .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
381  .addComponent(translateTextLabel)
382  .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
383  .addComponent(fileNameTranslationColumnCheckbox)))
384  .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
385  );
386 
387  currentCaseSettingsPanel.setBorder(javax.swing.BorderFactory.createTitledBorder(org.openide.util.NbBundle.getMessage(ViewPreferencesPanel.class, "ViewPreferencesPanel.currentCaseSettingsPanel.border.title"))); // NOI18N
388 
389  org.openide.awt.Mnemonics.setLocalizedText(groupByDataSourceCheckbox, org.openide.util.NbBundle.getMessage(ViewPreferencesPanel.class, "ViewPreferencesPanel.groupByDataSourceCheckbox.text")); // NOI18N
390  groupByDataSourceCheckbox.addActionListener(new java.awt.event.ActionListener() {
391  public void actionPerformed(java.awt.event.ActionEvent evt) {
393  }
394  });
395 
396  javax.swing.GroupLayout currentCaseSettingsPanelLayout = new javax.swing.GroupLayout(currentCaseSettingsPanel);
397  currentCaseSettingsPanel.setLayout(currentCaseSettingsPanelLayout);
398  currentCaseSettingsPanelLayout.setHorizontalGroup(
399  currentCaseSettingsPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
400  .addGroup(currentCaseSettingsPanelLayout.createSequentialGroup()
401  .addContainerGap()
402  .addComponent(groupByDataSourceCheckbox)
403  .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
404  );
405  currentCaseSettingsPanelLayout.setVerticalGroup(
406  currentCaseSettingsPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
407  .addGroup(currentCaseSettingsPanelLayout.createSequentialGroup()
408  .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
409  .addComponent(groupByDataSourceCheckbox))
410  );
411 
412  currentSessionSettingsPanel.setBorder(javax.swing.BorderFactory.createTitledBorder(org.openide.util.NbBundle.getMessage(ViewPreferencesPanel.class, "ViewPreferencesPanel.currentSessionSettingsPanel.border.title"))); // NOI18N
413 
414  org.openide.awt.Mnemonics.setLocalizedText(hideRejectedResultsCheckbox, org.openide.util.NbBundle.getMessage(ViewPreferencesPanel.class, "ViewPreferencesPanel.hideRejectedResultsCheckbox.text")); // NOI18N
415  hideRejectedResultsCheckbox.addActionListener(new java.awt.event.ActionListener() {
416  public void actionPerformed(java.awt.event.ActionEvent evt) {
418  }
419  });
420 
421  javax.swing.GroupLayout currentSessionSettingsPanelLayout = new javax.swing.GroupLayout(currentSessionSettingsPanel);
422  currentSessionSettingsPanel.setLayout(currentSessionSettingsPanelLayout);
423  currentSessionSettingsPanelLayout.setHorizontalGroup(
424  currentSessionSettingsPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
425  .addGroup(currentSessionSettingsPanelLayout.createSequentialGroup()
426  .addContainerGap()
427  .addComponent(hideRejectedResultsCheckbox, javax.swing.GroupLayout.PREFERRED_SIZE, 259, javax.swing.GroupLayout.PREFERRED_SIZE)
428  .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
429  );
430  currentSessionSettingsPanelLayout.setVerticalGroup(
431  currentSessionSettingsPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
432  .addGroup(currentSessionSettingsPanelLayout.createSequentialGroup()
433  .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
434  .addComponent(hideRejectedResultsCheckbox))
435  );
436 
437  javax.swing.GroupLayout viewPreferencesPanelLayout = new javax.swing.GroupLayout(viewPreferencesPanel);
438  viewPreferencesPanel.setLayout(viewPreferencesPanelLayout);
439  viewPreferencesPanelLayout.setHorizontalGroup(
440  viewPreferencesPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
441  .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, viewPreferencesPanelLayout.createSequentialGroup()
442  .addContainerGap()
443  .addGroup(viewPreferencesPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
444  .addComponent(currentSessionSettingsPanel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
445  .addComponent(currentCaseSettingsPanel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
446  .addComponent(globalSettingsPanel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
447  .addContainerGap())
448  );
449  viewPreferencesPanelLayout.setVerticalGroup(
450  viewPreferencesPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
451  .addGroup(viewPreferencesPanelLayout.createSequentialGroup()
452  .addComponent(globalSettingsPanel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
453  .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
454  .addComponent(currentCaseSettingsPanel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
455  .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
456  .addComponent(currentSessionSettingsPanel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
457  .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
458  );
459 
461 
462  javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);
463  this.setLayout(layout);
464  layout.setHorizontalGroup(
465  layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
466  .addComponent(viewPreferencesScrollPane, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
467  );
468  layout.setVerticalGroup(
469  layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
470  .addComponent(viewPreferencesScrollPane, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
471  );
472  }// </editor-fold>//GEN-END:initComponents
473 
474  private void groupByDataSourceCheckboxActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_groupByDataSourceCheckboxActionPerformed
475  if (immediateUpdates) {
477  } else {
478  firePropertyChange(OptionsPanelController.PROP_CHANGED, null, null);
479  }
480  }//GEN-LAST:event_groupByDataSourceCheckboxActionPerformed
481 
482  private void hideRejectedResultsCheckboxActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_hideRejectedResultsCheckboxActionPerformed
483  if (immediateUpdates) {
485  } else {
486  firePropertyChange(OptionsPanelController.PROP_CHANGED, null, null);
487  }
488  }//GEN-LAST:event_hideRejectedResultsCheckboxActionPerformed
489 
490  private void timeZoneListValueChanged(javax.swing.event.ListSelectionEvent evt) {//GEN-FIRST:event_timeZoneListValueChanged
491  if (immediateUpdates && useAnotherTimeRadioButton.isSelected()) {
492  UserPreferences.setTimeZoneForDisplays(timeZoneList.getSelectedValue().substring(11).trim());
493  } else {
494  firePropertyChange(OptionsPanelController.PROP_CHANGED, null, null);
495  }
496  }//GEN-LAST:event_timeZoneListValueChanged
497 
498  private void commentsOccurencesColumnsCheckboxActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_commentsOccurencesColumnsCheckboxActionPerformed
499  if (immediateUpdates) {
501  } else {
502  firePropertyChange(OptionsPanelController.PROP_CHANGED, null, null);
503  }
504  }//GEN-LAST:event_commentsOccurencesColumnsCheckboxActionPerformed
505 
506  private void hideOtherUsersTagsCheckboxActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_hideOtherUsersTagsCheckboxActionPerformed
507  if (immediateUpdates) {
509  } else {
510  firePropertyChange(OptionsPanelController.PROP_CHANGED, null, null);
511  }
512  }//GEN-LAST:event_hideOtherUsersTagsCheckboxActionPerformed
513 
514  private void useAnotherTimeRadioButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_useAnotherTimeRadioButtonActionPerformed
515  useLocalTimeRadioButton.setSelected(false);
516  useAnotherTimeRadioButton.setSelected(true);
517  timeZoneList.setEnabled(true);
518  if (immediateUpdates) {
520  } else {
521  firePropertyChange(OptionsPanelController.PROP_CHANGED, null, null);
522  }
523  }//GEN-LAST:event_useAnotherTimeRadioButtonActionPerformed
524 
525  private void useLocalTimeRadioButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_useLocalTimeRadioButtonActionPerformed
526  useLocalTimeRadioButton.setSelected(true);
527  useAnotherTimeRadioButton.setSelected(false);
528  timeZoneList.setEnabled(false);
529  if (immediateUpdates) {
531  } else {
532  firePropertyChange(OptionsPanelController.PROP_CHANGED, null, null);
533  }
534  }//GEN-LAST:event_useLocalTimeRadioButtonActionPerformed
535 
536  private void viewsHideSlackCheckboxActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_viewsHideSlackCheckboxActionPerformed
537  if (immediateUpdates) {
539  } else {
540  firePropertyChange(OptionsPanelController.PROP_CHANGED, null, null);
541  }
542  }//GEN-LAST:event_viewsHideSlackCheckboxActionPerformed
543 
544  private void dataSourcesHideSlackCheckboxActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_dataSourcesHideSlackCheckboxActionPerformed
545  if (immediateUpdates) {
547  } else {
548  firePropertyChange(OptionsPanelController.PROP_CHANGED, null, null);
549  }
550  }//GEN-LAST:event_dataSourcesHideSlackCheckboxActionPerformed
551 
552  private void viewsHideKnownCheckboxActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_viewsHideKnownCheckboxActionPerformed
553  if (immediateUpdates) {
555  } else {
556  firePropertyChange(OptionsPanelController.PROP_CHANGED, null, null);
557  }
558  }//GEN-LAST:event_viewsHideKnownCheckboxActionPerformed
559 
560  private void dataSourcesHideKnownCheckboxActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_dataSourcesHideKnownCheckboxActionPerformed
561  if (immediateUpdates) {
563  } else {
564  firePropertyChange(OptionsPanelController.PROP_CHANGED, null, null);
565  }
566  }//GEN-LAST:event_dataSourcesHideKnownCheckboxActionPerformed
567 
568  private void keepCurrentViewerRadioButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_keepCurrentViewerRadioButtonActionPerformed
569  useBestViewerRadioButton.setSelected(false);
570  keepCurrentViewerRadioButton.setSelected(true);
571  if (immediateUpdates) {
573  } else {
574  firePropertyChange(OptionsPanelController.PROP_CHANGED, null, null);
575  }
576  }//GEN-LAST:event_keepCurrentViewerRadioButtonActionPerformed
577 
578  private void useBestViewerRadioButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_useBestViewerRadioButtonActionPerformed
579  useBestViewerRadioButton.setSelected(true);
580  keepCurrentViewerRadioButton.setSelected(false);
581  if (immediateUpdates) {
583  } else {
584  firePropertyChange(OptionsPanelController.PROP_CHANGED, null, null);
585  }
586  }//GEN-LAST:event_useBestViewerRadioButtonActionPerformed
587 
588  private void fileNameTranslationColumnCheckboxActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_fileNameTranslationColumnCheckboxActionPerformed
589  if (immediateUpdates) {
591  } else {
592  firePropertyChange(OptionsPanelController.PROP_CHANGED, null, null);
593  }
594  }//GEN-LAST:event_fileNameTranslationColumnCheckboxActionPerformed
595 
596 
597  // Variables declaration - do not modify//GEN-BEGIN:variables
598  private javax.swing.JLabel centralRepoLabel;
599  private javax.swing.JLabel commentsOccurencesColumnWrapAroundText;
600  private javax.swing.JCheckBox commentsOccurencesColumnsCheckbox;
601  private javax.swing.JPanel currentCaseSettingsPanel;
602  private javax.swing.JPanel currentSessionSettingsPanel;
603  private javax.swing.JCheckBox dataSourcesHideKnownCheckbox;
604  private javax.swing.JCheckBox dataSourcesHideSlackCheckbox;
605  private javax.swing.JLabel displayTimeLabel;
606  private javax.swing.JCheckBox fileNameTranslationColumnCheckbox;
607  private javax.swing.JPanel globalSettingsPanel;
608  private javax.swing.JCheckBox groupByDataSourceCheckbox;
609  private javax.swing.JLabel hideKnownFilesLabel;
610  private javax.swing.JCheckBox hideOtherUsersTagsCheckbox;
611  private javax.swing.JLabel hideOtherUsersTagsLabel;
612  private javax.swing.JCheckBox hideRejectedResultsCheckbox;
613  private javax.swing.JLabel hideSlackFilesLabel;
614  private javax.swing.JScrollPane jScrollPane1;
615  private javax.swing.JRadioButton keepCurrentViewerRadioButton;
616  private javax.swing.JLabel selectFileLabel;
617  private javax.swing.JList<String> timeZoneList;
618  private javax.swing.JLabel translateTextLabel;
619  private javax.swing.JRadioButton useAnotherTimeRadioButton;
620  private javax.swing.JRadioButton useBestViewerRadioButton;
621  private javax.swing.JRadioButton useLocalTimeRadioButton;
622  private javax.swing.JPanel viewPreferencesPanel;
623  private javax.swing.JScrollPane viewPreferencesScrollPane;
624  private javax.swing.JCheckBox viewsHideKnownCheckbox;
625  private javax.swing.JCheckBox viewsHideSlackCheckbox;
626  // End of variables declaration//GEN-END:variables
627 }
static void setKeepPreferredContentViewer(boolean value)
void keepCurrentViewerRadioButtonActionPerformed(java.awt.event.ActionEvent evt)
void commentsOccurencesColumnsCheckboxActionPerformed(java.awt.event.ActionEvent evt)
static void setDisplayTimesInLocalTime(boolean value)
void fileNameTranslationColumnCheckboxActionPerformed(java.awt.event.ActionEvent evt)
static void setHideSlackFilesInViewsTree(boolean value)
void useLocalTimeRadioButtonActionPerformed(java.awt.event.ActionEvent evt)
void hideRejectedResultsCheckboxActionPerformed(java.awt.event.ActionEvent evt)
void dataSourcesHideKnownCheckboxActionPerformed(java.awt.event.ActionEvent evt)
static void setHideKnownFilesInViewsTree(boolean value)
static void setGroupItemsInTreeByDataSource(boolean value)
static String createTimeZoneString(TimeZone timeZone)
static void setTimeZoneForDisplays(String timeZone)
void groupByDataSourceCheckboxActionPerformed(java.awt.event.ActionEvent evt)
static void setDisplayTranslatedFileNames(boolean value)
static void setHideCentralRepoCommentsAndOccurrences(boolean value)
void hideOtherUsersTagsCheckboxActionPerformed(java.awt.event.ActionEvent evt)
static void setHideSlackFilesInDataSourcesTree(boolean value)
static void setHideKnownFilesInDataSourcesTree(boolean value)
void viewsHideKnownCheckboxActionPerformed(java.awt.event.ActionEvent evt)
void useBestViewerRadioButtonActionPerformed(java.awt.event.ActionEvent evt)
void useAnotherTimeRadioButtonActionPerformed(java.awt.event.ActionEvent evt)
void timeZoneListValueChanged(javax.swing.event.ListSelectionEvent evt)
static void addEventTypeSubscriber(Set< Events > eventTypes, PropertyChangeListener subscriber)
Definition: Case.java:437
static void setShowOnlyCurrentUserTags(boolean value)
void dataSourcesHideSlackCheckboxActionPerformed(java.awt.event.ActionEvent evt)
void viewsHideSlackCheckboxActionPerformed(java.awt.event.ActionEvent evt)

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