diff --git a/Core/nbproject/project.properties b/Core/nbproject/project.properties
index b6931ff315..905e6dac13 100755
--- a/Core/nbproject/project.properties
+++ b/Core/nbproject/project.properties
@@ -7,6 +7,7 @@ file.reference.jdom-2.0.5-contrib.jar=release/modules/ext/jdom-2.0.5-contrib.jar
file.reference.jdom-2.0.5.jar=release/modules/ext/jdom-2.0.5.jar
file.reference.jsoup-1.10.3.jar=release/modules/ext/jsoup-1.10.3.jar
file.reference.jython-standalone-2.7.0.jar=release/modules/ext/jython-standalone-2.7.0.jar
+file.reference.LGoodDatePicker-10.3.1.jar=release/modules/ext/LGoodDatePicker-10.3.1.jar
file.reference.mchange-commons-java-0.2.9.jar=release/modules/ext/mchange-commons-java-0.2.9.jar
file.reference.metadata-extractor-2.9.1.jar=release/modules/ext/metadata-extractor-2.9.1.jar
file.reference.postgresql-9.4.1211.jre7.jar=release/modules/ext/postgresql-9.4.1211.jre7.jar
@@ -26,10 +27,12 @@ file.reference.curator-recipes-2.8.0.jar=release/modules/ext/curator-recipes-2.8
file.reference.zookeeper-3.4.6.jar=release/modules/ext/zookeeper-3.4.6.jar
javac.source=1.8
javac.compilerargs=-Xlint -Xlint:-serial
+javadoc.reference.LGoodDatePicker-10.3.1.jar=release/modules/ext/LGoodDatePicker-10.3.1-javadoc.jar
license.file=../LICENSE-2.0.txt
nbm.homepage=http://www.sleuthkit.org/
nbm.module.author=Brian Carrier
nbm.needs.restart=true
source.reference.curator-recipes-2.8.0.jar=release/modules/ext/curator-recipes-2.8.0-sources.jar
+source.reference.LGoodDatePicker-10.3.1.jar=release/modules/ext/LGoodDatePicker-10.3.1-sources.jar
spec.version.base=10.9
diff --git a/Core/nbproject/project.xml b/Core/nbproject/project.xml
index c4fea0885c..896926f17f 100755
--- a/Core/nbproject/project.xml
+++ b/Core/nbproject/project.xml
@@ -336,6 +336,10 @@
ext/tika-core-1.14.jar
release/modules/ext/tika-core-1.14.jar
+
+ ext/LGoodDatePicker-10.3.1.jar
+ release/modules/ext/LGoodDatePicker-10.3.1.jar
+
ext/Tsk_DataModel_PostgreSQL.jar
release/modules/ext/Tsk_DataModel_PostgreSQL.jar
diff --git a/Core/src/org/sleuthkit/autopsy/centralrepository/contentviewer/DataContentViewerOtherCases.java b/Core/src/org/sleuthkit/autopsy/centralrepository/contentviewer/DataContentViewerOtherCases.java
index fbc955ca72..ad642a9cbc 100755
--- a/Core/src/org/sleuthkit/autopsy/centralrepository/contentviewer/DataContentViewerOtherCases.java
+++ b/Core/src/org/sleuthkit/autopsy/centralrepository/contentviewer/DataContentViewerOtherCases.java
@@ -433,36 +433,6 @@ public class DataContentViewerOtherCases extends javax.swing.JPanel implements D
return Collections.emptyList();
}
- /**
- * Get the global file instances matching the given eamArtifact and convert
- * them to central repository artifact instances.
- *
- * @param eamArtifact Artifact to use for ArtifactTypeEnum matching
- *
- * @return List of central repository artifact instances, empty list if none
- * found
- */
- public Collection getReferenceInstancesAsArtifactInstances(CorrelationAttribute eamArtifact) {
- Collection eamArtifactInstances = new ArrayList<>();
- // FUTURE: support other reference types
- if (eamArtifact.getCorrelationType().getId() != CorrelationAttribute.FILES_TYPE_ID) {
- return Collections.emptyList();
- }
- try {
- EamDb dbManager = EamDb.getInstance();
- Collection eamGlobalFileInstances = dbManager.getReferenceInstancesByTypeValue(eamArtifact.getCorrelationType(), eamArtifact.getCorrelationValue());
- eamGlobalFileInstances.forEach((eamGlobalFileInstance) -> {
- eamArtifactInstances.add(new CorrelationAttributeInstance(
- null, null, "", eamGlobalFileInstance.getComment(), eamGlobalFileInstance.getKnownStatus(), CorrelationAttributeInstance.GlobalStatus.GLOBAL
- ));
- });
- return eamArtifactInstances;
- } catch (EamDbException ex) {
- LOGGER.log(Level.SEVERE, "Error getting reference instances from database.", ex); // NON-NLS
- }
- return Collections.emptyList();
- }
-
@Override
public boolean isSupported(Node node) {
if (!EamDb.isEnabled()) {
@@ -517,7 +487,6 @@ public class DataContentViewerOtherCases extends javax.swing.JPanel implements D
// get correlation and reference set instances from DB
corAttrInstances.addAll(getCorrelatedInstances(corAttr, dataSourceName, deviceId));
- corAttrInstances.addAll(getReferenceInstancesAsArtifactInstances(corAttr));
corAttrInstances.forEach((corAttrInstance) -> {
CorrelationAttribute newCeArtifact = new CorrelationAttribute(
diff --git a/Core/src/org/sleuthkit/autopsy/centralrepository/contentviewer/DataContentViewerOtherCasesTableModel.java b/Core/src/org/sleuthkit/autopsy/centralrepository/contentviewer/DataContentViewerOtherCasesTableModel.java
index 58395b7ad5..61bcd68211 100755
--- a/Core/src/org/sleuthkit/autopsy/centralrepository/contentviewer/DataContentViewerOtherCasesTableModel.java
+++ b/Core/src/org/sleuthkit/autopsy/centralrepository/contentviewer/DataContentViewerOtherCasesTableModel.java
@@ -36,8 +36,7 @@ public class DataContentViewerOtherCasesTableModel extends AbstractTableModel {
"DataContentViewerOtherCasesTableModel.path=Path",
"DataContentViewerOtherCasesTableModel.type=Correlation Type",
"DataContentViewerOtherCasesTableModel.value=Correlation Value",
- "DataContentViewerOtherCasesTableModel.scope=Scope",
- "DataContentViewerOtherCasesTableModel.known=Known",
+ "DataContentViewerOtherCasesTableModel.known=Tagged",
"DataContentViewerOtherCasesTableModel.comment=Comment",
"DataContentViewerOtherCasesTableModel.noData=No Data.",})
enum TableColumns {
@@ -48,7 +47,6 @@ public class DataContentViewerOtherCasesTableModel extends AbstractTableModel {
TYPE(Bundle.DataContentViewerOtherCasesTableModel_type(), 100),
VALUE(Bundle.DataContentViewerOtherCasesTableModel_value(), 200),
KNOWN(Bundle.DataContentViewerOtherCasesTableModel_known(), 50),
- SCOPE(Bundle.DataContentViewerOtherCasesTableModel_scope(), 50),
FILE_PATH(Bundle.DataContentViewerOtherCasesTableModel_path(), 450),
COMMENT(Bundle.DataContentViewerOtherCasesTableModel_comment(), 200),
DEVICE(Bundle.DataContentViewerOtherCasesTableModel_device(), 250);
@@ -156,9 +154,6 @@ public class DataContentViewerOtherCasesTableModel extends AbstractTableModel {
case VALUE:
value = eamArtifact.getCorrelationValue();
break;
- case SCOPE:
- value = eamArtifactInstance.getGlobalStatus().toString();
- break;
case KNOWN:
value = eamArtifactInstance.getKnownStatus().getName();
break;
diff --git a/Core/src/org/sleuthkit/autopsy/centralrepository/datamodel/AbstractSqlEamDb.java b/Core/src/org/sleuthkit/autopsy/centralrepository/datamodel/AbstractSqlEamDb.java
index 8eda401abe..6930dda326 100644
--- a/Core/src/org/sleuthkit/autopsy/centralrepository/datamodel/AbstractSqlEamDb.java
+++ b/Core/src/org/sleuthkit/autopsy/centralrepository/datamodel/AbstractSqlEamDb.java
@@ -1001,12 +1001,14 @@ public abstract class AbstractSqlEamDb implements EamDb {
}
/**
- * Sets an eamArtifact instance to the given knownStatus. If eamArtifact
+ * Sets an eamArtifact instance to the given knownStatus.
+ * knownStatus should be BAD if the file has been tagged with a notable tag and
+ * UNKNOWN otherwise. If eamArtifact
* exists, it is updated. If eamArtifact does not exist it is added with the
* given status.
*
* @param eamArtifact Artifact containing exactly one (1) ArtifactInstance.
- * @param knownStatus The status to change the artifact to
+ * @param knownStatus The status to change the artifact to. Should never be KNOWN
*/
@Override
public void setArtifactInstanceKnownStatus(CorrelationAttribute eamArtifact, TskData.FileKnown knownStatus) throws EamDbException {
@@ -2170,8 +2172,7 @@ public abstract class AbstractSqlEamDb implements EamDb {
new CorrelationDataSource(-1, resultSet.getInt("case_id"), resultSet.getString("device_id"), resultSet.getString("name")),
resultSet.getString("file_path"),
resultSet.getString("comment"),
- TskData.FileKnown.valueOf(resultSet.getByte("known_status")),
- CorrelationAttributeInstance.GlobalStatus.LOCAL
+ TskData.FileKnown.valueOf(resultSet.getByte("known_status"))
);
return eamArtifactInstance;
diff --git a/Core/src/org/sleuthkit/autopsy/centralrepository/datamodel/CorrelationAttributeInstance.java b/Core/src/org/sleuthkit/autopsy/centralrepository/datamodel/CorrelationAttributeInstance.java
index 7db48d28db..f75364c580 100755
--- a/Core/src/org/sleuthkit/autopsy/centralrepository/datamodel/CorrelationAttributeInstance.java
+++ b/Core/src/org/sleuthkit/autopsy/centralrepository/datamodel/CorrelationAttributeInstance.java
@@ -28,29 +28,12 @@ import org.sleuthkit.datamodel.TskData;
* CorrelationAttribute. Includes its data source, path, etc.
*
*/
-@Messages({"EamArtifactInstances.globalStatus.local=Local",
- "EamArtifactInstances.globalStatus.global=Global",
+@Messages({
"EamArtifactInstances.knownStatus.bad=Bad",
"EamArtifactInstances.knownStatus.known=Known",
"EamArtifactInstances.knownStatus.unknown=Unknown"})
public class CorrelationAttributeInstance implements Serializable {
- public enum GlobalStatus {
- LOCAL(Bundle.EamArtifactInstances_globalStatus_local()),
- GLOBAL(Bundle.EamArtifactInstances_globalStatus_global());
-
- private final String globalStatus;
-
- private GlobalStatus(String globalStatus) {
- this.globalStatus = globalStatus;
- }
-
- @Override
- public String toString() {
- return globalStatus;
- }
- }
-
private static final long serialVersionUID = 1L;
private int ID;
@@ -59,13 +42,12 @@ public class CorrelationAttributeInstance implements Serializable {
private String filePath;
private String comment;
private TskData.FileKnown knownStatus;
- private GlobalStatus globalStatus;
public CorrelationAttributeInstance(
CorrelationCase eamCase,
CorrelationDataSource eamDataSource
) {
- this(-1, eamCase, eamDataSource, "", null, TskData.FileKnown.UNKNOWN, GlobalStatus.LOCAL);
+ this(-1, eamCase, eamDataSource, "", null, TskData.FileKnown.UNKNOWN);
}
public CorrelationAttributeInstance(
@@ -73,7 +55,7 @@ public class CorrelationAttributeInstance implements Serializable {
CorrelationDataSource eamDataSource,
String filePath
) {
- this(-1, eamCase, eamDataSource, filePath, null, TskData.FileKnown.UNKNOWN, GlobalStatus.LOCAL);
+ this(-1, eamCase, eamDataSource, filePath, null, TskData.FileKnown.UNKNOWN);
}
public CorrelationAttributeInstance(
@@ -82,7 +64,7 @@ public class CorrelationAttributeInstance implements Serializable {
String filePath,
String comment
) {
- this(-1, eamCase, eamDataSource, filePath, comment, TskData.FileKnown.UNKNOWN, GlobalStatus.LOCAL);
+ this(-1, eamCase, eamDataSource, filePath, comment, TskData.FileKnown.UNKNOWN);
}
public CorrelationAttributeInstance(
@@ -90,20 +72,18 @@ public class CorrelationAttributeInstance implements Serializable {
CorrelationDataSource eamDataSource,
String filePath,
String comment,
- TskData.FileKnown knownStatus,
- GlobalStatus globalStatus
+ TskData.FileKnown knownStatus
) {
- this(-1, eamCase, eamDataSource, filePath, comment, knownStatus, globalStatus);
+ this(-1, eamCase, eamDataSource, filePath, comment, knownStatus);
}
- public CorrelationAttributeInstance(
+ CorrelationAttributeInstance(
int ID,
CorrelationCase eamCase,
CorrelationDataSource eamDataSource,
String filePath,
String comment,
- TskData.FileKnown knownStatus,
- GlobalStatus globalStatus
+ TskData.FileKnown knownStatus
) {
this.ID = ID;
this.correlationCase = eamCase;
@@ -112,7 +92,6 @@ public class CorrelationAttributeInstance implements Serializable {
this.filePath = filePath.toLowerCase();
this.comment = comment;
this.knownStatus = knownStatus;
- this.globalStatus = globalStatus;
}
public Boolean equals(CorrelationAttributeInstance otherInstance) {
@@ -120,7 +99,6 @@ public class CorrelationAttributeInstance implements Serializable {
&& (this.getCorrelationCase().equals(otherInstance.getCorrelationCase()))
&& (this.getCorrelationDataSource().equals(otherInstance.getCorrelationDataSource()))
&& (this.getFilePath().equals(otherInstance.getFilePath()))
- && (this.getGlobalStatus().equals(otherInstance.getGlobalStatus()))
&& (this.getKnownStatus().equals(otherInstance.getKnownStatus()))
&& (this.getComment().equals(otherInstance.getComment())));
}
@@ -131,7 +109,6 @@ public class CorrelationAttributeInstance implements Serializable {
+ this.getCorrelationCase().getCaseUUID()
+ this.getCorrelationDataSource().getName()
+ this.getFilePath()
- + this.getGlobalStatus()
+ this.getKnownStatus()
+ this.getComment();
}
@@ -179,31 +156,22 @@ public class CorrelationAttributeInstance implements Serializable {
}
/**
- * @return the knownStatus
+ * Get this knownStatus. This only indicates whether an item has been
+ * tagged as notable and should never return KNOWN.
+ *
+ * @return BAD if the item has been tagged as notable, UNKNOWN otherwise
*/
public TskData.FileKnown getKnownStatus() {
return knownStatus;
}
/**
- * @param knownStatus the knownStatus to set
+ * Set the knownStatus. This only indicates whether an item has been
+ * tagged as notable and should never be set to KNOWN.
+ *
+ * @param knownStatus Should be BAD if the item is tagged as notable, UNKNOWN otherwise
*/
public void setKnownStatus(TskData.FileKnown knownStatus) {
this.knownStatus = knownStatus;
}
-
- /**
- * @return the globalStatus
- */
- public GlobalStatus getGlobalStatus() {
- return globalStatus;
- }
-
- /**
- * @param globalStatus the globalStatus to set
- */
- public void setGlobalStatus(GlobalStatus globalStatus) {
- this.globalStatus = globalStatus;
- }
-
}
diff --git a/Core/src/org/sleuthkit/autopsy/centralrepository/datamodel/EamArtifactUtil.java b/Core/src/org/sleuthkit/autopsy/centralrepository/datamodel/EamArtifactUtil.java
index c2bb0e0016..171444fa42 100755
--- a/Core/src/org/sleuthkit/autopsy/centralrepository/datamodel/EamArtifactUtil.java
+++ b/Core/src/org/sleuthkit/autopsy/centralrepository/datamodel/EamArtifactUtil.java
@@ -28,6 +28,7 @@ import org.sleuthkit.datamodel.AbstractFile;
import org.sleuthkit.datamodel.BlackboardArtifact;
import org.sleuthkit.datamodel.BlackboardAttribute;
import org.sleuthkit.datamodel.Content;
+import org.sleuthkit.datamodel.HashUtility;
import org.sleuthkit.datamodel.TskCoreException;
import org.sleuthkit.datamodel.TskData;
@@ -105,8 +106,7 @@ public class EamArtifactUtil {
CorrelationDataSource.fromTSKDataSource(correlationCase, bbSourceFile.getDataSource()),
bbSourceFile.getParentPath() + bbSourceFile.getName(),
"",
- TskData.FileKnown.UNKNOWN,
- CorrelationAttributeInstance.GlobalStatus.LOCAL
+ TskData.FileKnown.UNKNOWN
);
// add the instance details
@@ -227,7 +227,7 @@ public class EamArtifactUtil {
*
* @return The new EamArtifact or null if creation failed
*/
- public static CorrelationAttribute getEamArtifactFromContent(Content content, TskData.FileKnown knownStatus, String comment) {
+ public static CorrelationAttribute getCorrelationAttributeFromContent(Content content, TskData.FileKnown knownStatus, String comment) {
if (!(content instanceof AbstractFile)) {
return null;
@@ -241,7 +241,7 @@ public class EamArtifactUtil {
// We need a hash to make the artifact
String md5 = af.getMd5Hash();
- if (md5 == null || md5.isEmpty()) {
+ if (md5 == null || md5.isEmpty() || HashUtility.isNoDataMd5(md5)) {
return null;
}
@@ -258,8 +258,7 @@ public class EamArtifactUtil {
CorrelationDataSource.fromTSKDataSource(correlationCase, af.getDataSource()),
af.getParentPath() + af.getName(),
comment,
- TskData.FileKnown.BAD,
- CorrelationAttributeInstance.GlobalStatus.LOCAL
+ knownStatus
);
eamArtifact.addInstance(cei);
return eamArtifact;
diff --git a/Core/src/org/sleuthkit/autopsy/centralrepository/datamodel/SqliteEamDb.java b/Core/src/org/sleuthkit/autopsy/centralrepository/datamodel/SqliteEamDb.java
index 55e60dd380..0ed78b3631 100644
--- a/Core/src/org/sleuthkit/autopsy/centralrepository/datamodel/SqliteEamDb.java
+++ b/Core/src/org/sleuthkit/autopsy/centralrepository/datamodel/SqliteEamDb.java
@@ -550,11 +550,14 @@ public class SqliteEamDb extends AbstractSqlEamDb {
}
/**
- * Sets an eamArtifact instance as the given knownStatus. If eamArtifact
- * exists, it is updated. If eamArtifact does not exist nothing happens
+ * Sets an eamArtifact instance to the given knownStatus.
+ * knownStatus should be BAD if the file has been tagged with a notable tag and
+ * UNKNOWN otherwise. If eamArtifact
+ * exists, it is updated. If eamArtifact does not exist it is added with the
+ * given status.
*
* @param eamArtifact Artifact containing exactly one (1) ArtifactInstance.
- * @param knownStatus The known status of the artifact
+ * @param knownStatus The status to change the artifact to. Should never be KNOWN
*/
@Override
public void setArtifactInstanceKnownStatus(CorrelationAttribute eamArtifact, TskData.FileKnown knownStatus) throws EamDbException {
diff --git a/Core/src/org/sleuthkit/autopsy/centralrepository/eventlisteners/CaseEventListener.java b/Core/src/org/sleuthkit/autopsy/centralrepository/eventlisteners/CaseEventListener.java
index 88cf1ed59e..b053d9df17 100644
--- a/Core/src/org/sleuthkit/autopsy/centralrepository/eventlisteners/CaseEventListener.java
+++ b/Core/src/org/sleuthkit/autopsy/centralrepository/eventlisteners/CaseEventListener.java
@@ -191,7 +191,7 @@ final class CaseEventListener implements PropertyChangeListener {
}
}
- final CorrelationAttribute eamArtifact = EamArtifactUtil.getEamArtifactFromContent(af,
+ final CorrelationAttribute eamArtifact = EamArtifactUtil.getCorrelationAttributeFromContent(af,
knownStatus, comment);
if (eamArtifact != null) {
@@ -394,7 +394,7 @@ final class CaseEventListener implements PropertyChangeListener {
}
//if the file will have no tags with a status which would prevent the current status from being changed
if (!hasTagWithConflictingKnownStatus) {
- final CorrelationAttribute eamArtifact = EamArtifactUtil.getEamArtifactFromContent(contentTag.getContent(),
+ final CorrelationAttribute eamArtifact = EamArtifactUtil.getCorrelationAttributeFromContent(contentTag.getContent(),
tagName.getKnownStatus(), "");
if (eamArtifact != null) {
EamDb.getInstance().setArtifactInstanceKnownStatus(eamArtifact, tagName.getKnownStatus());
diff --git a/Core/src/org/sleuthkit/autopsy/centralrepository/ingestmodule/IngestModule.java b/Core/src/org/sleuthkit/autopsy/centralrepository/ingestmodule/IngestModule.java
index 5e933453dc..09f3c63449 100644
--- a/Core/src/org/sleuthkit/autopsy/centralrepository/ingestmodule/IngestModule.java
+++ b/Core/src/org/sleuthkit/autopsy/centralrepository/ingestmodule/IngestModule.java
@@ -104,22 +104,21 @@ class IngestModule implements FileIngestModule {
return ProcessResult.OK;
}
- // If unknown to both the hash module and as a globally known artifact in the EAM DB, correlate to other cases
- if (af.getKnown() == TskData.FileKnown.UNKNOWN) {
- // query db for artifact instances having this MD5 and knownStatus = "Bad".
+ /* Search the central repo to see if this file was previously
+ * marked as being bad. Create artifact if it was. */
+ if (af.getKnown() != TskData.FileKnown.KNOWN) {
try {
- // if af.getKnown() is "UNKNOWN" and this artifact instance was marked bad in a previous case,
- // create TSK_INTERESTING_FILE artifact on BB.
List caseDisplayNames = dbManager.getListCasesHavingArtifactInstancesKnownBad(filesType, md5);
if (!caseDisplayNames.isEmpty()) {
postCorrelatedBadFileToBlackboard(af, caseDisplayNames);
}
} catch (EamDbException ex) {
- LOGGER.log(Level.SEVERE, "Error counting notable artifacts.", ex); // NON-NLS
+ LOGGER.log(Level.SEVERE, "Error searching database for artifact.", ex); // NON-NLS
return ProcessResult.ERROR;
}
}
+ // insert this file into the central repository
try {
CorrelationAttribute eamArtifact = new CorrelationAttribute(filesType, md5);
CorrelationAttributeInstance cefi = new CorrelationAttributeInstance(
@@ -127,8 +126,7 @@ class IngestModule implements FileIngestModule {
eamDataSource,
af.getParentPath() + af.getName(),
null,
- TskData.FileKnown.UNKNOWN,
- CorrelationAttributeInstance.GlobalStatus.LOCAL
+ TskData.FileKnown.UNKNOWN // NOTE: Known status in the CR is based on tagging, not hashes like the Case Database.
);
eamArtifact.addInstance(cefi);
dbManager.prepareBulkArtifact(eamArtifact);
diff --git a/Core/src/org/sleuthkit/autopsy/filesearch/Bundle.properties b/Core/src/org/sleuthkit/autopsy/filesearch/Bundle.properties
index bb91c8e05c..6d83acae14 100755
--- a/Core/src/org/sleuthkit/autopsy/filesearch/Bundle.properties
+++ b/Core/src/org/sleuthkit/autopsy/filesearch/Bundle.properties
@@ -12,11 +12,7 @@ DateSearchPanel.createdCheckBox.text=Created
DateSearchPanel.accessedCheckBox.text=Accessed
DateSearchPanel.changedCheckBox.text=Changed
DateSearchPanel.modifiedCheckBox.text=Modified
-DateSearchPanel.dateToButtonCalendar.text=
-DateSearchPanel.dateToTextField.text=
DateSearchPanel.jLabel1.text=to
-DateSearchPanel.dateFromTextField.text=
-DateSearchPanel.dateFromButtonCalendar.text=
NameSearchPanel.nameCheckBox.text=Name:
NameSearchPanel.noteNameLabel.text=*Note: Name match is case insensitive and matches any part of the file name. Regular expressions are not currently supported.
NameSearchPanel.searchTextField.text=
diff --git a/Core/src/org/sleuthkit/autopsy/filesearch/DateSearchFilter.java b/Core/src/org/sleuthkit/autopsy/filesearch/DateSearchFilter.java
index 3291c5ae42..64666e66d9 100755
--- a/Core/src/org/sleuthkit/autopsy/filesearch/DateSearchFilter.java
+++ b/Core/src/org/sleuthkit/autopsy/filesearch/DateSearchFilter.java
@@ -82,7 +82,7 @@ class DateSearchFilter extends AbstractFileSearchFilter {
// convert the date from the selected timezone to get the GMT
long fromDate = 0;
- String startDateValue = panel.getDateFromTextField().getText();
+ String startDateValue = panel.getFromDate();
Calendar startDate = getCalendarDate(startDateValue);
if (!startDateValue.isEmpty()) {
if (startDate != null) {
@@ -91,7 +91,7 @@ class DateSearchFilter extends AbstractFileSearchFilter {
}
long toDate = 0;
- String endDateValue = panel.getDateToTextField().getText();
+ String endDateValue = panel.getToDate();
Calendar endDate = getCalendarDate(endDateValue);
if (!endDateValue.isEmpty()) {
if (endDate != null) {
@@ -199,7 +199,7 @@ class DateSearchFilter extends AbstractFileSearchFilter {
@Override
public void addActionListener(ActionListener l) {
- getComponent().addActionListener(l);
+ getComponent().addDateChangeListener();
}
@Override
@@ -210,8 +210,8 @@ class DateSearchFilter extends AbstractFileSearchFilter {
public boolean isValid() {
DateSearchPanel panel = this.getComponent();
- Calendar startDate = getCalendarDate(panel.getDateFromTextField().getText());
- Calendar endDate = getCalendarDate(panel.getDateToTextField().getText());
+ Calendar startDate = getCalendarDate(panel.getFromDate());
+ Calendar endDate = getCalendarDate(panel.getToDate());
if ((startDate != null && startDate.after(endDate)) || (endDate != null && endDate.before(startDate))) {
setLastError(Bundle.DateSearchFilter_errorMessage_endDateBeforeStartDate());
diff --git a/Core/src/org/sleuthkit/autopsy/filesearch/DateSearchPanel.form b/Core/src/org/sleuthkit/autopsy/filesearch/DateSearchPanel.form
index 59082745da..0d2d2b3d19 100755
--- a/Core/src/org/sleuthkit/autopsy/filesearch/DateSearchPanel.form
+++ b/Core/src/org/sleuthkit/autopsy/filesearch/DateSearchPanel.form
@@ -55,28 +55,11 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
@@ -98,27 +81,31 @@
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
+
+
-
-
-
-
-
-
-
-
+
+
+
+
+
@@ -147,20 +134,6 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
@@ -199,36 +172,22 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
@@ -275,25 +234,23 @@
-
-
-
-
-
-
+
-
+
+
+
+
+
-
-
-
-
-
-
+
-
+
+
+
+
+
diff --git a/Core/src/org/sleuthkit/autopsy/filesearch/DateSearchPanel.java b/Core/src/org/sleuthkit/autopsy/filesearch/DateSearchPanel.java
index b9f490041b..1c38b7e35b 100755
--- a/Core/src/org/sleuthkit/autopsy/filesearch/DateSearchPanel.java
+++ b/Core/src/org/sleuthkit/autopsy/filesearch/DateSearchPanel.java
@@ -1,7 +1,7 @@
/*
* Autopsy Forensic Browser
*
- * Copyright 2011 Basis Technology Corp.
+ * Copyright 2011-2017 Basis Technology Corp.
* Contact: carrier sleuthkit org
*
* Licensed under the Apache License, Version 2.0 (the "License");
@@ -21,22 +21,28 @@ package org.sleuthkit.autopsy.filesearch;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.text.DateFormat;
-import java.text.ParseException;
-import java.util.Date;
import java.util.List;
import javax.swing.JCheckBox;
import javax.swing.JComboBox;
import javax.swing.JFormattedTextField;
import javax.swing.JMenuItem;
import javax.swing.JPopupMenu;
-import javax.swing.event.DocumentEvent;
-import javax.swing.event.DocumentListener;
+import com.github.lgooddatepicker.components.DatePicker;
+import com.github.lgooddatepicker.optionalusertools.PickerUtilities;
+import com.github.lgooddatepicker.components.DatePickerSettings;
+import com.github.lgooddatepicker.optionalusertools.DateChangeListener;
+import com.github.lgooddatepicker.zinternaltools.DateChangeEvent;
+import java.text.ParseException;
+import java.time.Instant;
+import java.util.Date;
/**
* Subpanel with controls for file data filtering.
*/
class DateSearchPanel extends javax.swing.JPanel {
+ private final DatePickerSettings fromDateSettings = new DatePickerSettings();
+ private final DatePickerSettings toDateSettings = new DatePickerSettings();
DateFormat dateFormat;
List timeZones;
@@ -49,10 +55,11 @@ class DateSearchPanel extends javax.swing.JPanel {
}
private void customizeComponents() {
-
- dateFromTextField.setComponentPopupMenu(rightClickMenu);
- dateToTextField.setComponentPopupMenu(rightClickMenu);
-
+ fromDateSettings.setFormatForDatesCommonEra(PickerUtilities.createFormatterFromPatternString("MM/dd/yyyy", fromDateSettings.getLocale()));
+ toDateSettings.setFormatForDatesCommonEra(PickerUtilities.createFormatterFromPatternString("MM/dd/yyyy", toDateSettings.getLocale()));
+ fromDateSettings.setAllowKeyboardEditing(false);
+ toDateSettings.setAllowKeyboardEditing(false);
+
ActionListener actList = new ActionListener() {
@Override
public void actionPerformed(ActionEvent e) {
@@ -77,41 +84,7 @@ class DateSearchPanel extends javax.swing.JPanel {
copyMenuItem.addActionListener(actList);
pasteMenuItem.addActionListener(actList);
selectAllMenuItem.addActionListener(actList);
- this.dateFromTextField.getDocument().addDocumentListener(new DocumentListener() {
- @Override
- public void insertUpdate(DocumentEvent e) {
- firePropertyChange(FileSearchPanel.EVENT.CHECKED.toString(), null, null);
- }
-
- @Override
- public void removeUpdate(DocumentEvent e) {
- firePropertyChange(FileSearchPanel.EVENT.CHECKED.toString(), null, null);
- }
-
- @Override
- public void changedUpdate(DocumentEvent e) {
- firePropertyChange(FileSearchPanel.EVENT.CHECKED.toString(), null, null);
- }
- });
-
- this.dateToTextField.getDocument().addDocumentListener(new DocumentListener() {
- @Override
- public void insertUpdate(DocumentEvent e) {
- firePropertyChange(FileSearchPanel.EVENT.CHECKED.toString(), null, null);
- }
-
- @Override
- public void removeUpdate(DocumentEvent e) {
- firePropertyChange(FileSearchPanel.EVENT.CHECKED.toString(), null, null);
- }
-
- @Override
- public void changedUpdate(DocumentEvent e) {
- firePropertyChange(FileSearchPanel.EVENT.CHECKED.toString(), null, null);
- }
- });
-
-
+
this.setComponentsEnabled();
}
@@ -131,12 +104,12 @@ class DateSearchPanel extends javax.swing.JPanel {
return dateCheckBox;
}
- JFormattedTextField getDateFromTextField() {
- return dateFromTextField;
+ String getFromDate() {
+ return fromDatePicker.getText();
}
- JFormattedTextField getDateToTextField() {
- return dateToTextField;
+ String getToDate() {
+ return toDatePicker.getText();
}
JCheckBox getModifiedCheckBox() {
@@ -157,11 +130,9 @@ class DateSearchPanel extends javax.swing.JPanel {
private void setComponentsEnabled() {
boolean enable = this.dateCheckBox.isSelected();
- this.dateFromTextField.setEnabled(enable);
- this.dateFromButtonCalendar.setEnabled(enable);
+ this.fromDatePicker.setEnabled(enable);
this.jLabel1.setEnabled(enable);
- this.dateToTextField.setEnabled(enable);
- this.dateToButtonCalendar.setEnabled(enable);
+ this.toDatePicker.setEnabled(enable);
this.jLabel2.setEnabled(enable);
this.jLabel3.setEnabled(enable);
this.jLabel4.setEnabled(enable);
@@ -186,21 +157,19 @@ class DateSearchPanel extends javax.swing.JPanel {
copyMenuItem = new javax.swing.JMenuItem();
pasteMenuItem = new javax.swing.JMenuItem();
selectAllMenuItem = new javax.swing.JMenuItem();
- dateToTextField = new JFormattedTextField(this.dateFormat);
jLabel1 = new javax.swing.JLabel();
jLabel4 = new javax.swing.JLabel();
dateCheckBox = new javax.swing.JCheckBox();
timeZoneComboBox = new JComboBox<>(this.timeZones.toArray(new String[this.timeZones.size()]));
timeZoneComboBox.setRenderer(new DateSearchFilter.ComboBoxRenderer());
jLabel3 = new javax.swing.JLabel();
- dateFromTextField = new JFormattedTextField(this.dateFormat);
jLabel2 = new javax.swing.JLabel();
modifiedCheckBox = new javax.swing.JCheckBox();
changedCheckBox = new javax.swing.JCheckBox();
accessedCheckBox = new javax.swing.JCheckBox();
createdCheckBox = new javax.swing.JCheckBox();
- dateFromButtonCalendar = new org.jbundle.thin.base.screen.jcalendarbutton.JCalendarButton();
- dateToButtonCalendar = new org.jbundle.thin.base.screen.jcalendarbutton.JCalendarButton();
+ fromDatePicker = new DatePicker(fromDateSettings);
+ toDatePicker = new DatePicker(toDateSettings);
cutMenuItem.setText(org.openide.util.NbBundle.getMessage(DateSearchPanel.class, "DateSearchPanel.cutMenuItem.text")); // NOI18N
rightClickMenu.add(cutMenuItem);
@@ -214,14 +183,6 @@ class DateSearchPanel extends javax.swing.JPanel {
selectAllMenuItem.setText(org.openide.util.NbBundle.getMessage(DateSearchPanel.class, "DateSearchPanel.selectAllMenuItem.text")); // NOI18N
rightClickMenu.add(selectAllMenuItem);
- dateToTextField.setEditable(false);
- dateToTextField.setText(org.openide.util.NbBundle.getMessage(DateSearchPanel.class, "DateSearchPanel.dateToTextField.text")); // NOI18N
- dateToTextField.addFocusListener(new java.awt.event.FocusAdapter() {
- public void focusLost(java.awt.event.FocusEvent evt) {
- dateToTextFieldFocusLost(evt);
- }
- });
-
jLabel1.setText(org.openide.util.NbBundle.getMessage(DateSearchPanel.class, "DateSearchPanel.jLabel1.text")); // NOI18N
jLabel4.setText(org.openide.util.NbBundle.getMessage(DateSearchPanel.class, "DateSearchPanel.jLabel4.text")); // NOI18N
@@ -233,19 +194,11 @@ class DateSearchPanel extends javax.swing.JPanel {
}
});
- jLabel3.setFont(new java.awt.Font("Tahoma", 0, 10)); // NOI18N
jLabel3.setText(org.openide.util.NbBundle.getMessage(DateSearchPanel.class, "DateSearchPanel.jLabel3.text")); // NOI18N
+ jLabel3.setFont(new java.awt.Font("Tahoma", 0, 10)); // NOI18N
- dateFromTextField.setEditable(false);
- dateFromTextField.setText(org.openide.util.NbBundle.getMessage(DateSearchPanel.class, "DateSearchPanel.dateFromTextField.text")); // NOI18N
- dateFromTextField.addFocusListener(new java.awt.event.FocusAdapter() {
- public void focusLost(java.awt.event.FocusEvent evt) {
- dateFromTextFieldFocusLost(evt);
- }
- });
-
- jLabel2.setFont(new java.awt.Font("Tahoma", 0, 10)); // NOI18N
jLabel2.setText(org.openide.util.NbBundle.getMessage(DateSearchPanel.class, "DateSearchPanel.jLabel2.text")); // NOI18N
+ jLabel2.setFont(new java.awt.Font("Tahoma", 0, 10)); // NOI18N
modifiedCheckBox.setSelected(true);
modifiedCheckBox.setText(org.openide.util.NbBundle.getMessage(DateSearchPanel.class, "DateSearchPanel.modifiedCheckBox.text")); // NOI18N
@@ -279,17 +232,25 @@ class DateSearchPanel extends javax.swing.JPanel {
}
});
- dateFromButtonCalendar.setText(org.openide.util.NbBundle.getMessage(DateSearchPanel.class, "DateSearchPanel.dateFromButtonCalendar.text")); // NOI18N
- dateFromButtonCalendar.addPropertyChangeListener(new java.beans.PropertyChangeListener() {
+ fromDatePicker.addFocusListener(new java.awt.event.FocusAdapter() {
+ public void focusLost(java.awt.event.FocusEvent evt) {
+ fromDatePickerFocusLost(evt);
+ }
+ });
+ fromDatePicker.addPropertyChangeListener(new java.beans.PropertyChangeListener() {
public void propertyChange(java.beans.PropertyChangeEvent evt) {
- dateFromPopupChanged(evt);
+ fromDatePickerPropertyChange(evt);
}
});
- dateToButtonCalendar.setText(org.openide.util.NbBundle.getMessage(DateSearchPanel.class, "DateSearchPanel.dateToButtonCalendar.text")); // NOI18N
- dateToButtonCalendar.addPropertyChangeListener(new java.beans.PropertyChangeListener() {
+ toDatePicker.addFocusListener(new java.awt.event.FocusAdapter() {
+ public void focusLost(java.awt.event.FocusEvent evt) {
+ toDatePickerFocusLost(evt);
+ }
+ });
+ toDatePicker.addPropertyChangeListener(new java.beans.PropertyChangeListener() {
public void propertyChange(java.beans.PropertyChangeEvent evt) {
- dateToPopupChanged(evt);
+ toDatePickerPropertyChange(evt);
}
});
@@ -298,25 +259,11 @@ class DateSearchPanel extends javax.swing.JPanel {
layout.setHorizontalGroup(
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(layout.createSequentialGroup()
- .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
- .addGroup(layout.createSequentialGroup()
- .addComponent(dateCheckBox)
- .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
- .addComponent(dateFromTextField, javax.swing.GroupLayout.PREFERRED_SIZE, 92, javax.swing.GroupLayout.PREFERRED_SIZE)
- .addGap(0, 0, 0)
- .addComponent(dateFromButtonCalendar, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
- .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
- .addComponent(jLabel1)
- .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
- .addComponent(dateToTextField, javax.swing.GroupLayout.PREFERRED_SIZE, 92, javax.swing.GroupLayout.PREFERRED_SIZE)
- .addGap(0, 0, 0)
- .addComponent(dateToButtonCalendar, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
- .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
- .addContainerGap()
- .addComponent(jLabel2)
- .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
- .addComponent(jLabel3)))
- .addContainerGap(26, Short.MAX_VALUE))
+ .addContainerGap()
+ .addComponent(jLabel2)
+ .addGap(18, 18, 18)
+ .addComponent(jLabel3)
+ .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
.addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
.addGap(0, 0, Short.MAX_VALUE)
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
@@ -333,23 +280,28 @@ class DateSearchPanel extends javax.swing.JPanel {
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(changedCheckBox)))
.addGap(33, 33, 33))
+ .addGroup(layout.createSequentialGroup()
+ .addComponent(dateCheckBox)
+ .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
+ .addComponent(fromDatePicker, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
+ .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
+ .addComponent(jLabel1, javax.swing.GroupLayout.PREFERRED_SIZE, 10, javax.swing.GroupLayout.PREFERRED_SIZE)
+ .addGap(10, 10, 10)
+ .addComponent(toDatePicker, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
+ .addContainerGap())
);
layout.setVerticalGroup(
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(layout.createSequentialGroup()
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
.addGroup(layout.createSequentialGroup()
- .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
- .addComponent(dateCheckBox)
- .addComponent(dateFromTextField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
+ .addComponent(dateCheckBox)
.addGap(18, 18, 18))
.addGroup(layout.createSequentialGroup()
- .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
- .addComponent(dateToButtonCalendar, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
- .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
- .addComponent(jLabel1)
- .addComponent(dateToTextField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
- .addComponent(dateFromButtonCalendar, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
+ .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
+ .addComponent(jLabel1)
+ .addComponent(fromDatePicker, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
+ .addComponent(toDatePicker, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(jLabel3)
@@ -369,45 +321,6 @@ class DateSearchPanel extends javax.swing.JPanel {
);
}// //GEN-END:initComponents
- private void dateFromTextFieldFocusLost(java.awt.event.FocusEvent evt) {//GEN-FIRST:event_dateFromTextFieldFocusLost
- // set the "from" calendar button to listen to change in the text field
- String fromDateString = this.dateFromTextField.getText();
- if (!fromDateString.equals("")) {
- try {
- Date fromDate = dateFormat.parse(fromDateString);
- dateFromButtonCalendar.setTargetDate(fromDate);
- } catch (ParseException ex) {
- // for now, no need to show the error message to the user her
- }
- }
- }//GEN-LAST:event_dateFromTextFieldFocusLost
-
- private void dateToTextFieldFocusLost(java.awt.event.FocusEvent evt) {//GEN-FIRST:event_dateToTextFieldFocusLost
- // set the "to" calendar button to listen to change in the text field
- String toDateString = this.dateToTextField.getText();
- if (!toDateString.equals("")) {
- try {
- Date toDate = dateFormat.parse(toDateString);
- dateToButtonCalendar.setTargetDate(toDate);
- } catch (ParseException ex) {
- // for now, no need to show the error message to the user here
- }
- }
- }//GEN-LAST:event_dateToTextFieldFocusLost
-
- private void dateFromPopupChanged(java.beans.PropertyChangeEvent evt) {//GEN-FIRST:event_dateFromPopupChanged
- if (evt.getNewValue() instanceof Date) {
- setFromDate((Date) evt.getNewValue());
- }
- }//GEN-LAST:event_dateFromPopupChanged
-
- private void dateToPopupChanged(java.beans.PropertyChangeEvent evt) {//GEN-FIRST:event_dateToPopupChanged
- if (evt.getNewValue() instanceof Date) {
- setToDate((Date) evt.getNewValue());
- }
-
- }//GEN-LAST:event_dateToPopupChanged
-
private void dateCheckBoxActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_dateCheckBoxActionPerformed
this.setComponentsEnabled();
firePropertyChange(FileSearchPanel.EVENT.CHECKED.toString(), null, null);
@@ -429,6 +342,44 @@ class DateSearchPanel extends javax.swing.JPanel {
firePropertyChange(FileSearchPanel.EVENT.CHECKED.toString(), null, null);
}//GEN-LAST:event_changedCheckBoxActionPerformed
+ private void fromDatePickerPropertyChange(java.beans.PropertyChangeEvent evt) {//GEN-FIRST:event_fromDatePickerPropertyChange
+ if (evt.getNewValue() instanceof Date) {
+ setFromDate((Date) evt.getNewValue());
+ }
+ }//GEN-LAST:event_fromDatePickerPropertyChange
+
+ private void toDatePickerPropertyChange(java.beans.PropertyChangeEvent evt) {//GEN-FIRST:event_toDatePickerPropertyChange
+ if (evt.getNewValue() instanceof Date) {
+ setToDate((Date) evt.getNewValue());
+ }
+ }//GEN-LAST:event_toDatePickerPropertyChange
+
+ private void fromDatePickerFocusLost(java.awt.event.FocusEvent evt) {//GEN-FIRST:event_fromDatePickerFocusLost
+ // set the "from" calendar button to listen to change in the text field
+ String fromDateString = this.fromDatePicker.getText();
+ if (!fromDateString.equals("")) {
+ try {
+ Date fromDate = dateFormat.parse(fromDateString);
+ fromDatePicker.setDate(fromDate.toInstant().atZone(dateFormat.getTimeZone().toZoneId()).toLocalDate());
+ } catch (ParseException ex) {
+ // for now, no need to show the error message to the user her
+ }
+ }
+ }//GEN-LAST:event_fromDatePickerFocusLost
+
+ private void toDatePickerFocusLost(java.awt.event.FocusEvent evt) {//GEN-FIRST:event_toDatePickerFocusLost
+ // set the "to" calendar button to listen to change in the text field
+ String toDateString = this.toDatePicker.getText();
+ if (!toDateString.equals("")) {
+ try {
+ Date toDate = dateFormat.parse(toDateString);
+ toDatePicker.setDate(toDate.toInstant().atZone(dateFormat.getTimeZone().toZoneId()).toLocalDate());
+ } catch (ParseException ex) {
+ // for now, no need to show the error message to the user here
+ }
+ }
+ }//GEN-LAST:event_toDatePickerFocusLost
+
/**
* Validate and set the datetime field on the screen given a datetime
* string.
@@ -437,12 +388,18 @@ class DateSearchPanel extends javax.swing.JPanel {
*/
private void setFromDate(Date date) {
String dateStringResult = "";
+ Instant ins = null;
if (date != null) {
dateStringResult = dateFormat.format(date);
+ ins = date.toInstant();
}
- dateFromTextField.setText(dateStringResult);
- dateFromButtonCalendar.setTargetDate(date);
+ fromDatePicker.setText(dateStringResult);
+ if (ins != null) {
+ fromDatePicker.setDate(ins.atZone(dateFormat.getTimeZone().toZoneId()).toLocalDate());
+ } else {
+ fromDatePicker.setDate(null);
+ }
}
/**
@@ -452,13 +409,19 @@ class DateSearchPanel extends javax.swing.JPanel {
*/
private void setToDate(Date date) {
String dateStringResult = "";
+ Instant ins = null;
if (date != null) {
dateStringResult = dateFormat.format(date);
+ ins = date.toInstant();
+ }
+ toDatePicker.setText(dateStringResult);
+ if (ins != null) {
+ toDatePicker.setDate(ins.atZone(dateFormat.getTimeZone().toZoneId()).toLocalDate());
+ } else {
+ toDatePicker.setDate(null);
}
- dateToTextField.setText(dateStringResult);
- dateToButtonCalendar.setTargetDate(date);
}
-
+
boolean isValidSearch() {
return this.accessedCheckBox.isSelected() ||
this.changedCheckBox.isSelected() ||
@@ -472,10 +435,7 @@ class DateSearchPanel extends javax.swing.JPanel {
private javax.swing.JCheckBox createdCheckBox;
private javax.swing.JMenuItem cutMenuItem;
private javax.swing.JCheckBox dateCheckBox;
- private org.jbundle.thin.base.screen.jcalendarbutton.JCalendarButton dateFromButtonCalendar;
- private javax.swing.JFormattedTextField dateFromTextField;
- private org.jbundle.thin.base.screen.jcalendarbutton.JCalendarButton dateToButtonCalendar;
- private javax.swing.JFormattedTextField dateToTextField;
+ private com.github.lgooddatepicker.components.DatePicker fromDatePicker;
private javax.swing.JLabel jLabel1;
private javax.swing.JLabel jLabel2;
private javax.swing.JLabel jLabel3;
@@ -485,10 +445,17 @@ class DateSearchPanel extends javax.swing.JPanel {
private javax.swing.JPopupMenu rightClickMenu;
private javax.swing.JMenuItem selectAllMenuItem;
private javax.swing.JComboBox timeZoneComboBox;
+ private com.github.lgooddatepicker.components.DatePicker toDatePicker;
// End of variables declaration//GEN-END:variables
- void addActionListener(ActionListener l) {
- dateFromTextField.addActionListener(l);
- dateToTextField.addActionListener(l);
+ void addDateChangeListener() {
+ DateChangeListener dcl = (DateChangeEvent event) -> {
+ firePropertyChange(FileSearchPanel.EVENT.CHECKED.toString(), null, null);
+ };
+
+ fromDatePicker.addDateChangeListener(dcl);
+ toDatePicker.addDateChangeListener(dcl);
}
+
}
+
diff --git a/CoreLibs/ivy.xml b/CoreLibs/ivy.xml
index 32c7186ae5..b5de9e9ac2 100755
--- a/CoreLibs/ivy.xml
+++ b/CoreLibs/ivy.xml
@@ -13,7 +13,6 @@
-
diff --git a/CoreLibs/nbproject/project.properties b/CoreLibs/nbproject/project.properties
index 4218ccab88..09225d0115 100755
--- a/CoreLibs/nbproject/project.properties
+++ b/CoreLibs/nbproject/project.properties
@@ -44,7 +44,6 @@ file.reference.imgscalr-lib-4.2-sources.jar=release/modules/ext/imgscalr-lib-4.2
file.reference.imgscalr-lib-4.2.jar=release/modules/ext/imgscalr-lib-4.2.jar
file.reference.javaee-api-5.0-2.jar=release/modules/ext/javaee-api-5.0-2.jar
file.reference.javassist-3.12.1.GA.jar=release/modules/ext/javassist-3.12.1.GA.jar
-file.reference.jcalendarbutton-1.4.6.jar=release/modules/ext/jcalendarbutton-1.4.6.jar
file.reference.jfxtras-common-8.0-r4.jar=release/modules/ext/jfxtras-common-8.0-r4.jar
file.reference.jfxtras-controls-8.0-r4.jar=release/modules/ext/jfxtras-controls-8.0-r4.jar
file.reference.jfxtras-fxml-8.0-r4.jar=release/modules/ext/jfxtras-fxml-8.0-r4.jar
diff --git a/CoreLibs/nbproject/project.xml b/CoreLibs/nbproject/project.xml
index cc752d4833..5b4cb9fd83 100755
--- a/CoreLibs/nbproject/project.xml
+++ b/CoreLibs/nbproject/project.xml
@@ -215,7 +215,6 @@
jfxtras.scene.control
jfxtras.scene.layout
jfxtras.util
- net.sourceforge.jcalendarbutton
org.apache.avalon.framework
org.apache.avalon.framework.activity
org.apache.avalon.framework.component
@@ -590,7 +589,6 @@
org.hyperic.sigar.vmware
org.hyperic.sigar.win32
org.imgscalr
- org.jbundle.thin.base.screen.jcalendarbutton
org.joda.time
org.joda.time.base
org.joda.time.chrono
@@ -633,7 +631,6 @@
org.slf4j.helpers
org.slf4j.impl
org.slf4j.spi
- org.sourceforge.jcalendarbutton
org.w3c.dom
org.w3c.dom.css
org.w3c.dom.events
@@ -770,10 +767,6 @@
ext/poi-excelant-3.15.jar
release/modules/ext/poi-excelant-3.15.jar
-
- ext/jcalendarbutton-1.4.6.jar
- release/modules/ext/jcalendarbutton-1.4.6.jar
-
ext/imageio-psd-3.2.jar
release/modules/ext/imageio-psd-3.2.jar
diff --git a/Experimental/ivy.xml b/Experimental/ivy.xml
index e50fab6472..93d6dafa8d 100755
--- a/Experimental/ivy.xml
+++ b/Experimental/ivy.xml
@@ -5,7 +5,7 @@
-
+
diff --git a/Experimental/nbproject/project.properties b/Experimental/nbproject/project.properties
index d47542bdb5..1bd0e2fc90 100755
--- a/Experimental/nbproject/project.properties
+++ b/Experimental/nbproject/project.properties
@@ -1,10 +1,10 @@
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.LGoodDatePicker-10.3.1.jar=release/modules/ext/LGoodDatePicker-10.3.1.jar
file.reference.mchange-commons-java-0.2.9.jar=release/modules/ext/mchange-commons-java-0.2.9.jar
file.reference.postgresql-9.4-1201-jdbc41.jar=release/modules/ext/postgresql-9.4-1201-jdbc41.jar
file.reference.tika-core-1.14.jar=release/modules/ext/tika-core-1.14.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
-source.reference.LGoodDatePicker-4.3.1.jar=release/modules/ext/LGoodDatePicker-4.3.1-sources.jar
+javadoc.reference.LGoodDatePicker-10.3.1.jar=release/modules/ext/LGoodDatePicker-10.3.1-javadoc.jar
+source.reference.LGoodDatePicker-10.3.1.jar=release/modules/ext/LGoodDatePicker-10.3.1-sources.jar
diff --git a/Experimental/nbproject/project.xml b/Experimental/nbproject/project.xml
index 78e13b64ed..8293608102 100755
--- a/Experimental/nbproject/project.xml
+++ b/Experimental/nbproject/project.xml
@@ -145,18 +145,18 @@
org.sleuthkit.autopsy.experimental.autoingest
org.sleuthkit.autopsy.experimental.configuration
-
- ext/mchange-commons-java-0.2.9.jar
- release/modules/ext/mchange-commons-java-0.2.9.jar
-
-
- ext/LGoodDatePicker-4.3.1.jar
- release/modules/ext/LGoodDatePicker-4.3.1.jar
-
ext/tika-core-1.14.jar
release/modules/ext/tika-core-1.14.jar
+
+ ext/LGoodDatePicker-10.3.1.jar
+ release/modules/ext/LGoodDatePicker-10.3.1.jar
+
+
+ ext/mchange-commons-java-0.2.9.jar
+ release/modules/ext/mchange-commons-java-0.2.9.jar
+
ext/jackson-core-2.7.0.jar
release/modules/ext/jackson-core-2.7.0.jar
diff --git a/Experimental/src/org/sleuthkit/autopsy/experimental/autoingest/AutoIngestMetricsDialog.form b/Experimental/src/org/sleuthkit/autopsy/experimental/autoingest/AutoIngestMetricsDialog.form
index cbe7b53c2f..1ec767ba21 100755
--- a/Experimental/src/org/sleuthkit/autopsy/experimental/autoingest/AutoIngestMetricsDialog.form
+++ b/Experimental/src/org/sleuthkit/autopsy/experimental/autoingest/AutoIngestMetricsDialog.form
@@ -31,9 +31,9 @@
-
+
-
+
@@ -51,8 +51,10 @@
-
-
+
+
+
+
@@ -103,16 +105,6 @@
-
-
-
-
-
-
-
-
-
-
@@ -120,5 +112,12 @@
+
+
+
+
+
+
+
diff --git a/Experimental/src/org/sleuthkit/autopsy/experimental/autoingest/AutoIngestMetricsDialog.java b/Experimental/src/org/sleuthkit/autopsy/experimental/autoingest/AutoIngestMetricsDialog.java
index af0679be5f..990d04e244 100755
--- a/Experimental/src/org/sleuthkit/autopsy/experimental/autoingest/AutoIngestMetricsDialog.java
+++ b/Experimental/src/org/sleuthkit/autopsy/experimental/autoingest/AutoIngestMetricsDialog.java
@@ -18,7 +18,6 @@
*/
package org.sleuthkit.autopsy.experimental.autoingest;
-import com.github.lgooddatepicker.datepicker.DatePicker;
import java.awt.Container;
import java.awt.Cursor;
import java.awt.Window;
@@ -139,8 +138,8 @@ final class AutoIngestMetricsDialog extends javax.swing.JDialog {
jScrollPane1 = new javax.swing.JScrollPane();
reportTextArea = new javax.swing.JTextArea();
metricsButton = new javax.swing.JButton();
- datePicker = new DatePicker();
startingDataLabel = new javax.swing.JLabel();
+ datePicker = new com.github.lgooddatepicker.components.DatePicker();
setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);
setAlwaysOnTop(true);
@@ -166,10 +165,10 @@ final class AutoIngestMetricsDialog extends javax.swing.JDialog {
}
});
- datePicker.setToolTipText(org.openide.util.NbBundle.getMessage(AutoIngestMetricsDialog.class, "AutoIngestMetricsDialog.datePicker.toolTipText")); // NOI18N
-
org.openide.awt.Mnemonics.setLocalizedText(startingDataLabel, org.openide.util.NbBundle.getMessage(AutoIngestMetricsDialog.class, "AutoIngestMetricsDialog.startingDataLabel.text")); // NOI18N
+ datePicker.setToolTipText(org.openide.util.NbBundle.getMessage(AutoIngestMetricsDialog.class, "AutoIngestMetricsDialog.datePicker.toolTipText")); // NOI18N
+
javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
getContentPane().setLayout(layout);
layout.setHorizontalGroup(
@@ -180,9 +179,9 @@ final class AutoIngestMetricsDialog extends javax.swing.JDialog {
.addComponent(jScrollPane1)
.addGroup(layout.createSequentialGroup()
.addComponent(startingDataLabel)
- .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
+ .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(datePicker, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
- .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 7, Short.MAX_VALUE)
+ .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addComponent(metricsButton))
.addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
.addGap(0, 0, Short.MAX_VALUE)
@@ -195,8 +194,9 @@ final class AutoIngestMetricsDialog extends javax.swing.JDialog {
.addContainerGap()
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(metricsButton)
- .addComponent(datePicker, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
- .addComponent(startingDataLabel))
+ .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
+ .addComponent(startingDataLabel)
+ .addComponent(datePicker, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
.addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 128, javax.swing.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
@@ -220,7 +220,7 @@ final class AutoIngestMetricsDialog extends javax.swing.JDialog {
// Variables declaration - do not modify//GEN-BEGIN:variables
private javax.swing.JButton closeButton;
- private com.github.lgooddatepicker.datepicker.DatePicker datePicker;
+ private com.github.lgooddatepicker.components.DatePicker datePicker;
private javax.swing.JScrollPane jScrollPane1;
private javax.swing.JButton metricsButton;
private javax.swing.JTextArea reportTextArea;
diff --git a/Experimental/src/org/sleuthkit/autopsy/experimental/autoingest/FileExporterSettingsPanel.form b/Experimental/src/org/sleuthkit/autopsy/experimental/autoingest/FileExporterSettingsPanel.form
index 7ec8ed3539..4bd74cd7ed 100755
--- a/Experimental/src/org/sleuthkit/autopsy/experimental/autoingest/FileExporterSettingsPanel.form
+++ b/Experimental/src/org/sleuthkit/autopsy/experimental/autoingest/FileExporterSettingsPanel.form
@@ -71,10 +71,10 @@
-
+
@@ -136,12 +136,12 @@
-
-
-
+
+
+
@@ -161,7 +161,7 @@
-
+
@@ -173,13 +173,6 @@
-
-
-
-
-
-
-
@@ -202,6 +195,13 @@
+
+
+
+
+
+
+
@@ -236,7 +236,7 @@
-
+
@@ -259,20 +259,16 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
@@ -380,12 +376,12 @@
-
-
-
+
+
+
@@ -396,12 +392,12 @@
-
-
-
+
+
+
@@ -409,15 +405,15 @@
-
-
-
+
+
+
@@ -431,10 +427,10 @@
+
-
@@ -477,10 +473,10 @@
-
+
@@ -488,13 +484,13 @@
-
+
@@ -503,8 +499,8 @@
-
+
@@ -533,14 +529,6 @@
-
-
-
-
-
-
-
-
@@ -554,8 +542,8 @@
-
+
@@ -593,6 +581,14 @@
+
+
+
+
+
+
+
+
@@ -610,12 +606,12 @@
-
-
-
+
+
+
@@ -630,9 +626,9 @@
-
+
@@ -700,10 +696,10 @@
+
-
diff --git a/Experimental/src/org/sleuthkit/autopsy/experimental/autoingest/FileExporterSettingsPanel.java b/Experimental/src/org/sleuthkit/autopsy/experimental/autoingest/FileExporterSettingsPanel.java
index 64acf1163a..4413d948f4 100755
--- a/Experimental/src/org/sleuthkit/autopsy/experimental/autoingest/FileExporterSettingsPanel.java
+++ b/Experimental/src/org/sleuthkit/autopsy/experimental/autoingest/FileExporterSettingsPanel.java
@@ -1,7 +1,7 @@
/*
* Autopsy Forensic Browser
*
- * Copyright 2015 Basis Technology Corp.
+ * Copyright 2015-2017 Basis Technology Corp.
* Contact: carrier sleuthkit org
*
* Licensed under the Apache License, Version 2.0 (the "License");
@@ -18,9 +18,9 @@
*/
package org.sleuthkit.autopsy.experimental.autoingest;
-import com.github.lgooddatepicker.datetimepicker.DateTimePicker;
+import com.github.lgooddatepicker.components.DateTimePicker;
import com.github.lgooddatepicker.optionalusertools.PickerUtilities;
-import com.github.lgooddatepicker.timepicker.TimePickerSettings;
+import com.github.lgooddatepicker.components.TimePickerSettings;
import java.awt.Color;
import java.awt.Component;
import java.awt.event.FocusEvent;
@@ -632,7 +632,7 @@ public final class FileExporterSettingsPanel extends JPanel {
comboBoxValueType.setEnabled(null == attributeTypeMap.get(artifactConditionToPopulateWith.getAttributeTypeName()));
if (valueType == BlackboardAttribute.TSK_BLACKBOARD_ATTRIBUTE_VALUE_TYPE.DATETIME) {
Instant instant = Instant.ofEpochMilli(artifactConditionToPopulateWith.getDateTimeValue().toDate().getTime());
- dateTimePicker.setDateTime(LocalDateTime.ofInstant(instant, ZoneId.systemDefault()));
+ dateTimePicker.setDateTimeStrict(LocalDateTime.ofInstant(instant, ZoneId.systemDefault()));
} else {
tbAttributeValue.setText(artifactConditionToPopulateWith.getStringRepresentationOfValue());
}
@@ -650,30 +650,30 @@ public final class FileExporterSettingsPanel extends JPanel {
mainPanel = new javax.swing.JPanel();
tbRootDirectory = new javax.swing.JTextField();
pnEditRule = new javax.swing.JPanel();
- comboBoxMimeValue = new javax.swing.JComboBox();
+ comboBoxMimeValue = new javax.swing.JComboBox<>();
cbMimeType = new javax.swing.JCheckBox();
spFileSizeValue = new javax.swing.JSpinner();
- comboBoxFileSizeUnits = new javax.swing.JComboBox();
+ comboBoxFileSizeUnits = new javax.swing.JComboBox<>();
cbFileSize = new javax.swing.JCheckBox();
- comboBoxFileSizeComparison = new javax.swing.JComboBox();
- comboBoxMimeTypeComparison = new javax.swing.JComboBox();
+ comboBoxFileSizeComparison = new javax.swing.JComboBox<>();
+ comboBoxMimeTypeComparison = new javax.swing.JComboBox<>();
tbRuleName = new javax.swing.JTextField();
bnSaveRule = new javax.swing.JButton();
- comboBoxArtifactName = new javax.swing.JComboBox();
- comboBoxAttributeName = new javax.swing.JComboBox();
- comboBoxAttributeComparison = new javax.swing.JComboBox();
+ comboBoxArtifactName = new javax.swing.JComboBox<>();
+ comboBoxAttributeName = new javax.swing.JComboBox<>();
+ comboBoxAttributeComparison = new javax.swing.JComboBox<>();
tbAttributeValue = new javax.swing.JTextField();
bnAddAttribute = new javax.swing.JButton();
- comboBoxValueType = new javax.swing.JComboBox();
+ comboBoxValueType = new javax.swing.JComboBox<>();
cbAttributeType = new javax.swing.JCheckBox();
- dateTimePicker = new DateTimePicker(null, timeSettings);
lbArtifact = new javax.swing.JLabel();
lbAttribute = new javax.swing.JLabel();
bnDeleteAttribute = new javax.swing.JButton();
jScrollPane1 = new javax.swing.JScrollPane();
- lsAttributeList = new javax.swing.JList();
+ lsAttributeList = new javax.swing.JList<>();
lbRuleName = new javax.swing.JLabel();
lbSaveRuleHelper = new javax.swing.JLabel();
+ dateTimePicker = new DateTimePicker(null, timeSettings);
bnBrowseReportDirectory = new javax.swing.JButton();
tbReportDirectory = new javax.swing.JTextField();
ruleListScrollPane = new javax.swing.JScrollPane();
@@ -690,11 +690,11 @@ public final class FileExporterSettingsPanel extends JPanel {
setBorder(javax.swing.BorderFactory.createEtchedBorder());
setName(org.openide.util.NbBundle.getMessage(FileExporterSettingsPanel.class, "FileExporterSettingsPanel.Title")); // NOI18N
- mainPanel.setAutoscrolls(true);
mainPanel.setPreferredSize(new java.awt.Dimension(657, 425));
+ mainPanel.setAutoscrolls(true);
- tbRootDirectory.setToolTipText(org.openide.util.NbBundle.getMessage(FileExporterSettingsPanel.class, "FileExporterSettingsPanel.RuleOutputTooltip_1")); // NOI18N
tbRootDirectory.setMaximumSize(new java.awt.Dimension(2000, 2000));
+ tbRootDirectory.setToolTipText(org.openide.util.NbBundle.getMessage(FileExporterSettingsPanel.class, "FileExporterSettingsPanel.RuleOutputTooltip_1")); // NOI18N
pnEditRule.setBorder(javax.swing.BorderFactory.createEtchedBorder());
pnEditRule.setAutoscrolls(true);
@@ -716,7 +716,7 @@ public final class FileExporterSettingsPanel extends JPanel {
}
});
- spFileSizeValue.setModel(new javax.swing.SpinnerNumberModel(Integer.valueOf(1024), Integer.valueOf(0), null, Integer.valueOf(1)));
+ spFileSizeValue.setModel(new javax.swing.SpinnerNumberModel(1024, 0, null, 1));
spFileSizeValue.setToolTipText(org.openide.util.NbBundle.getMessage(FileExporterSettingsPanel.class, "FileExporterSettingsPanel.FileSizeValueToolTip_1")); // NOI18N
comboBoxFileSizeUnits.setToolTipText(org.openide.util.NbBundle.getMessage(FileExporterSettingsPanel.class, "FileExporterSettingsPanel.FileSizeUnitToolTip_1")); // NOI18N
@@ -729,15 +729,15 @@ public final class FileExporterSettingsPanel extends JPanel {
}
});
- comboBoxFileSizeComparison.setToolTipText(org.openide.util.NbBundle.getMessage(FileExporterSettingsPanel.class, "FileExporterSettingsPanel.FileSizeComparisonTooltip_1")); // NOI18N
comboBoxFileSizeComparison.setMinimumSize(new java.awt.Dimension(32, 20));
+ comboBoxFileSizeComparison.setToolTipText(org.openide.util.NbBundle.getMessage(FileExporterSettingsPanel.class, "FileExporterSettingsPanel.FileSizeComparisonTooltip_1")); // NOI18N
- comboBoxMimeTypeComparison.setToolTipText(org.openide.util.NbBundle.getMessage(FileExporterSettingsPanel.class, "FileExporterSettingsPanel.MimeTypeComparisonTooltip_1")); // NOI18N
comboBoxMimeTypeComparison.setMinimumSize(new java.awt.Dimension(32, 20));
+ comboBoxMimeTypeComparison.setToolTipText(org.openide.util.NbBundle.getMessage(FileExporterSettingsPanel.class, "FileExporterSettingsPanel.MimeTypeComparisonTooltip_1")); // NOI18N
- tbRuleName.setToolTipText(org.openide.util.NbBundle.getMessage(FileExporterSettingsPanel.class, "FileExporterSettingsPanel.CurrentlySelectedRuleNameTooltip_1")); // NOI18N
tbRuleName.setMaximumSize(new java.awt.Dimension(10, 1000));
tbRuleName.setPreferredSize(new java.awt.Dimension(733, 20));
+ tbRuleName.setToolTipText(org.openide.util.NbBundle.getMessage(FileExporterSettingsPanel.class, "FileExporterSettingsPanel.CurrentlySelectedRuleNameTooltip_1")); // NOI18N
tbRuleName.addKeyListener(new java.awt.event.KeyAdapter() {
public void keyTyped(java.awt.event.KeyEvent evt) {
tbRuleNameKeyTyped(evt);
@@ -746,8 +746,8 @@ public final class FileExporterSettingsPanel extends JPanel {
bnSaveRule.setIcon(new javax.swing.ImageIcon(getClass().getResource("/org/sleuthkit/autopsy/experimental/images/save-icon.png"))); // NOI18N
bnSaveRule.setText(org.openide.util.NbBundle.getMessage(FileExporterSettingsPanel.class, "FileExporterSettingsPanel.SaveText")); // NOI18N
- bnSaveRule.setToolTipText(org.openide.util.NbBundle.getMessage(FileExporterSettingsPanel.class, "FileExporterSettingsPanel.SaveTooltip_1")); // NOI18N
bnSaveRule.setEnabled(false);
+ bnSaveRule.setToolTipText(org.openide.util.NbBundle.getMessage(FileExporterSettingsPanel.class, "FileExporterSettingsPanel.SaveTooltip_1")); // NOI18N
bnSaveRule.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
bnSaveRuleActionPerformed(evt);
@@ -772,17 +772,17 @@ public final class FileExporterSettingsPanel extends JPanel {
}
});
- comboBoxAttributeComparison.setToolTipText("Select the conditional operator");
comboBoxAttributeComparison.setMinimumSize(new java.awt.Dimension(32, 23));
+ comboBoxAttributeComparison.setToolTipText("Select the conditional operator");
- tbAttributeValue.setToolTipText("Type a value here");
tbAttributeValue.setMinimumSize(new java.awt.Dimension(6, 23));
tbAttributeValue.setPreferredSize(new java.awt.Dimension(6, 23));
+ tbAttributeValue.setToolTipText("Type a value here");
bnAddAttribute.setIcon(new javax.swing.ImageIcon(getClass().getResource("/org/sleuthkit/autopsy/experimental/images/left-arrow-16-icon.png"))); // NOI18N
bnAddAttribute.setText("Add Attribute");
- bnAddAttribute.setToolTipText("Click to add an attribute to the current rule");
bnAddAttribute.setEnabled(false);
+ bnAddAttribute.setToolTipText("Click to add an attribute to the current rule");
bnAddAttribute.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
bnAddAttributeActionPerformed(evt);
@@ -804,15 +804,13 @@ public final class FileExporterSettingsPanel extends JPanel {
}
});
- dateTimePicker.setToolTipText("Choose a date and time");
-
lbArtifact.setText("Artifact");
lbAttribute.setText("Attribute");
bnDeleteAttribute.setText("Delete Attribute");
- bnDeleteAttribute.setToolTipText("Click to remove the selected attribute");
bnDeleteAttribute.setEnabled(false);
+ bnDeleteAttribute.setToolTipText("Click to remove the selected attribute");
bnDeleteAttribute.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
bnDeleteAttributeActionPerformed(evt);
@@ -829,6 +827,8 @@ public final class FileExporterSettingsPanel extends JPanel {
lbSaveRuleHelper.setHorizontalAlignment(javax.swing.SwingConstants.RIGHT);
lbSaveRuleHelper.setText("To save, a rule must have a name and at least one condition.");
+ dateTimePicker.setToolTipText("Choose a date and time");
+
javax.swing.GroupLayout pnEditRuleLayout = new javax.swing.GroupLayout(pnEditRule);
pnEditRule.setLayout(pnEditRuleLayout);
pnEditRuleLayout.setHorizontalGroup(
@@ -845,12 +845,6 @@ public final class FileExporterSettingsPanel extends JPanel {
.addComponent(lbSaveRuleHelper, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(bnSaveRule, javax.swing.GroupLayout.PREFERRED_SIZE, 101, javax.swing.GroupLayout.PREFERRED_SIZE))
- .addGroup(pnEditRuleLayout.createSequentialGroup()
- .addComponent(comboBoxAttributeComparison, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
- .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
- .addComponent(dateTimePicker, javax.swing.GroupLayout.PREFERRED_SIZE, 306, javax.swing.GroupLayout.PREFERRED_SIZE)
- .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
- .addComponent(tbAttributeValue, javax.swing.GroupLayout.DEFAULT_SIZE, 158, Short.MAX_VALUE))
.addGroup(pnEditRuleLayout.createSequentialGroup()
.addGroup(pnEditRuleLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(pnEditRuleLayout.createSequentialGroup()
@@ -867,7 +861,13 @@ public final class FileExporterSettingsPanel extends JPanel {
.addGroup(pnEditRuleLayout.createSequentialGroup()
.addComponent(bnAddAttribute, javax.swing.GroupLayout.PREFERRED_SIZE, 117, javax.swing.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
- .addComponent(bnDeleteAttribute)))
+ .addComponent(bnDeleteAttribute))
+ .addGroup(pnEditRuleLayout.createSequentialGroup()
+ .addComponent(comboBoxAttributeComparison, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
+ .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
+ .addComponent(dateTimePicker, javax.swing.GroupLayout.PREFERRED_SIZE, 306, javax.swing.GroupLayout.PREFERRED_SIZE)
+ .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
+ .addComponent(tbAttributeValue, javax.swing.GroupLayout.DEFAULT_SIZE, 158, Short.MAX_VALUE)))
.addGap(0, 0, Short.MAX_VALUE))))
.addGroup(pnEditRuleLayout.createSequentialGroup()
.addGroup(pnEditRuleLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
@@ -910,17 +910,15 @@ public final class FileExporterSettingsPanel extends JPanel {
.addGap(78, 78, 78)
.addComponent(lbAttribute)
.addGap(8, 8, 8)
- .addGroup(pnEditRuleLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
- .addGroup(pnEditRuleLayout.createSequentialGroup()
- .addGroup(pnEditRuleLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
- .addComponent(comboBoxAttributeName, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
- .addComponent(comboBoxArtifactName, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
- .addComponent(comboBoxValueType, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
- .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
- .addGroup(pnEditRuleLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
- .addComponent(tbAttributeValue, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
- .addComponent(dateTimePicker, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))
- .addComponent(comboBoxAttributeComparison, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
+ .addGroup(pnEditRuleLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
+ .addComponent(comboBoxAttributeName, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
+ .addComponent(comboBoxArtifactName, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
+ .addComponent(comboBoxValueType, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
+ .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
+ .addGroup(pnEditRuleLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
+ .addComponent(tbAttributeValue, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
+ .addComponent(comboBoxAttributeComparison, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
+ .addComponent(dateTimePicker, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addGroup(pnEditRuleLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(bnAddAttribute)
@@ -953,14 +951,14 @@ public final class FileExporterSettingsPanel extends JPanel {
}
});
- tbReportDirectory.setToolTipText(org.openide.util.NbBundle.getMessage(FileExporterSettingsPanel.class, "FileExporterSettingsPanel.ReportOutputFolderTooltip_1")); // NOI18N
tbReportDirectory.setMaximumSize(new java.awt.Dimension(2000, 2000));
+ tbReportDirectory.setToolTipText(org.openide.util.NbBundle.getMessage(FileExporterSettingsPanel.class, "FileExporterSettingsPanel.ReportOutputFolderTooltip_1")); // NOI18N
javax.swing.tree.DefaultMutableTreeNode treeNode1 = new javax.swing.tree.DefaultMutableTreeNode("root");
trRuleList.setModel(new javax.swing.tree.DefaultTreeModel(treeNode1));
- trRuleList.setToolTipText("This tree shows the rules to collect files for automatic file export");
trRuleList.setName("trRuleList"); // NOI18N
trRuleList.setShowsRootHandles(true);
+ trRuleList.setToolTipText("This tree shows the rules to collect files for automatic file export");
ruleListScrollPane.setViewportView(trRuleList);
trRuleList.getAccessibleContext().setAccessibleParent(ruleListScrollPane);
@@ -1039,8 +1037,8 @@ public final class FileExporterSettingsPanel extends JPanel {
bnDeleteRule.setIcon(new javax.swing.ImageIcon(getClass().getResource("/org/sleuthkit/autopsy/experimental/images/minus-icon.png"))); // NOI18N
bnDeleteRule.setText(org.openide.util.NbBundle.getMessage(FileExporterSettingsPanel.class, "FileExporterSettingsPanel.DeleteText")); // NOI18N
- bnDeleteRule.setToolTipText(org.openide.util.NbBundle.getMessage(FileExporterSettingsPanel.class, "FileExporterSettingsPanel.DeleteTooltip_1")); // NOI18N
bnDeleteRule.setEnabled(false);
+ bnDeleteRule.setToolTipText(org.openide.util.NbBundle.getMessage(FileExporterSettingsPanel.class, "FileExporterSettingsPanel.DeleteTooltip_1")); // NOI18N
bnDeleteRule.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
bnDeleteRuleActionPerformed(evt);
@@ -1260,7 +1258,7 @@ public final class FileExporterSettingsPanel extends JPanel {
}
if (intrinsicType == BlackboardAttribute.TSK_BLACKBOARD_ATTRIBUTE_VALUE_TYPE.DATETIME) {
- LocalDateTime localDateTime = dateTimePicker.getDateTime();
+ LocalDateTime localDateTime = dateTimePicker.getDateTimeStrict();
if (localDateTime == null) {
throw new IllegalArgumentException("Bad date/time combination");
}
@@ -2028,7 +2026,7 @@ public final class FileExporterSettingsPanel extends JPanel {
private javax.swing.JComboBox comboBoxMimeTypeComparison;
private javax.swing.JComboBox comboBoxMimeValue;
private javax.swing.JComboBox comboBoxValueType;
- private com.github.lgooddatepicker.datetimepicker.DateTimePicker dateTimePicker;
+ private com.github.lgooddatepicker.components.DateTimePicker dateTimePicker;
private javax.swing.JScrollPane jScrollPane1;
private javax.swing.JLabel lbArtifact;
private javax.swing.JLabel lbAttribute;