Autopsy  4.8.0
Graphical digital forensics platform for The Sleuth Kit and other tools.
ZoomOut.java
Go to the documentation of this file.
1 /*
2  * Autopsy Forensic Browser
3  *
4  * Copyright 2015 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.actions;
20 
21 import javafx.beans.binding.BooleanBinding;
22 import javafx.scene.image.Image;
23 import javafx.scene.image.ImageView;
24 import org.controlsfx.control.action.Action;
25 import org.openide.util.NbBundle;
28 
32 public class ZoomOut extends Action {
33 
34  private static final Image MAGNIFIER_OUT = new Image("/org/sleuthkit/autopsy/timeline/images/magnifier-zoom-out-red.png"); //NOI18N NON-NLS
35 
36  @NbBundle.Messages({"ZoomOut.longText=Zoom out to view about 50% more time.",
37  "ZoomOut.action.text=Zoom out"})
38  public ZoomOut(TimeLineController controller) {
39  super(Bundle.ZoomOut_action_text());
40  setLongText(Bundle.ZoomOut_longText());
41  setGraphic(new ImageView(MAGNIFIER_OUT));
42  setEventHandler(actionEvent -> controller.pushZoomOutTime());
43 
44  //disable action when the current time range already encompases the entire case.
45  disabledProperty().bind(new BooleanBinding() {
46  private final FilteredEventsModel eventsModel = controller.getEventsModel();
47 
48  {
49  bind(eventsModel.zoomParametersProperty(), eventsModel.timeRangeProperty());
50  }
51 
52  @Override
53  protected boolean computeValue() {
54  return eventsModel.timeRangeProperty().get().contains(eventsModel.getSpanningInterval());
55  }
56  });
57  }
58 }
synchronized ReadOnlyObjectProperty< ZoomParams > zoomParametersProperty()
ZoomOut(TimeLineController controller)
Definition: ZoomOut.java:38
synchronized ReadOnlyObjectProperty< Interval > timeRangeProperty()

Copyright © 2012-2018 Basis Technology. Generated on: Thu Oct 4 2018
This work is licensed under a Creative Commons Attribution-Share Alike 3.0 United States License.