This commit is contained in:
millmanorama
2017-06-07 15:56:05 +02:00
parent 19798c5ac5
commit cd962e1532
2 changed files with 6 additions and 7 deletions
@@ -52,19 +52,19 @@ import org.openide.nodes.NodeReorderEvent;
import org.openide.util.NbBundle;
import org.openide.util.NbPreferences;
import org.sleuthkit.autopsy.corecomponentinterfaces.DataResultViewer;
import static org.sleuthkit.autopsy.corecomponents.Bundle.*;
import org.sleuthkit.autopsy.corecomponents.ResultViewerPersistence.SortCriterion;
import org.sleuthkit.autopsy.corecomponents.ThumbnailViewChildren.ThumbnailLoader;
import org.sleuthkit.autopsy.coreutils.ImageUtils;
import org.sleuthkit.autopsy.coreutils.Logger;
import org.sleuthkit.datamodel.AbstractFile;
import org.sleuthkit.datamodel.TskCoreException;
import static org.sleuthkit.autopsy.corecomponents.Bundle.*;
import org.sleuthkit.autopsy.corecomponents.ThumbnailViewChildren.ThumbnailLoader;
/**
* A thumbnail viewer for the results view, with paging support.
*
* The paging is intended to reduce memory footprint by load only up to
* (currently) 1000 images at a time. This works whether or not the underlying
* (currently) 200 images at a time. This works whether or not the underlying
* content nodes are being lazy loaded or not.
*
* TODO (JIRA-2658): Fix DataResultViewer extension point. When this is done,
@@ -166,7 +166,6 @@ class ThumbnailViewChildren extends Children.Keys<Integer> {
}
private Comparator<Node> getCriterionComparator(SortCriterion criterion) {
Comparator<Node> c = Comparator.comparing(node -> getPropertyValue(node, criterion.getProperty()),
Comparator.nullsFirst(Comparator.naturalOrder()));
return criterion.getSortOrder() == SortOrder.ASCENDING ? c : c.reversed();
@@ -236,7 +235,7 @@ class ThumbnailViewChildren extends Children.Keys<Integer> {
/**
* the constructor
*/
ThumbnailViewNode(Node arg, ThumbnailLoader thumbLoader) {
private ThumbnailViewNode(Node arg, ThumbnailLoader thumbLoader) {
super(arg, FilterNode.Children.LEAF);
this.thumbLoader = thumbLoader;
}
@@ -282,7 +281,7 @@ class ThumbnailViewChildren extends Children.Keys<Integer> {
thumbTask = null;
}
class ThumbnailLoadTask extends SwingWorker<Image, Object> {
private class ThumbnailLoadTask extends SwingWorker<Image, Object> {
private final Content content;
private final ProgressHandle progressHandle;
@@ -338,7 +337,7 @@ class ThumbnailViewChildren extends Children.Keys<Integer> {
futures.clear();
}
synchronized void load(ThumbnailViewNode.ThumbnailLoadTask task) {
private synchronized void load(ThumbnailViewNode.ThumbnailLoadTask task) {
futures.add(task);
executor.submit(task);
}