Fixed date format in ImageGallery details pane.

Added exception handling for an error coming up when Autopsy was closed.
This commit is contained in:
APriestman 2015-04-20 17:24:22 -04:00
parent 4f526d39cb
commit f7d9b32138
2 changed files with 11 additions and 5 deletions

View File

@ -27,6 +27,7 @@ import javafx.beans.property.ReadOnlyStringWrapper;
import javafx.beans.property.StringProperty;
import javafx.scene.image.Image;
import org.apache.commons.lang3.StringUtils;
import org.sleuthkit.autopsy.datamodel.ContentUtils;
import org.sleuthkit.datamodel.TagName;
/**
@ -61,11 +62,11 @@ public class DrawableAttribute<T extends Comparable<T>> {
public final static DrawableAttribute<String> PATH
= new DrawableAttribute<>(AttributeName.PATH, "Path", true, "folder_picture.png", f -> Collections.singleton(f.getDrawablePath()));
public final static DrawableAttribute<Long> CREATED_TIME
= new DrawableAttribute<>( AttributeName.CREATED_TIME, "Created Time", true, "clock--plus.png", f -> Collections.singleton(f.getCrtime()));
public final static DrawableAttribute<String> CREATED_TIME
= new DrawableAttribute<>( AttributeName.CREATED_TIME, "Created Time", true, "clock--plus.png", f -> Collections.singleton(ContentUtils.getStringTime(f.getCrtime(), f)));
public final static DrawableAttribute<Long> MODIFIED_TIME
= new DrawableAttribute<>( AttributeName.MODIFIED_TIME, "Modified Time", true, "clock--pencil.png", f -> Collections.singleton(f.getMtime()));
public final static DrawableAttribute<String> MODIFIED_TIME
= new DrawableAttribute<>( AttributeName.MODIFIED_TIME, "Modified Time", true, "clock--pencil.png", f -> Collections.singleton(ContentUtils.getStringTime(f.getMtime(), f)));
public final static DrawableAttribute<String> MAKE
= new DrawableAttribute<>( AttributeName.MAKE, "Camera Make", true, "camera.png", f -> Collections.singleton(f.getMake()));

View File

@ -21,6 +21,7 @@ package org.sleuthkit.autopsy.imagegallery.gui;
import java.net.URL;
import java.util.Objects;
import java.util.ResourceBundle;
import java.util.logging.Level;
import javafx.fxml.FXML;
import javafx.scene.CacheHint;
import javafx.scene.control.Control;
@ -88,7 +89,11 @@ public class DrawableTile extends SingleDrawableViewBase implements Category.Cat
imageView.fitWidthProperty().bind(Toolbar.getDefault().sizeSliderValue());
globalSelectionModel.lastSelectedProperty().addListener((observable, oldValue, newValue) -> {
try{
setEffect(Objects.equals(newValue, fileID) ? LAST_SELECTED_EFFECT : null);
} catch (java.lang.IllegalStateException ex){
Logger.getLogger(DrawableTile.class.getName()).log(Level.WARNING, "Error displaying tile");
}
});
}