/**
* Creates a wrapped table cell.
*
* @param column the table column in which the cell resides
* @return a TableCell with the text wrapped inside
*/
private TableCell<Annotation, String> createWrappableTableCell(final TableColumn<Annotation, String> column) {
return new TableCell<Annotation, String>() {
@Override
protected void updateItem(final String item, final boolean empty) {
super.updateItem(item, empty);
if (item == null || empty) {
setGraphic(null);
return;
}
final Text text = new Text(item);
text.setWrappingWidth(column.getWidth() - TEXT_PADDING);
setPrefHeight(text.getLayoutBounds().getHeight());
setGraphic(text);
}
};
}
AnnotationController.java 文件源码
java
阅读 30
收藏 0
点赞 0
评论 0
项目:hygene
作者:
评论列表
文章目录