mirror of
https://github.com/klmp200/PQT_Gestionnaire_vente_stock.git
synced 2024-12-22 23:41:09 +00:00
Module Client, packg gui.ressources.components.generics.javafx_override : ajout clss HighlightListCell
This commit is contained in:
parent
3efe9476b7
commit
26e94d8078
@ -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");
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user