From 989e770cc862396e69661a11c0d7fde5d420d2e8 Mon Sep 17 00:00:00 2001 From: jmillman Date: Wed, 11 May 2016 16:22:05 -0400 Subject: [PATCH 1/9] don't refresh the timeline when the user backs out of dangerous zoom parameters --- .../ui/detailview/DetailViewPane.java | 30 +++++++++++++++---- 1 file changed, 25 insertions(+), 5 deletions(-) diff --git a/Core/src/org/sleuthkit/autopsy/timeline/ui/detailview/DetailViewPane.java b/Core/src/org/sleuthkit/autopsy/timeline/ui/detailview/DetailViewPane.java index 5b9dc12837..87a37d8f3e 100644 --- a/Core/src/org/sleuthkit/autopsy/timeline/ui/detailview/DetailViewPane.java +++ b/Core/src/org/sleuthkit/autopsy/timeline/ui/detailview/DetailViewPane.java @@ -19,6 +19,7 @@ package org.sleuthkit.autopsy.timeline.ui.detailview; import java.util.List; +import java.util.Objects; import java.util.function.Function; import java.util.function.Predicate; import java.util.stream.Collectors; @@ -56,6 +57,7 @@ import org.sleuthkit.autopsy.timeline.datamodel.TimeLineEvent; import org.sleuthkit.autopsy.timeline.ui.AbstractVisualizationPane; import org.sleuthkit.autopsy.timeline.utils.MappedList; import org.sleuthkit.autopsy.timeline.zooming.DescriptionLoD; +import org.sleuthkit.autopsy.timeline.zooming.ZoomParams; /** * Controller class for a DetailsChart based implementation of a timeline view. @@ -87,6 +89,12 @@ public class DetailViewPane extends AbstractVisualizationPane> selectedEvents; + /** + * Local copy of the zoomParams. Used to backout of a zoomParam change + * without needing to requery/redraw the vis. + */ + private ZoomParams currentZoomParams; + /** * Constructor for a DetailViewPane * @@ -353,13 +361,17 @@ public class DetailViewPane extends AbstractVisualizationPane Date: Wed, 11 May 2016 16:30:02 -0400 Subject: [PATCH 2/9] improve warning when showing many events in details view --- .../autopsy/timeline/ui/detailview/DetailViewPane.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Core/src/org/sleuthkit/autopsy/timeline/ui/detailview/DetailViewPane.java b/Core/src/org/sleuthkit/autopsy/timeline/ui/detailview/DetailViewPane.java index 87a37d8f3e..9477e3d73d 100644 --- a/Core/src/org/sleuthkit/autopsy/timeline/ui/detailview/DetailViewPane.java +++ b/Core/src/org/sleuthkit/autopsy/timeline/ui/detailview/DetailViewPane.java @@ -351,7 +351,7 @@ public class DetailViewPane extends AbstractVisualizationPane { DetailsUpdateTask() { From f79a77fdedbc5bbece6fd029e3198d551d2cdecf Mon Sep 17 00:00:00 2001 From: jmillman Date: Thu, 12 May 2016 10:45:12 -0400 Subject: [PATCH 3/9] minor cleanup --- .../ui/countsview/CountsViewPane.java | 25 ++++++++----------- 1 file changed, 10 insertions(+), 15 deletions(-) diff --git a/Core/src/org/sleuthkit/autopsy/timeline/ui/countsview/CountsViewPane.java b/Core/src/org/sleuthkit/autopsy/timeline/ui/countsview/CountsViewPane.java index 91649dcf37..b31cbfb496 100644 --- a/Core/src/org/sleuthkit/autopsy/timeline/ui/countsview/CountsViewPane.java +++ b/Core/src/org/sleuthkit/autopsy/timeline/ui/countsview/CountsViewPane.java @@ -58,7 +58,6 @@ import org.sleuthkit.autopsy.timeline.TimeLineController; import org.sleuthkit.autopsy.timeline.datamodel.FilteredEventsModel; import org.sleuthkit.autopsy.timeline.datamodel.eventtype.EventType; import org.sleuthkit.autopsy.timeline.ui.AbstractVisualizationPane; -import static org.sleuthkit.autopsy.timeline.ui.countsview.Bundle.*; import org.sleuthkit.autopsy.timeline.utils.RangeDivisionInfo; /** @@ -93,8 +92,8 @@ public class CountsViewPane extends AbstractVisualizationPane series.getData().stream()) - .anyMatch((data) -> data.getXValue().equals(value) && data.getYValue().intValue() > 0); + return dataSeries.stream().flatMap(series -> series.getData().stream()) + .anyMatch(data -> data.getXValue().equals(value) && data.getYValue().intValue() > 0); } @Override @@ -105,11 +104,7 @@ public class CountsViewPane extends AbstractVisualizationPane { - if (scaleGroup.getSelectedToggle() == linearRadio) { + scaleGroup.selectedToggleProperty().addListener((observable, oldToggle, newToggle) -> { + if (newToggle == linearRadio) { scaleProp.set(Scale.LINEAR); - } else if (scaleGroup.getSelectedToggle() == logRadio) { + } else if (newToggle == logRadio) { scaleProp.set(Scale.LOGARITHMIC); } }); From cc3096bbdb2562ecb612303dd8050bd448a73597 Mon Sep 17 00:00:00 2001 From: jmillman Date: Thu, 12 May 2016 10:58:10 -0400 Subject: [PATCH 4/9] improve timeline scale help text --- .../autopsy/timeline/ui/countsview/CountsViewPane.java | 4 ++-- docs/doxygen-user/timeline.dox | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/Core/src/org/sleuthkit/autopsy/timeline/ui/countsview/CountsViewPane.java b/Core/src/org/sleuthkit/autopsy/timeline/ui/countsview/CountsViewPane.java index b31cbfb496..cee108b6cc 100644 --- a/Core/src/org/sleuthkit/autopsy/timeline/ui/countsview/CountsViewPane.java +++ b/Core/src/org/sleuthkit/autopsy/timeline/ui/countsview/CountsViewPane.java @@ -244,9 +244,9 @@ public class CountsViewPane extends AbstractVisualizationPane Date: Thu, 12 May 2016 16:17:47 -0400 Subject: [PATCH 5/9] cleanup --- .../autopsy/timeline/TimeLineController.java | 3 --- .../autopsy/timeline/ui/VisualizationPanel.java | 13 ++----------- 2 files changed, 2 insertions(+), 14 deletions(-) diff --git a/Core/src/org/sleuthkit/autopsy/timeline/TimeLineController.java b/Core/src/org/sleuthkit/autopsy/timeline/TimeLineController.java index a02917d75f..bbc213de10 100644 --- a/Core/src/org/sleuthkit/autopsy/timeline/TimeLineController.java +++ b/Core/src/org/sleuthkit/autopsy/timeline/TimeLineController.java @@ -676,9 +676,6 @@ public class TimeLineController { } } - @NbBundle.Messages({"# {0} - the number of events", - "Timeline.pushDescrLOD.confdlg.msg=You are about to show details for {0} events. This might be very slow or even crash Autopsy.\n\nDo you want to continue?", - "Timeline.pushDescrLOD.confdlg.title=Change description level of detail?"}) synchronized public void pushDescrLOD(DescriptionLoD newLOD) { ZoomParams currentZoom = filteredEvents.zoomParametersProperty().get(); if (currentZoom == null) { diff --git a/Core/src/org/sleuthkit/autopsy/timeline/ui/VisualizationPanel.java b/Core/src/org/sleuthkit/autopsy/timeline/ui/VisualizationPanel.java index e0f5171407..a93e52947e 100644 --- a/Core/src/org/sleuthkit/autopsy/timeline/ui/VisualizationPanel.java +++ b/Core/src/org/sleuthkit/autopsy/timeline/ui/VisualizationPanel.java @@ -544,21 +544,12 @@ final public class VisualizationPanel extends BorderPane { } private void refreshTimeUI() { - refreshTimeUI(filteredEvents.timeRangeProperty().get()); - } - - private void refreshTimeUI(Interval interval) { - RangeDivisionInfo rangeDivisionInfo = RangeDivisionInfo.getRangeDivisionInfo(filteredEvents.getSpanningInterval()); - final long minTime = rangeDivisionInfo.getLowerBound(); final long maxTime = rangeDivisionInfo.getUpperBound(); - - long startMillis = interval.getStartMillis(); - long endMillis = interval.getEndMillis(); - + long startMillis = filteredEvents.getTimeRange().getStartMillis(); + long endMillis = filteredEvents.getTimeRange().getEndMillis(); if (minTime > 0 && maxTime > minTime) { - Platform.runLater(() -> { startPicker.localDateTimeProperty().removeListener(startListener); endPicker.localDateTimeProperty().removeListener(endListener); From 259fc185c2665b7cfc93de76e43a6ac8ae98b89d Mon Sep 17 00:00:00 2001 From: jmillman Date: Thu, 12 May 2016 16:37:34 -0400 Subject: [PATCH 6/9] revert eventing change that mysteriously broke the zoom sliders --- .../timeline/ui/AbstractVisualizationPane.java | 13 +++++++++++++ .../autopsy/timeline/ui/VisualizationPanel.java | 10 +++++++--- 2 files changed, 20 insertions(+), 3 deletions(-) diff --git a/Core/src/org/sleuthkit/autopsy/timeline/ui/AbstractVisualizationPane.java b/Core/src/org/sleuthkit/autopsy/timeline/ui/AbstractVisualizationPane.java index edf74385f6..4aa137c94f 100644 --- a/Core/src/org/sleuthkit/autopsy/timeline/ui/AbstractVisualizationPane.java +++ b/Core/src/org/sleuthkit/autopsy/timeline/ui/AbstractVisualizationPane.java @@ -18,6 +18,7 @@ */ package org.sleuthkit.autopsy.timeline.ui; +import com.google.common.eventbus.Subscribe; import java.util.ArrayList; import java.util.Collections; import java.util.Comparator; @@ -71,6 +72,7 @@ import org.sleuthkit.autopsy.coreutils.ThreadConfined; import org.sleuthkit.autopsy.timeline.TimeLineController; import org.sleuthkit.autopsy.timeline.datamodel.FilteredEventsModel; import org.sleuthkit.autopsy.timeline.datamodel.eventtype.EventType; +import org.sleuthkit.autopsy.timeline.events.RefreshRequestedEvent; /** * Abstract base class for TimeLineChart based visualizations. @@ -401,6 +403,17 @@ public abstract class AbstractVisualizationPane { if (Bundle.VisualizationPanel_tagsAddedOrDeleted().equals(notificationPane.getText())) { notificationPane.hide(); @@ -543,12 +542,17 @@ final public class VisualizationPanel extends BorderPane { controller.monitorTask(histogramTask); } + /** + * Refresh the time selection UI to match the current zoome paramaters. + */ private void refreshTimeUI() { RangeDivisionInfo rangeDivisionInfo = RangeDivisionInfo.getRangeDivisionInfo(filteredEvents.getSpanningInterval()); final long minTime = rangeDivisionInfo.getLowerBound(); final long maxTime = rangeDivisionInfo.getUpperBound(); + long startMillis = filteredEvents.getTimeRange().getStartMillis(); long endMillis = filteredEvents.getTimeRange().getEndMillis(); + if (minTime > 0 && maxTime > minTime) { Platform.runLater(() -> { startPicker.localDateTimeProperty().removeListener(startListener); From d0423f78708de5fc493c81c1ed1b990bb8a45168 Mon Sep 17 00:00:00 2001 From: jmillman Date: Thu, 12 May 2016 17:56:15 -0400 Subject: [PATCH 7/9] seperate help for log and linear scale --- .../ui/countsview/CountsViewPane.java | 74 ++++++++++++++----- .../ui/countsview/CountsViewSettingsPane.fxml | 18 +++-- 2 files changed, 67 insertions(+), 25 deletions(-) diff --git a/Core/src/org/sleuthkit/autopsy/timeline/ui/countsview/CountsViewPane.java b/Core/src/org/sleuthkit/autopsy/timeline/ui/countsview/CountsViewPane.java index 1297cc75ca..19667f07ae 100644 --- a/Core/src/org/sleuthkit/autopsy/timeline/ui/countsview/CountsViewPane.java +++ b/Core/src/org/sleuthkit/autopsy/timeline/ui/countsview/CountsViewPane.java @@ -39,6 +39,7 @@ import javafx.scene.control.Label; import javafx.scene.control.RadioButton; import javafx.scene.control.ToggleGroup; import javafx.scene.control.Tooltip; +import javafx.scene.image.Image; import javafx.scene.image.ImageView; import javafx.scene.layout.BorderPane; import javafx.scene.layout.HBox; @@ -236,7 +237,9 @@ public class CountsViewPane extends AbstractVisualizationPane { - Text text = new Text(Bundle.CountsViewPane_scaleHelp()); - Text text2 = new Text(Bundle.CountsViewPane_scaleHelp2()); + //make a popup help "window" with a description of the log scale. + logImageView.setCursor(Cursor.HAND); + logImageView.setOnMouseClicked(clicked -> { + Text text = new Text(Bundle.CountsViewPane_scaleHelpLog()); + Text text2 = new Text(Bundle.CountsViewPane_scaleHelpLog2()); Font baseFont = text.getFont(); text2.setFont(Font.font(baseFont.getFamily(), FontWeight.BOLD, FontPosture.ITALIC, baseFont.getSize())); - Text text3 = new Text(Bundle.CountsViewPane_scaleHelp3()); + Text text3 = new Text(Bundle.CountsViewPane_scaleHelpLog3()); + showPopoverHelp(logImageView, + Bundle.CountsViewPane_logRadio_text(), + logImageView.getImage(), + new TextFlow(text, text2, text3)); + }); - Pane borderPane = new BorderPane(null, null, new ImageView(helpImageView.getImage()), - new TextFlow(text, text2, text3), - new Label(Bundle.CountsViewPane_scaleHelp_label_text())); - borderPane.setPadding(new Insets(10)); - borderPane.setPrefWidth(500); - - PopOver popOver = new PopOver(borderPane); - popOver.setDetachable(false); - popOver.setArrowLocation(PopOver.ArrowLocation.TOP_CENTER); - popOver.show(helpImageView); + //make a popup help "window" with a description of the linear scale. + linearImageView.setCursor(Cursor.HAND); + linearImageView.setOnMouseClicked(clicked -> { + Text text = new Text(Bundle.CountsViewPane_scaleHelpLinear()); + text.setWrappingWidth(480); //This is a hack to fix the layout. + showPopoverHelp(linearImageView, + Bundle.CountsViewPane_linearRadio_text(), + linearImageView.getImage(), text); }); } @@ -293,6 +300,33 @@ public class CountsViewPane extends AbstractVisualizationPane - + - + - - - + + + + + + + + + + + From b20ed2c89ba9a435418e541ff56bf0c3fc7748f8 Mon Sep 17 00:00:00 2001 From: jmillman Date: Fri, 13 May 2016 11:09:08 -0400 Subject: [PATCH 8/9] keep pinned toggle in sync with state of visualization. cleanup and comments --- .../autopsy/timeline/ui/IntervalSelector.java | 4 +- .../autopsy/timeline/ui/TimeLineChart.java | 19 +-- .../timeline/ui/detailview/DetailsChart.java | 126 ++++++++++-------- 3 files changed, 83 insertions(+), 66 deletions(-) diff --git a/Core/src/org/sleuthkit/autopsy/timeline/ui/IntervalSelector.java b/Core/src/org/sleuthkit/autopsy/timeline/ui/IntervalSelector.java index 2ecddba51e..5d57134c7d 100644 --- a/Core/src/org/sleuthkit/autopsy/timeline/ui/IntervalSelector.java +++ b/Core/src/org/sleuthkit/autopsy/timeline/ui/IntervalSelector.java @@ -336,8 +336,8 @@ public abstract class IntervalSelector extends BorderPane { IntervalSelector newIntervalSelector(); /** - * clear any references to previous interval selectors , including - * removing the interval selector from the ui / scene-graph + * Clear any references to previous interval selectors , including + * removing the interval selector from the UI / scene-graph. */ void clearIntervalSelector(); diff --git a/Core/src/org/sleuthkit/autopsy/timeline/ui/TimeLineChart.java b/Core/src/org/sleuthkit/autopsy/timeline/ui/TimeLineChart.java index 22516eba78..ed73a29f45 100644 --- a/Core/src/org/sleuthkit/autopsy/timeline/ui/TimeLineChart.java +++ b/Core/src/org/sleuthkit/autopsy/timeline/ui/TimeLineChart.java @@ -44,8 +44,10 @@ public interface TimeLineChart extends ContextMenuProvider, IntervalSelectorP ObservableList getSelectedNodes(); + @Override IntervalSelector getIntervalSelector(); + @Override void setIntervalSelector(IntervalSelector newIntervalSelector); /** @@ -54,30 +56,29 @@ public interface TimeLineChart extends ContextMenuProvider, IntervalSelectorP * * @return a new interval selector */ + @Override IntervalSelector newIntervalSelector(); - /** - * clear any references to previous interval selectors , including removing - * the interval selector from the ui / scene-graph - */ + @Override void clearIntervalSelector(); + @Override public Axis getXAxis(); + @Override public TimeLineController getController(); /** - * drag handler class used by {@link TimeLineChart}s to create - * {@link IntervalSelector}s + * Drag handler class used by TimeLineCharts to create IntervalSelectors * - * @param the type of values along the horizontal axis - * @param the type of chart this is a drag handler for + * @param The type of values along the horizontal axis. + * @param The type of chart this is a drag handler for. */ public static class ChartDragHandler> implements EventHandler { private final Y chart; - private double startX; //hanlder mainstains position of drag start + private double startX; //hanlder maintains position of drag start public ChartDragHandler(Y chart) { this.chart = chart; diff --git a/Core/src/org/sleuthkit/autopsy/timeline/ui/detailview/DetailsChart.java b/Core/src/org/sleuthkit/autopsy/timeline/ui/detailview/DetailsChart.java index 41fbd5f087..de35136920 100644 --- a/Core/src/org/sleuthkit/autopsy/timeline/ui/detailview/DetailsChart.java +++ b/Core/src/org/sleuthkit/autopsy/timeline/ui/detailview/DetailsChart.java @@ -21,7 +21,6 @@ package org.sleuthkit.autopsy.timeline.ui.detailview; import java.util.Arrays; import java.util.MissingResourceException; import java.util.function.Predicate; -import javafx.beans.Observable; import javafx.beans.property.SimpleObjectProperty; import javafx.collections.FXCollections; import javafx.collections.ObservableList; @@ -62,9 +61,14 @@ final class DetailsChart extends Control implements TimeLineChart { private final Axis verticalAxis; /** - * property that holds the interval selector if one is active + * Property that holds the interval selector if one is active */ - private final SimpleObjectProperty> intervalSelector = new SimpleObjectProperty<>(); + private final SimpleObjectProperty> intervalSelectorProp = new SimpleObjectProperty<>(); + + /** + * ObservableSet of GuieLines displayed in this chart + */ + private final ObservableSet guideLines = FXCollections.observableSet(); /** * Predicate used to determine if a EventNode should be highlighted. Can be @@ -75,12 +79,12 @@ final class DetailsChart extends Control implements TimeLineChart { private final SimpleObjectProperty>> highlightPredicate = new SimpleObjectProperty<>((x) -> false); /** - * an ObservableList of the Nodes that are selected in this chart. + * An ObservableList of the Nodes that are selected in this chart. */ private final ObservableList> selectedNodes; /** - * an ObservableList representing all the events in the tree as a flat list + * An ObservableList representing all the events in the tree as a flat list * of events whose roots are in the eventStripes lists * */ @@ -98,12 +102,25 @@ final class DetailsChart extends Control implements TimeLineChart { private final TimeLineController controller; /** - * an ObservableList of root event stripes to display in the chart. Must - * only be modified on the JFX Thread. + * An ObservableList of root event stripes to display in the chart. */ @ThreadConfined(type = ThreadConfined.ThreadType.JFX) private final ObservableList rootEventStripes = FXCollections.observableArrayList(); + /** + * Constructor + * + * @param controller The TimeLineController for this chart. + * @param detailsChartDateAxis The DateAxis to use in this chart. + * @param pinnedDateAxis The DateAxis to use for the pinned lane. It + * will not be shown on screen, but must not be + * null or the same as the detailsChartDateAxis. + * @param verticalAxis An Axis to use as the vertical + * axis in the primary lane. + * @param selectedNodes An ObservableList>, that + * will be used to keep track of the nodes + * selected in this chart. + */ DetailsChart(TimeLineController controller, DateAxis detailsChartDateAxis, DateAxis pinnedDateAxis, Axis verticalAxis, ObservableList> selectedNodes) { this.controller = controller; this.layoutSettings = new DetailsChartLayoutSettings(controller); @@ -113,8 +130,9 @@ final class DetailsChart extends Control implements TimeLineChart { this.selectedNodes = selectedNodes; FilteredEventsModel eventsModel = getController().getEventsModel(); + /* - * if the time range is changed, clear the guide line and the interval + * If the time range is changed, clear the guide line and the interval * selector, since they may not be in view any more. */ eventsModel.timeRangeProperty().addListener(o -> clearTimeBasedUIElements()); @@ -127,9 +145,9 @@ final class DetailsChart extends Control implements TimeLineChart { * Get the DateTime represented by the given x-position in this chart. * * - * @param xPos the x-position to get the DataTime for + * @param xPos The x-position to get the DataTime for. * - * @return the DateTime represented by the given x-position in this chart. + * @return The DateTime represented by the given x-position in this chart. */ DateTime getDateTimeForPosition(double xPos) { return getXAxis().getValueForDisplay(getXAxis().parentToLocal(xPos, 0).getX()); @@ -138,7 +156,7 @@ final class DetailsChart extends Control implements TimeLineChart { /** * Add an EventStripe to the list of root stripes. * - * @param stripe the EventStripe to add. + * @param stripe The EventStripe to add. */ @ThreadConfined(type = ThreadConfined.ThreadType.JFX) void addStripe(EventStripe stripe) { @@ -147,10 +165,9 @@ final class DetailsChart extends Control implements TimeLineChart { } /** - * * Remove the given GuideLine from this chart. * - * @param guideLine the GuideLine to remove + * @param guideLine The GuideLine to remove. */ void clearGuideLine(GuideLine guideLine) { guideLines.remove(guideLine); @@ -162,23 +179,22 @@ final class DetailsChart extends Control implements TimeLineChart { } /** - * Get the DetailsCharLayoutSettings for this chart. + * Get the DetailsChartLayoutSettings for this chart. * - * @return the DetailsCharLayoutSettings for this chart. + * @return The DetailsChartLayoutSettings for this chart. */ DetailsChartLayoutSettings getLayoutSettings() { return layoutSettings; } /** - * * Set the Predicate used to determine if a EventNode should be highlighted. * Can be a combination of conditions such as: be in the selectedNodes list * OR have a particular description, but it must include be in the * selectedNodes (selectedNodes::contains). * - * @param highlightPredicate the Predicate used to determine which nodes to - * highlight + * @param highlightPredicate The Predicate used to determine which nodes to + * highlight. */ void setHighlightPredicate(Predicate> highlightPredicate) { this.highlightPredicate.set(highlightPredicate); @@ -209,14 +225,9 @@ final class DetailsChart extends Control implements TimeLineChart { clearIntervalSelector(); } - /** - * ObservableSet of GuieLines displayed in this chart - */ - private final ObservableSet guideLines = FXCollections.observableSet(); - @Override public void clearIntervalSelector() { - intervalSelector.set(null); + intervalSelectorProp.set(null); } @Override @@ -226,16 +237,12 @@ final class DetailsChart extends Control implements TimeLineChart { @Override public IntervalSelector getIntervalSelector() { - return intervalSelector.get(); - } - - private SimpleObjectProperty> intervalSelector() { - return intervalSelector; + return intervalSelectorProp.get(); } @Override public void setIntervalSelector(IntervalSelector newIntervalSelector) { - intervalSelector.set(newIntervalSelector); + intervalSelectorProp.set(newIntervalSelector); } @Override @@ -278,7 +285,7 @@ final class DetailsChart extends Control implements TimeLineChart { /** * Get the ObservableList of root EventStripes. * - * @return the ObservableList of root EventStripes. + * @return The ObservableList of root EventStripes. */ ObservableList getRootEventStripes() { return rootEventStripes; @@ -386,8 +393,9 @@ final class DetailsChart extends Control implements TimeLineChart { private final Pane rootPane; /** - * The divder position of masterDetailPane is saved when the pinned lane - * is hidden so it can be restored when the pinned lane is shown again. + * The divider position of masterDetailPane is saved when the pinned + * lane is hidden so it can be restored when the pinned lane is shown + * again. */ private double dividerPosition = .1; @@ -401,8 +409,7 @@ final class DetailsChart extends Control implements TimeLineChart { pinnedView = new ScrollingLaneWrapper(pinnedLane); pinnedLane.setMinHeight(MIN_PINNED_LANE_HEIGHT); - pinnedLane.maxVScrollProperty().addListener((Observable observable) -> syncPinnedHeight()); - syncPinnedHeight(); + pinnedLane.maxVScrollProperty().addListener(maxVScroll -> syncPinnedHeight()); //assemble scene graph masterDetailPane = new MasterDetailPane(Side.TOP, primaryView, pinnedView, false); @@ -414,10 +421,8 @@ final class DetailsChart extends Control implements TimeLineChart { //maintain highlighted effect on correct nodes getSkinnable().highlightPredicate.addListener((observable, oldPredicate, newPredicate) -> { - primaryLane.getAllNodes().forEach(eNode -> - eNode.applyHighlightEffect(newPredicate.test(eNode))); - pinnedLane.getAllNodes().forEach(eNode -> - eNode.applyHighlightEffect(newPredicate.test(eNode))); + primaryLane.getAllNodes().forEach(primaryNode -> primaryNode.applyHighlightEffect(newPredicate.test(primaryNode))); + pinnedLane.getAllNodes().forEach(pinnedNode -> pinnedNode.applyHighlightEffect(newPredicate.test(pinnedNode))); }); //configure mouse listeners @@ -427,20 +432,11 @@ final class DetailsChart extends Control implements TimeLineChart { configureMouseListeners(pinnedLane, mouseClickedHandler, chartDragHandler); //show and hide pinned lane in response to settings property change - getSkinnable().getLayoutSettings().pinnedLaneShowing().addListener(observable -> { - boolean selected = getSkinnable().getLayoutSettings().isPinnedLaneShowing(); - if (selected == false) { - dividerPosition = masterDetailPane.getDividerPosition(); - } - masterDetailPane.setShowDetailNode(selected); - if (selected) { - syncPinnedHeight(); - masterDetailPane.setDividerPosition(dividerPosition); - } - }); + getSkinnable().getLayoutSettings().pinnedLaneShowing().addListener(observable -> syncPinnedShowing()); + syncPinnedShowing(); //show and remove interval selector in sync with control state change - getSkinnable().intervalSelector().addListener((observable, oldIntervalSelector, newIntervalSelector) -> { + getSkinnable().intervalSelectorProp.addListener((observable, oldIntervalSelector, newIntervalSelector) -> { rootPane.getChildren().remove(oldIntervalSelector); if (null != newIntervalSelector) { rootPane.getChildren().add(newIntervalSelector); @@ -470,11 +466,11 @@ final class DetailsChart extends Control implements TimeLineChart { /** * Add the given listeners to the given chart lane * - * @param chartLane the Chart lane to add the listeners to - * @param mouseClickedHandler the mouseClickedHandler to add to chart - * @param chartDragHandler1 the ChartDragHandler to add to the chart + * @param chartLane The Chart lane to add the listeners to. + * @param mouseClickedHandler The MouseClickedHandler to add to chart. + * @param chartDragHandler1 The ChartDragHandler to add to the chart * as pressed, released, dragged, and clicked - * handler + * handler. */ static private void configureMouseListeners(final DetailsChartLane chartLane, final TimeLineChart.MouseClickedHandler mouseClickedHandler, final TimeLineChart.ChartDragHandler chartDragHandler) { chartLane.setOnMousePressed(chartDragHandler); @@ -483,5 +479,25 @@ final class DetailsChart extends Control implements TimeLineChart { chartLane.setOnMouseClicked(chartDragHandler); chartLane.addEventHandler(MouseEvent.MOUSE_CLICKED, mouseClickedHandler); } + + /** + * Show the pinned lane if and only if the settings object says it + * should be. + */ + private void syncPinnedShowing() { + boolean pinnedLaneShowing = getSkinnable().getLayoutSettings().isPinnedLaneShowing(); + if (pinnedLaneShowing == false) { + //Save the divider position for later. + dividerPosition = masterDetailPane.getDividerPosition(); + } + + masterDetailPane.setShowDetailNode(pinnedLaneShowing); + + if (pinnedLaneShowing) { + syncPinnedHeight(); + //Restore the devider position. + masterDetailPane.setDividerPosition(dividerPosition); + } + } } } From 6ff6a51db20bd597bc62b80e9bb339fcaf00328a Mon Sep 17 00:00:00 2001 From: jmillman Date: Fri, 13 May 2016 14:07:05 -0400 Subject: [PATCH 9/9] fix typo --- .../autopsy/timeline/ui/countsview/CountsViewPane.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Core/src/org/sleuthkit/autopsy/timeline/ui/countsview/CountsViewPane.java b/Core/src/org/sleuthkit/autopsy/timeline/ui/countsview/CountsViewPane.java index 19667f07ae..22849f913a 100644 --- a/Core/src/org/sleuthkit/autopsy/timeline/ui/countsview/CountsViewPane.java +++ b/Core/src/org/sleuthkit/autopsy/timeline/ui/countsview/CountsViewPane.java @@ -248,7 +248,7 @@ public class CountsViewPane extends AbstractVisualizationPane