Re: Questions on Plugin Development
by Puybaret » Tue Sep 16, 2014 1:00 pm
when I click "SweetHome3D.exe" to launch, the JAVA application hangs after showing the initial banner. What is the possible cause for that?
Add some logs in the startup of your plug-in to check if it starts correctly or not.
I can get home and User Preferences but not for ViewFactory and ContentManger.
You can get
ContentManger instance from
HomeController one. For
ViewFactory, create yourself an instance of
SwingViewFactory if you need it.
ContentManger is used to manage the user's choice of data (homes, images, 3D models,…) with file choosers for
Sweet Home 3D desktop version, or from lists returned by the server / file choosers (depending on the content) for
applet version.
ViewFactory is use to create main window panes and modification dialog boxes of the program. It's the entry point for controllers classes to access user interface implementation. If a programmer wants to replace Swing by another toolkit (for example JavaFX or SWT/JFace), his main work would consist of implementing the methods of
ViewFactory using that toolkit.