6 package org.sleuthkit.autopsy.timeline.ui.detailview;
8 import javafx.scene.image.Image;
9 import javafx.scene.image.ImageView;
10 import org.controlsfx.control.action.Action;
11 import org.openide.util.NbBundle;
19 @NbBundle.Messages(value = {
"HideDescriptionAction.displayName=Hide",
20 "HideDescriptionAction.displayMsg=Hide this group from the details view."})
21 class HideDescriptionAction extends Action {
23 private static final Image HIDE =
new Image(
"/org/sleuthkit/autopsy/timeline/images/eye--minus.png");
25 HideDescriptionAction(String description, DescriptionLoD descriptionLoD, DetailsChart chart) {
26 super(Bundle.HideDescriptionAction_displayName());
27 setLongText(Bundle.HideDescriptionAction_displayMsg());
28 setGraphic(
new ImageView(HIDE));
30 setEventHandler(actionEvent -> {
39 final DescriptionFilter testFilter =
new DescriptionFilter(descriptionLoD, description, DescriptionFilter.FilterMode.EXCLUDE);
40 DescriptionFilter descriptionFilter = chart.getController().getQuickHideFilters().stream()
41 .filter(testFilter::equals).findFirst()
44 testFilter.selectedProperty().addListener(selectedProperty -> chart.requestLayout());
45 chart.getController().getQuickHideFilters().add(testFilter);
48 descriptionFilter.setSelected(
true);