19 package org.sleuthkit.autopsy.timeline.ui.detailview.tree;
22 import java.util.Arrays;
23 import java.util.Comparator;
24 import java.util.ResourceBundle;
25 import javafx.application.Platform;
26 import javafx.beans.Observable;
27 import javafx.collections.ObservableList;
28 import javafx.fxml.FXML;
29 import javafx.scene.control.*;
30 import javafx.scene.image.ImageView;
31 import javafx.scene.layout.BorderPane;
32 import javafx.scene.layout.StackPane;
33 import javafx.scene.shape.Rectangle;
34 import org.openide.util.NbBundle;
72 private ComboBox<Comparator<TreeItem<NavTreeNode>>>
sortByBox;
87 eventsTree.getSelectionModel().clearSelection();
89 eventsTree.getSelectionModel().select(((NavTreeItem) eventsTree.getRoot()).findTreeItemForEvent(t.
getEvent()));
96 RootItem root =
new RootItem();
97 final ObservableList<AggregateEvent> aggregatedEvents = detailViewPane.
getAggregatedEvents();
99 synchronized (aggregatedEvents) {
104 Platform.runLater(() -> {
105 eventsTree.setRoot(root);
123 assert sortByBox != null :
"fx:id=\"sortByBox\" was not injected: check your FXML file 'NavPanel.fxml'.";
125 sortByBox.getItems().setAll(Arrays.asList(TreeComparator.Description, TreeComparator.Count));
126 sortByBox.getSelectionModel().select(TreeComparator.Description);
127 sortByBox.getSelectionModel().selectedItemProperty().addListener((Observable o) -> {
128 ((RootItem) eventsTree.getRoot()).resort(sortByBox.getSelectionModel().getSelectedItem());
130 eventsTree.setShowRoot(
false);
131 eventsTree.setCellFactory((TreeView<NavTreeNode> p) ->
new EventTreeCell());
132 eventsTree.getSelectionModel().setSelectionMode(SelectionMode.MULTIPLE);
134 eventsTreeLabel.setText(NbBundle.getMessage(
this.getClass(),
"NavPanel.eventsTreeLabel.text"));
143 super.updateItem(item, empty);
147 setTooltip(
new Tooltip(text));
148 Rectangle rect =
new Rectangle(24, 24);
149 rect.setArcHeight(5);
151 rect.setStrokeWidth(2);
FilteredEventsModel filteredEvents
FilteredEventsModel getEventsModel()
void setSelectionModel(MultipleSelectionModel< TreeItem< NavTreeNode >> selectionModel)
TreeView< NavTreeNode > eventsTree
void setModel(FilteredEventsModel filteredEvents)
DetailViewPane detailViewPane
ReadOnlyListProperty< N > getSelectedNodes()
static void construct(Node n, String fxmlFileName)
TimeLineController controller
ComboBox< Comparator< TreeItem< NavTreeNode > > > sortByBox
void updateItem(NavTreeNode item, boolean empty)
void setController(TimeLineController controller)
AggregateEvent getEvent()
void setChart(DetailViewPane detailViewPane)
ObservableList< AggregateEvent > getAggregatedEvents()