Autopsy  3.1
Graphical digital forensics platform for The Sleuth Kit and other tools.
StatusBar.java
Go to the documentation of this file.
1 /*
2  * Autopsy Forensic Browser
3  *
4  * Copyright 2014 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.ui;
20 
21 import javafx.fxml.FXML;
22 import javafx.scene.control.Label;
23 import javafx.scene.control.ProgressBar;
24 import javafx.scene.control.ToolBar;
25 import javafx.scene.layout.HBox;
26 import javafx.scene.layout.Priority;
27 import javafx.scene.layout.Region;
28 import org.openide.util.NbBundle;
32 
37 public class StatusBar extends ToolBar implements TimeLineUI {
38 
40 
41  @FXML
42  private Label refreshLabel;
43 
44  @FXML
45  private ProgressBar progressBar;
46 
47  @FXML
48  private Region spacer;
49 
50  @FXML
51  private Label taskLabel;
52 
53  @FXML
54  private Label messageLabel;
55 
56  public StatusBar() {
57  FXMLConstructor.construct(this, "StatusBar.fxml"); // NON-NLS
58  }
59 
60  @FXML
61  void initialize() {
62  assert refreshLabel != null : "fx:id=\"refreshLabel\" was not injected: check your FXML file 'StatusBar.fxml'."; // NON-NLS
63  assert progressBar != null : "fx:id=\"progressBar\" was not injected: check your FXML file 'StatusBar.fxml'."; // NON-NLS
64  assert spacer != null : "fx:id=\"spacer\" was not injected: check your FXML file 'StatusBar.fxml'."; // NON-NLS
65  assert taskLabel != null : "fx:id=\"taskLabel\" was not injected: check your FXML file 'StatusBar.fxml'."; // NON-NLS
66  assert messageLabel != null : "fx:id=\"messageLabel\" was not injected: check your FXML file 'StatusBar.fxml'."; // NON-NLS
67  refreshLabel.setVisible(false);
68  refreshLabel.setText(NbBundle.getMessage(this.getClass(), "StatusBar.refreshLabel.text"));
69  messageLabel.setText(NbBundle.getMessage(this.getClass(), "StatusBar.messageLabel.text"));
70  taskLabel.setText(NbBundle.getMessage(this.getClass(), "StatusBar.taskLabel.text"));
71  taskLabel.setVisible(false);
72  HBox.setHgrow(spacer, Priority.ALWAYS);
73  }
74 
75  @Override
76  public void setController(TimeLineController controller) {
77  this.controller = controller;
78  refreshLabel.visibleProperty().bind(this.controller.getNewEventsFlag());
79  taskLabel.textProperty().bind(this.controller.getTaskTitle());
80  messageLabel.textProperty().bind(this.controller.getMessage());
81  progressBar.progressProperty().bind(this.controller.getProgress());
82  taskLabel.visibleProperty().bind(this.controller.getTasks().emptyProperty().not());
83  }
84 }
static void construct(Node n, String fxmlFileName)
synchronized ReadOnlyStringProperty getMessage()
synchronized ReadOnlyDoubleProperty getProgress()
synchronized ReadOnlyStringProperty getTaskTitle()
void setController(TimeLineController controller)
Definition: StatusBar.java:76
synchronized ReadOnlyListProperty< Task<?> > getTasks()

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