From 26e94d8078b2e8e65f0b70482d08c786ea701c56 Mon Sep 17 00:00:00 2001 From: Notmoo Date: Thu, 17 Aug 2017 23:48:32 +0200 Subject: [PATCH] Module Client, packg gui.ressources.components.generics.javafx_override : ajout clss HighlightListCell --- .../javafx_override/HighlightListCell.java | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 Workspace/client/src/main/java/com/pqt/client/gui/ressources/components/generics/javafx_override/HighlightListCell.java diff --git a/Workspace/client/src/main/java/com/pqt/client/gui/ressources/components/generics/javafx_override/HighlightListCell.java b/Workspace/client/src/main/java/com/pqt/client/gui/ressources/components/generics/javafx_override/HighlightListCell.java new file mode 100644 index 00000000..7bab5db3 --- /dev/null +++ b/Workspace/client/src/main/java/com/pqt/client/gui/ressources/components/generics/javafx_override/HighlightListCell.java @@ -0,0 +1,18 @@ +package com.pqt.client.gui.ressources.components.generics.javafx_override; + +import javafx.scene.control.ListCell; + +public class HighlightListCell extends ListCell { + 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"); + } +}