Autopsy  4.6.0
Graphical digital forensics platform for The Sleuth Kit and other tools.
PinnedEventsChartLane.java
Go to the documentation of this file.
1 /*
2  * Autopsy Forensic Browser
3  *
4  * Copyright 2016 Basis Technology Corp.
5  * Contact: carrier <at> sleuthkit <dot> org
6  *
7  * Licensed under the Apache License, Version 2.0 (the "License");
8  * you may not use this file except in compliance with the License.
9  * You may obtain a copy of the License at
10  *
11  * http://www.apache.org/licenses/LICENSE-2.0
12  *
13  * Unless required by applicable law or agreed to in writing, software
14  * distributed under the License is distributed on an "AS IS" BASIS,
15  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16  * See the License for the specific language governing permissions and
17  * limitations under the License.
18  */
19 package org.sleuthkit.autopsy.timeline.ui.detailview;
20 
21 import javafx.collections.SetChangeListener;
22 import javafx.scene.chart.Axis;
24 
28 public final class PinnedEventsChartLane extends DetailsChartLane<TimeLineEvent> {
29 
37  PinnedEventsChartLane(DetailsChart parentChart, DateAxis dateAxis, final Axis<TimeLineEvent> verticalAxis) {
38  super(parentChart, dateAxis, verticalAxis, false);
39 
40 // final Series<DateTime, TimeLineEvent> series = new Series<>();
41 // setData(FXCollections.observableArrayList());
42 // getData().add(series);
43  getController().getPinnedEvents().addListener((SetChangeListener.Change<? extends TimeLineEvent> change) -> {
44  if (change.wasAdded()) {
45  addEvent(change.getElementAdded());
46  }
47  if (change.wasRemoved()) {
48  removeEvent(change.getElementRemoved());
49  }
50  requestChartLayout();
51  });
52 
53  getController().getPinnedEvents().stream().forEach(this::addEvent);
54  requestChartLayout();
55  }
56 
57  @Override
58  void doAdditionalLayout() {
59  }
60 
61 }

Copyright © 2012-2016 Basis Technology. Generated on: Mon May 7 2018
This work is licensed under a Creative Commons Attribution-Share Alike 3.0 United States License.