Add setIndeterminate to ProgressPanel ctor

This commit is contained in:
Richard Cordovano 2017-03-23 17:46:59 -04:00
parent 0b622ddc70
commit e8fcffcfea
2 changed files with 111 additions and 90 deletions

View File

@ -449,19 +449,21 @@ public class Case {
* IMPORTANT: This method should not be called in the event dispatch thread * IMPORTANT: This method should not be called in the event dispatch thread
* (EDT). * (EDT).
* *
* @param caseDir The full path of the case directory. The directory will be * @param caseDir The full path of the case directory. The directory
* created if it doesn't already exist; if it exists, it is ASSUMED it was * will be created if it doesn't already exist; if it
* created by calling createCaseDirectory. * exists, it is ASSUMED it was created by calling
* createCaseDirectory.
* @param caseDisplayName The display name of case, which may be changed * @param caseDisplayName The display name of case, which may be changed
* later by the user. * later by the user.
* @param caseNumber The case number, can be the empty string. * @param caseNumber The case number, can be the empty string.
* @param examiner The examiner to associate with the case, can be the empty * @param examiner The examiner to associate with the case, can be
* string. * the empty string.
* @param caseType The type of case (single-user or multi-user). * @param caseType The type of case (single-user or multi-user).
* *
* @throws CaseActionException if there is a problem creating the case. The * @throws CaseActionException if there is a problem creating the case. The
* exception will have a user-friendly message and may be a wrapper for a * exception will have a user-friendly message
* lower-level exception. * and may be a wrapper for a lower-level
* exception.
*/ */
@Messages({ @Messages({
"# {0} - exception message", "Case.exceptionMessage.wrapperMessage={0}" "# {0} - exception message", "Case.exceptionMessage.wrapperMessage={0}"
@ -501,8 +503,9 @@ public class Case {
* @param caseMetadataFilePath The path of the case metadata (.aut) file. * @param caseMetadataFilePath The path of the case metadata (.aut) file.
* *
* @throws CaseActionException if there is a problem opening the case. The * @throws CaseActionException if there is a problem opening the case. The
* exception will have a user-friendly message and may be a wrapper for a * exception will have a user-friendly message
* lower-level exception. * and may be a wrapper for a lower-level
* exception.
*/ */
@Messages({ @Messages({
"# {0} - exception message", "Case.openException.couldNotOpenCase=Could not open case: {0}", "# {0} - exception message", "Case.openException.couldNotOpenCase=Could not open case: {0}",
@ -605,8 +608,9 @@ public class Case {
* (EDT). * (EDT).
* *
* @throws CaseActionException if there is a problem deleting the case. The * @throws CaseActionException if there is a problem deleting the case. The
* exception will have a user-friendly message and may be a wrapper for a * exception will have a user-friendly message
* lower-level exception. * and may be a wrapper for a lower-level
* exception.
*/ */
public static void deleteCurrentCase() throws CaseActionException { public static void deleteCurrentCase() throws CaseActionException {
synchronized (currentCaseWriteLock) { synchronized (currentCaseWriteLock) {
@ -626,8 +630,9 @@ public class Case {
* @param metadata The metadata for the case to delete. * @param metadata The metadata for the case to delete.
* *
* @throws CaseActionException if there is a problem deleting the case. The * @throws CaseActionException if there is a problem deleting the case. The
* exception will have a user-friendly message and may be a wrapper for a * exception will have a user-friendly message
* lower-level exception. * and may be a wrapper for a lower-level
* exception.
*/ */
@Messages({ @Messages({
"# {0} - exception message", "Case.deleteException.couldNotDeleteCase=Could not delete case: {0}", "# {0} - exception message", "Case.deleteException.couldNotDeleteCase=Could not delete case: {0}",
@ -1333,7 +1338,8 @@ public class Case {
* @return A list of data sources. * @return A list of data sources.
* *
* @throws org.sleuthkit.datamodel.TskCoreException if there is a problem * @throws org.sleuthkit.datamodel.TskCoreException if there is a problem
* querying the case database. * querying the case
* database.
*/ */
public List<Content> getDataSources() throws TskCoreException { public List<Content> getDataSources() throws TskCoreException {
List<Content> list = caseDb.getRootObjects(); List<Content> list = caseDb.getRootObjects();
@ -1406,8 +1412,8 @@ public class Case {
* This should not be called from the event dispatch thread (EDT) * This should not be called from the event dispatch thread (EDT)
* *
* @param eventId A unique identifier for the event. This UUID must be used * @param eventId A unique identifier for the event. This UUID must be used
* to call notifyFailedAddingDataSource or notifyNewDataSource after the * to call notifyFailedAddingDataSource or
* data source is added. * notifyNewDataSource after the data source is added.
*/ */
public void notifyAddingDataSource(UUID eventId) { public void notifyAddingDataSource(UUID eventId) {
eventPublisher.publish(new AddingDataSourceEvent(eventId)); eventPublisher.publish(new AddingDataSourceEvent(eventId));
@ -1420,7 +1426,8 @@ public class Case {
* This should not be called from the event dispatch thread (EDT) * This should not be called from the event dispatch thread (EDT)
* *
* @param addingDataSourceEventId The unique identifier for the * @param addingDataSourceEventId The unique identifier for the
* corresponding adding data source event (see notifyAddingDataSource). * corresponding adding data source event
* (see notifyAddingDataSource).
*/ */
public void notifyFailedAddingDataSource(UUID addingDataSourceEventId) { public void notifyFailedAddingDataSource(UUID addingDataSourceEventId) {
eventPublisher.publish(new AddingDataSourceFailedEvent(addingDataSourceEventId)); eventPublisher.publish(new AddingDataSourceFailedEvent(addingDataSourceEventId));
@ -1434,7 +1441,8 @@ public class Case {
* *
* @param dataSource The data source. * @param dataSource The data source.
* @param addingDataSourceEventId The unique identifier for the * @param addingDataSourceEventId The unique identifier for the
* corresponding adding data source event (see notifyAddingDataSource). * corresponding adding data source event
* (see notifyAddingDataSource).
*/ */
public void notifyDataSourceAdded(Content dataSource, UUID addingDataSourceEventId) { public void notifyDataSourceAdded(Content dataSource, UUID addingDataSourceEventId) {
eventPublisher.publish(new DataSourceAddedEvent(dataSource, addingDataSourceEventId)); eventPublisher.publish(new DataSourceAddedEvent(dataSource, addingDataSourceEventId));
@ -1577,19 +1585,21 @@ public class Case {
} }
/** /**
* @param caseDir The full path of the case directory. The directory will be * @param caseDir The full path of the case directory. The directory
* created if it doesn't already exist; if it exists, it is ASSUMED it was * will be created if it doesn't already exist; if it
* created by calling createCaseDirectory. * exists, it is ASSUMED it was created by calling
* createCaseDirectory.
* @param caseDisplayName The display name of case, which may be changed * @param caseDisplayName The display name of case, which may be changed
* later by the user. * later by the user.
* @param caseNumber The case number, can be the empty string. * @param caseNumber The case number, can be the empty string.
* @param examiner The examiner to associate with the case, can be the empty * @param examiner The examiner to associate with the case, can be
* string. * the empty string.
* @param caseType The type of case (single-user or multi-user). * @param caseType The type of case (single-user or multi-user).
* *
* @throws CaseActionException if there is a problem creating the case. The * @throws CaseActionException if there is a problem creating the case. The
* exception will have a user-friendly message and may be a wrapper for a * exception will have a user-friendly message
* lower-level exception. * and may be a wrapper for a lower-level
* exception.
*/ */
@Messages({ @Messages({
"Case.exceptionMessage.illegalCaseName=Case name contains illegal characters.", "Case.exceptionMessage.illegalCaseName=Case name contains illegal characters.",
@ -1710,19 +1720,21 @@ public class Case {
/** /**
* Creates and opens a new case. * Creates and opens a new case.
* *
* @param caseDir The full path of the case directory. The directory will be * @param caseDir The full path of the case directory. The directory
* created if it doesn't already exist; if it exists, it is ASSUMED it was * will be created if it doesn't already exist; if it
* created by calling createCaseDirectory. * exists, it is ASSUMED it was created by calling
* createCaseDirectory.
* @param caseDisplayName The display name of case, which may be changed * @param caseDisplayName The display name of case, which may be changed
* later by the user. * later by the user.
* @param caseNumber The case number, can be the empty string. * @param caseNumber The case number, can be the empty string.
* @param examiner The examiner to associate with the case, can be the empty * @param examiner The examiner to associate with the case, can be
* string. * the empty string.
* @param caseType The type of case (single-user or multi-user). * @param caseType The type of case (single-user or multi-user).
* *
* @throws CaseActionException if there is a problem creating the case. The * @throws CaseActionException if there is a problem creating the case. The
* exception will have a user-friendly message and may be a wrapper for a * exception will have a user-friendly message
* lower-level exception. * and may be a wrapper for a lower-level
* exception.
*/ */
@Messages({ @Messages({
"Case.progressMessage.creatingCaseDirectory=Creating case directory...", "Case.progressMessage.creatingCaseDirectory=Creating case directory...",
@ -1809,8 +1821,9 @@ public class Case {
* @param caseMetadataFilePath The apth to the case metadata file. * @param caseMetadataFilePath The apth to the case metadata file.
* *
* @throws CaseActionException if there is a problem creating the case. The * @throws CaseActionException if there is a problem creating the case. The
* exception will have a user-friendly message and may be a wrapper for a * exception will have a user-friendly message
* lower-level exception. * and may be a wrapper for a lower-level
* exception.
*/ */
private void open(Path caseMetadataFilePath) throws CaseActionException { private void open(Path caseMetadataFilePath) throws CaseActionException {
/* /*
@ -1923,8 +1936,9 @@ public class Case {
* @param progressIndicator A progress indicator. * @param progressIndicator A progress indicator.
* *
* @throws CaseActionException if there is a problem opening the case. The * @throws CaseActionException if there is a problem opening the case. The
* exception will have a user-friendly message and may be a wrapper for a * exception will have a user-friendly message
* lower-level exception. * and may be a wrapper for a lower-level
* exception.
*/ */
@Messages({ @Messages({
"Case.progressMessage.openingCaseDatabase=Opening case database...", "Case.progressMessage.openingCaseDatabase=Opening case database...",
@ -2423,18 +2437,20 @@ public class Case {
/** /**
* Creates a new, single-user Autopsy case. * Creates a new, single-user Autopsy case.
* *
* @param caseDir The full path of the case directory. The directory will be * @param caseDir The full path of the case directory. The directory
* created if it doesn't already exist; if it exists, it is ASSUMED it was * will be created if it doesn't already exist; if it
* created by calling createCaseDirectory. * exists, it is ASSUMED it was created by calling
* createCaseDirectory.
* @param caseDisplayName The display name of case, which may be changed * @param caseDisplayName The display name of case, which may be changed
* later by the user. * later by the user.
* @param caseNumber The case number, can be the empty string. * @param caseNumber The case number, can be the empty string.
* @param examiner The examiner to associate with the case, can be the empty * @param examiner The examiner to associate with the case, can be
* string. * the empty string.
* *
* @throws CaseActionException if there is a problem creating the case. The * @throws CaseActionException if there is a problem creating the case. The
* exception will have a user-friendly message and may be a wrapper for a * exception will have a user-friendly message
* lower-level exception. * and may be a wrapper for a lower-level
* exception.
* @deprecated Use createAsCurrentCase instead. * @deprecated Use createAsCurrentCase instead.
*/ */
@Deprecated @Deprecated
@ -2445,19 +2461,21 @@ public class Case {
/** /**
* Creates a new Autopsy case and makes it the current case. * Creates a new Autopsy case and makes it the current case.
* *
* @param caseDir The full path of the case directory. The directory will be * @param caseDir The full path of the case directory. The directory
* created if it doesn't already exist; if it exists, it is ASSUMED it was * will be created if it doesn't already exist; if it
* created by calling createCaseDirectory. * exists, it is ASSUMED it was created by calling
* createCaseDirectory.
* @param caseDisplayName The display name of case, which may be changed * @param caseDisplayName The display name of case, which may be changed
* later by the user. * later by the user.
* @param caseNumber The case number, can be the empty string. * @param caseNumber The case number, can be the empty string.
* @param examiner The examiner to associate with the case, can be the empty * @param examiner The examiner to associate with the case, can be
* string. * the empty string.
* @param caseType The type of case (single-user or multi-user). * @param caseType The type of case (single-user or multi-user).
* *
* @throws CaseActionException if there is a problem creating the case. The * @throws CaseActionException if there is a problem creating the case. The
* exception will have a user-friendly message and may be a wrapper for a * exception will have a user-friendly message
* lower-level exception. * and may be a wrapper for a lower-level
* exception.
* @deprecated Use createAsCurrentCase instead. * @deprecated Use createAsCurrentCase instead.
*/ */
@Deprecated @Deprecated
@ -2471,8 +2489,9 @@ public class Case {
* @param caseMetadataFilePath The path of the case metadata (.aut) file. * @param caseMetadataFilePath The path of the case metadata (.aut) file.
* *
* @throws CaseActionException if there is a problem opening the case. The * @throws CaseActionException if there is a problem opening the case. The
* exception will have a user-friendly message and may be a wrapper for a * exception will have a user-friendly message
* lower-level exception. * and may be a wrapper for a lower-level
* exception.
* @deprecated Use openAsCurrentCase instead. * @deprecated Use openAsCurrentCase instead.
*/ */
@Deprecated @Deprecated
@ -2484,8 +2503,9 @@ public class Case {
* Closes this Autopsy case. * Closes this Autopsy case.
* *
* @throws CaseActionException if there is a problem closing the case. The * @throws CaseActionException if there is a problem closing the case. The
* exception will have a user-friendly message and may be a wrapper for a * exception will have a user-friendly message
* lower-level exception. * and may be a wrapper for a lower-level
* exception.
* @deprecated Use closeCurrentCase instead. * @deprecated Use closeCurrentCase instead.
*/ */
@Deprecated @Deprecated

View File

@ -28,6 +28,7 @@ class ProgressPanel extends javax.swing.JPanel {
ProgressPanel() { ProgressPanel() {
initComponents(); initComponents();
this.progressBar.setMinimum(0); this.progressBar.setMinimum(0);
this.progressBar.setIndeterminate(true);
} }
void setMessage(String message) { void setMessage(String message) {