From 12929528f9c002d6235ff40aa0f1a0553aed3aa9 Mon Sep 17 00:00:00 2001 From: jmillman Date: Tue, 21 Oct 2014 16:52:25 -0400 Subject: [PATCH 1/4] remove sqrt scale; move detail view options into an "Advanced Layout Options" button --- .../autopsy/timeline/TimeLineController.java | 2 +- .../timeline/ui/AbstractVisualization.java | 3 +- .../timeline/ui/VisualizationPanel.fxml | 12 +- .../ui/countsview/CountsViewPane.java | 10 +- .../ui/countsview/CountsViewSettingsPane.fxml | 35 +++--- .../ui/detailview/DetailViewPane.java | 8 +- .../ui/detailview/DetailViewSettingsPane.fxml | 105 +++++++++++------- 7 files changed, 104 insertions(+), 71 deletions(-) diff --git a/Core/src/org/sleuthkit/autopsy/timeline/TimeLineController.java b/Core/src/org/sleuthkit/autopsy/timeline/TimeLineController.java index 6780af841a..50fae61d4b 100644 --- a/Core/src/org/sleuthkit/autopsy/timeline/TimeLineController.java +++ b/Core/src/org/sleuthkit/autopsy/timeline/TimeLineController.java @@ -670,7 +670,7 @@ public class TimeLineController { } @Immutable - class AutopsyCaseListener implements PropertyChangeListener { + private class AutopsyCaseListener implements PropertyChangeListener { @Override public void propertyChange(PropertyChangeEvent evt) { diff --git a/Core/src/org/sleuthkit/autopsy/timeline/ui/AbstractVisualization.java b/Core/src/org/sleuthkit/autopsy/timeline/ui/AbstractVisualization.java index aabac6e1bb..fad4f78949 100644 --- a/Core/src/org/sleuthkit/autopsy/timeline/ui/AbstractVisualization.java +++ b/Core/src/org/sleuthkit/autopsy/timeline/ui/AbstractVisualization.java @@ -18,6 +18,7 @@ */ package org.sleuthkit.autopsy.timeline.ui; +import java.util.Collections; import java.util.List; import java.util.concurrent.ExecutionException; import javafx.beans.InvalidationListener; @@ -102,7 +103,7 @@ public abstract class AbstractVisualization getSettingsNodes() { - return settingsNodes; + return Collections.unmodifiableList(settingsNodes); } /** @param value a value along this visualization's x axis diff --git a/Core/src/org/sleuthkit/autopsy/timeline/ui/VisualizationPanel.fxml b/Core/src/org/sleuthkit/autopsy/timeline/ui/VisualizationPanel.fxml index 7aa00b91b4..d80a29ad7d 100644 --- a/Core/src/org/sleuthkit/autopsy/timeline/ui/VisualizationPanel.fxml +++ b/Core/src/org/sleuthkit/autopsy/timeline/ui/VisualizationPanel.fxml @@ -1,5 +1,6 @@ + @@ -14,10 +15,13 @@ - + + + + + + + + + + + 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 e781608910..c6e68a1ec4 100644 --- a/Core/src/org/sleuthkit/autopsy/timeline/ui/detailview/DetailViewPane.java +++ b/Core/src/org/sleuthkit/autopsy/timeline/ui/detailview/DetailViewPane.java @@ -38,6 +38,7 @@ import javafx.scene.chart.Axis; import javafx.scene.chart.BarChart; import javafx.scene.chart.XYChart; import javafx.scene.control.CheckBox; +import javafx.scene.control.Label; import javafx.scene.control.MultipleSelectionModel; import javafx.scene.control.RadioButton; import javafx.scene.control.ScrollBar; @@ -60,9 +61,9 @@ import javafx.scene.layout.Priority; import javafx.scene.layout.Region; import javafx.scene.layout.VBox; import org.joda.time.DateTime; -import org.sleuthkit.autopsy.timeline.FXMLConstructor; import org.sleuthkit.autopsy.coreutils.LoggedTask; import org.sleuthkit.autopsy.coreutils.Logger; +import org.sleuthkit.autopsy.timeline.FXMLConstructor; import org.sleuthkit.autopsy.timeline.TimeLineController; import org.sleuthkit.autopsy.timeline.events.AggregateEvent; import org.sleuthkit.autopsy.timeline.events.FilteredEventsModel; @@ -391,6 +392,9 @@ public class DetailViewPane extends AbstractVisualization { if (truncateWidthSlider.isValueChanging() == false) { chart.getTruncateWidth().set(truncateWidthSlider.getValue()); diff --git a/Core/src/org/sleuthkit/autopsy/timeline/ui/detailview/DetailViewSettingsPane.fxml b/Core/src/org/sleuthkit/autopsy/timeline/ui/detailview/DetailViewSettingsPane.fxml index 47b444c4e5..60de1944fe 100644 --- a/Core/src/org/sleuthkit/autopsy/timeline/ui/detailview/DetailViewSettingsPane.fxml +++ b/Core/src/org/sleuthkit/autopsy/timeline/ui/detailview/DetailViewSettingsPane.fxml @@ -7,48 +7,73 @@ - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + From 6dd3b91a6a28bdd038043f9bed7d5f6eff515f94 Mon Sep 17 00:00:00 2001 From: jmillman Date: Wed, 22 Oct 2014 11:18:46 -0400 Subject: [PATCH 2/4] add dialog to confirm switching to details view when a bar is double clicked at the highest temporal resolution (seconds) --- .../timeline/ui/countsview/Bundle.properties | 5 +++ .../ui/countsview/CountsViewPane.java | 35 +++++++++++++++++-- 2 files changed, 38 insertions(+), 2 deletions(-) diff --git a/Core/src/org/sleuthkit/autopsy/timeline/ui/countsview/Bundle.properties b/Core/src/org/sleuthkit/autopsy/timeline/ui/countsview/Bundle.properties index 284a121fc9..3772037238 100644 --- a/Core/src/org/sleuthkit/autopsy/timeline/ui/countsview/Bundle.properties +++ b/Core/src/org/sleuthkit/autopsy/timeline/ui/countsview/Bundle.properties @@ -16,4 +16,9 @@ * See the License for the specific language governing permissions and * limitations under the License. */ +#this is the label for the vetical axis CountsChartPane.numberOfEvents=Number of Events +#this is the message shown in the dialog when the user double clicks a bar at seconds resolution +CountsViewPane.detailSwitchMessage="There is no temporal resolution smaller than Seconds. Would you like to switch to the Details view instead?" +#this is the title shown in the dialog when the user double clicks a bar at seconds resolution +CountsViewPane.detailSwitchTitle="Switch to Details View? 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 171e0f168a..3939a37977 100644 --- a/Core/src/org/sleuthkit/autopsy/timeline/ui/countsview/CountsViewPane.java +++ b/Core/src/org/sleuthkit/autopsy/timeline/ui/countsview/CountsViewPane.java @@ -53,17 +53,20 @@ import javafx.scene.input.MouseEvent; import javafx.scene.layout.HBox; import javafx.scene.layout.Pane; import javafx.scene.layout.Region; +import javax.swing.JOptionPane; import org.controlsfx.control.action.ActionGroup; import org.controlsfx.control.action.ActionUtils; import org.joda.time.DateTime; import org.joda.time.Interval; import org.joda.time.Seconds; +import org.openide.util.NbBundle; import org.sleuthkit.autopsy.coreutils.ColorUtilities; import org.sleuthkit.autopsy.coreutils.LoggedTask; import org.sleuthkit.autopsy.coreutils.Logger; import org.sleuthkit.autopsy.timeline.FXMLConstructor; import org.sleuthkit.autopsy.timeline.TimeLineController; import org.sleuthkit.autopsy.timeline.TimeLineView; +import org.sleuthkit.autopsy.timeline.VisualizationMode; import org.sleuthkit.autopsy.timeline.actions.Back; import org.sleuthkit.autopsy.timeline.actions.Forward; import org.sleuthkit.autopsy.timeline.events.FilteredEventsModel; @@ -451,13 +454,41 @@ public class CountsViewPane extends AbstractVisualization= 2) { //double-click => zoom in time if (interval.toDuration().isLongerThan(Seconds.ONE.toStandardDuration())) { controller.pushTimeRange(interval); + } else { + + int showConfirmDialog = JOptionPane.showConfirmDialog(null, + NbBundle.getMessage(CountsViewPane.class, "CountsViewPane.detailSwitchMessage"), + NbBundle.getMessage(CountsViewPane.class, "CountsViewPane.detailSwitchTitle"), JOptionPane.YES_NO_OPTION); + if (showConfirmDialog == JOptionPane.YES_OPTION) { + controller.setViewMode(VisualizationMode.DETAIL); + } + + /* //I would like to use the JAvafx dialog, but it doesn't + * block the ui (because it is embeded in a TopComponent) + * -jm + * + * final Dialogs.CommandLink yes = new + * Dialogs.CommandLink("Yes", "switch to Details view"); + * final Dialogs.CommandLink no = new + * Dialogs.CommandLink("No", "return to Counts view with a + * resolution of Seconds"); + * Action choice = Dialogs.create() + * .title("Switch to Details View?") + * .masthead("There is no temporal resolution smaller than + * Seconds.") + * .message("Would you like to switch to the Details view + * instead?") + * .showCommandLinks(Arrays.asList(yes, no)); + * + * if (choice == yes) { + * controller.setViewMode(VisualizationMode.DETAIL); + * } */ } } } - } - class CountsViewSettingsPane extends HBox { + private class CountsViewSettingsPane extends HBox { @FXML private RadioButton logRadio; From 485aaba086f9b063abe518b0d876df8ab15f62ce Mon Sep 17 00:00:00 2001 From: jmillman Date: Wed, 22 Oct 2014 11:19:08 -0400 Subject: [PATCH 3/4] put scenegraph update on JFX thread --- .../timeline/zooming/ZoomSettingsPane.java | 60 +++++++++---------- 1 file changed, 30 insertions(+), 30 deletions(-) diff --git a/Core/src/org/sleuthkit/autopsy/timeline/zooming/ZoomSettingsPane.java b/Core/src/org/sleuthkit/autopsy/timeline/zooming/ZoomSettingsPane.java index f07e113461..8c7defaa03 100644 --- a/Core/src/org/sleuthkit/autopsy/timeline/zooming/ZoomSettingsPane.java +++ b/Core/src/org/sleuthkit/autopsy/timeline/zooming/ZoomSettingsPane.java @@ -111,40 +111,40 @@ public class ZoomSettingsPane extends TitledPane implements TimeLineView { this.filteredEvents = filteredEvents; initializeSlider(timeUnitSlider, - () -> { - TimeUnits requestedUnit = TimeUnits.values()[new Double(timeUnitSlider.getValue()).intValue()]; - if (requestedUnit == TimeUnits.FOREVER) { - controller.showFullRange(); - } else { - controller.pushTimeRange(IntervalUtils.getIntervalAround(IntervalUtils.middleOf(ZoomSettingsPane.this.filteredEvents.timeRange().get()), requestedUnit.getPeriod())); - } - }, - this.filteredEvents.timeRange(), - () -> { - RangeDivisionInfo rangeInfo = RangeDivisionInfo.getRangeDivisionInfo(this.filteredEvents.timeRange().get()); - ChronoUnit chronoUnit = rangeInfo.getPeriodSize().getChronoUnit(); + () -> { + TimeUnits requestedUnit = TimeUnits.values()[new Double(timeUnitSlider.getValue()).intValue()]; + if (requestedUnit == TimeUnits.FOREVER) { + controller.showFullRange(); + } else { + controller.pushTimeRange(IntervalUtils.getIntervalAround(IntervalUtils.middleOf(ZoomSettingsPane.this.filteredEvents.timeRange().get()), requestedUnit.getPeriod())); + } + }, + this.filteredEvents.timeRange(), + () -> { + RangeDivisionInfo rangeInfo = RangeDivisionInfo.getRangeDivisionInfo(this.filteredEvents.timeRange().get()); + ChronoUnit chronoUnit = rangeInfo.getPeriodSize().getChronoUnit(); - timeUnitSlider.setValue(TimeUnits.fromChronoUnit(chronoUnit).ordinal() - 1); - }); + timeUnitSlider.setValue(TimeUnits.fromChronoUnit(chronoUnit).ordinal() - 1); + }); initializeSlider(descrLODSlider, - () -> { - DescriptionLOD newLOD = DescriptionLOD.values()[Math.round(descrLODSlider.valueProperty().floatValue())]; - controller.pushDescrLOD(newLOD); - }, this.filteredEvents.descriptionLOD(), - () -> { - descrLODSlider.setValue(this.filteredEvents.descriptionLOD().get().ordinal()); - }); + () -> { + DescriptionLOD newLOD = DescriptionLOD.values()[Math.round(descrLODSlider.valueProperty().floatValue())]; + controller.pushDescrLOD(newLOD); + }, this.filteredEvents.descriptionLOD(), + () -> { + descrLODSlider.setValue(this.filteredEvents.descriptionLOD().get().ordinal()); + }); initializeSlider(typeZoomSlider, - () -> { - EventTypeZoomLevel newZoomLevel = EventTypeZoomLevel.values()[Math.round(typeZoomSlider.valueProperty().floatValue())]; - controller.pushEventTypeZoom(newZoomLevel); - }, - this.filteredEvents.eventTypeZoom(), - () -> { - typeZoomSlider.setValue(this.filteredEvents.eventTypeZoom().get().ordinal()); - }); + () -> { + EventTypeZoomLevel newZoomLevel = EventTypeZoomLevel.values()[Math.round(typeZoomSlider.valueProperty().floatValue())]; + controller.pushEventTypeZoom(newZoomLevel); + }, + this.filteredEvents.eventTypeZoom(), + () -> { + typeZoomSlider.setValue(this.filteredEvents.eventTypeZoom().get().ordinal()); + }); } /** @@ -178,7 +178,7 @@ public class ZoomSettingsPane extends TitledPane implements TimeLineView { slider.valueProperty().removeListener(sliderListener); slider.valueChangingProperty().removeListener(sliderListener); - driverChangHandler.run(); + Platform.runLater(driverChangHandler); slider.valueProperty().addListener(sliderListener); slider.valueChangingProperty().addListener(sliderListener); From 7a9ab05f0cc12d85fff6fc27901376500e21e5e1 Mon Sep 17 00:00:00 2001 From: jmillman Date: Wed, 22 Oct 2014 11:23:42 -0400 Subject: [PATCH 4/4] fix newline in bundle --- .../sleuthkit/autopsy/timeline/ui/countsview/Bundle.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Core/src/org/sleuthkit/autopsy/timeline/ui/countsview/Bundle.properties b/Core/src/org/sleuthkit/autopsy/timeline/ui/countsview/Bundle.properties index 3772037238..7b7ac0e30f 100644 --- a/Core/src/org/sleuthkit/autopsy/timeline/ui/countsview/Bundle.properties +++ b/Core/src/org/sleuthkit/autopsy/timeline/ui/countsview/Bundle.properties @@ -19,6 +19,6 @@ #this is the label for the vetical axis CountsChartPane.numberOfEvents=Number of Events #this is the message shown in the dialog when the user double clicks a bar at seconds resolution -CountsViewPane.detailSwitchMessage="There is no temporal resolution smaller than Seconds. Would you like to switch to the Details view instead?" +CountsViewPane.detailSwitchMessage=There is no temporal resolution smaller than Seconds.\nWould you like to switch to the Details view instead? #this is the title shown in the dialog when the user double clicks a bar at seconds resolution CountsViewPane.detailSwitchTitle="Switch to Details View?