So, I have an app under development where I load some data from a file and create the graph from that programmatically. Its based off of a MenuAction sample, where it adds a menuitem to the top bar for the program, and then sets an action performed function to be called when its clicked. The MenuAction class extends from AbstracCyAction, and I'm pretty sure that its available in the samples.
The problem is, whenever the graph is finished being created, it is nothing but a bunch of nodes stacked upon one another. I'm really confused as to why this is, because when I got to apply this hierarchical layout that already exists, it seems to apply the VisualStyle settings that I have specified in the actionPerformed function; before the layout is applied, nodes don't have labels. After the layout is done, the nodes do have labels, and I don't understand why that is. (In a previous email, over the course of a number of messages I explained that I found that you had to use the VisualStyleFunctionFactory in conjunction with VisualStyle and VisualMappingManager classes to configure styles. After I found this out, I followed samples 15 & 16 to a T, but it doesn't apply these settings that I'm configuring with the VisualStyle class until after the layout.
I always layout this graph in hierarchical, from the Layout menu that already exists in cytoscape. My thinking is, if I can have it automatically perform this layout, its a time saver, and it will also solve the other problem (for now, but I really want to understand why it doesn't get applied immediately). How can I programmatically make it perform this same layout?