brunomnsilva / JavaFXSmartGraph

Generic (Java FX) Graph Visualization Library

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Dinamically change vertex's label.

LazyAfternoons opened this issue · comments

Hello and thank you for your hard work on this library. This is more of a question than an issue. I was wondering if I could change a vertex's label in my custom Strategy class or even outside it.
I was looking at the javadoc and eventually I found out that I can load my custom CSS class by using the setStyleClass method on a SmartLabel object. This SmartLabel is attached to a SmartGraphVertextNode in the addVertex method in SmartGraphPanel.
I can't find a way to get this SmartLabel and load the CSS class into it.
Any help is deeply appreciated, thank you.

This was already answered in previous issues.

The labels are automatically pulled from the contained element's toString() method. If you update the state of the element's instance and call GraphPanel.update() it will reload the labels.

This is now possible. Believe I misunderstood your issue from the beginning.

Sorry for the late answer and thank you again for your work.