I'm new to JUNG I have a FRLayout that represents a network topology with key nodes or vertices that are color as red and the other vertices blue The edges from the starting node to the end node are blue I want to be to demonstrate an animation of the path to the end node. How can animate drawing the edges from a start_node to end_node with a specified time interval? Can you provide or reference an example?
相关问题
- Delete Messages from a Topic in Apache Kafka
- Jackson Deserialization not calling deserialize on
- How to maintain order of key-value in DataFrame sa
- StackExchange API - Deserialize Date in JSON Respo
- Difference between Types.INTEGER and Types.NULL in
You could attach a keyframe to your Edge data. Then, every time you draw (using a transformer) you can use the keyframe to adjust the gradient of the edge:
EDIT:
I wrote up a quick example:
This animates from one vertex to another (along one edge). If you want to animate going through multiple vertices, that will require more logic. However, this looks pretty cool and should give you a start. If you (or anyone else) need more comments, just let me know and I can try and make it more clear.
Also, I've taken a bit of heat for this before so: this requires the JUNG library. If you don't have it, you can't run the SSCCEE.