From e9f82d0ea7e05395bbc5b5bfaf8569df485760a5 Mon Sep 17 00:00:00 2001 From: William Schaefer Date: Wed, 29 Mar 2017 17:10:36 -0400 Subject: [PATCH 01/27] 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/27] 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/27] 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/27] 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/27] 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/27] 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/27] 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 530c1745b33fa25b9f073dfb72c79109c8844828 Mon Sep 17 00:00:00 2001 From: Eugene Livis Date: Mon, 10 Apr 2017 16:18:10 -0400 Subject: [PATCH 08/27] First cut at adding list name and original term to Keyword class --- .../keywordsearch/GlobalEditListPanel.java | 2 +- .../autopsy/keywordsearch/Keyword.java | 35 +++++++++++++++++++ .../autopsy/keywordsearch/LuceneQuery.java | 2 +- .../autopsy/keywordsearch/RegexQuery.java | 2 +- .../keywordsearch/TermsComponentQuery.java | 2 +- 5 files changed, 39 insertions(+), 4 deletions(-) diff --git a/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/GlobalEditListPanel.java b/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/GlobalEditListPanel.java index 8e9d4bb5c5..f44fbe9182 100644 --- a/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/GlobalEditListPanel.java +++ b/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/GlobalEditListPanel.java @@ -159,7 +159,7 @@ class GlobalEditListPanel extends javax.swing.JPanel implements ListSelectionLis continue; } - final Keyword keyword = new Keyword(newWord, !dialog.isKeywordRegex(), dialog.isKeywordExact()); + final Keyword keyword = new Keyword(newWord, !dialog.isKeywordRegex(), dialog.isKeywordExact(), currentKeywordList.getName(), newWord); if (currentKeywordList.hasKeyword(keyword)) { dupeCount++; continue; diff --git a/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/Keyword.java b/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/Keyword.java index 0c84da9c73..72764ffaa1 100644 --- a/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/Keyword.java +++ b/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/Keyword.java @@ -36,6 +36,8 @@ class Keyword { private boolean isLiteral; private boolean isWholeWord; private BlackboardAttribute.ATTRIBUTE_TYPE artifactAtrributeType; + private final String listName; + private final String originalTerm; /** * Constructs a representation of a keyword for which to search. The search @@ -50,8 +52,25 @@ class Keyword { this.searchTerm = searchTerm; this.isLiteral = isLiteral; this.isWholeWord = true; + this.listName = ""; + this.originalTerm = searchTerm; } + + Keyword(String searchTerm, boolean isLiteral, String listName, String originalTerm) { + this.searchTerm = searchTerm; + this.isLiteral = isLiteral; + this.isWholeWord = true; + this.listName = listName; + this.originalTerm = originalTerm; + } + Keyword(String searchTerm, boolean isLiteral, boolean isWholeWord, String listName, String originalTerm) { + this.searchTerm = searchTerm; + this.isLiteral = isLiteral; + this.isWholeWord = isWholeWord; + this.listName = listName; + this.originalTerm = originalTerm; + } /** * Constructs a representation of a keyword for which to search. The search * term may be either a literal term, to be treated as either a whole word @@ -68,6 +87,8 @@ class Keyword { this.searchTerm = searchTerm; this.isLiteral = isLiteral; this.isWholeWord = isWholeWord; + this.listName = ""; + this.originalTerm = searchTerm; } /** @@ -186,4 +207,18 @@ class Keyword { return hash; } + /** + * @return the listName + */ + String getListName() { + return listName; + } + + /** + * @return the originalTerm + */ + String getOriginalTerm() { + return originalTerm; + } + } diff --git a/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/LuceneQuery.java b/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/LuceneQuery.java index 741928c92d..397af6acfd 100644 --- a/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/LuceneQuery.java +++ b/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/LuceneQuery.java @@ -181,7 +181,7 @@ class LuceneQuery implements KeywordSearchQuery { QueryResults results = new QueryResults(this); //in case of single term literal query there is only 1 term - results.addResult(new Keyword(originalKeyword.getSearchTerm(), true), matches); + results.addResult(new Keyword(originalKeyword.getSearchTerm(), true, originalKeyword.getListName(), originalKeyword.getOriginalTerm()), matches); return results; } diff --git a/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/RegexQuery.java b/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/RegexQuery.java index c7004b1fa7..36a888a9a9 100644 --- a/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/RegexQuery.java +++ b/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/RegexQuery.java @@ -204,7 +204,7 @@ final class RegexQuery implements KeywordSearchQuery { try { List keywordHits = createKeywordHits(resultDoc); for (KeywordHit hit : keywordHits) { - hitsMultiMap.put(new Keyword(hit.getHit(), true), hit); + hitsMultiMap.put(new Keyword(hit.getHit(), true, originalKeyword.getListName(), originalKeyword.getOriginalTerm()), hit); } } catch (TskException ex) { // diff --git a/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/TermsComponentQuery.java b/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/TermsComponentQuery.java index c1149eee87..e4121a9874 100644 --- a/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/TermsComponentQuery.java +++ b/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/TermsComponentQuery.java @@ -313,7 +313,7 @@ final class TermsComponentQuery implements KeywordSearchQuery { for (Keyword word : termQueryResult.getKeywords()) { termHits.addAll(termQueryResult.getResults(word)); } - results.addResult(new Keyword(term.getTerm(), false), new ArrayList<>(termHits)); + results.addResult(new Keyword(term.getTerm(), false, originalKeyword.getListName(), originalKeyword.getOriginalTerm()), new ArrayList<>(termHits)); } return results; } From 06daab86232b81d20cdbfa322bf6311d3295f2c2 Mon Sep 17 00:00:00 2001 From: Eugene Livis Date: Mon, 10 Apr 2017 16:21:03 -0400 Subject: [PATCH 09/27] First cut at adding list name and original term to Keyword class --- .../sleuthkit/autopsy/keywordsearch/GlobalEditListPanel.java | 2 +- .../src/org/sleuthkit/autopsy/keywordsearch/Keyword.java | 2 +- .../src/org/sleuthkit/autopsy/keywordsearch/LuceneQuery.java | 2 +- .../src/org/sleuthkit/autopsy/keywordsearch/RegexQuery.java | 2 +- .../sleuthkit/autopsy/keywordsearch/TermsComponentQuery.java | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/GlobalEditListPanel.java b/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/GlobalEditListPanel.java index f44fbe9182..4aa42cae2e 100644 --- a/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/GlobalEditListPanel.java +++ b/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/GlobalEditListPanel.java @@ -162,7 +162,7 @@ class GlobalEditListPanel extends javax.swing.JPanel implements ListSelectionLis final Keyword keyword = new Keyword(newWord, !dialog.isKeywordRegex(), dialog.isKeywordExact(), currentKeywordList.getName(), newWord); if (currentKeywordList.hasKeyword(keyword)) { dupeCount++; - continue; + continue; } //check if valid diff --git a/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/Keyword.java b/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/Keyword.java index 72764ffaa1..ae0743d560 100644 --- a/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/Keyword.java +++ b/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/Keyword.java @@ -61,7 +61,7 @@ class Keyword { this.isLiteral = isLiteral; this.isWholeWord = true; this.listName = listName; - this.originalTerm = originalTerm; + this.originalTerm = originalTerm; } Keyword(String searchTerm, boolean isLiteral, boolean isWholeWord, String listName, String originalTerm) { diff --git a/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/LuceneQuery.java b/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/LuceneQuery.java index 397af6acfd..ce113b2e75 100644 --- a/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/LuceneQuery.java +++ b/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/LuceneQuery.java @@ -70,7 +70,7 @@ class LuceneQuery implements KeywordSearchQuery { LuceneQuery(KeywordList keywordList, Keyword keyword) { this.keywordList = keywordList; this.originalKeyword = keyword; - this.keywordStringEscaped = this.originalKeyword.getSearchTerm(); + this.keywordStringEscaped = this.originalKeyword.getSearchTerm(); } @Override diff --git a/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/RegexQuery.java b/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/RegexQuery.java index 36a888a9a9..bb96ae81d5 100644 --- a/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/RegexQuery.java +++ b/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/RegexQuery.java @@ -206,7 +206,7 @@ final class RegexQuery implements KeywordSearchQuery { for (KeywordHit hit : keywordHits) { hitsMultiMap.put(new Keyword(hit.getHit(), true, originalKeyword.getListName(), originalKeyword.getOriginalTerm()), hit); } - } catch (TskException ex) { + } catch (TskException ex) { // } } diff --git a/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/TermsComponentQuery.java b/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/TermsComponentQuery.java index e4121a9874..43388a3687 100644 --- a/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/TermsComponentQuery.java +++ b/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/TermsComponentQuery.java @@ -315,7 +315,7 @@ final class TermsComponentQuery implements KeywordSearchQuery { } results.addResult(new Keyword(term.getTerm(), false, originalKeyword.getListName(), originalKeyword.getOriginalTerm()), new ArrayList<>(termHits)); } - return results; + return results; } /** From aae52e2467b0ace76c2024ab65937bf3e3d493c9 Mon Sep 17 00:00:00 2001 From: Eugene Livis Date: Mon, 10 Apr 2017 17:03:11 -0400 Subject: [PATCH 10/27] Reduced number of custructors in Keyword class --- .../EnCaseKeywordSearchList.java | 2 +- .../keywordsearch/HighlightedText.java | 2 +- .../autopsy/keywordsearch/Keyword.java | 66 +++++++++---------- .../autopsy/keywordsearch/LuceneQuery.java | 2 +- .../autopsy/keywordsearch/RegexQuery.java | 2 +- .../keywordsearch/TermsComponentQuery.java | 4 +- .../keywordsearch/XmlKeywordSearchList.java | 2 +- 7 files changed, 39 insertions(+), 41 deletions(-) diff --git a/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/EnCaseKeywordSearchList.java b/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/EnCaseKeywordSearchList.java index ff5792e60f..a567812057 100644 --- a/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/EnCaseKeywordSearchList.java +++ b/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/EnCaseKeywordSearchList.java @@ -74,7 +74,7 @@ class EnCaseKeywordSearchList extends KeywordSearchList { if (child.flags.contains(EncaseFlag.pg)) { // Skip GREP keywords break; } - children.add(new Keyword(child.value, true)); + children.add(new Keyword(child.value, true, true)); break; } } diff --git a/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/HighlightedText.java b/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/HighlightedText.java index 9aa8b74a4f..ffe3a66456 100644 --- a/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/HighlightedText.java +++ b/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/HighlightedText.java @@ -179,7 +179,7 @@ class HighlightedText implements IndexedText { // Run a query to figure out which chunks for the current object have // hits for this keyword. - Keyword keywordQuery = new Keyword(keyword, isLiteral); + Keyword keywordQuery = new Keyword(keyword, isLiteral, true); KeywordSearchQuery chunksQuery = new LuceneQuery(new KeywordList(Arrays.asList(keywordQuery)), keywordQuery); chunksQuery.escape(); chunksQuery.addFilter(new KeywordQueryFilter(FilterType.CHUNK, this.objectId)); diff --git a/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/Keyword.java b/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/Keyword.java index ae0743d560..22a2e1ca59 100644 --- a/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/Keyword.java +++ b/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/Keyword.java @@ -39,38 +39,6 @@ class Keyword { private final String listName; private final String originalTerm; - /** - * Constructs a representation of a keyword for which to search. The search - * term for the keyword may be either a literal term that will be treated as - * a whole word, or a regex. - * - * @param searchTerm The search term for the keyword. - * @param isLiteral Whether or not the search term is a literal term that - * will be treated as a whole word, instead of a regex. - */ - Keyword(String searchTerm, boolean isLiteral) { - this.searchTerm = searchTerm; - this.isLiteral = isLiteral; - this.isWholeWord = true; - this.listName = ""; - this.originalTerm = searchTerm; - } - - Keyword(String searchTerm, boolean isLiteral, String listName, String originalTerm) { - this.searchTerm = searchTerm; - this.isLiteral = isLiteral; - this.isWholeWord = true; - this.listName = listName; - this.originalTerm = originalTerm; - } - - Keyword(String searchTerm, boolean isLiteral, boolean isWholeWord, String listName, String originalTerm) { - this.searchTerm = searchTerm; - this.isLiteral = isLiteral; - this.isWholeWord = isWholeWord; - this.listName = listName; - this.originalTerm = originalTerm; - } /** * Constructs a representation of a keyword for which to search. The search * term may be either a literal term, to be treated as either a whole word @@ -88,7 +56,37 @@ class Keyword { this.isLiteral = isLiteral; this.isWholeWord = isWholeWord; this.listName = ""; - this.originalTerm = searchTerm; + this.originalTerm = searchTerm; + } + + /** + * Constructs a representation of a keyword for which to search. The search + * term may be either a literal term, to be treated as either a whole word + * or as a substring, or a regex. + * + * NOTE: The addition of keyword list name and original search term was + * added to facilitate proper de-duping of results of periodic keyword + * searches that does not lose any keyword hits. Without this addition when + * using substring search feature during ingest, if there are multiple searches + * on differnt keyword lists that produce the same keyword hit, that hit is + * only going to be displayed in results of one of the list. For example, + * two substring searches, such as "pass" and "enger", will be missing one + * copy of any shared entries (i.e., "passenger" will only show up on one + * list). See JIRA story 2495. + * + * @param searchTerm The search term. + * @param isLiteral Whether or not the search term is a literal term, + * instead of a regex. + * @param isWholeWord Whether or not the search term, if it is a literal + * search term, should be treated as a whole word rather + * than a substring. + */ + Keyword(String searchTerm, boolean isLiteral, boolean isWholeWord, String listName, String originalTerm) { + this.searchTerm = searchTerm; + this.isLiteral = isLiteral; + this.isWholeWord = isWholeWord; + this.listName = listName; + this.originalTerm = originalTerm; } /** @@ -106,7 +104,7 @@ class Keyword { * @param keywordType The artifact attribute type. */ Keyword(String searchTerm, boolean isLiteral, BlackboardAttribute.ATTRIBUTE_TYPE artifactAtrributeType) { - this(searchTerm, isLiteral); + this(searchTerm, isLiteral, true); this.artifactAtrributeType = artifactAtrributeType; } diff --git a/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/LuceneQuery.java b/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/LuceneQuery.java index ce113b2e75..9f8686898f 100644 --- a/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/LuceneQuery.java +++ b/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/LuceneQuery.java @@ -181,7 +181,7 @@ class LuceneQuery implements KeywordSearchQuery { QueryResults results = new QueryResults(this); //in case of single term literal query there is only 1 term - results.addResult(new Keyword(originalKeyword.getSearchTerm(), true, originalKeyword.getListName(), originalKeyword.getOriginalTerm()), matches); + results.addResult(new Keyword(originalKeyword.getSearchTerm(), true, true, originalKeyword.getListName(), originalKeyword.getOriginalTerm()), matches); return results; } diff --git a/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/RegexQuery.java b/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/RegexQuery.java index bb96ae81d5..9834332567 100644 --- a/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/RegexQuery.java +++ b/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/RegexQuery.java @@ -204,7 +204,7 @@ final class RegexQuery implements KeywordSearchQuery { try { List keywordHits = createKeywordHits(resultDoc); for (KeywordHit hit : keywordHits) { - hitsMultiMap.put(new Keyword(hit.getHit(), true, originalKeyword.getListName(), originalKeyword.getOriginalTerm()), hit); + hitsMultiMap.put(new Keyword(hit.getHit(), true, true, originalKeyword.getListName(), originalKeyword.getOriginalTerm()), hit); } } catch (TskException ex) { // diff --git a/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/TermsComponentQuery.java b/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/TermsComponentQuery.java index 43388a3687..f4413e3f2a 100644 --- a/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/TermsComponentQuery.java +++ b/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/TermsComponentQuery.java @@ -306,14 +306,14 @@ final class TermsComponentQuery implements KeywordSearchQuery { * query. */ String escapedTerm = KeywordSearchUtil.escapeLuceneQuery(term.getTerm()); - LuceneQuery termQuery = new LuceneQuery(keywordList, new Keyword(escapedTerm, true)); + LuceneQuery termQuery = new LuceneQuery(keywordList, new Keyword(escapedTerm, true, true)); filters.forEach(termQuery::addFilter); // This appears to be unused QueryResults termQueryResult = termQuery.performQuery(); Set termHits = new HashSet<>(); for (Keyword word : termQueryResult.getKeywords()) { termHits.addAll(termQueryResult.getResults(word)); } - results.addResult(new Keyword(term.getTerm(), false, originalKeyword.getListName(), originalKeyword.getOriginalTerm()), new ArrayList<>(termHits)); + results.addResult(new Keyword(term.getTerm(), false, true, originalKeyword.getListName(), originalKeyword.getOriginalTerm()), new ArrayList<>(termHits)); } return results; } diff --git a/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/XmlKeywordSearchList.java b/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/XmlKeywordSearchList.java index a5c25d1dc7..79843e4d64 100644 --- a/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/XmlKeywordSearchList.java +++ b/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/XmlKeywordSearchList.java @@ -201,7 +201,7 @@ final class XmlKeywordSearchList extends KeywordSearchList { Keyword keyword; String whole = wordEl.getAttribute(KEYWORD_WHOLE_ATTR); if (whole.equals("")) { - keyword = new Keyword(wordEl.getTextContent(), isLiteral); + keyword = new Keyword(wordEl.getTextContent(), isLiteral, true); } else { boolean isWhole = whole.equals("true"); keyword = new Keyword(wordEl.getTextContent(), isLiteral, isWhole); From 828fc487f96b995a59eaeb89e36be9f7f8446183 Mon Sep 17 00:00:00 2001 From: William Schaefer Date: Tue, 11 Apr 2017 13:45:05 -0400 Subject: [PATCH 11/27] 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 12/27] 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 3701ca74f9aa3d1fb8c9b68ea9e5d2a6b17e900d Mon Sep 17 00:00:00 2001 From: Eugene Livis Date: Tue, 11 Apr 2017 15:51:11 -0400 Subject: [PATCH 13/27] Modified Keyword.equals() method to take the new fileds into account --- .../src/org/sleuthkit/autopsy/keywordsearch/Keyword.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/Keyword.java b/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/Keyword.java index 22a2e1ca59..5bc357bfd0 100644 --- a/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/Keyword.java +++ b/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/Keyword.java @@ -193,7 +193,9 @@ class Keyword { Keyword other = (Keyword) obj; return (this.searchTerm.equals(other.getSearchTerm()) && this.isLiteral == other.searchTermIsLiteral() - && this.isWholeWord == other.searchTermIsWholeWord()); + && this.isWholeWord == other.searchTermIsWholeWord() + && this.listName.equals(other.getListName()) + && this.originalTerm.equals(other.getOriginalTerm())); } @Override From d1ffdf43aec5fed138ae5bf19c86072efe1ca7a9 Mon Sep 17 00:00:00 2001 From: Eugene Livis Date: Tue, 11 Apr 2017 16:03:51 -0400 Subject: [PATCH 14/27] Updated documentation --- .../autopsy/keywordsearch/Keyword.java | 35 ++++++++++++------- 1 file changed, 23 insertions(+), 12 deletions(-) diff --git a/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/Keyword.java b/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/Keyword.java index 5bc357bfd0..fdf0d1a889 100644 --- a/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/Keyword.java +++ b/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/Keyword.java @@ -37,6 +37,11 @@ class Keyword { private boolean isWholeWord; private BlackboardAttribute.ATTRIBUTE_TYPE artifactAtrributeType; private final String listName; + /* + * For substring searches, original search term (e.g. "pass" or "enger") can + * be different from the search term (e.g. "passenger") that is found and + * used (e.g. for highlighting purposes). + */ private final String originalTerm; /** @@ -67,19 +72,25 @@ class Keyword { * NOTE: The addition of keyword list name and original search term was * added to facilitate proper de-duping of results of periodic keyword * searches that does not lose any keyword hits. Without this addition when - * using substring search feature during ingest, if there are multiple searches - * on differnt keyword lists that produce the same keyword hit, that hit is - * only going to be displayed in results of one of the list. For example, - * two substring searches, such as "pass" and "enger", will be missing one - * copy of any shared entries (i.e., "passenger" will only show up on one - * list). See JIRA story 2495. + * using substring search feature during ingest, if there are multiple + * searches on differnt keyword lists that produce the same keyword hit, + * that hit is only going to be displayed in results of one of the list. For + * example, two substring searches, such as "pass" and "enger", will be + * missing one copy of any shared entries (i.e., "passenger" will only show + * up on one list). See JIRA story 2495. * - * @param searchTerm The search term. - * @param isLiteral Whether or not the search term is a literal term, - * instead of a regex. - * @param isWholeWord Whether or not the search term, if it is a literal - * search term, should be treated as a whole word rather - * than a substring. + * @param searchTerm The search term. + * @param isLiteral Whether or not the search term is a literal term, + * instead of a regex. + * @param isWholeWord Whether or not the search term, if it is a literal + * search term, should be treated as a whole word rather + * than a substring. + * @param listName Keyword list name. + * @param originalTerm The original search term that was entered into the + * keyword list. For substring searches, original search + * term (e.g. "pass" or "enger") can be different from + * the search term (e.g. "passenger") that is found and + * used (e.g. for highlighting purposes). */ Keyword(String searchTerm, boolean isLiteral, boolean isWholeWord, String listName, String originalTerm) { this.searchTerm = searchTerm; From 9afa7e79ac9f6e869ad92637b1bd3f7ee23960dd Mon Sep 17 00:00:00 2001 From: William Schaefer Date: Tue, 11 Apr 2017 16:11:42 -0400 Subject: [PATCH 15/27] 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 16/27] 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 7e2ac8e126c48ab8064ca671e7f9bbfea9db9660 Mon Sep 17 00:00:00 2001 From: millmanorama Date: Wed, 12 Apr 2017 12:56:04 +0200 Subject: [PATCH 17/27] remove unused methods and dependency on solr 4.9.1 --- .gitignore | 25 ++++++----- Experimental/build.xml | 10 +++-- Experimental/ivy.xml | 6 --- Experimental/nbproject/project.properties | 4 +- Experimental/nbproject/project.xml | 28 ++---------- .../autoingest/AutoIngestManager.java | 45 +------------------ 6 files changed, 25 insertions(+), 93 deletions(-) diff --git a/.gitignore b/.gitignore index 62fc485729..1881802712 100644 --- a/.gitignore +++ b/.gitignore @@ -4,19 +4,25 @@ */nbproject/private/* /nbproject/private/* +/Core/release/ /Core/src/org/sleuthkit/autopsy/coreutils/Version.properties +/Core/src/org/sleuthkit/autopsy/casemodule/docs/QuickStart.html +/Core/src/org/sleuthkit/autopsy/casemodule/docs/screenshot.png +/Core/src/org/sleuthkit/autopsy/datamodel/ranges.csv /Core/build/ /Core/dist/ /Core/nbproject/* !/Core/nbproject/project.xml !/Core/nbproject/project.properties +/CoreLibs/release/ /CoreLibs/build/ /CoreLibs/dist/ /CoreLibs/nbproject/* !/CoreLibs/nbproject/project.xml !/CoreLibs/nbproject/project.properties +/KeywordSearch/release/ /KeywordSearch/build/ /KeywordSearch/dist/ /KeywordSearch/nbproject/* @@ -25,6 +31,7 @@ */genfiles.properties genfiles.properties + /branding/core/core.jar/org/netbeans/core/startup/Bundle.properties /branding/modules/org-netbeans-core-windows.jar/org/netbeans/core/windows/view/ui/Bundle.properties /branding/build/ @@ -32,6 +39,7 @@ genfiles.properties /branding/nbproject/* !/branding/nbproject/project.xml !/branding/nbproject/project.properties + /test/input/* !/test/input/notablehashes.txt-md5.idx !/test/input/notablekeywords.xml @@ -46,6 +54,8 @@ genfiles.properties /test/script/DBDump.txt /test/script/SortedData-Diff.txt /test/script/SortedData.txt +/test/script/myconfig.xml +/test/script/*/*.xml /test/build/ /test/dist/ /test/nbproject/* @@ -59,19 +69,10 @@ genfiles.properties /jdiff-logs/* /gen_version.txt hs_err_pid*.log -Core/src/org/sleuthkit/autopsy/casemodule/docs/QuickStart.html -Core/src/org/sleuthkit/autopsy/casemodule/docs/screenshot.png -Core/src/org/sleuthkit/autopsy/datamodel/ranges.csv -/test/script/myconfig.xml -/test/script/*/*.xml .DS_Store .*.swp +/Experimental/release/ +/ImageGallery/release/ +/thunderbirdparser/release/ - -Core/release/ -CoreLibs/release/ -Experimental/release/ -ImageGallery/release/ -KeywordSearch/release/ -thunderbirdparser/release/ diff --git a/Experimental/build.xml b/Experimental/build.xml index b13b9ca777..0ea23765f0 100644 --- a/Experimental/build.xml +++ b/Experimental/build.xml @@ -6,17 +6,19 @@ Builds, tests, and runs the project org.sleuthkit.autopsy.experimental. - + + - + - + + + - diff --git a/Experimental/ivy.xml b/Experimental/ivy.xml index ebd7bade53..5934399ba3 100644 --- a/Experimental/ivy.xml +++ b/Experimental/ivy.xml @@ -7,16 +7,10 @@ - - - - - - diff --git a/Experimental/nbproject/project.properties b/Experimental/nbproject/project.properties index 49be6268a5..34d831c12a 100644 --- a/Experimental/nbproject/project.properties +++ b/Experimental/nbproject/project.properties @@ -2,11 +2,9 @@ file.reference.c3p0-0.9.5.jar=release/modules/ext/c3p0-0.9.5.jar file.reference.jackson-core-2.7.0.jar=release/modules/ext/jackson-core-2.7.0.jar file.reference.LGoodDatePicker-4.3.1.jar=release/modules/ext/LGoodDatePicker-4.3.1.jar file.reference.mchange-commons-java-0.2.9.jar=release/modules/ext/mchange-commons-java-0.2.9.jar -file.reference.solr-solrj-4.9.1.jar=release/modules/ext/solr-solrj-4.9.1.jar +file.reference.postgresql-9.4-1201-jdbc41.jar=release/modules/ext/postgresql-9.4-1201-jdbc41.jar file.reference.tika-core-1.5.jar=release/modules/ext/tika-core-1.5.jar javac.source=1.8 javac.compilerargs=-Xlint -Xlint:-serial javadoc.reference.LGoodDatePicker-4.3.1.jar=release/modules/ext/LGoodDatePicker-4.3.1-javadoc.jar -javadoc.reference.solr-solrj-4.9.1.jar=release/modules/ext/solr-solrj-4.9.1-javadoc.jar source.reference.LGoodDatePicker-4.3.1.jar=release/modules/ext/LGoodDatePicker-4.3.1-sources.jar -source.reference.solr-solrj-4.9.1.jar=release/modules/ext/solr-solrj-4.9.1-sources.jar diff --git a/Experimental/nbproject/project.xml b/Experimental/nbproject/project.xml index 63cedca0de..714d6e4028 100644 --- a/Experimental/nbproject/project.xml +++ b/Experimental/nbproject/project.xml @@ -119,6 +119,10 @@ org.sleuthkit.autopsy.experimental.autoingest org.sleuthkit.autopsy.experimental.configuration + + ext/postgresql-9.4-1201-jdbc41.jar + release/modules/ext/postgresql-9.4-1201-jdbc41.jar + ext/mchange-commons-java-0.2.9.jar release/modules/ext/mchange-commons-java-0.2.9.jar @@ -139,30 +143,6 @@ ext/c3p0-0.9.5.jar release/modules/ext/c3p0-0.9.5.jar - - ext/solr-solrj-4.9.1.jar - release/modules/ext/solr-solrj-4.9.1.jar - - - ext/httpclient-4.3.1.jar - release/modules/ext/httpclient-4.3.1.jar - - - ext/httpmime-4.3.1.jar - release/modules/ext/httpmime-4.3.1.jar - - - ext/httpcore-4.3.jar - release/modules/ext/httpcore-4.3.jar - - - ext/noggit-0.5.jar - release/modules/ext/noggit-0.5.jar - - - ext/postgresql-9.4-1201-jdbc41.jar - release/modules/ext/postgresql-9.4-1201-jdbc41.jar - diff --git a/Experimental/src/org/sleuthkit/autopsy/experimental/autoingest/AutoIngestManager.java b/Experimental/src/org/sleuthkit/autopsy/experimental/autoingest/AutoIngestManager.java index dd370b0534..f9c4011a62 100644 --- a/Experimental/src/org/sleuthkit/autopsy/experimental/autoingest/AutoIngestManager.java +++ b/Experimental/src/org/sleuthkit/autopsy/experimental/autoingest/AutoIngestManager.java @@ -32,10 +32,7 @@ import java.nio.file.Files; import java.nio.file.Path; import java.nio.file.Paths; import java.nio.file.attribute.BasicFileAttributes; -import java.sql.Connection; -import java.sql.DriverManager; import java.sql.SQLException; -import java.sql.Statement; import java.time.Duration; import java.time.Instant; import java.util.ArrayList; @@ -64,7 +61,6 @@ import java.util.stream.Collectors; import javax.annotation.concurrent.GuardedBy; import javax.annotation.concurrent.Immutable; import javax.annotation.concurrent.ThreadSafe; -import org.apache.solr.client.solrj.impl.HttpSolrServer; import org.openide.util.Lookup; import org.sleuthkit.autopsy.casemodule.Case; import org.sleuthkit.autopsy.casemodule.Case.CaseType; @@ -77,7 +73,6 @@ import org.sleuthkit.autopsy.coordinationservice.CoordinationService.Lock; import org.sleuthkit.autopsy.core.RuntimeProperties; import org.sleuthkit.autopsy.core.ServicesMonitor; import org.sleuthkit.autopsy.core.ServicesMonitor.ServicesMonitorException; -import org.sleuthkit.autopsy.core.UserPreferences; import org.sleuthkit.autopsy.core.UserPreferencesException; import org.sleuthkit.autopsy.corecomponentinterfaces.DataSourceProcessorCallback; import org.sleuthkit.autopsy.corecomponentinterfaces.DataSourceProcessorCallback.DataSourceProcessorResult; @@ -106,7 +101,6 @@ import org.sleuthkit.autopsy.ingest.IngestJobSettings; import org.sleuthkit.autopsy.ingest.IngestJobStartResult; import org.sleuthkit.autopsy.ingest.IngestManager; import org.sleuthkit.autopsy.ingest.IngestModuleError; -import org.sleuthkit.datamodel.CaseDbConnectionInfo; import org.sleuthkit.datamodel.Content; /** @@ -781,44 +775,7 @@ public final class AutoIngestManager extends Observable implements PropertyChang } } - /** - * Tries to unload the Solr core for a case. - * - * @param caseName The case name. - * @param coreName The name of the core to unload. - * - * @throws Exception if there is a problem unloading the core or it has - * already been unloaded (e.g., by the server due to - * resource constraints), or there is a problem deleting - * files associated with the core - */ - private void unloadSolrCore(String coreName) throws Exception { - /* - * Send a core unload request to the Solr server, with the parameters - * that request deleting the index and the instance directory - * (deleteInstanceDir removes everything related to the core, the index - * directory, the configuration files, etc.) set to true. - */ - String url = "http://" + UserPreferences.getIndexingServerHost() + ":" + UserPreferences.getIndexingServerPort() + "/solr"; - HttpSolrServer solrServer = new HttpSolrServer(url); - org.apache.solr.client.solrj.request.CoreAdminRequest.unloadCore(coreName, true, true, solrServer); - } - - /** - * Tries to delete the case database for a case. - * - * @param caseFolderPath The case name. - * @param caseDatbaseName The case database name. - */ - private void deleteCaseDatabase(String caseDatbaseName) throws UserPreferencesException, ClassNotFoundException, SQLException { - CaseDbConnectionInfo db = UserPreferences.getDatabaseConnectionInfo(); - Class.forName("org.postgresql.Driver"); //NON-NLS - try (Connection connection = DriverManager.getConnection("jdbc:postgresql://" + db.getHost() + ":" + db.getPort() + "/postgres", db.getUserName(), db.getPassword()); //NON-NLS - Statement statement = connection.createStatement();) { - String deleteCommand = "DROP DATABASE \"" + caseDatbaseName + "\""; //NON-NLS - statement.execute(deleteCommand); - } - } + /** * Removes a set of auto ingest jobs from a collection of jobs. From 7398d6ab3eca5369cab351a4266dd562607219e8 Mon Sep 17 00:00:00 2001 From: millmanorama Date: Wed, 12 Apr 2017 17:00:58 +0200 Subject: [PATCH 18/27] disable ImageGallery button on case closed --- .../org/sleuthkit/autopsy/imagegallery/actions/OpenAction.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ImageGallery/src/org/sleuthkit/autopsy/imagegallery/actions/OpenAction.java b/ImageGallery/src/org/sleuthkit/autopsy/imagegallery/actions/OpenAction.java index 1b182d0900..68fec22b82 100755 --- a/ImageGallery/src/org/sleuthkit/autopsy/imagegallery/actions/OpenAction.java +++ b/ImageGallery/src/org/sleuthkit/autopsy/imagegallery/actions/OpenAction.java @@ -64,7 +64,7 @@ public final class OpenAction extends CallableSystemAction implements Presenter. toolbarButton.addActionListener(actionEvent -> performAction()); pcl = (PropertyChangeEvent evt) -> { if (evt.getPropertyName().equals(Case.Events.CURRENT_CASE.toString())) { - setEnabled(Case.isCaseOpen()); + setEnabled(evt.getNewValue() != null); } }; Case.addPropertyChangeListener(pcl); From 06bb7e42c40be8f4441b9e0e9beb3f920806d3b2 Mon Sep 17 00:00:00 2001 From: millmanorama Date: Wed, 12 Apr 2017 17:08:53 +0200 Subject: [PATCH 19/27] cleanup up OpenAction.java --- .../autopsy/imagegallery/actions/OpenAction.java | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/ImageGallery/src/org/sleuthkit/autopsy/imagegallery/actions/OpenAction.java b/ImageGallery/src/org/sleuthkit/autopsy/imagegallery/actions/OpenAction.java index 1b182d0900..206866fc94 100755 --- a/ImageGallery/src/org/sleuthkit/autopsy/imagegallery/actions/OpenAction.java +++ b/ImageGallery/src/org/sleuthkit/autopsy/imagegallery/actions/OpenAction.java @@ -1,7 +1,7 @@ /* * Autopsy Forensic Browser * -* Copyright 2013 Basis Technology Corp. +* Copyright 2011-17 Basis Technology Corp. * Contact: carrier sleuthkit org * * Licensed under the Apache License, Version 2.0 (the "License"); @@ -53,10 +53,10 @@ import org.sleuthkit.autopsy.imagegallery.ImageGalleryTopComponent; "OpenAction.stale.confDlg.title=Image Gallery"}) public final class OpenAction extends CallableSystemAction implements Presenter.Toolbar { - private static final String VIEW_IMAGES_VIDEOS = Bundle.CTL_OpenAction(); - private static final boolean fxInited = Installer.isJavaFxInited(); private static final Logger LOGGER = Logger.getLogger(OpenAction.class.getName()); - private JButton toolbarButton = new JButton(); + private static final String VIEW_IMAGES_VIDEOS = Bundle.CTL_OpenAction(); + + private final JButton toolbarButton = new JButton(); private final PropertyChangeListener pcl; public OpenAction() { @@ -73,7 +73,7 @@ public final class OpenAction extends CallableSystemAction implements Presenter. @Override public boolean isEnabled() { - return Case.isCaseOpen() && fxInited && Case.getCurrentCase().hasData(); + return Case.isCaseOpen() && Installer.isJavaFxInited() && Case.getCurrentCase().hasData(); } /** Returns the toolbar component of this action From ff55fd74121430dae2317b65caee1f083fb8733e Mon Sep 17 00:00:00 2001 From: William Schaefer Date: Wed, 12 Apr 2017 12:23:49 -0400 Subject: [PATCH 20/27] 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 21/27] 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 22/27] 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 ed5831795ed393af977cf8687db03fe51e2741c8 Mon Sep 17 00:00:00 2001 From: Eugene Livis Date: Wed, 12 Apr 2017 13:53:44 -0400 Subject: [PATCH 23/27] Fixed typo --- .../src/org/sleuthkit/autopsy/keywordsearch/Keyword.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/Keyword.java b/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/Keyword.java index fdf0d1a889..2033dfbdb7 100644 --- a/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/Keyword.java +++ b/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/Keyword.java @@ -73,7 +73,7 @@ class Keyword { * added to facilitate proper de-duping of results of periodic keyword * searches that does not lose any keyword hits. Without this addition when * using substring search feature during ingest, if there are multiple - * searches on differnt keyword lists that produce the same keyword hit, + * searches on different keyword lists that produce the same keyword hit, * that hit is only going to be displayed in results of one of the list. For * example, two substring searches, such as "pass" and "enger", will be * missing one copy of any shared entries (i.e., "passenger" will only show From 5bad83da006d65673e5c3065d6bf6035cb836540 Mon Sep 17 00:00:00 2001 From: William Schaefer Date: Thu, 13 Apr 2017 11:17:13 -0400 Subject: [PATCH 24/27] 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 25/27] 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 26/27] 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 27/27] 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) {