Autopsy  4.16.0
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-16 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;
27 
32 public class StatusBar extends ToolBar {
33 
35 
36  @FXML
37  private Label statusLabel;
38 
39  @FXML
40  private ProgressBar progressBar;
41  @FXML
42  private Label taskLabel;
43  @FXML
44  private Label messageLabel;
45 
46  public StatusBar(TimeLineController controller) {
47  this.controller = controller;
48  FXMLConstructor.construct(this, "StatusBar.fxml"); // NON-NLS
49  }
50 
51  @FXML
52  void initialize() {
53  assert progressBar != null : "fx:id=\"progressBar\" was not injected: check your FXML file 'StatusBar.fxml'."; // NON-NLS
54  assert taskLabel != null : "fx:id=\"taskLabel\" was not injected: check your FXML file 'StatusBar.fxml'."; // NON-NLS
55  assert messageLabel != null : "fx:id=\"messageLabel\" was not injected: check your FXML file 'StatusBar.fxml'."; // NON-NLS
56 
57  taskLabel.setVisible(false);
58  taskLabel.textProperty().bind(this.controller.taskTitleProperty());
59  taskLabel.visibleProperty().bind(this.controller.getTasks().emptyProperty().not());
60 
61  messageLabel.textProperty().bind(this.controller.taskMessageProperty());
62  progressBar.progressProperty().bind(this.controller.taskProgressProperty());
63 
64  statusLabel.textProperty().bind(this.controller.statusMessageProperty());
65  statusLabel.visibleProperty().bind(statusLabel.textProperty().isNotEmpty());
66  }
67 }
synchronized ReadOnlyDoubleProperty taskProgressProperty()
synchronized ReadOnlyStringProperty taskTitleProperty()
synchronized ReadOnlyStringProperty taskMessageProperty()
StatusBar(TimeLineController controller)
Definition: StatusBar.java:46
static void construct(Node node, String fxmlFileName)
synchronized ReadOnlyListProperty< Task<?> > getTasks()

Copyright © 2012-2020 Basis Technology. Generated on: Tue Sep 22 2020
This work is licensed under a Creative Commons Attribution-Share Alike 3.0 United States License.