Autopsy  4.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-15 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;
31 
36 public class StatusBar extends ToolBar {
37 
39 
40  @FXML
41  private Label refreshLabel;
42 
43  @FXML
44  private Label statusLabel;
45 
46  @FXML
47  private ProgressBar progressBar;
48 
49  @FXML
50  private Region spacer;
51 
52  @FXML
53  private Label taskLabel;
54 
55  @FXML
56  private Label messageLabel;
57 
58  public StatusBar(TimeLineController controller) {
59  this.controller = controller;
60  FXMLConstructor.construct(this, "StatusBar.fxml"); // NON-NLS
61  }
62 
63  @FXML
64  void initialize() {
65  assert refreshLabel != null : "fx:id=\"refreshLabel\" was not injected: check your FXML file 'StatusBar.fxml'."; // NON-NLS
66  assert progressBar != null : "fx:id=\"progressBar\" was not injected: check your FXML file 'StatusBar.fxml'."; // NON-NLS
67  assert spacer != null : "fx:id=\"spacer\" was not injected: check your FXML file 'StatusBar.fxml'."; // NON-NLS
68  assert taskLabel != null : "fx:id=\"taskLabel\" was not injected: check your FXML file 'StatusBar.fxml'."; // NON-NLS
69  assert messageLabel != null : "fx:id=\"messageLabel\" was not injected: check your FXML file 'StatusBar.fxml'."; // NON-NLS
70  refreshLabel.setVisible(false);
71  refreshLabel.setText(NbBundle.getMessage(this.getClass(), "StatusBar.refreshLabel.text"));
72  messageLabel.setText(NbBundle.getMessage(this.getClass(), "StatusBar.messageLabel.text"));
73  taskLabel.setText(NbBundle.getMessage(this.getClass(), "StatusBar.taskLabel.text"));
74  taskLabel.setVisible(false);
75  HBox.setHgrow(spacer, Priority.ALWAYS);
76 
77  refreshLabel.visibleProperty().bind(this.controller.eventsDBStaleProperty());
78  refreshLabel.managedProperty().bind(this.controller.eventsDBStaleProperty());
79  taskLabel.textProperty().bind(this.controller.taskTitleProperty());
80  messageLabel.textProperty().bind(this.controller.taskMessageProperty());
81  progressBar.progressProperty().bind(this.controller.taskProgressProperty());
82  taskLabel.visibleProperty().bind(this.controller.getTasks().emptyProperty().not());
83 
84  statusLabel.textProperty().bind(this.controller.getStatusProperty());
85  statusLabel.visibleProperty().bind(statusLabel.textProperty().isNotEmpty());
86  }
87 }
synchronized ReadOnlyDoubleProperty taskProgressProperty()
synchronized ReadOnlyStringProperty taskTitleProperty()
synchronized ReadOnlyStringProperty taskMessageProperty()
StatusBar(TimeLineController controller)
Definition: StatusBar.java:58
static void construct(Node node, String fxmlFileName)
synchronized ReadOnlyListProperty< Task<?> > getTasks()

Copyright © 2012-2015 Basis Technology. Generated on: Wed Apr 6 2016
This work is licensed under a Creative Commons Attribution-Share Alike 3.0 United States License.