use of com.acgist.snail.pojo.ITaskSession.FileType in project snail by acgist.
the class TaskTableCell method updateItem.
@Override
public void updateItem(String value, boolean empty) {
super.updateItem(value, empty);
final HBox box = new HBox();
final ITaskSession taskSession = this.getTableRow().getItem();
if (taskSession != null) {
final Text name = new Text(value);
if (this.pos != null) {
box.setAlignment(this.pos);
}
if (this.icon) {
final FileType fileType = taskSession.getFileType();
final Label fileLabel = Fonts.fileTypeIconLabel(fileType);
box.getChildren().add(fileLabel);
}
if (this.tooltip) {
this.setTooltip(Tooltips.newTooltip(value));
}
box.getChildren().add(name);
}
this.setGraphic(box);
}
Aggregations