19 package org.sleuthkit.autopsy.timeline.ui.detailview.tree;
21 import java.util.Comparator;
22 import java.util.HashMap;
23 import java.util.List;
25 import java.util.function.Supplier;
26 import javafx.scene.control.TreeItem;
34 class BaseTypeTreeItem
extends EventTypeTreeItem {
40 private final Map<Object, EventsTreeItem> childMap =
new HashMap<>();
49 BaseTypeTreeItem(
TimeLineEvent event, Comparator<TreeItem<TimeLineEvent>> comparator) {
55 public void insert(List<TimeLineEvent> path) {
58 Supplier< EventsTreeItem> treeItemConstructor;
59 String descriptionKey;
66 treeItemConstructor = () -> configureNewTreeItem(
new SubTypeTreeItem(head, getComparator()));
70 treeItemConstructor = () -> configureNewTreeItem(
new DescriptionTreeItem(stripe, getComparator()));
73 EventsTreeItem treeItem = childMap.computeIfAbsent(descriptionKey, key -> treeItemConstructor.get());
76 if (path.isEmpty() ==
false) {
77 treeItem.insert(path);
82 void remove(List<TimeLineEvent> path) {
85 EventsTreeItem descTreeItem;
98 if (descTreeItem != null) {
99 if (path.isEmpty() ==
false) {
100 descTreeItem.remove(path);
103 if (descTreeItem.getChildren().isEmpty()) {
105 getChildren().remove(descTreeItem);
EventTypeZoomLevel getZoomLevel()
default BaseTypes getBaseType()