Autopsy  4.6.0
Graphical digital forensics platform for The Sleuth Kit and other tools.
WrappingListCell.java
Go to the documentation of this file.
1 /*
2  * To change this license header, choose License Headers in Project Properties.
3  * To change this template file, choose Tools | Templates
4  * and open the template in the editor.
5  */
6 
7 package org.sleuthkit.autopsy.timeline;
8 
9 import javafx.scene.control.ListCell;
10 import javafx.scene.text.Text;
11 
15 class WrappingListCell extends ListCell<String> {
16 
17  @Override
18  public void updateItem(String item, boolean empty) {
19  super.updateItem(item, empty);
20  if (item == null || isEmpty()) {
21  setGraphic(null);
22  } else {
23  Text text = new Text(item);
24  text.wrappingWidthProperty().bind(getListView().widthProperty().subtract(20));
25  setGraphic(text);
26  }
27  }
28 
29 }

Copyright © 2012-2016 Basis Technology. Generated on: Mon May 7 2018
This work is licensed under a Creative Commons Attribution-Share Alike 3.0 United States License.