Popup on Startup

Extensions and customization
Post Reply [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
Mountaineer
Posts:5
Joined:08 Jul 2010 21:08
[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
Popup on Startup

Post by Mountaineer » 09 Jul 2010 18:35

Hello!

I'd like to create a popup of some sort which gets initialized on program startup (very similar to the Welcome Screen). I know the Welcome Screen itself is made from AWT/Swing.

My question is about the core of Gephi. What calls the Welcome Screen, and can I put in something from a plugin in there? Thanks!

User avatar
mbastian
Gephi Architect
Posts:728
Joined:10 Dec 2009 10:11
Location:San Francisco, CA
[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: Popup on Startup

Post by mbastian » 12 Jul 2010 09:32

Hi,

You have special class named Installer that can be executed when your module is inited. That is how the Welcome Screen is working. You can go tot the Gephi source code, and have a look at "WelcomeScreen/Installer.java". The Welcome Screen uses a TopComponent but you simply create a JPopup there.

Create a new plugin, then Right-Click on your module, select "New > Module Development > Installer". Now you can write the code to create your popup and show it.

If you need to get the frame as parent you can do, after including "Window Systems API" as dependency:

Code: Select all

WindowManager.getDefault().getMainWindow()

Post Reply
[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
[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