[phpBB Debug] PHP Warning: in file [ROOT]/phpbb/session.php on line 583: sizeof(): Parameter must be an array or an object that implements Countable
[phpBB Debug] PHP Warning: in file [ROOT]/phpbb/session.php on line 639: sizeof(): Parameter must be an array or an object that implements Countable
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4516: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3262)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4516: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3262)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4516: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3262)
Gephi forums •Enabling node label visibility from a plugin?
Page 1 of 1

Enabling node label visibility from a plugin?

Posted: 13 Mar 2012 22:43
by phreakocious
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!

Re: Enabling node label visibility from a plugin?

Posted: 13 Mar 2012 23:51
by eduramiba
Hi,
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);
Eduardo

Re: Enabling node label visibility from a plugin?

Posted: 14 Mar 2012 00:01
by phreakocious
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.

Re: Enabling node label visibility from a plugin?

Posted: 14 Mar 2012 00:18
by eduramiba
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

Re: Enabling node label visibility from a plugin?

Posted: 04 Jun 2013 10:56
by seinecle
Wow I would put +1000 if I could. This part of the API gives full control on so many stuff! Love it!