19 package org.sleuthkit.autopsy.timeline.explorernodes;
21 import java.util.Collection;
22 import java.util.HashMap;
23 import java.util.List;
25 import java.util.logging.Level;
26 import org.openide.nodes.AbstractNode;
27 import org.openide.nodes.ChildFactory;
28 import org.openide.nodes.Children;
29 import org.openide.nodes.Node;
30 import org.openide.util.NbBundle;
31 import org.openide.util.lookup.Lookups;
53 super(Children.create(
new EventNodeChildFactory(eventIds, filteredEvents),
true), Lookups.singleton(eventIds));
68 return getClass().getName();
87 private final Map<Long, Node>
nodesMap =
new HashMap<>();
90 this.eventIDs = eventIds;
101 for (Long eventId : eventIDs) {
102 nodesMap.computeIfAbsent(eventId, this::createNode);
103 toPopulate.add(eventId);
106 nodesMap.computeIfAbsent(-1L, this::createNode);
114 return nodesMap.get(eventID);
127 }
catch (TskCoreException ex) {
133 LOGGER.log(Level.SEVERE,
"Error creating explorer node for event id " + eventID +
".", ex);
146 "# {0} - maximum number of events to display",
147 "# {1} - the number of events that is too many",
148 "EventRoodNode.tooManyNode.displayName=Too many events to display. Maximum = {0}. But there are {1} to display."})
150 super(Children.LEAF);
151 this.setIconBaseWithExtension(
"org/sleuthkit/autopsy/images/info-icon-16.png");
152 setDisplayName(Bundle.EventRoodNode_tooManyNode_displayName(MAX_EVENTS_TO_DISPLAY, size));
final EventsModel filteredEvents
static final Logger LOGGER
static EventNode createEventNode(final Long eventID, EventsModel eventsModel)
boolean createKeys(List< Long > toPopulate)
static final long serialVersionUID
final Collection< Long > eventIDs
static final int MAX_EVENTS_TO_DISPLAY
Node createNodeForKey(Long eventID)
synchronized static Logger getLogger(String name)
EventRootNode(Collection< Long > eventIds, EventsModel filteredEvents)
final Map< Long, Node > nodesMap
Node createNode(Long eventID)