Can anyone point me in the right direction for ensuring that node labels are visible in the UI from a plugin? I set the LabelVisible parameter to true for the nodes, but that only affects which are visible when toggled in the UI.
Thanks!
Enabling node label visibility from a plugin?
- phreakocious
- Gephi Plugin Developer
- Posts:25
- Joined:03 Aug 2010 15:15
- Contact:
- eduramiba
- Gephi Code Manager
- Posts:1064
- Joined:22 Mar 2010 15:30
- Location:Madrid, Spain [phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1275: count(): Parameter must be an array or an object that implements Countable
Re: Enabling node label visibility from a plugin?
Hi,
You will need to include Visualization Module as a dependency in your module.
Then use some code like this:
Eduardo
You will need to include Visualization Module as a dependency in your module.
Then use some code like this:
Code: Select all
VizController.getInstance().getTextManager().getModel().setShowNodeLabels(true);
- phreakocious
- Gephi Plugin Developer
- Posts:25
- Joined:03 Aug 2010 15:15
- Contact:
Re: Enabling node label visibility from a plugin?
Wow.. I was soooo close. Should I use Lookup to get the instance of VizController, or is that raw version enough?
Thanks a bunch for the quick reply.
Thanks a bunch for the quick reply.
- eduramiba
- Gephi Code Manager
- Posts:1064
- Joined:22 Mar 2010 15:30
- Location:Madrid, Spain [phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1275: count(): Parameter must be an array or an object that implements Countable
Re: Enabling node label visibility from a plugin?
Well the method itself uses Lookup and inits some objects.
You probably can get it with Lookup because Gephi will have initialized it before.
Eduardo
You probably can get it with Lookup because Gephi will have initialized it before.
Eduardo
Re: Enabling node label visibility from a plugin?
Wow I would put +1000 if I could. This part of the API gives full control on so many stuff! Love it!