- java.lang.Object
-
- org.tentackle.fx.ShortLongTextCellFactory<T>
-
- All Implemented Interfaces:
javafx.util.Callback<javafx.scene.control.ListView<T>,javafx.scene.control.ListCell<T>>
public class ShortLongTextCellFactory<T> extends java.lang.Object implements javafx.util.Callback<javafx.scene.control.ListView<T>,javafx.scene.control.ListCell<T>>Cell factory to display items implementingShortLongText.
-
-
Constructor Summary
Constructors Constructor Description ShortLongTextCellFactory()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description javafx.scene.control.ListCell<T>call(javafx.scene.control.ListView<T> listView)protected org.tentackle.misc.ShortLongTextgetShortLongText(T item)Returns whether the long text should be shown for the given item.protected voidupdateLabels(T item, javafx.scene.control.Label shortLabel, javafx.scene.control.Label longLabel)Updates the labels of a cell.
-
-
-
Method Detail
-
getShortLongText
protected org.tentackle.misc.ShortLongText getShortLongText(T item)
Returns whether the long text should be shown for the given item.- Parameters:
item- the item- Returns:
- the
ShortLongTextto be displayed, null if only short text as toString()
-
updateLabels
protected void updateLabels(T item, javafx.scene.control.Label shortLabel, javafx.scene.control.Label longLabel)
Updates the labels of a cell.- Parameters:
item- the item to displayshortLabel- the label for the short textlongLabel- the label for the long text
-
-