I have a ListCell in which I display information on the progress of downloading a ProgressIndicator file.
My problem is to remove the percentage information displayed below the indicator. As stated here , I included the rule in my css as follows:
.customProgressIndicator .percentage{
visibility: hidden;
-fx-text-background-color: red;
}
The part -fx-text-background-color: redis just to make sure our css is applied to node.
The problem is that I am making a type call indicator.setProgress(progress), the percentage becomes visible (red), and when I hover over the indicator, it becomes invisible again. Again at the end, the text βFinishβ becomes visible below when called indicator.setProgress(1.0)and again becomes invisible after freezing.
It may be associated with ListView, because; after hovering and invisibility, if I remove the item from Listand call updateItemon ListCell, it will become visible again.
I tried a workaround like:
Text text = (Text)indicator.lookup(".percentage");
if ( text != null )
{
text.setText("");
}
But text sometimes null, sometimes not.
source
share