How to display a rectangle node with label through PREFUSE visualization toolkit in Java?

StackOverflow https://stackoverflow.com/questions/2278991

  •  21-09-2019
  •  | 
  •  

Question

I can render a node with the help of either:

  1. LabelRenderer (that shows the text content of the node)

or

  1. ShapeRenderer (that shows the shape of the node)

I want a mix-up of both, means the shape should be displayed with tthe text (label) on it.

How can I do this. I tried to add both renderers (label and shape renderers) to the visualization but it didn't work.

A lot of thanks in advance

Was it helpful?

Solution

You need Decorators for this purpose.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top