From e9f82d0ea7e05395bbc5b5bfaf8569df485760a5 Mon Sep 17 00:00:00 2001 From: William Schaefer Date: Wed, 29 Mar 2017 17:10:36 -0400 Subject: [PATCH 01/18] 2462 Auto Ingest Dashboard Delete Case button now works again --- .../sleuthkit/autopsy/casemodule/Case.java | 2 +- .../KeywordSearchService.java | 2 + .../keywordsearch/SolrSearchService.java | 37 ++++++++++++++++--- 3 files changed, 35 insertions(+), 6 deletions(-) diff --git a/Core/src/org/sleuthkit/autopsy/casemodule/Case.java b/Core/src/org/sleuthkit/autopsy/casemodule/Case.java index 5facca3088..b4a35b04b1 100644 --- a/Core/src/org/sleuthkit/autopsy/casemodule/Case.java +++ b/Core/src/org/sleuthkit/autopsy/casemodule/Case.java @@ -685,7 +685,7 @@ public class Case { for (KeywordSearchService searchService : Lookup.getDefault().lookupAll(KeywordSearchService.class )) { - searchService.deleteTextIndex(metadata.getTextIndexName()); + searchService.deleteCores(metadata.getTextIndexName(), metadata.getCaseDirectory()); } if (CaseType.MULTI_USER_CASE == metadata.getCaseType()) { diff --git a/Core/src/org/sleuthkit/autopsy/keywordsearchservice/KeywordSearchService.java b/Core/src/org/sleuthkit/autopsy/keywordsearchservice/KeywordSearchService.java index 412d23251b..da06adc743 100644 --- a/Core/src/org/sleuthkit/autopsy/keywordsearchservice/KeywordSearchService.java +++ b/Core/src/org/sleuthkit/autopsy/keywordsearchservice/KeywordSearchService.java @@ -57,5 +57,7 @@ public interface KeywordSearchService extends Closeable { * @throws KeywordSearchServiceException if unable to delete. */ public void deleteTextIndex(String textIndexName) throws KeywordSearchServiceException; + + public void deleteCores(String textIndexName, String caseDirectory) throws KeywordSearchServiceException; } diff --git a/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/SolrSearchService.java b/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/SolrSearchService.java index 8e7f89c6c5..d8c7591c1a 100644 --- a/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/SolrSearchService.java +++ b/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/SolrSearchService.java @@ -33,6 +33,7 @@ import org.apache.commons.io.FileUtils; import org.apache.commons.lang.math.NumberUtils; import org.apache.solr.client.solrj.SolrServerException; import org.apache.solr.client.solrj.impl.HttpSolrClient; +import org.openide.util.Exceptions; import org.openide.util.NbBundle; import org.openide.util.lookup.ServiceProvider; import org.openide.util.lookup.ServiceProviders; @@ -148,8 +149,10 @@ public class SolrSearchService implements KeywordSearchService, AutopsyService { * * @param coreName The core name. */ + @Deprecated @Override public void deleteTextIndex(String coreName) throws KeywordSearchServiceException { + //If this was called with the metadata.textIndexName then this will only work on solr 4 cores KeywordSearch.getServer().deleteCore(coreName); } @@ -185,7 +188,7 @@ public class SolrSearchService implements KeywordSearchService, AutopsyService { ProgressIndicator progress = context.getProgressIndicator(); int totalNumProgressUnits = 8; int progressUnitsCompleted = 0; - + String caseDirPath = context.getCase().getCaseDirectory(); Case theCase = context.getCase(); List indexes = new ArrayList<>(); @@ -212,7 +215,7 @@ public class SolrSearchService implements KeywordSearchService, AutopsyService { indexes.add(oldIndex); } } - + if (context.cancelRequested()) { return; } @@ -323,14 +326,13 @@ public class SolrSearchService implements KeywordSearchService, AutopsyService { } return; } - + // add current index to the list of indexes that exist for this case indexes.add(currentVersionIndex); } } } - try { // update text index metadata file if (!indexes.isEmpty()) { @@ -346,7 +348,7 @@ public class SolrSearchService implements KeywordSearchService, AutopsyService { KeywordSearch.getServer().openCoreForCase(theCase, currentVersionIndex); } catch (KeywordSearchModuleException ex) { throw new AutopsyServiceException(String.format("Failed to open or create core for %s", caseDirPath), ex); - } + } progress.progress(Bundle.SolrSearch_complete_msg(), totalNumProgressUnits); } @@ -379,4 +381,29 @@ public class SolrSearchService implements KeywordSearchService, AutopsyService { throw new AutopsyServiceException(String.format("Failed to close core for %s", context.getCase().getCaseDirectory()), ex); } } + + /** + * Deletes the solr core for a case. Finds the core name based on the caseDirectory if specified, + * otherwise will try to delete based on the textIndexName. + * + * @param textIndexName - the name of the core if the core is a solr 4 core + * @param caseDirectory - the case directory, used for getting the solr 6 + * core name + * + * @throws KeywordSearchServiceException + */ + @Override + public void deleteCores(String textIndexName, String caseDirectory) throws KeywordSearchServiceException { + String coreName = textIndexName; + if (!caseDirectory.isEmpty()) { + IndexMetadata indexMetadata; + try { + indexMetadata = new IndexMetadata(caseDirectory); + coreName = indexMetadata.getIndexes().get(0).getIndexName(); + } catch (IndexMetadata.TextIndexMetadataException ex) { + Exceptions.printStackTrace(ex); + } + } + KeywordSearch.getServer().deleteCore(coreName); + } } From 072815cb8eef39d66b67b55ab8e32105e91fd066 Mon Sep 17 00:00:00 2001 From: William Schaefer Date: Thu, 30 Mar 2017 10:48:39 -0400 Subject: [PATCH 02/18] 2462 fix deprecation tags on old delete method for index --- Core/src/org/sleuthkit/autopsy/casemodule/Case.java | 2 +- .../autopsy/keywordsearchservice/KeywordSearchService.java | 3 ++- .../sleuthkit/autopsy/keywordsearch/SolrSearchService.java | 4 ++-- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/Core/src/org/sleuthkit/autopsy/casemodule/Case.java b/Core/src/org/sleuthkit/autopsy/casemodule/Case.java index b4a35b04b1..6ceec7a111 100644 --- a/Core/src/org/sleuthkit/autopsy/casemodule/Case.java +++ b/Core/src/org/sleuthkit/autopsy/casemodule/Case.java @@ -685,7 +685,7 @@ public class Case { for (KeywordSearchService searchService : Lookup.getDefault().lookupAll(KeywordSearchService.class )) { - searchService.deleteCores(metadata.getTextIndexName(), metadata.getCaseDirectory()); + searchService.deleteCore(metadata.getTextIndexName(), metadata.getCaseDirectory()); } if (CaseType.MULTI_USER_CASE == metadata.getCaseType()) { diff --git a/Core/src/org/sleuthkit/autopsy/keywordsearchservice/KeywordSearchService.java b/Core/src/org/sleuthkit/autopsy/keywordsearchservice/KeywordSearchService.java index da06adc743..569649a6dc 100644 --- a/Core/src/org/sleuthkit/autopsy/keywordsearchservice/KeywordSearchService.java +++ b/Core/src/org/sleuthkit/autopsy/keywordsearchservice/KeywordSearchService.java @@ -55,9 +55,10 @@ public interface KeywordSearchService extends Closeable { * @param textIndexName The text index name. * * @throws KeywordSearchServiceException if unable to delete. + * @deprecated deleteCore(String textIndexName, String caseDirectory) should be used instead to support newer solr cores */ public void deleteTextIndex(String textIndexName) throws KeywordSearchServiceException; - public void deleteCores(String textIndexName, String caseDirectory) throws KeywordSearchServiceException; + public void deleteCore(String textIndexName, String caseDirectory) throws KeywordSearchServiceException; } diff --git a/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/SolrSearchService.java b/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/SolrSearchService.java index ded8d7f450..fa7bad504a 100644 --- a/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/SolrSearchService.java +++ b/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/SolrSearchService.java @@ -148,8 +148,8 @@ public class SolrSearchService implements KeywordSearchService, AutopsyService { * Deletes Solr core for a case. * * @param coreName The core name. + * @deprecated deleteCore(String textIndexName, String caseDirectory) should be used instead to support newer solr cores */ - @Deprecated @Override public void deleteTextIndex(String coreName) throws KeywordSearchServiceException { //If this was called with the metadata.textIndexName then this will only work on solr 4 cores @@ -393,7 +393,7 @@ public class SolrSearchService implements KeywordSearchService, AutopsyService { * @throws KeywordSearchServiceException */ @Override - public void deleteCores(String textIndexName, String caseDirectory) throws KeywordSearchServiceException { + public void deleteCore(String textIndexName, String caseDirectory) throws KeywordSearchServiceException { String coreName = textIndexName; if (!caseDirectory.isEmpty()) { IndexMetadata indexMetadata; From d8b53d8fb80b27988d8f912a9e1b2793416137af Mon Sep 17 00:00:00 2001 From: William Schaefer Date: Thu, 30 Mar 2017 10:54:27 -0400 Subject: [PATCH 03/18] 2462 add missing @Deprecated tag to KeywordSearchService Interface deleteTextIndex --- .../autopsy/keywordsearchservice/KeywordSearchService.java | 1 + 1 file changed, 1 insertion(+) diff --git a/Core/src/org/sleuthkit/autopsy/keywordsearchservice/KeywordSearchService.java b/Core/src/org/sleuthkit/autopsy/keywordsearchservice/KeywordSearchService.java index 569649a6dc..09d00167a9 100644 --- a/Core/src/org/sleuthkit/autopsy/keywordsearchservice/KeywordSearchService.java +++ b/Core/src/org/sleuthkit/autopsy/keywordsearchservice/KeywordSearchService.java @@ -57,6 +57,7 @@ public interface KeywordSearchService extends Closeable { * @throws KeywordSearchServiceException if unable to delete. * @deprecated deleteCore(String textIndexName, String caseDirectory) should be used instead to support newer solr cores */ + @Deprecated public void deleteTextIndex(String textIndexName) throws KeywordSearchServiceException; public void deleteCore(String textIndexName, String caseDirectory) throws KeywordSearchServiceException; From eacf3e70159e43bb91986c4e31a242e8219a028e Mon Sep 17 00:00:00 2001 From: William Schaefer Date: Thu, 30 Mar 2017 11:06:02 -0400 Subject: [PATCH 04/18] 2462 added comment to clarify new method in solrsearchservice --- .../org/sleuthkit/autopsy/keywordsearch/SolrSearchService.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/SolrSearchService.java b/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/SolrSearchService.java index fa7bad504a..55a34dadeb 100644 --- a/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/SolrSearchService.java +++ b/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/SolrSearchService.java @@ -399,6 +399,8 @@ public class SolrSearchService implements KeywordSearchService, AutopsyService { IndexMetadata indexMetadata; try { indexMetadata = new IndexMetadata(caseDirectory); + //When I was debugging and there were multiple cores they had the same name + //so the first one is as good as any. coreName = indexMetadata.getIndexes().get(0).getIndexName(); } catch (IndexMetadata.TextIndexMetadataException ex) { Exceptions.printStackTrace(ex); From 44d6edb349621b14a28152c4ee4bbc3ca70cdd4e Mon Sep 17 00:00:00 2001 From: William Schaefer Date: Thu, 30 Mar 2017 12:50:05 -0400 Subject: [PATCH 05/18] 2462 added check to ensure list of Indexes was not empty --- .../sleuthkit/autopsy/keywordsearch/SolrSearchService.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/SolrSearchService.java b/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/SolrSearchService.java index 55a34dadeb..2a2d28a725 100644 --- a/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/SolrSearchService.java +++ b/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/SolrSearchService.java @@ -401,7 +401,9 @@ public class SolrSearchService implements KeywordSearchService, AutopsyService { indexMetadata = new IndexMetadata(caseDirectory); //When I was debugging and there were multiple cores they had the same name //so the first one is as good as any. - coreName = indexMetadata.getIndexes().get(0).getIndexName(); + if (!indexMetadata.getIndexes().isEmpty()){ + coreName = indexMetadata.getIndexes().get(0).getIndexName(); + } } catch (IndexMetadata.TextIndexMetadataException ex) { Exceptions.printStackTrace(ex); } From c20712d2dbbd8211d0ec99d9fbf0d8136ac8cc6a Mon Sep 17 00:00:00 2001 From: William Schaefer Date: Thu, 30 Mar 2017 17:24:43 -0400 Subject: [PATCH 06/18] 2462 replaced debug statement with logging of exception in solrSearchService --- .../org/sleuthkit/autopsy/keywordsearch/SolrSearchService.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/SolrSearchService.java b/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/SolrSearchService.java index 2a2d28a725..d48ef6170b 100644 --- a/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/SolrSearchService.java +++ b/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/SolrSearchService.java @@ -405,7 +405,7 @@ public class SolrSearchService implements KeywordSearchService, AutopsyService { coreName = indexMetadata.getIndexes().get(0).getIndexName(); } } catch (IndexMetadata.TextIndexMetadataException ex) { - Exceptions.printStackTrace(ex); + logger.log(Level.WARNING, "Unable to create IndexMetaData from caseDirectory " + caseDirectory, ex); } } KeywordSearch.getServer().deleteCore(coreName); From f0ab0721e07581842a5846e09d4e739cf4e63c31 Mon Sep 17 00:00:00 2001 From: William Schaefer Date: Mon, 10 Apr 2017 15:06:25 -0400 Subject: [PATCH 07/18] 2462 deleteTextIndex now uses CaseMetadata to get case dir --- .../sleuthkit/autopsy/casemodule/Case.java | 6 +-- .../KeywordSearchService.java | 12 ++--- .../keywordsearch/SolrSearchService.java | 50 ++++++------------- 3 files changed, 23 insertions(+), 45 deletions(-) diff --git a/Core/src/org/sleuthkit/autopsy/casemodule/Case.java b/Core/src/org/sleuthkit/autopsy/casemodule/Case.java index 6ceec7a111..d260ad6a42 100644 --- a/Core/src/org/sleuthkit/autopsy/casemodule/Case.java +++ b/Core/src/org/sleuthkit/autopsy/casemodule/Case.java @@ -682,10 +682,8 @@ public class Case { * Delete the text index. */ progressIndicator.start(Bundle.Case_progressMessage_deletingTextIndex()); - - for (KeywordSearchService searchService : Lookup.getDefault().lookupAll(KeywordSearchService.class - )) { - searchService.deleteCore(metadata.getTextIndexName(), metadata.getCaseDirectory()); + for (KeywordSearchService searchService : Lookup.getDefault().lookupAll(KeywordSearchService.class)) { + searchService.deleteTextIndex(metadata); } if (CaseType.MULTI_USER_CASE == metadata.getCaseType()) { diff --git a/Core/src/org/sleuthkit/autopsy/keywordsearchservice/KeywordSearchService.java b/Core/src/org/sleuthkit/autopsy/keywordsearchservice/KeywordSearchService.java index 09d00167a9..f0215cd189 100644 --- a/Core/src/org/sleuthkit/autopsy/keywordsearchservice/KeywordSearchService.java +++ b/Core/src/org/sleuthkit/autopsy/keywordsearchservice/KeywordSearchService.java @@ -19,6 +19,8 @@ package org.sleuthkit.autopsy.keywordsearchservice; import java.io.Closeable; +import org.sleuthkit.autopsy.casemodule.Case; +import org.sleuthkit.autopsy.casemodule.CaseMetadata; import org.sleuthkit.datamodel.BlackboardArtifact; import org.sleuthkit.datamodel.TskCoreException; @@ -52,14 +54,10 @@ public interface KeywordSearchService extends Closeable { /** * Deletes the keyword search text index for a case. * - * @param textIndexName The text index name. - * + * @param metadata The CaseMetadata which will have its core deleted. + * * @throws KeywordSearchServiceException if unable to delete. - * @deprecated deleteCore(String textIndexName, String caseDirectory) should be used instead to support newer solr cores */ - @Deprecated - public void deleteTextIndex(String textIndexName) throws KeywordSearchServiceException; - - public void deleteCore(String textIndexName, String caseDirectory) throws KeywordSearchServiceException; + public void deleteTextIndex(CaseMetadata metadata) throws KeywordSearchServiceException; } diff --git a/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/SolrSearchService.java b/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/SolrSearchService.java index ed20ebfd6c..7a0c817792 100644 --- a/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/SolrSearchService.java +++ b/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/SolrSearchService.java @@ -38,6 +38,7 @@ import org.openide.util.NbBundle; import org.openide.util.lookup.ServiceProvider; import org.openide.util.lookup.ServiceProviders; import org.sleuthkit.autopsy.casemodule.Case; +import org.sleuthkit.autopsy.casemodule.CaseMetadata; import org.sleuthkit.autopsy.core.RuntimeProperties; import org.sleuthkit.autopsy.coreutils.Logger; import org.sleuthkit.autopsy.framework.AutopsyService; @@ -147,13 +148,23 @@ public class SolrSearchService implements KeywordSearchService, AutopsyService { /** * Deletes Solr core for a case. * - * @param coreName The core name. - * @deprecated deleteCore(String textIndexName, String caseDirectory) should be used instead to support newer solr cores + * @param metadata The CaseMetadata which will have its core deleted. */ @Override - public void deleteTextIndex(String coreName) throws KeywordSearchServiceException { - //If this was called with the metadata.textIndexName then this will only work on solr 4 cores - KeywordSearch.getServer().deleteCore(coreName); + public void deleteTextIndex(CaseMetadata metadata) throws KeywordSearchServiceException { + String caseDirectory = metadata.getCaseDirectory(); + if (!caseDirectory.isEmpty()) { + IndexMetadata indexMetadata; + try { + indexMetadata = new IndexMetadata(caseDirectory); + //When there were multiple cores in the array they seemed to have the name. + if (!indexMetadata.getIndexes().isEmpty()) { + KeywordSearch.getServer().deleteCore(indexMetadata.getIndexes().get(0).getIndexName()); + } + } catch (IndexMetadata.TextIndexMetadataException ex) { + logger.log(Level.WARNING, "Unable to create IndexMetaData from caseDirectory " + caseDirectory, ex); + } + } } @Override @@ -381,33 +392,4 @@ public class SolrSearchService implements KeywordSearchService, AutopsyService { throw new AutopsyServiceException(String.format("Failed to close core for %s", context.getCase().getCaseDirectory()), ex); } } - - /** - * Deletes the solr core for a case. Finds the core name based on the caseDirectory if specified, - * otherwise will try to delete based on the textIndexName. - * - * @param textIndexName - the name of the core if the core is a solr 4 core - * @param caseDirectory - the case directory, used for getting the solr 6 - * core name - * - * @throws KeywordSearchServiceException - */ - @Override - public void deleteCore(String textIndexName, String caseDirectory) throws KeywordSearchServiceException { - String coreName = textIndexName; - if (!caseDirectory.isEmpty()) { - IndexMetadata indexMetadata; - try { - indexMetadata = new IndexMetadata(caseDirectory); - //When I was debugging and there were multiple cores they had the same name - //so the first one is as good as any. - if (!indexMetadata.getIndexes().isEmpty()){ - coreName = indexMetadata.getIndexes().get(0).getIndexName(); - } - } catch (IndexMetadata.TextIndexMetadataException ex) { - logger.log(Level.WARNING, "Unable to create IndexMetaData from caseDirectory " + caseDirectory, ex); - } - } - KeywordSearch.getServer().deleteCore(coreName); - } } From 828fc487f96b995a59eaeb89e36be9f7f8446183 Mon Sep 17 00:00:00 2001 From: William Schaefer Date: Tue, 11 Apr 2017 13:45:05 -0400 Subject: [PATCH 08/18] 2462 fixed comment regarding cores with the same name --- .../autopsy/keywordsearchservice/KeywordSearchService.java | 1 - .../org/sleuthkit/autopsy/keywordsearch/SolrSearchService.java | 3 +-- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/Core/src/org/sleuthkit/autopsy/keywordsearchservice/KeywordSearchService.java b/Core/src/org/sleuthkit/autopsy/keywordsearchservice/KeywordSearchService.java index f0215cd189..4a702b6df5 100644 --- a/Core/src/org/sleuthkit/autopsy/keywordsearchservice/KeywordSearchService.java +++ b/Core/src/org/sleuthkit/autopsy/keywordsearchservice/KeywordSearchService.java @@ -19,7 +19,6 @@ package org.sleuthkit.autopsy.keywordsearchservice; import java.io.Closeable; -import org.sleuthkit.autopsy.casemodule.Case; import org.sleuthkit.autopsy.casemodule.CaseMetadata; import org.sleuthkit.datamodel.BlackboardArtifact; import org.sleuthkit.datamodel.TskCoreException; diff --git a/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/SolrSearchService.java b/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/SolrSearchService.java index 7a0c817792..75b5cfe7cd 100644 --- a/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/SolrSearchService.java +++ b/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/SolrSearchService.java @@ -33,7 +33,6 @@ import org.apache.commons.io.FileUtils; import org.apache.commons.lang.math.NumberUtils; import org.apache.solr.client.solrj.SolrServerException; import org.apache.solr.client.solrj.impl.HttpSolrClient; -import org.openide.util.Exceptions; import org.openide.util.NbBundle; import org.openide.util.lookup.ServiceProvider; import org.openide.util.lookup.ServiceProviders; @@ -157,7 +156,7 @@ public class SolrSearchService implements KeywordSearchService, AutopsyService { IndexMetadata indexMetadata; try { indexMetadata = new IndexMetadata(caseDirectory); - //When there were multiple cores in the array they seemed to have the name. + //When there were multiple cores in the same array they seemed to have the same name as each other. if (!indexMetadata.getIndexes().isEmpty()) { KeywordSearch.getServer().deleteCore(indexMetadata.getIndexes().get(0).getIndexName()); } From 3e511254f1499301f8ffb33281149784a5581819 Mon Sep 17 00:00:00 2001 From: William Schaefer Date: Tue, 11 Apr 2017 14:26:38 -0400 Subject: [PATCH 09/18] 2462 rethrow exception when unable to delete case from invalid IndexMetadata --- .../keywordsearch/SolrSearchService.java | 22 ++++++++++--------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/SolrSearchService.java b/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/SolrSearchService.java index 75b5cfe7cd..2c8cc44ebf 100644 --- a/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/SolrSearchService.java +++ b/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/SolrSearchService.java @@ -144,6 +144,9 @@ public class SolrSearchService implements KeywordSearchService, AutopsyService { } } + @NbBundle.Messages({"# {0} - case directory", + "SolrSearchService.exceptionMessage.noIndexMetadata=Unable to create IndexMetaData from caseDirectory: {0}" + }) /** * Deletes Solr core for a case. * @@ -152,17 +155,16 @@ public class SolrSearchService implements KeywordSearchService, AutopsyService { @Override public void deleteTextIndex(CaseMetadata metadata) throws KeywordSearchServiceException { String caseDirectory = metadata.getCaseDirectory(); - if (!caseDirectory.isEmpty()) { - IndexMetadata indexMetadata; - try { - indexMetadata = new IndexMetadata(caseDirectory); - //When there were multiple cores in the same array they seemed to have the same name as each other. - if (!indexMetadata.getIndexes().isEmpty()) { - KeywordSearch.getServer().deleteCore(indexMetadata.getIndexes().get(0).getIndexName()); - } - } catch (IndexMetadata.TextIndexMetadataException ex) { - logger.log(Level.WARNING, "Unable to create IndexMetaData from caseDirectory " + caseDirectory, ex); + IndexMetadata indexMetadata; + try { + indexMetadata = new IndexMetadata(caseDirectory); + //When there were multiple cores in the same array they seemed to have the same name as each other. + if (!indexMetadata.getIndexes().isEmpty()) { + KeywordSearch.getServer().deleteCore(indexMetadata.getIndexes().get(0).getIndexName()); } + } catch (IndexMetadata.TextIndexMetadataException ex) { + logger.log(Level.WARNING, NbBundle.getMessage(SolrSearchService.class, "SolrSearchService.exceptionMessage.noIndexMetadata", caseDirectory), ex); + throw new KeywordSearchServiceException(NbBundle.getMessage(SolrSearchService.class, "SolrSearchService.exceptionMessage.noIndexMetadata", caseDirectory), ex); //NON-NLS } } From 9afa7e79ac9f6e869ad92637b1bd3f7ee23960dd Mon Sep 17 00:00:00 2001 From: William Schaefer Date: Tue, 11 Apr 2017 16:11:42 -0400 Subject: [PATCH 10/18] 2462 modified delete to use the indexName from the current Index --- .../keywordsearch/SolrSearchService.java | 22 ++++++++++++++----- 1 file changed, 16 insertions(+), 6 deletions(-) diff --git a/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/SolrSearchService.java b/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/SolrSearchService.java index 2c8cc44ebf..32c8f4d6c3 100644 --- a/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/SolrSearchService.java +++ b/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/SolrSearchService.java @@ -145,7 +145,9 @@ public class SolrSearchService implements KeywordSearchService, AutopsyService { } @NbBundle.Messages({"# {0} - case directory", - "SolrSearchService.exceptionMessage.noIndexMetadata=Unable to create IndexMetaData from caseDirectory: {0}" + "SolrSearchService.exceptionMessage.noIndexMetadata=Unable to create IndexMetaData from caseDirectory: {0}", + "# {0} - case directory", + "SolrSearchService.exceptionMessage.noCurrentSolrCore=IndexMetadata did not contain a current Solr core so could not delete the case" }) /** * Deletes Solr core for a case. @@ -158,14 +160,22 @@ public class SolrSearchService implements KeywordSearchService, AutopsyService { IndexMetadata indexMetadata; try { indexMetadata = new IndexMetadata(caseDirectory); - //When there were multiple cores in the same array they seemed to have the same name as each other. - if (!indexMetadata.getIndexes().isEmpty()) { - KeywordSearch.getServer().deleteCore(indexMetadata.getIndexes().get(0).getIndexName()); - } } catch (IndexMetadata.TextIndexMetadataException ex) { logger.log(Level.WARNING, NbBundle.getMessage(SolrSearchService.class, "SolrSearchService.exceptionMessage.noIndexMetadata", caseDirectory), ex); - throw new KeywordSearchServiceException(NbBundle.getMessage(SolrSearchService.class, "SolrSearchService.exceptionMessage.noIndexMetadata", caseDirectory), ex); //NON-NLS + throw new KeywordSearchServiceException(NbBundle.getMessage(SolrSearchService.class, "SolrSearchService.exceptionMessage.noIndexMetadata", caseDirectory), ex); } + //find the index for the current version of solr (the one we are connected to) and delete its core using the index name + String currentSchema = IndexFinder.getCurrentSchemaVersion(); + String currentSolr = IndexFinder.getCurrentSolrVersion(); + for (Index index : indexMetadata.getIndexes()) { + if (index.getSolrVersion().equals(currentSolr) && index.getSchemaVersion().equals(currentSchema)) { + KeywordSearch.getServer().deleteCore(index.getIndexName()); + return; //only one core per for each combination of solr and schema version + } + } + //if an index for the current core was not found this code this code will execute + logger.log(Level.WARNING, NbBundle.getMessage(SolrSearchService.class, "SolrSearchService.exceptionMessage.noCurrentSolrCore")); + throw new KeywordSearchServiceException(NbBundle.getMessage(SolrSearchService.class, "SolrSearchService.exceptionMessage.noCurrentSolrCore")); } @Override From d2fe6eb429b055ec159a30443b9c3289a5056a07 Mon Sep 17 00:00:00 2001 From: William Schaefer Date: Tue, 11 Apr 2017 16:13:19 -0400 Subject: [PATCH 11/18] 2462 made comments in deleteTextIndex more clear --- .../sleuthkit/autopsy/keywordsearch/SolrSearchService.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/SolrSearchService.java b/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/SolrSearchService.java index 32c8f4d6c3..3ff7c7cfe9 100644 --- a/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/SolrSearchService.java +++ b/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/SolrSearchService.java @@ -170,10 +170,10 @@ public class SolrSearchService implements KeywordSearchService, AutopsyService { for (Index index : indexMetadata.getIndexes()) { if (index.getSolrVersion().equals(currentSolr) && index.getSchemaVersion().equals(currentSchema)) { KeywordSearch.getServer().deleteCore(index.getIndexName()); - return; //only one core per for each combination of solr and schema version + return; //only one core exists for each combination of solr and schema version } } - //if an index for the current core was not found this code this code will execute + //this code this code will only execute if an index for the current core was not found logger.log(Level.WARNING, NbBundle.getMessage(SolrSearchService.class, "SolrSearchService.exceptionMessage.noCurrentSolrCore")); throw new KeywordSearchServiceException(NbBundle.getMessage(SolrSearchService.class, "SolrSearchService.exceptionMessage.noCurrentSolrCore")); } From ff55fd74121430dae2317b65caee1f083fb8733e Mon Sep 17 00:00:00 2001 From: William Schaefer Date: Wed, 12 Apr 2017 12:23:49 -0400 Subject: [PATCH 12/18] 2541-Keywordlists rename no longer deletes names with unchanged name --- .../autopsy/keywordsearch/GlobalListSettingsPanel.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/GlobalListSettingsPanel.java b/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/GlobalListSettingsPanel.java index 9be40c184a..cbe6bd54c4 100644 --- a/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/GlobalListSettingsPanel.java +++ b/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/GlobalListSettingsPanel.java @@ -114,7 +114,8 @@ final class GlobalListSettingsPanel extends javax.swing.JPanel implements Option null, null, currentKeywordList.getName()); - if (listName == null || listName.trim().equals("")) { + //if the name is null, empty, or unchanged return without changing anything + if (listName == null || listName.trim().equals("") || listName.equals(currentKeywordList.getName())) { return shouldAdd; } From 1b1ef37288d06ca2c7623d11e98bc8c44c07d236 Mon Sep 17 00:00:00 2001 From: William Schaefer Date: Wed, 12 Apr 2017 12:51:05 -0400 Subject: [PATCH 13/18] 2541 trim trailing and leading spaces from list names to avoid visual dupes --- .../keywordsearch/GlobalListSettingsPanel.java | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/GlobalListSettingsPanel.java b/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/GlobalListSettingsPanel.java index cbe6bd54c4..d0fe1682c0 100644 --- a/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/GlobalListSettingsPanel.java +++ b/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/GlobalListSettingsPanel.java @@ -114,11 +114,16 @@ final class GlobalListSettingsPanel extends javax.swing.JPanel implements Option null, null, currentKeywordList.getName()); - //if the name is null, empty, or unchanged return without changing anything - if (listName == null || listName.trim().equals("") || listName.equals(currentKeywordList.getName())) { + + if (listName == null ) { + return shouldAdd; + } + //remove trailing and leading spaces so lists can't have visually identical names + listName = listName.trim(); + //if the name is empty or unchanged return without changing anything + if (listName.equals("") || listName.equals(currentKeywordList.getName())) { return shouldAdd; } - XmlKeywordSearchList writer = XmlKeywordSearchList.getCurrent(); if (writer.listExists(listName) && writer.getList(listName).isEditable()) { KeywordSearchUtil.displayDialog(FEATURE_NAME, NbBundle.getMessage(this.getClass(), "KeywordSearchConfigurationPanel1.customizeComponents.noOwDefaultMsg"), KeywordSearchUtil.DIALOG_MESSAGE_TYPE.WARN); From d4290e4f99b28e0653e3c4aca66dc5d21fff6250 Mon Sep 17 00:00:00 2001 From: William Schaefer Date: Wed, 12 Apr 2017 13:31:00 -0400 Subject: [PATCH 14/18] 2540 Edit List button now named Edit List Name --- .../autopsy/keywordsearch/Bundle.properties | 2 +- .../GlobalListSettingsPanel.form | 9 +- .../GlobalListSettingsPanel.java | 9 +- .../GlobalListsManagementPanel.form | 95 +++++++++++++++---- .../GlobalListsManagementPanel.java | 61 +++++++----- 5 files changed, 124 insertions(+), 52 deletions(-) diff --git a/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/Bundle.properties b/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/Bundle.properties index e784e4888a..050e2d687e 100644 --- a/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/Bundle.properties +++ b/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/Bundle.properties @@ -312,7 +312,7 @@ GlobalEditListPanel.keywordErrorsPlural.text={0} keywords could not be parsed. P GlobalListsManagementPanel.exportButton.text=Export List GlobalListsManagementPanel.deleteListButton.text=Delete List GlobalListsManagementPanel.copyListButton.text=Copy List -GlobalListsManagementPanel.renameListButton.text=Edit List +GlobalListsManagementPanel.renameListButton.text=Edit List Name GlobalEditListPanel.editWordButton.text=Edit Keyword SolrSearchService.ServiceName=Solr Keyword Search Service SolrSearchService.IndexUpgradeDialog.title=Text Index Upgrade Required In Order To Open Case diff --git a/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/GlobalListSettingsPanel.form b/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/GlobalListSettingsPanel.form index ba8a541eba..08febc4d19 100644 --- a/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/GlobalListSettingsPanel.form +++ b/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/GlobalListSettingsPanel.form @@ -41,7 +41,7 @@ - + @@ -50,8 +50,9 @@ - + + @@ -62,7 +63,7 @@ - + @@ -87,7 +88,7 @@ - + diff --git a/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/GlobalListSettingsPanel.java b/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/GlobalListSettingsPanel.java index d0fe1682c0..6c6341c298 100644 --- a/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/GlobalListSettingsPanel.java +++ b/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/GlobalListSettingsPanel.java @@ -193,16 +193,17 @@ final class GlobalListSettingsPanel extends javax.swing.JPanel implements Option rightPanel = new javax.swing.JPanel(); mainSplitPane.setBorder(null); - mainSplitPane.setDividerLocation(300); + mainSplitPane.setDividerLocation(309); mainSplitPane.setDividerSize(1); - leftPanel.setPreferredSize(new java.awt.Dimension(287, 327)); + leftPanel.setPreferredSize(new java.awt.Dimension(309, 327)); + leftPanel.setVerifyInputWhenFocusTarget(false); javax.swing.GroupLayout leftPanelLayout = new javax.swing.GroupLayout(leftPanel); leftPanel.setLayout(leftPanelLayout); leftPanelLayout.setHorizontalGroup( leftPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) - .addGap(0, 300, Short.MAX_VALUE) + .addGap(0, 309, Short.MAX_VALUE) ); leftPanelLayout.setVerticalGroup( leftPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) @@ -217,7 +218,7 @@ final class GlobalListSettingsPanel extends javax.swing.JPanel implements Option rightPanel.setLayout(rightPanelLayout); rightPanelLayout.setHorizontalGroup( rightPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) - .addGap(0, 372, Short.MAX_VALUE) + .addGap(0, 363, Short.MAX_VALUE) ); rightPanelLayout.setVerticalGroup( rightPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) diff --git a/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/GlobalListsManagementPanel.form b/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/GlobalListsManagementPanel.form index b86ed01a12..6929544d48 100644 --- a/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/GlobalListsManagementPanel.form +++ b/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/GlobalListsManagementPanel.form @@ -22,34 +22,33 @@ - + - - + - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + - + @@ -117,6 +116,15 @@ + + + + + + + + + @@ -134,6 +142,15 @@ + + + + + + + + + @@ -158,6 +175,15 @@ + + + + + + + + + @@ -175,6 +201,15 @@ + + + + + + + + + @@ -192,6 +227,15 @@ + + + + + + + + + @@ -209,6 +253,15 @@ + + + + + + + + + diff --git a/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/GlobalListsManagementPanel.java b/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/GlobalListsManagementPanel.java index 730bfc1170..1bfe47bb7e 100644 --- a/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/GlobalListsManagementPanel.java +++ b/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/GlobalListsManagementPanel.java @@ -207,6 +207,9 @@ class GlobalListsManagementPanel extends javax.swing.JPanel implements OptionsPa newListButton.setText(org.openide.util.NbBundle.getMessage(GlobalListsManagementPanel.class, "GlobalListsManagementPanel.newListButton.text")); // NOI18N newListButton.setIconTextGap(2); newListButton.setMargin(new java.awt.Insets(2, 2, 2, 2)); + newListButton.setMaximumSize(new java.awt.Dimension(78, 25)); + newListButton.setMinimumSize(new java.awt.Dimension(78, 25)); + newListButton.setPreferredSize(new java.awt.Dimension(78, 25)); newListButton.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { newListButtonActionPerformed(evt); @@ -217,6 +220,9 @@ class GlobalListsManagementPanel extends javax.swing.JPanel implements OptionsPa importButton.setText(org.openide.util.NbBundle.getMessage(GlobalListsManagementPanel.class, "GlobalListsManagementPanel.importButton.text")); // NOI18N importButton.setIconTextGap(2); importButton.setMargin(new java.awt.Insets(2, 2, 2, 2)); + importButton.setMaximumSize(new java.awt.Dimension(78, 25)); + importButton.setMinimumSize(new java.awt.Dimension(78, 25)); + importButton.setPreferredSize(new java.awt.Dimension(78, 25)); importButton.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { importButtonActionPerformed(evt); @@ -229,6 +235,9 @@ class GlobalListsManagementPanel extends javax.swing.JPanel implements OptionsPa exportButton.setText(org.openide.util.NbBundle.getMessage(GlobalListsManagementPanel.class, "GlobalListsManagementPanel.exportButton.text")); // NOI18N exportButton.setIconTextGap(2); exportButton.setMargin(new java.awt.Insets(2, 2, 2, 2)); + exportButton.setMaximumSize(new java.awt.Dimension(78, 25)); + exportButton.setMinimumSize(new java.awt.Dimension(78, 25)); + exportButton.setPreferredSize(new java.awt.Dimension(78, 25)); exportButton.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { exportButtonActionPerformed(evt); @@ -239,6 +248,9 @@ class GlobalListsManagementPanel extends javax.swing.JPanel implements OptionsPa copyListButton.setText(org.openide.util.NbBundle.getMessage(GlobalListsManagementPanel.class, "GlobalListsManagementPanel.copyListButton.text")); // NOI18N copyListButton.setIconTextGap(2); copyListButton.setMargin(new java.awt.Insets(2, 2, 2, 2)); + copyListButton.setMaximumSize(new java.awt.Dimension(78, 25)); + copyListButton.setMinimumSize(new java.awt.Dimension(78, 25)); + copyListButton.setPreferredSize(new java.awt.Dimension(78, 25)); copyListButton.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { copyListButtonActionPerformed(evt); @@ -249,6 +261,9 @@ class GlobalListsManagementPanel extends javax.swing.JPanel implements OptionsPa deleteListButton.setText(org.openide.util.NbBundle.getMessage(GlobalListsManagementPanel.class, "GlobalListsManagementPanel.deleteListButton.text")); // NOI18N deleteListButton.setIconTextGap(2); deleteListButton.setMargin(new java.awt.Insets(2, 2, 2, 2)); + deleteListButton.setMaximumSize(new java.awt.Dimension(78, 25)); + deleteListButton.setMinimumSize(new java.awt.Dimension(78, 25)); + deleteListButton.setPreferredSize(new java.awt.Dimension(78, 25)); deleteListButton.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { deleteListButtonActionPerformed(evt); @@ -259,6 +274,9 @@ class GlobalListsManagementPanel extends javax.swing.JPanel implements OptionsPa renameListButton.setText(org.openide.util.NbBundle.getMessage(GlobalListsManagementPanel.class, "GlobalListsManagementPanel.renameListButton.text")); // NOI18N renameListButton.setIconTextGap(2); renameListButton.setMargin(new java.awt.Insets(2, 2, 2, 2)); + renameListButton.setMaximumSize(new java.awt.Dimension(78, 25)); + renameListButton.setMinimumSize(new java.awt.Dimension(78, 25)); + renameListButton.setPreferredSize(new java.awt.Dimension(78, 25)); renameListButton.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { renameListButtonActionPerformed(evt); @@ -270,27 +288,26 @@ class GlobalListsManagementPanel extends javax.swing.JPanel implements OptionsPa layout.setHorizontalGroup( layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createSequentialGroup() - .addContainerGap() + .addGap(10, 10, 10) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 0, Short.MAX_VALUE) - .addComponent(keywordListsLabel) .addGroup(layout.createSequentialGroup() .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) - .addComponent(newListButton, javax.swing.GroupLayout.PREFERRED_SIZE, 85, javax.swing.GroupLayout.PREFERRED_SIZE) - .addComponent(deleteListButton, javax.swing.GroupLayout.PREFERRED_SIZE, 1, Short.MAX_VALUE)) - .addGap(12, 12, 12) - .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false) - .addComponent(renameListButton, javax.swing.GroupLayout.PREFERRED_SIZE, 75, Short.MAX_VALUE) - .addComponent(importButton, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) - .addGap(12, 12, 12) - .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addComponent(keywordListsLabel) .addGroup(layout.createSequentialGroup() - .addComponent(copyListButton, javax.swing.GroupLayout.PREFERRED_SIZE, 1, Short.MAX_VALUE) - .addGap(0, 1, Short.MAX_VALUE)) - .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup() - .addGap(0, 0, Short.MAX_VALUE) - .addComponent(exportButton, javax.swing.GroupLayout.PREFERRED_SIZE, 79, javax.swing.GroupLayout.PREFERRED_SIZE))))) - .addContainerGap()) + .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addComponent(newListButton, javax.swing.GroupLayout.PREFERRED_SIZE, 85, javax.swing.GroupLayout.PREFERRED_SIZE) + .addComponent(deleteListButton, javax.swing.GroupLayout.PREFERRED_SIZE, 1, Short.MAX_VALUE)) + .addGap(5, 5, 5) + .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addComponent(importButton, javax.swing.GroupLayout.PREFERRED_SIZE, 87, javax.swing.GroupLayout.PREFERRED_SIZE) + .addComponent(renameListButton, javax.swing.GroupLayout.PREFERRED_SIZE, 93, javax.swing.GroupLayout.PREFERRED_SIZE)) + .addGap(5, 5, 5) + .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addComponent(exportButton, javax.swing.GroupLayout.PREFERRED_SIZE, 88, javax.swing.GroupLayout.PREFERRED_SIZE) + .addComponent(copyListButton, javax.swing.GroupLayout.PREFERRED_SIZE, 87, javax.swing.GroupLayout.PREFERRED_SIZE)))) + .addGap(0, 0, Short.MAX_VALUE))) + .addGap(10, 10, 10)) ); layout.linkSize(javax.swing.SwingConstants.HORIZONTAL, new java.awt.Component[] {copyListButton, deleteListButton, exportButton, importButton, newListButton, renameListButton}); @@ -304,14 +321,14 @@ class GlobalListsManagementPanel extends javax.swing.JPanel implements OptionsPa .addComponent(jScrollPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 316, Short.MAX_VALUE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) - .addComponent(newListButton) - .addComponent(renameListButton) - .addComponent(copyListButton)) + .addComponent(newListButton, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) + .addComponent(renameListButton, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) + .addComponent(copyListButton, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) - .addComponent(importButton) - .addComponent(exportButton) - .addComponent(deleteListButton)) + .addComponent(importButton, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) + .addComponent(exportButton, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) + .addComponent(deleteListButton, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) .addContainerGap()) ); From 5bad83da006d65673e5c3065d6bf6035cb836540 Mon Sep 17 00:00:00 2001 From: William Schaefer Date: Thu, 13 Apr 2017 11:17:13 -0400 Subject: [PATCH 15/18] 2541 clean up boolean logic of copying a keyword list --- .../GlobalListSettingsPanel.java | 38 ++++++++----------- 1 file changed, 15 insertions(+), 23 deletions(-) diff --git a/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/GlobalListSettingsPanel.java b/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/GlobalListSettingsPanel.java index 6c6341c298..be4b092f7c 100644 --- a/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/GlobalListSettingsPanel.java +++ b/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/GlobalListSettingsPanel.java @@ -95,10 +95,9 @@ final class GlobalListSettingsPanel extends javax.swing.JPanel implements Option * Duplicates the selected keyword list, returns whether or not the keyword * list was duplicated. * - * @return true or false + * @return true if the list was copied false if it was not */ private boolean copyAction() { - boolean shouldAdd = false; final String FEATURE_NAME = NbBundle.getMessage(this.getClass(), "KeywordSearchGlobalListSettingsPanel.component.featureName.text"); KeywordList currentKeywordList = editListPanel.getCurrentKeywordList(); @@ -114,37 +113,30 @@ final class GlobalListSettingsPanel extends javax.swing.JPanel implements Option null, null, currentKeywordList.getName()); - - if (listName == null ) { - return shouldAdd; + + if (listName == null) { + return false; } //remove trailing and leading spaces so lists can't have visually identical names listName = listName.trim(); //if the name is empty or unchanged return without changing anything if (listName.equals("") || listName.equals(currentKeywordList.getName())) { - return shouldAdd; + return false; } XmlKeywordSearchList writer = XmlKeywordSearchList.getCurrent(); if (writer.listExists(listName) && writer.getList(listName).isEditable()) { KeywordSearchUtil.displayDialog(FEATURE_NAME, NbBundle.getMessage(this.getClass(), "KeywordSearchConfigurationPanel1.customizeComponents.noOwDefaultMsg"), KeywordSearchUtil.DIALOG_MESSAGE_TYPE.WARN); - return shouldAdd; + return false; } if (writer.listExists(listName)) { - boolean replace = KeywordSearchUtil.displayConfirmDialog(FEATURE_NAME, NbBundle.getMessage(this.getClass(), "KeywordSearchConfigurationPanel1.customizeComponents.kwListExistMsg", listName), - KeywordSearchUtil.DIALOG_MESSAGE_TYPE.WARN); - if (replace) { - shouldAdd = true; + if (!KeywordSearchUtil.displayConfirmDialog(FEATURE_NAME, NbBundle.getMessage(this.getClass(), "KeywordSearchConfigurationPanel1.customizeComponents.kwListExistMsg", listName), + KeywordSearchUtil.DIALOG_MESSAGE_TYPE.WARN)) { + return false; } - - } else { - shouldAdd = true; } - - if (shouldAdd) { - writer.addList(listName, keywords); - KeywordSearchUtil.displayDialog(FEATURE_NAME, NbBundle.getMessage(this.getClass(), "KeywordSearchConfigurationPanel1.customizeComponents.kwListSavedMsg", listName), KeywordSearchUtil.DIALOG_MESSAGE_TYPE.INFO); - } - return shouldAdd; + writer.addList(listName, keywords); + KeywordSearchUtil.displayDialog(FEATURE_NAME, NbBundle.getMessage(this.getClass(), "KeywordSearchConfigurationPanel1.customizeComponents.kwListSavedMsg", listName), KeywordSearchUtil.DIALOG_MESSAGE_TYPE.INFO); + return true; } @Override @@ -193,7 +185,7 @@ final class GlobalListSettingsPanel extends javax.swing.JPanel implements Option rightPanel = new javax.swing.JPanel(); mainSplitPane.setBorder(null); - mainSplitPane.setDividerLocation(309); + mainSplitPane.setDividerLocation(364); mainSplitPane.setDividerSize(1); leftPanel.setPreferredSize(new java.awt.Dimension(309, 327)); @@ -203,7 +195,7 @@ final class GlobalListSettingsPanel extends javax.swing.JPanel implements Option leftPanel.setLayout(leftPanelLayout); leftPanelLayout.setHorizontalGroup( leftPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) - .addGap(0, 309, Short.MAX_VALUE) + .addGap(0, 364, Short.MAX_VALUE) ); leftPanelLayout.setVerticalGroup( leftPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) @@ -218,7 +210,7 @@ final class GlobalListSettingsPanel extends javax.swing.JPanel implements Option rightPanel.setLayout(rightPanelLayout); rightPanelLayout.setHorizontalGroup( rightPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) - .addGap(0, 363, Short.MAX_VALUE) + .addGap(0, 308, Short.MAX_VALUE) ); rightPanelLayout.setVerticalGroup( rightPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) From 155028efca5e48373652ef93e19a7243706aee29 Mon Sep 17 00:00:00 2001 From: William Schaefer Date: Thu, 13 Apr 2017 11:20:36 -0400 Subject: [PATCH 16/18] 2541 resize keyword list panel, larger buttons, more consistant with other panels size --- .../keywordsearch/GlobalListSettingsPanel.form | 6 +++--- .../GlobalListsManagementPanel.form | 18 +++++++++--------- .../GlobalListsManagementPanel.java | 16 ++++++++-------- 3 files changed, 20 insertions(+), 20 deletions(-) diff --git a/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/GlobalListSettingsPanel.form b/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/GlobalListSettingsPanel.form index 08febc4d19..caf6043eb4 100644 --- a/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/GlobalListSettingsPanel.form +++ b/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/GlobalListSettingsPanel.form @@ -41,7 +41,7 @@ - + @@ -63,7 +63,7 @@ - + @@ -88,7 +88,7 @@ - + diff --git a/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/GlobalListsManagementPanel.form b/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/GlobalListsManagementPanel.form index 6929544d48..bbdf4c212b 100644 --- a/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/GlobalListsManagementPanel.form +++ b/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/GlobalListsManagementPanel.form @@ -30,15 +30,15 @@ - - + + - + - + - + @@ -48,7 +48,7 @@ - + @@ -59,19 +59,19 @@ - + - + - + diff --git a/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/GlobalListsManagementPanel.java b/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/GlobalListsManagementPanel.java index 1bfe47bb7e..f368eac1eb 100644 --- a/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/GlobalListsManagementPanel.java +++ b/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/GlobalListsManagementPanel.java @@ -296,18 +296,18 @@ class GlobalListsManagementPanel extends javax.swing.JPanel implements OptionsPa .addComponent(keywordListsLabel) .addGroup(layout.createSequentialGroup() .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) - .addComponent(newListButton, javax.swing.GroupLayout.PREFERRED_SIZE, 85, javax.swing.GroupLayout.PREFERRED_SIZE) - .addComponent(deleteListButton, javax.swing.GroupLayout.PREFERRED_SIZE, 1, Short.MAX_VALUE)) - .addGap(5, 5, 5) + .addComponent(newListButton, javax.swing.GroupLayout.PREFERRED_SIZE, 93, javax.swing.GroupLayout.PREFERRED_SIZE) + .addComponent(deleteListButton, javax.swing.GroupLayout.DEFAULT_SIZE, 93, Short.MAX_VALUE)) + .addGap(6, 6, 6) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(importButton, javax.swing.GroupLayout.PREFERRED_SIZE, 87, javax.swing.GroupLayout.PREFERRED_SIZE) - .addComponent(renameListButton, javax.swing.GroupLayout.PREFERRED_SIZE, 93, javax.swing.GroupLayout.PREFERRED_SIZE)) - .addGap(5, 5, 5) + .addComponent(renameListButton, javax.swing.GroupLayout.PREFERRED_SIZE, 112, javax.swing.GroupLayout.PREFERRED_SIZE)) + .addGap(6, 6, 6) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(exportButton, javax.swing.GroupLayout.PREFERRED_SIZE, 88, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(copyListButton, javax.swing.GroupLayout.PREFERRED_SIZE, 87, javax.swing.GroupLayout.PREFERRED_SIZE)))) .addGap(0, 0, Short.MAX_VALUE))) - .addGap(10, 10, 10)) + .addGap(6, 6, 6)) ); layout.linkSize(javax.swing.SwingConstants.HORIZONTAL, new java.awt.Component[] {copyListButton, deleteListButton, exportButton, importButton, newListButton, renameListButton}); @@ -324,12 +324,12 @@ class GlobalListsManagementPanel extends javax.swing.JPanel implements OptionsPa .addComponent(newListButton, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(renameListButton, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(copyListButton, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) - .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) + .addGap(6, 6, 6) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(importButton, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(exportButton, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(deleteListButton, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) - .addContainerGap()) + .addGap(6, 6, 6)) ); layout.linkSize(javax.swing.SwingConstants.VERTICAL, new java.awt.Component[] {copyListButton, deleteListButton, exportButton, importButton, newListButton, renameListButton}); From 845117cbc391fdba192635b92f3d0ba9c41b9bda Mon Sep 17 00:00:00 2001 From: William Schaefer Date: Thu, 13 Apr 2017 11:48:56 -0400 Subject: [PATCH 17/18] 2540 further standardize button sizing and spacing between options panels --- .../autopsy/ingest/ProfileSettingsPanel.form | 42 +++++---- .../autopsy/ingest/ProfileSettingsPanel.java | 38 ++++---- .../interestingitems/FilesSetDefsPanel.form | 90 ++++++++++++++++-- .../interestingitems/FilesSetDefsPanel.java | 52 ++++++++--- .../GlobalListSettingsPanel.form | 6 +- .../GlobalListSettingsPanel.java | 6 +- .../GlobalListsManagementPanel.form | 92 +++++++++---------- .../GlobalListsManagementPanel.java | 88 +++++++++--------- 8 files changed, 256 insertions(+), 158 deletions(-) diff --git a/Core/src/org/sleuthkit/autopsy/ingest/ProfileSettingsPanel.form b/Core/src/org/sleuthkit/autopsy/ingest/ProfileSettingsPanel.form index e9c71501e5..a03fa2cd75 100644 --- a/Core/src/org/sleuthkit/autopsy/ingest/ProfileSettingsPanel.form +++ b/Core/src/org/sleuthkit/autopsy/ingest/ProfileSettingsPanel.form @@ -33,11 +33,11 @@ - + - + - + @@ -118,25 +118,25 @@ - + - - + + - + - + @@ -181,16 +181,16 @@ - + - + - + - + @@ -206,16 +206,16 @@ - + - + - + - + @@ -231,10 +231,16 @@ - + + + + + + + - + diff --git a/Core/src/org/sleuthkit/autopsy/ingest/ProfileSettingsPanel.java b/Core/src/org/sleuthkit/autopsy/ingest/ProfileSettingsPanel.java index d3e4cadb84..306a69be91 100644 --- a/Core/src/org/sleuthkit/autopsy/ingest/ProfileSettingsPanel.java +++ b/Core/src/org/sleuthkit/autopsy/ingest/ProfileSettingsPanel.java @@ -108,10 +108,10 @@ class ProfileSettingsPanel extends IngestModuleGlobalSettingsPanel implements Op newProfileButton.setIcon(new javax.swing.ImageIcon(getClass().getResource("/org/sleuthkit/autopsy/images/add16.png"))); // NOI18N org.openide.awt.Mnemonics.setLocalizedText(newProfileButton, org.openide.util.NbBundle.getMessage(ProfileSettingsPanel.class, "ProfileSettingsPanel.newProfileButton.text")); // NOI18N - newProfileButton.setMargin(new java.awt.Insets(2, 8, 2, 8)); - newProfileButton.setMaximumSize(new java.awt.Dimension(97, 23)); - newProfileButton.setMinimumSize(new java.awt.Dimension(97, 23)); - newProfileButton.setPreferredSize(new java.awt.Dimension(97, 23)); + newProfileButton.setMargin(new java.awt.Insets(2, 6, 2, 6)); + newProfileButton.setMaximumSize(new java.awt.Dimension(111, 25)); + newProfileButton.setMinimumSize(new java.awt.Dimension(111, 25)); + newProfileButton.setPreferredSize(new java.awt.Dimension(111, 25)); newProfileButton.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { newProfileButtonActionPerformed(evt); @@ -120,10 +120,10 @@ class ProfileSettingsPanel extends IngestModuleGlobalSettingsPanel implements Op editProfileButton.setIcon(new javax.swing.ImageIcon(getClass().getResource("/org/sleuthkit/autopsy/images/edit16.png"))); // NOI18N org.openide.awt.Mnemonics.setLocalizedText(editProfileButton, org.openide.util.NbBundle.getMessage(ProfileSettingsPanel.class, "ProfileSettingsPanel.editProfileButton.text")); // NOI18N - editProfileButton.setMargin(new java.awt.Insets(2, 8, 2, 8)); - editProfileButton.setMaximumSize(new java.awt.Dimension(97, 23)); - editProfileButton.setMinimumSize(new java.awt.Dimension(97, 23)); - editProfileButton.setPreferredSize(new java.awt.Dimension(97, 23)); + editProfileButton.setMargin(new java.awt.Insets(2, 6, 2, 6)); + editProfileButton.setMaximumSize(new java.awt.Dimension(111, 25)); + editProfileButton.setMinimumSize(new java.awt.Dimension(111, 25)); + editProfileButton.setPreferredSize(new java.awt.Dimension(111, 25)); editProfileButton.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { editProfileButtonActionPerformed(evt); @@ -132,8 +132,10 @@ class ProfileSettingsPanel extends IngestModuleGlobalSettingsPanel implements Op deleteProfileButton.setIcon(new javax.swing.ImageIcon(getClass().getResource("/org/sleuthkit/autopsy/images/delete16.png"))); // NOI18N org.openide.awt.Mnemonics.setLocalizedText(deleteProfileButton, org.openide.util.NbBundle.getMessage(ProfileSettingsPanel.class, "ProfileSettingsPanel.deleteProfileButton.text")); // NOI18N - deleteProfileButton.setMargin(new java.awt.Insets(2, 8, 2, 8)); - deleteProfileButton.setPreferredSize(new java.awt.Dimension(97, 23)); + deleteProfileButton.setMargin(new java.awt.Insets(2, 6, 2, 6)); + deleteProfileButton.setMaximumSize(new java.awt.Dimension(111, 25)); + deleteProfileButton.setMinimumSize(new java.awt.Dimension(111, 25)); + deleteProfileButton.setPreferredSize(new java.awt.Dimension(111, 25)); deleteProfileButton.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { deleteProfileButtonActionPerformed(evt); @@ -208,11 +210,11 @@ class ProfileSettingsPanel extends IngestModuleGlobalSettingsPanel implements Op .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createSequentialGroup() - .addComponent(newProfileButton, javax.swing.GroupLayout.PREFERRED_SIZE, 107, javax.swing.GroupLayout.PREFERRED_SIZE) + .addComponent(newProfileButton, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) - .addComponent(editProfileButton, javax.swing.GroupLayout.PREFERRED_SIZE, 107, javax.swing.GroupLayout.PREFERRED_SIZE) + .addComponent(editProfileButton, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) - .addComponent(deleteProfileButton, javax.swing.GroupLayout.PREFERRED_SIZE, 109, javax.swing.GroupLayout.PREFERRED_SIZE)) + .addComponent(deleteProfileButton, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) .addComponent(jScrollPane2, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.PREFERRED_SIZE, 346, javax.swing.GroupLayout.PREFERRED_SIZE)) .addComponent(profileListLabel)) .addGap(6, 6, 6)) @@ -277,21 +279,21 @@ class ProfileSettingsPanel extends IngestModuleGlobalSettingsPanel implements Op .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(selectedModulesLabel) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) - .addComponent(selectedModulesPane, javax.swing.GroupLayout.DEFAULT_SIZE, 170, Short.MAX_VALUE)) + .addComponent(selectedModulesPane, javax.swing.GroupLayout.DEFAULT_SIZE, 171, Short.MAX_VALUE)) .addGroup(layout.createSequentialGroup() .addComponent(jScrollPane2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(profileListLabel) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) - .addComponent(profileListPane, javax.swing.GroupLayout.DEFAULT_SIZE, 346, Short.MAX_VALUE) - .addGap(9, 9, 9))) - .addGap(4, 4, 4) + .addComponent(profileListPane, javax.swing.GroupLayout.DEFAULT_SIZE, 356, Short.MAX_VALUE) + .addGap(0, 0, 0))) + .addGap(6, 6, 6) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(newProfileButton, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(editProfileButton, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(deleteProfileButton, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(ingestWarningLabel)) - .addContainerGap()) + .addGap(6, 6, 6)) .addComponent(jSeparator2))) ); }// //GEN-END:initComponents diff --git a/Core/src/org/sleuthkit/autopsy/modules/interestingitems/FilesSetDefsPanel.form b/Core/src/org/sleuthkit/autopsy/modules/interestingitems/FilesSetDefsPanel.form index d6ecd9bfc7..bffb00f33b 100755 --- a/Core/src/org/sleuthkit/autopsy/modules/interestingitems/FilesSetDefsPanel.form +++ b/Core/src/org/sleuthkit/autopsy/modules/interestingitems/FilesSetDefsPanel.form @@ -68,20 +68,20 @@ - + - + - + - + - - + + @@ -285,9 +285,9 @@ - - - + + + @@ -459,6 +459,18 @@ + + + + + + + + + + + + @@ -648,6 +660,18 @@ + + + + + + + + + + + + @@ -685,6 +709,18 @@ + + + + + + + + + + + + @@ -892,6 +928,18 @@ + + + + + + + + + + + + @@ -905,6 +953,18 @@ + + + + + + + + + + + + @@ -919,6 +979,18 @@ + + + + + + + + + + + + diff --git a/Core/src/org/sleuthkit/autopsy/modules/interestingitems/FilesSetDefsPanel.java b/Core/src/org/sleuthkit/autopsy/modules/interestingitems/FilesSetDefsPanel.java index 93b8bc52ed..1741f43064 100755 --- a/Core/src/org/sleuthkit/autopsy/modules/interestingitems/FilesSetDefsPanel.java +++ b/Core/src/org/sleuthkit/autopsy/modules/interestingitems/FilesSetDefsPanel.java @@ -675,6 +675,10 @@ public final class FilesSetDefsPanel extends IngestModuleGlobalSettingsPanel imp editSetButton.setIcon(new javax.swing.ImageIcon(getClass().getResource("/org/sleuthkit/autopsy/images/edit16.png"))); // NOI18N org.openide.awt.Mnemonics.setLocalizedText(editSetButton, org.openide.util.NbBundle.getMessage(FilesSetDefsPanel.class, "FilesSetDefsPanel.interesting.editSetButton.text")); // NOI18N editSetButton.setEnabled(false); + editSetButton.setMargin(new java.awt.Insets(2, 6, 2, 6)); + editSetButton.setMaximumSize(new java.awt.Dimension(111, 25)); + editSetButton.setMinimumSize(new java.awt.Dimension(111, 25)); + editSetButton.setPreferredSize(new java.awt.Dimension(111, 25)); editSetButton.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { editSetButtonActionPerformed(evt); @@ -733,6 +737,10 @@ public final class FilesSetDefsPanel extends IngestModuleGlobalSettingsPanel imp deleteSetButton.setIcon(new javax.swing.ImageIcon(getClass().getResource("/org/sleuthkit/autopsy/images/delete16.png"))); // NOI18N org.openide.awt.Mnemonics.setLocalizedText(deleteSetButton, org.openide.util.NbBundle.getMessage(FilesSetDefsPanel.class, "FilesSetDefsPanel.interesting.deleteSetButton.text")); // NOI18N deleteSetButton.setEnabled(false); + deleteSetButton.setMargin(new java.awt.Insets(2, 6, 2, 6)); + deleteSetButton.setMaximumSize(new java.awt.Dimension(111, 25)); + deleteSetButton.setMinimumSize(new java.awt.Dimension(111, 25)); + deleteSetButton.setPreferredSize(new java.awt.Dimension(111, 25)); deleteSetButton.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { deleteSetButtonActionPerformed(evt); @@ -752,6 +760,10 @@ public final class FilesSetDefsPanel extends IngestModuleGlobalSettingsPanel imp newSetButton.setFont(newSetButton.getFont().deriveFont(newSetButton.getFont().getStyle() & ~java.awt.Font.BOLD, 11)); newSetButton.setIcon(new javax.swing.ImageIcon(getClass().getResource("/org/sleuthkit/autopsy/images/add16.png"))); // NOI18N org.openide.awt.Mnemonics.setLocalizedText(newSetButton, org.openide.util.NbBundle.getMessage(FilesSetDefsPanel.class, "FilesSetDefsPanel.interesting.newSetButton.text")); // NOI18N + newSetButton.setMargin(new java.awt.Insets(2, 6, 2, 6)); + newSetButton.setMaximumSize(new java.awt.Dimension(111, 25)); + newSetButton.setMinimumSize(new java.awt.Dimension(111, 25)); + newSetButton.setPreferredSize(new java.awt.Dimension(111, 25)); newSetButton.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { newSetButtonActionPerformed(evt); @@ -818,6 +830,10 @@ public final class FilesSetDefsPanel extends IngestModuleGlobalSettingsPanel imp copySetButton.setIcon(new javax.swing.ImageIcon(getClass().getResource("/org/sleuthkit/autopsy/images/new16.png"))); // NOI18N org.openide.awt.Mnemonics.setLocalizedText(copySetButton, org.openide.util.NbBundle.getMessage(FilesSetDefsPanel.class, "FilesSetDefsPanel.interesting.copySetButton.text")); // NOI18N copySetButton.setEnabled(false); + copySetButton.setMargin(new java.awt.Insets(2, 6, 2, 6)); + copySetButton.setMaximumSize(new java.awt.Dimension(111, 25)); + copySetButton.setMinimumSize(new java.awt.Dimension(111, 25)); + copySetButton.setPreferredSize(new java.awt.Dimension(111, 25)); copySetButton.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { copySetButtonActionPerformed(evt); @@ -826,6 +842,10 @@ public final class FilesSetDefsPanel extends IngestModuleGlobalSettingsPanel imp importSetButton.setIcon(new javax.swing.ImageIcon(getClass().getResource("/org/sleuthkit/autopsy/images/import16.png"))); // NOI18N org.openide.awt.Mnemonics.setLocalizedText(importSetButton, org.openide.util.NbBundle.getMessage(FilesSetDefsPanel.class, "FilesSetDefsPanel.interesting.importSetButton.text")); // NOI18N + importSetButton.setMargin(new java.awt.Insets(2, 6, 2, 6)); + importSetButton.setMaximumSize(new java.awt.Dimension(111, 25)); + importSetButton.setMinimumSize(new java.awt.Dimension(111, 25)); + importSetButton.setPreferredSize(new java.awt.Dimension(111, 25)); importSetButton.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { importSetButtonActionPerformed(evt); @@ -835,6 +855,10 @@ public final class FilesSetDefsPanel extends IngestModuleGlobalSettingsPanel imp exportSetButton.setIcon(new javax.swing.ImageIcon(getClass().getResource("/org/sleuthkit/autopsy/images/export16.png"))); // NOI18N org.openide.awt.Mnemonics.setLocalizedText(exportSetButton, org.openide.util.NbBundle.getMessage(FilesSetDefsPanel.class, "FilesSetDefsPanel.interesting.exportSetButton.text")); // NOI18N exportSetButton.setEnabled(false); + exportSetButton.setMargin(new java.awt.Insets(2, 6, 2, 6)); + exportSetButton.setMaximumSize(new java.awt.Dimension(111, 25)); + exportSetButton.setMinimumSize(new java.awt.Dimension(111, 25)); + exportSetButton.setPreferredSize(new java.awt.Dimension(111, 25)); exportSetButton.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { exportSetButtonActionPerformed(evt); @@ -851,17 +875,17 @@ public final class FilesSetDefsPanel extends IngestModuleGlobalSettingsPanel imp .addGroup(jPanel1Layout.createSequentialGroup() .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false) .addGroup(javax.swing.GroupLayout.Alignment.LEADING, jPanel1Layout.createSequentialGroup() - .addComponent(copySetButton, javax.swing.GroupLayout.PREFERRED_SIZE, 103, javax.swing.GroupLayout.PREFERRED_SIZE) + .addComponent(copySetButton, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) - .addComponent(importSetButton, javax.swing.GroupLayout.PREFERRED_SIZE, 1, Short.MAX_VALUE)) + .addComponent(importSetButton, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) .addGroup(javax.swing.GroupLayout.Alignment.LEADING, jPanel1Layout.createSequentialGroup() - .addComponent(newSetButton, javax.swing.GroupLayout.PREFERRED_SIZE, 97, javax.swing.GroupLayout.PREFERRED_SIZE) + .addComponent(newSetButton, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) - .addComponent(editSetButton, javax.swing.GroupLayout.PREFERRED_SIZE, 98, javax.swing.GroupLayout.PREFERRED_SIZE))) + .addComponent(editSetButton, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) - .addComponent(exportSetButton, javax.swing.GroupLayout.PREFERRED_SIZE, 112, javax.swing.GroupLayout.PREFERRED_SIZE) - .addComponent(deleteSetButton, javax.swing.GroupLayout.DEFAULT_SIZE, 111, Short.MAX_VALUE))) + .addComponent(exportSetButton, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) + .addComponent(deleteSetButton, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))) .addComponent(setsListScrollPane, javax.swing.GroupLayout.PREFERRED_SIZE, 346, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(jScrollPane2, javax.swing.GroupLayout.PREFERRED_SIZE, 346, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(setsListLabel)) @@ -946,7 +970,7 @@ public final class FilesSetDefsPanel extends IngestModuleGlobalSettingsPanel imp .addGap(8, 8, 8)))) ); - jPanel1Layout.linkSize(javax.swing.SwingConstants.HORIZONTAL, new java.awt.Component[] {copySetButton, deleteSetButton, editSetButton, newSetButton}); + jPanel1Layout.linkSize(javax.swing.SwingConstants.HORIZONTAL, new java.awt.Component[] {copySetButton, deleteSetButton, editSetButton, exportSetButton, importSetButton, newSetButton}); jPanel1Layout.setVerticalGroup( jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) @@ -1019,18 +1043,18 @@ public final class FilesSetDefsPanel extends IngestModuleGlobalSettingsPanel imp .addComponent(setsListScrollPane) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) - .addComponent(newSetButton) - .addComponent(editSetButton) - .addComponent(deleteSetButton)) + .addComponent(newSetButton, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) + .addComponent(editSetButton, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) + .addComponent(deleteSetButton, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) - .addComponent(copySetButton, javax.swing.GroupLayout.PREFERRED_SIZE, 23, javax.swing.GroupLayout.PREFERRED_SIZE) - .addComponent(importSetButton, javax.swing.GroupLayout.PREFERRED_SIZE, 23, javax.swing.GroupLayout.PREFERRED_SIZE) - .addComponent(exportSetButton, javax.swing.GroupLayout.PREFERRED_SIZE, 23, javax.swing.GroupLayout.PREFERRED_SIZE)) + .addComponent(copySetButton, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) + .addComponent(importSetButton, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) + .addComponent(exportSetButton, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) .addGap(6, 6, 6)))) ); - jPanel1Layout.linkSize(javax.swing.SwingConstants.VERTICAL, new java.awt.Component[] {deleteRuleButton, deleteSetButton, editRuleButton, editSetButton, newRuleButton, newSetButton}); + jPanel1Layout.linkSize(javax.swing.SwingConstants.VERTICAL, new java.awt.Component[] {copySetButton, deleteRuleButton, deleteSetButton, editRuleButton, editSetButton, exportSetButton, importSetButton, newRuleButton, newSetButton}); jScrollPane1.setViewportView(jPanel1); diff --git a/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/GlobalListSettingsPanel.form b/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/GlobalListSettingsPanel.form index caf6043eb4..18c416a00f 100644 --- a/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/GlobalListSettingsPanel.form +++ b/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/GlobalListSettingsPanel.form @@ -41,7 +41,7 @@ - + @@ -63,7 +63,7 @@ - + @@ -88,7 +88,7 @@ - + diff --git a/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/GlobalListSettingsPanel.java b/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/GlobalListSettingsPanel.java index be4b092f7c..f0c8162d8f 100644 --- a/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/GlobalListSettingsPanel.java +++ b/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/GlobalListSettingsPanel.java @@ -185,7 +185,7 @@ final class GlobalListSettingsPanel extends javax.swing.JPanel implements Option rightPanel = new javax.swing.JPanel(); mainSplitPane.setBorder(null); - mainSplitPane.setDividerLocation(364); + mainSplitPane.setDividerLocation(361); mainSplitPane.setDividerSize(1); leftPanel.setPreferredSize(new java.awt.Dimension(309, 327)); @@ -195,7 +195,7 @@ final class GlobalListSettingsPanel extends javax.swing.JPanel implements Option leftPanel.setLayout(leftPanelLayout); leftPanelLayout.setHorizontalGroup( leftPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) - .addGap(0, 364, Short.MAX_VALUE) + .addGap(0, 361, Short.MAX_VALUE) ); leftPanelLayout.setVerticalGroup( leftPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) @@ -210,7 +210,7 @@ final class GlobalListSettingsPanel extends javax.swing.JPanel implements Option rightPanel.setLayout(rightPanelLayout); rightPanelLayout.setHorizontalGroup( rightPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) - .addGap(0, 308, Short.MAX_VALUE) + .addGap(0, 311, Short.MAX_VALUE) ); rightPanelLayout.setVerticalGroup( rightPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) diff --git a/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/GlobalListsManagementPanel.form b/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/GlobalListsManagementPanel.form index bbdf4c212b..6609e672e0 100644 --- a/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/GlobalListsManagementPanel.form +++ b/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/GlobalListsManagementPanel.form @@ -24,29 +24,25 @@ - + + + + + + - - - - - - - - - - - - - - - - - + + + + + + + + @@ -55,21 +51,21 @@ - + - + - + - + @@ -107,23 +103,23 @@ - + - + - + - + - + @@ -140,16 +136,16 @@ - + - + - + - + @@ -173,16 +169,16 @@ - + - + - + - + @@ -192,23 +188,23 @@ - + - + - + - + - + @@ -225,16 +221,16 @@ - + - + - + - + @@ -251,16 +247,16 @@ - + - + - + - + diff --git a/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/GlobalListsManagementPanel.java b/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/GlobalListsManagementPanel.java index f368eac1eb..f7aa622d62 100644 --- a/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/GlobalListsManagementPanel.java +++ b/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/GlobalListsManagementPanel.java @@ -203,13 +203,13 @@ class GlobalListsManagementPanel extends javax.swing.JPanel implements OptionsPa }); jScrollPane1.setViewportView(listsTable); - newListButton.setIcon(new javax.swing.ImageIcon(getClass().getResource("/org/sleuthkit/autopsy/keywordsearch/new16.png"))); // NOI18N + newListButton.setIcon(new javax.swing.ImageIcon(getClass().getResource("/org/sleuthkit/autopsy/keywordsearch/add16.png"))); // NOI18N newListButton.setText(org.openide.util.NbBundle.getMessage(GlobalListsManagementPanel.class, "GlobalListsManagementPanel.newListButton.text")); // NOI18N newListButton.setIconTextGap(2); - newListButton.setMargin(new java.awt.Insets(2, 2, 2, 2)); - newListButton.setMaximumSize(new java.awt.Dimension(78, 25)); - newListButton.setMinimumSize(new java.awt.Dimension(78, 25)); - newListButton.setPreferredSize(new java.awt.Dimension(78, 25)); + newListButton.setMargin(new java.awt.Insets(2, 6, 2, 6)); + newListButton.setMaximumSize(new java.awt.Dimension(111, 25)); + newListButton.setMinimumSize(new java.awt.Dimension(111, 25)); + newListButton.setPreferredSize(new java.awt.Dimension(111, 25)); newListButton.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { newListButtonActionPerformed(evt); @@ -219,10 +219,10 @@ class GlobalListsManagementPanel extends javax.swing.JPanel implements OptionsPa importButton.setIcon(new javax.swing.ImageIcon(getClass().getResource("/org/sleuthkit/autopsy/keywordsearch/import16.png"))); // NOI18N importButton.setText(org.openide.util.NbBundle.getMessage(GlobalListsManagementPanel.class, "GlobalListsManagementPanel.importButton.text")); // NOI18N importButton.setIconTextGap(2); - importButton.setMargin(new java.awt.Insets(2, 2, 2, 2)); - importButton.setMaximumSize(new java.awt.Dimension(78, 25)); - importButton.setMinimumSize(new java.awt.Dimension(78, 25)); - importButton.setPreferredSize(new java.awt.Dimension(78, 25)); + importButton.setMargin(new java.awt.Insets(2, 6, 2, 6)); + importButton.setMaximumSize(new java.awt.Dimension(111, 25)); + importButton.setMinimumSize(new java.awt.Dimension(111, 25)); + importButton.setPreferredSize(new java.awt.Dimension(111, 25)); importButton.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { importButtonActionPerformed(evt); @@ -234,23 +234,23 @@ class GlobalListsManagementPanel extends javax.swing.JPanel implements OptionsPa exportButton.setIcon(new javax.swing.ImageIcon(getClass().getResource("/org/sleuthkit/autopsy/keywordsearch/export16.png"))); // NOI18N exportButton.setText(org.openide.util.NbBundle.getMessage(GlobalListsManagementPanel.class, "GlobalListsManagementPanel.exportButton.text")); // NOI18N exportButton.setIconTextGap(2); - exportButton.setMargin(new java.awt.Insets(2, 2, 2, 2)); - exportButton.setMaximumSize(new java.awt.Dimension(78, 25)); - exportButton.setMinimumSize(new java.awt.Dimension(78, 25)); - exportButton.setPreferredSize(new java.awt.Dimension(78, 25)); + exportButton.setMargin(new java.awt.Insets(2, 6, 2, 6)); + exportButton.setMaximumSize(new java.awt.Dimension(111, 25)); + exportButton.setMinimumSize(new java.awt.Dimension(111, 25)); + exportButton.setPreferredSize(new java.awt.Dimension(111, 25)); exportButton.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { exportButtonActionPerformed(evt); } }); - copyListButton.setIcon(new javax.swing.ImageIcon(getClass().getResource("/org/sleuthkit/autopsy/keywordsearch/add16.png"))); // NOI18N + copyListButton.setIcon(new javax.swing.ImageIcon(getClass().getResource("/org/sleuthkit/autopsy/keywordsearch/new16.png"))); // NOI18N copyListButton.setText(org.openide.util.NbBundle.getMessage(GlobalListsManagementPanel.class, "GlobalListsManagementPanel.copyListButton.text")); // NOI18N copyListButton.setIconTextGap(2); - copyListButton.setMargin(new java.awt.Insets(2, 2, 2, 2)); - copyListButton.setMaximumSize(new java.awt.Dimension(78, 25)); - copyListButton.setMinimumSize(new java.awt.Dimension(78, 25)); - copyListButton.setPreferredSize(new java.awt.Dimension(78, 25)); + copyListButton.setMargin(new java.awt.Insets(2, 6, 2, 6)); + copyListButton.setMaximumSize(new java.awt.Dimension(111, 25)); + copyListButton.setMinimumSize(new java.awt.Dimension(111, 25)); + copyListButton.setPreferredSize(new java.awt.Dimension(111, 25)); copyListButton.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { copyListButtonActionPerformed(evt); @@ -260,10 +260,10 @@ class GlobalListsManagementPanel extends javax.swing.JPanel implements OptionsPa deleteListButton.setIcon(new javax.swing.ImageIcon(getClass().getResource("/org/sleuthkit/autopsy/keywordsearch/delete16.png"))); // NOI18N deleteListButton.setText(org.openide.util.NbBundle.getMessage(GlobalListsManagementPanel.class, "GlobalListsManagementPanel.deleteListButton.text")); // NOI18N deleteListButton.setIconTextGap(2); - deleteListButton.setMargin(new java.awt.Insets(2, 2, 2, 2)); - deleteListButton.setMaximumSize(new java.awt.Dimension(78, 25)); - deleteListButton.setMinimumSize(new java.awt.Dimension(78, 25)); - deleteListButton.setPreferredSize(new java.awt.Dimension(78, 25)); + deleteListButton.setMargin(new java.awt.Insets(2, 6, 2, 6)); + deleteListButton.setMaximumSize(new java.awt.Dimension(111, 25)); + deleteListButton.setMinimumSize(new java.awt.Dimension(111, 25)); + deleteListButton.setPreferredSize(new java.awt.Dimension(111, 25)); deleteListButton.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { deleteListButtonActionPerformed(evt); @@ -273,10 +273,10 @@ class GlobalListsManagementPanel extends javax.swing.JPanel implements OptionsPa renameListButton.setIcon(new javax.swing.ImageIcon(getClass().getResource("/org/sleuthkit/autopsy/keywordsearch/edit16.png"))); // NOI18N renameListButton.setText(org.openide.util.NbBundle.getMessage(GlobalListsManagementPanel.class, "GlobalListsManagementPanel.renameListButton.text")); // NOI18N renameListButton.setIconTextGap(2); - renameListButton.setMargin(new java.awt.Insets(2, 2, 2, 2)); - renameListButton.setMaximumSize(new java.awt.Dimension(78, 25)); - renameListButton.setMinimumSize(new java.awt.Dimension(78, 25)); - renameListButton.setPreferredSize(new java.awt.Dimension(78, 25)); + renameListButton.setMargin(new java.awt.Insets(2, 6, 2, 6)); + renameListButton.setMaximumSize(new java.awt.Dimension(111, 25)); + renameListButton.setMinimumSize(new java.awt.Dimension(111, 25)); + renameListButton.setPreferredSize(new java.awt.Dimension(111, 25)); renameListButton.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { renameListButtonActionPerformed(evt); @@ -290,23 +290,21 @@ class GlobalListsManagementPanel extends javax.swing.JPanel implements OptionsPa .addGroup(layout.createSequentialGroup() .addGap(10, 10, 10) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) - .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 0, Short.MAX_VALUE) + .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 345, javax.swing.GroupLayout.PREFERRED_SIZE) .addGroup(layout.createSequentialGroup() + .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING) + .addComponent(newListButton, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) + .addComponent(copyListButton, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) + .addGap(6, 6, 6) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) - .addComponent(keywordListsLabel) - .addGroup(layout.createSequentialGroup() - .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) - .addComponent(newListButton, javax.swing.GroupLayout.PREFERRED_SIZE, 93, javax.swing.GroupLayout.PREFERRED_SIZE) - .addComponent(deleteListButton, javax.swing.GroupLayout.DEFAULT_SIZE, 93, Short.MAX_VALUE)) - .addGap(6, 6, 6) - .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) - .addComponent(importButton, javax.swing.GroupLayout.PREFERRED_SIZE, 87, javax.swing.GroupLayout.PREFERRED_SIZE) - .addComponent(renameListButton, javax.swing.GroupLayout.PREFERRED_SIZE, 112, javax.swing.GroupLayout.PREFERRED_SIZE)) - .addGap(6, 6, 6) - .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) - .addComponent(exportButton, javax.swing.GroupLayout.PREFERRED_SIZE, 88, javax.swing.GroupLayout.PREFERRED_SIZE) - .addComponent(copyListButton, javax.swing.GroupLayout.PREFERRED_SIZE, 87, javax.swing.GroupLayout.PREFERRED_SIZE)))) - .addGap(0, 0, Short.MAX_VALUE))) + .addComponent(importButton, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) + .addComponent(renameListButton, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) + .addGap(6, 6, 6) + .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addComponent(exportButton, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) + .addComponent(deleteListButton, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) + .addGap(0, 0, Short.MAX_VALUE)) + .addComponent(keywordListsLabel)) .addGap(6, 6, 6)) ); @@ -315,20 +313,20 @@ class GlobalListsManagementPanel extends javax.swing.JPanel implements OptionsPa layout.setVerticalGroup( layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup() - .addContainerGap() + .addGap(22, 22, 22) .addComponent(keywordListsLabel) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) - .addComponent(jScrollPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 316, Short.MAX_VALUE) + .addComponent(jScrollPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 305, Short.MAX_VALUE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(newListButton, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(renameListButton, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) - .addComponent(copyListButton, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) + .addComponent(deleteListButton, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) .addGap(6, 6, 6) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(importButton, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(exportButton, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) - .addComponent(deleteListButton, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) + .addComponent(copyListButton, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) .addGap(6, 6, 6)) ); From 69af487d45456874666aa630a98904cfc899de7a Mon Sep 17 00:00:00 2001 From: William Schaefer Date: Thu, 13 Apr 2017 11:59:49 -0400 Subject: [PATCH 18/18] 2540 add keyword icon made standard new icon --- .../sleuthkit/autopsy/keywordsearch/GlobalEditListPanel.form | 2 +- .../sleuthkit/autopsy/keywordsearch/GlobalEditListPanel.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/GlobalEditListPanel.form b/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/GlobalEditListPanel.form index 6ccf9f6836..cbfad12e0b 100644 --- a/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/GlobalEditListPanel.form +++ b/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/GlobalEditListPanel.form @@ -151,7 +151,7 @@ - + diff --git a/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/GlobalEditListPanel.java b/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/GlobalEditListPanel.java index 8e9d4bb5c5..112ae15edf 100644 --- a/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/GlobalEditListPanel.java +++ b/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/GlobalEditListPanel.java @@ -282,7 +282,7 @@ class GlobalEditListPanel extends javax.swing.JPanel implements ListSelectionLis keywordsLabel.setText(org.openide.util.NbBundle.getMessage(GlobalEditListPanel.class, "KeywordSearchEditListPanel.keywordsLabel.text")); // NOI18N - newKeywordsButton.setIcon(new javax.swing.ImageIcon(getClass().getResource("/org/sleuthkit/autopsy/keywordsearch/new16.png"))); // NOI18N + newKeywordsButton.setIcon(new javax.swing.ImageIcon(getClass().getResource("/org/sleuthkit/autopsy/keywordsearch/add16.png"))); // NOI18N newKeywordsButton.setText(org.openide.util.NbBundle.getMessage(GlobalEditListPanel.class, "GlobalEditListPanel.newKeywordsButton.text")); // NOI18N newKeywordsButton.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) {