Module Client, packg gui.ressources.components.generics.javafx_override : ajout clss HighlightListCell

This commit is contained in:
Notmoo 2017-08-17 23:48:32 +02:00
parent 3efe9476b7
commit 26e94d8078

View File

@ -0,0 +1,18 @@
package com.pqt.client.gui.ressources.components.generics.javafx_override;
import javafx.scene.control.ListCell;
public class HighlightListCell<T> extends ListCell<T> {
public void setHighLight(boolean highLight){
if(highLight){
if(!getStyleClass().contains("list-cell-highlighted"))
getStyleClass().add("list-cell-highlighted");
}
else
getStyleClass().remove("list-cell-highlighted");
}
public boolean isHightlighted(){
return getStyleClass().contains("list-cell-highlighted");
}
}