19 package org.sleuthkit.autopsy.timeline.ui.detailview;
21 import javafx.scene.image.Image;
22 import javafx.scene.image.ImageView;
23 import org.controlsfx.control.action.Action;
24 import org.openide.util.NbBundle;
33 @NbBundle.Messages(value = {
"HideDescriptionAction.displayName=Hide",
34 "HideDescriptionAction.displayMsg=Hide this group from the details view."})
35 class HideDescriptionAction extends Action {
37 private static final Image HIDE =
new Image(
"/org/sleuthkit/autopsy/timeline/images/eye--minus.png");
39 HideDescriptionAction(String description, TimelineLevelOfDetail descriptionLoD, DetailsChart chart) {
40 super(Bundle.HideDescriptionAction_displayName());
41 setLongText(Bundle.HideDescriptionAction_displayMsg());
42 setGraphic(
new ImageView(HIDE));
44 setEventHandler(actionEvent -> {
53 final DescriptionFilterState testFilter
54 =
new DescriptionFilterState(
55 new DescriptionFilter(descriptionLoD, description));
57 DescriptionFilterState descriptionFilter = chart.getController().getQuickHideFilters().stream()
58 .filter(otherFilterState -> testFilter.getFilter().equals(otherFilterState.getFilter()))
62 testFilter.selectedProperty().addListener(selectedProperty -> chart.requestLayout());
63 chart.getController().getQuickHideFilters().add(testFilter);
66 descriptionFilter.setSelected(
true);