[Gephi-plugins] changing VizController default settings

Dan Halbert halbert at halwitz.org
Mon Jul 22 18:34:33 CEST 2013


I'm working on a Grphic 0.8.2 plugin and would like to change the default settings of the VizController that is attached to the Gephi GraphTopComponent. I want to change the selection modes, label scaling etc., as well.
 
As an example, I'm doing something like:
 
VizController vizController = Lookup.getDefault().lookup(VizController.class);
 TextManager textManager = vizController.getTextManager();
 TextModel textModel = textManager.getModel();
textModel.setSelectedOnly(true);
// etc.

I want to execute this code as early as possible, but not too early. We load a particular graph automatically when Gephi starts with our plugin loaded. The graph loading is done by another custom-built TopComponent.
 
I've tried changing the VizController settings in the routine that loads the graph, but that seems to be too early: the settings still have their old default values. I've also tried in a Runnable invoked by WindowManager.getDefault().invokeWhenUIReady(). That also is too early.
 
I can eventually change the settings when everything is displayed and I invoke some button in our custom-built TopComponent. Then the settings change.
 
Any suggestions? Is there some event I can listen for that says the VizController has been created? Do I need to subclass GraphTopComponent to do this properly?
 
Thanks,
Dan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://gephi.org/pipermail/gephi-plugins/attachments/20130722/7fb00093/attachment.html>


More information about the gephi-plugins mailing list