mirror of
https://github.com/elisspace/autopsy.git
synced 2026-09-30 14:29:51 +00:00
clean up OptionsPanel
This commit is contained in:
+7
-1
@@ -23,13 +23,19 @@ import org.sleuthkit.autopsy.casemodule.Case;
|
||||
import org.sleuthkit.autopsy.ingest.IngestManager;
|
||||
|
||||
/** The Image/Video Analyzer panel in the NetBeans provided Options Dialogs
|
||||
* accessed via Tool -> Options */
|
||||
* accessed via Tool -> Options
|
||||
*
|
||||
* Uses {@link ImageAnalyzerPreferences} and {@link PerCaseProperties} to
|
||||
* persist settings
|
||||
*/
|
||||
final class ImageAnalyzerOptionsPanel extends javax.swing.JPanel {
|
||||
|
||||
ImageAnalyzerOptionsPanel(ImageAnalyzerOptionsPanelController controller) {
|
||||
initComponents();
|
||||
|
||||
//listen for interactions
|
||||
IngestManager.getInstance().addIngestJobEventListener(evt -> {
|
||||
//disable during ingest
|
||||
enabledForCaseBox.setEnabled(Case.isCaseOpen() && IngestManager.getInstance().isIngestRunning() == false);
|
||||
});
|
||||
|
||||
|
||||
+1
@@ -26,6 +26,7 @@ import org.netbeans.spi.options.OptionsPanelController;
|
||||
import org.openide.util.HelpCtx;
|
||||
import org.openide.util.Lookup;
|
||||
|
||||
/** OptionsPanelController for the ImageAnalyzerOptionPanel */
|
||||
@OptionsPanelController.TopLevelRegistration(
|
||||
categoryName = "#OptionsCategory_Name_Options",
|
||||
iconBase = "org/sleuthkit/autopsy/imageanalyzer/images/polaroid_48_silhouette.png",
|
||||
|
||||
@@ -22,14 +22,14 @@ import java.util.prefs.PreferenceChangeListener;
|
||||
import java.util.prefs.Preferences;
|
||||
import org.openide.util.NbPreferences;
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
class ImageAnalyzerPreferences {
|
||||
/** Persists Image Analyzer preference to a per user .properties file */
|
||||
class ImageAnalyzerPreferences {
|
||||
|
||||
/** NBPreferences object used to persist settings */
|
||||
private static final Preferences preferences = NbPreferences.forModule(ImageAnalyzerPreferences.class);
|
||||
|
||||
static final String ENABLED_BY_DEFAULT = "enabled_by_default";
|
||||
/** key for the listening enabled for new cases setting */
|
||||
private static final String ENABLED_BY_DEFAULT = "enabled_by_default";
|
||||
|
||||
static boolean isEnabledByDefault() {
|
||||
final boolean aBoolean = preferences.getBoolean(ENABLED_BY_DEFAULT, true);
|
||||
|
||||
Reference in New Issue
Block a user