diff --git a/ImageGallery/src/org/sleuthkit/autopsy/imagegallery/ImageGalleryOptionsPanel.form b/ImageGallery/src/org/sleuthkit/autopsy/imagegallery/ImageGalleryOptionsPanel.form index a971228a0f..c1514b9b49 100644 --- a/ImageGallery/src/org/sleuthkit/autopsy/imagegallery/ImageGalleryOptionsPanel.form +++ b/ImageGallery/src/org/sleuthkit/autopsy/imagegallery/ImageGalleryOptionsPanel.form @@ -23,10 +23,10 @@ - + - + @@ -35,7 +35,7 @@ - + @@ -45,10 +45,11 @@ - + - + + @@ -70,9 +71,9 @@ - + - + diff --git a/ImageGallery/src/org/sleuthkit/autopsy/imagegallery/ImageGalleryOptionsPanel.java b/ImageGallery/src/org/sleuthkit/autopsy/imagegallery/ImageGalleryOptionsPanel.java index 06891c5a0c..bd3e7ff8c0 100644 --- a/ImageGallery/src/org/sleuthkit/autopsy/imagegallery/ImageGalleryOptionsPanel.java +++ b/ImageGallery/src/org/sleuthkit/autopsy/imagegallery/ImageGalleryOptionsPanel.java @@ -1,7 +1,7 @@ /* * Autopsy Forensic Browser * - * Copyright 2013-15 Basis Technology Corp. + * Copyright 2013-16 Basis Technology Corp. * Contact: carrier sleuthkit org * * Licensed under the Apache License, Version 2.0 (the "License"); @@ -23,11 +23,12 @@ import org.openide.util.NbBundle; import org.sleuthkit.autopsy.casemodule.Case; import org.sleuthkit.autopsy.ingest.IngestManager; -/** The Image/Video Gallery panel in the NetBeans provided Options Dialogs +/** + * The Image/Video Gallery panel in the NetBeans provided Options Dialogs * accessed via Tools -> Options * - * Uses {@link ImageGalleryPreferences} and {@link PerCaseProperties} to - * persist settings + * Uses {@link ImageGalleryPreferences} and {@link PerCaseProperties} to persist + * settings */ final class ImageGalleryOptionsPanel extends javax.swing.JPanel { @@ -49,10 +50,10 @@ final class ImageGalleryOptionsPanel extends javax.swing.JPanel { }); } - /** This method is called from within the constructor to - * initialize the form. - * WARNING: Do NOT modify this code. The content of this method is - * always regenerated by the Form Editor. + /** + * This method is called from within the constructor to initialize the form. + * WARNING: Do NOT modify this code. The content of this method is always + * regenerated by the Form Editor. */ // //GEN-BEGIN:initComponents private void initComponents() { @@ -127,15 +128,16 @@ final class ImageGalleryOptionsPanel extends javax.swing.JPanel { .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false) .addComponent(enabledByDefaultBox) .addComponent(enabledForCaseBox) - .addComponent(descriptionLabel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) + .addComponent(descriptionLabel, javax.swing.GroupLayout.Alignment.TRAILING) .addGroup(layout.createSequentialGroup() .addGap(21, 21, 21) .addComponent(infoIconLabel) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(furtherDescriptionArea, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))) .addComponent(groupCategorizationWarningBox)) - .addContainerGap(46, Short.MAX_VALUE)) - .addComponent(jSeparator1, javax.swing.GroupLayout.Alignment.TRAILING))) + .addGap(0, 36, Short.MAX_VALUE)) + .addComponent(jSeparator1)) + .addContainerGap()) ); layout.setVerticalGroup( layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) @@ -154,9 +156,9 @@ final class ImageGalleryOptionsPanel extends javax.swing.JPanel { .addComponent(furtherDescriptionArea, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) .addGap(18, 18, 18) .addComponent(jSeparator1, javax.swing.GroupLayout.PREFERRED_SIZE, 10, javax.swing.GroupLayout.PREFERRED_SIZE) - .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) .addComponent(groupCategorizationWarningBox) - .addContainerGap()) + .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) ); }// //GEN-END:initComponents @@ -172,7 +174,6 @@ final class ImageGalleryOptionsPanel extends javax.swing.JPanel { // TODO add your handling code here: }//GEN-LAST:event_groupCategorizationWarningBoxActionPerformed - /** {@inheritDoc} */ void load() { enabledByDefaultBox.setSelected(ImageGalleryPreferences.isEnabledByDefault()); if (Case.isCaseOpen() && IngestManager.getInstance().isIngestRunning() == false) { @@ -185,7 +186,6 @@ final class ImageGalleryOptionsPanel extends javax.swing.JPanel { groupCategorizationWarningBox.setSelected(ImageGalleryPreferences.isGroupCategorizationWarningDisabled()); } - /** {@inheritDoc } */ void store() { ImageGalleryPreferences.setEnabledByDefault(enabledByDefaultBox.isSelected()); ImageGalleryController.getDefault().setListeningEnabled(enabledForCaseBox.isSelected()); @@ -195,9 +195,9 @@ final class ImageGalleryOptionsPanel extends javax.swing.JPanel { ImageGalleryPreferences.setGroupCategorizationWarningDisabled(groupCategorizationWarningBox.isSelected()); } - /** {@inheritDoc } - * - * @return true, since there is no way for this form to be invalid */ + /** + * @return true, since there is no way for this form to be invalid + */ boolean valid() { // TODO check whether form is consistent and complete return true; diff --git a/ImageGallery/src/org/sleuthkit/autopsy/imagegallery/ImageGalleryPreferences.java b/ImageGallery/src/org/sleuthkit/autopsy/imagegallery/ImageGalleryPreferences.java index bf98cad72b..93329c3e62 100644 --- a/ImageGallery/src/org/sleuthkit/autopsy/imagegallery/ImageGalleryPreferences.java +++ b/ImageGallery/src/org/sleuthkit/autopsy/imagegallery/ImageGalleryPreferences.java @@ -54,6 +54,12 @@ public class ImageGalleryPreferences { preferences.putBoolean(ENABLED_BY_DEFAULT, b); } + /** + * Return whether the warning about overwriting categories when acting on an + * entire group is disabled. + * + * @return true if the warning is disabled. + */ public static boolean isGroupCategorizationWarningDisabled() { final boolean aBoolean = preferences.getBoolean(GROUP_CATEGORIZATION_WARNING_DISABLED, false); return aBoolean; diff --git a/ImageGallery/src/org/sleuthkit/autopsy/imagegallery/actions/CategorizeGroupAction.java b/ImageGallery/src/org/sleuthkit/autopsy/imagegallery/actions/CategorizeGroupAction.java index 4db55815bb..c9e44dd1da 100644 --- a/ImageGallery/src/org/sleuthkit/autopsy/imagegallery/actions/CategorizeGroupAction.java +++ b/ImageGallery/src/org/sleuthkit/autopsy/imagegallery/actions/CategorizeGroupAction.java @@ -53,7 +53,7 @@ public class CategorizeGroupAction extends CategorizeAction { ObservableList fileIDs = controller.viewState().get().getGroup().getFileIDs(); if (ImageGalleryPreferences.isGroupCategorizationWarningDisabled()) { - //if they have preveiously disabled the wrning, just go ahead and apply categories. + //if they have preveiously disabled the warning, just go ahead and apply categories. addCatToFiles(ImmutableSet.copyOf(fileIDs)); } else { final Map catCountMap = new HashMap<>();