mirror of
https://github.com/overcuriousity/autopsy-flatpak.git
synced 2025-07-16 17:57:43 +00:00
Improve add data source wizard comments
This commit is contained in:
parent
b93d45fbf1
commit
a18f333836
@ -40,11 +40,9 @@ import org.sleuthkit.autopsy.ingest.IngestManager;
|
||||
import org.sleuthkit.datamodel.Image;
|
||||
|
||||
/**
|
||||
* An action that adds a data source to the current case.
|
||||
*
|
||||
* RC: This action needs to be enabled and disabled as cases are opened and
|
||||
* closed. Currently this is done using
|
||||
* CallableSystemAction.get(AddImageAction.class).setEnabled().
|
||||
* An action that adds a data source to the current case. This action needs to
|
||||
* be enabled and disabled as cases are opened and closed. Use
|
||||
* CallableSystemAction.get(AddImageAction.class).setEnabled() to do so.
|
||||
*/
|
||||
public final class AddImageAction extends CallableSystemAction implements Presenter.Toolbar {
|
||||
|
||||
@ -59,8 +57,8 @@ public final class AddImageAction extends CallableSystemAction implements Presen
|
||||
* Constructs an action that adds a data source to the current case.
|
||||
*/
|
||||
public AddImageAction() {
|
||||
cleanupSupport = new ChangeSupport(this);
|
||||
putValue(Action.NAME, NbBundle.getMessage(AddImageAction.class, "CTL_AddImage"));
|
||||
cleanupSupport = new ChangeSupport(this);
|
||||
toolbarButton = new JButton();
|
||||
toolbarButton.addActionListener(AddImageAction.this::actionPerformed);
|
||||
setEnabled(false);
|
||||
@ -103,9 +101,6 @@ public final class AddImageAction extends CallableSystemAction implements Presen
|
||||
* abstract CleanupTask class to call their cleanup methods (assuming
|
||||
* they have not done an override of stateChanged), after which the
|
||||
* CleanupTasks are unregistered.
|
||||
*
|
||||
* RC: This is a convoluted and error-prone way to implement clean up.
|
||||
* Fortunately, it is confined to this package.
|
||||
*/
|
||||
cleanupSupport.fireChange();
|
||||
}
|
||||
@ -185,13 +180,8 @@ public final class AddImageAction extends CallableSystemAction implements Presen
|
||||
* cleanUp method is called. Implementations should not override
|
||||
* stateChanged, and should not re-enable themselves after cleanUp is
|
||||
* called. To stop cleanUp being called, call disable before the wizard is
|
||||
* dismissed.
|
||||
*
|
||||
* Instances must be constructed using a reference to an AddImageAction
|
||||
* object because this is a non-static inner class.
|
||||
*
|
||||
* RC: This is a convoluted and error-prone way to implement clean up.
|
||||
* Fortunately, it is confined to this package.
|
||||
* dismissed. Also, instances must be constructed using a reference to an
|
||||
* AddImageAction object because this is a non-static inner class.
|
||||
*/
|
||||
abstract class CleanupTask implements ChangeListener {
|
||||
|
||||
@ -238,6 +228,11 @@ public final class AddImageAction extends CallableSystemAction implements Presen
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Is not used by Autopsy.
|
||||
*
|
||||
* @deprecated
|
||||
*/
|
||||
@Deprecated
|
||||
public interface IndexImageTask {
|
||||
|
||||
|
@ -38,7 +38,7 @@ import org.sleuthkit.autopsy.corecomponentinterfaces.DataSourceProcessorProgress
|
||||
final class AddImageWizardAddingProgressPanel implements WizardDescriptor.FinishablePanel<WizardDescriptor> {
|
||||
|
||||
private final ChangeSupport changeSupport;
|
||||
private final DSPProgressMonitorImpl dspProgressMonitor = new DSPProgressMonitorImpl();
|
||||
private final DSPProgressMonitorImpl dspProgressMonitor;
|
||||
private AddImageWizardAddingProgressVisual component;
|
||||
private boolean dataSourceAdded = false;
|
||||
|
||||
@ -48,6 +48,7 @@ final class AddImageWizardAddingProgressPanel implements WizardDescriptor.Finish
|
||||
*/
|
||||
AddImageWizardAddingProgressPanel() {
|
||||
changeSupport = new ChangeSupport(this);
|
||||
dspProgressMonitor = new DSPProgressMonitorImpl();
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -37,7 +37,7 @@ final class AddImageWizardChooseDataSourcePanel implements WizardDescriptor.Pane
|
||||
|
||||
private AddImageWizardChooseDataSourceVisual component;
|
||||
private final ChangeSupport changeSupport;
|
||||
private boolean nextButtonIsEnabled = false;
|
||||
private boolean nextButtonIsEnabled;
|
||||
|
||||
/**
|
||||
* Constructs an instance of the first panel of the add data source wizard.
|
||||
|
@ -194,8 +194,6 @@ final class AddImageWizardIngestConfigPanel implements WizardDescriptor.Panel<Wi
|
||||
* while the user is doing the ingest module configuration. It is ok to
|
||||
* do this now because the back button is disabled for this wizard - the
|
||||
* user cannot go back to choose a different data source.
|
||||
*
|
||||
* RC: Not sure why the cancel button is disabled.
|
||||
*/
|
||||
JButton cancel = new JButton(NbBundle.getMessage(this.getClass(), "AddImageWizardIngestConfigPanel.CANCEL_BUTTON.text"));
|
||||
cancel.setEnabled(false);
|
||||
|
Loading…
x
Reference in New Issue
Block a user