Hi, I have a JGoPalette containing 10 JGoIconic Nodes. Each node has a descriptive text label. The palette has vertical orientation. When I layout the nodes they appear left aligned in the palette and because the text label has a different length for each node the palette looks pretty bad. How do I get the nodes to align centrally?
Yes, we ought to have another flag that controls what part of each item should be aligned.
I think the best solution is to override JGoPalette.layoutItems() to do exactly what you want.
You can copy and adapt the definition that is in JGoPalette.java. In the loop you can find the relative offset of the Icon compared to the whole node, and subtract that from the values that are passed to JGoObject.setTopLeft.
Where can I find JGoPalette.java? I’ve added the examples folder to my project but I can’t find the file.
It’s one of the source code files, where one would expect com.nwoods.jgo to be.