Sweet Home 3D 4.0

com.eteks.sweethome3d
Class SweetHome3D

java.lang.Object
  extended by com.eteks.sweethome3d.model.HomeApplication
      extended by com.eteks.sweethome3d.SweetHome3D

public class SweetHome3D
extends HomeApplication

Sweet Home 3D main class. Sweet Home 3D accepts the parameter -open followed by the path of a Sweet Home 3D file.
Users may also define the optional following System properties to alter program behavior:

The value of a System property can be set with the -D java option.

Author:
Emmanuel Puybaret

Constructor Summary
protected SweetHome3D()
          Creates a home application instance.
 
Method Summary
protected  HomeFrameController createHomeFrameController(Home home)
          Returns a new instance of a home frame controller after home was created.
protected  ContentManager getContentManager()
          Returns a content manager able to handle files.
 HomeRecorder getHomeRecorder()
          Returns a recorder able to write and read homes in files.
 HomeRecorder getHomeRecorder(HomeRecorder.Type type)
          Returns a recorder of a given type able to write and read homes.
 String getId()
          Returns Sweet Home 3D application read from resources.
 String getName()
          Returns the name of this application read from resources.
protected  PluginManager getPluginManager()
          Returns the plugin manager of this application.
 UserPreferences getUserPreferences()
          Returns user preferences stored in resources and local file system.
 String getVersion()
          Returns information about the version of this application.
protected  ViewFactory getViewFactory()
          Returns a Swing view factory.
protected  void init(String[] args)
          Inits application instance.
static void main(String[] args)
          Sweet Home 3D entry point.
 void showDefaultHomeFrame()
          Shows a home frame, either a new one when no home is opened, or the last created home frame.
protected  void start(String[] args)
          Starts application once initialized and opens home passed in arguments.
 
Methods inherited from class com.eteks.sweethome3d.model.HomeApplication
addHome, addHomesListener, createHome, deleteHome, getHomes, removeHomesListener
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SweetHome3D

protected SweetHome3D()
Creates a home application instance. Recorders, user preferences, content manager, view factory and plug-in manager handled by this application are lazily instantiated to let subclasses override their creation.

Method Detail

getHomeRecorder

public HomeRecorder getHomeRecorder()
Returns a recorder able to write and read homes in files.

Specified by:
getHomeRecorder in class HomeApplication

getHomeRecorder

public HomeRecorder getHomeRecorder(HomeRecorder.Type type)
Description copied from class: HomeApplication
Returns a recorder of a given type able to write and read homes. Subclasses may override this method to return a recorder matching type.

Overrides:
getHomeRecorder in class HomeApplication
Parameters:
type - a hint for the application to choose the returned recorder.
Returns:
the default recorder able to write and read homes.

getUserPreferences

public UserPreferences getUserPreferences()
Returns user preferences stored in resources and local file system.

Specified by:
getUserPreferences in class HomeApplication

getContentManager

protected ContentManager getContentManager()
Returns a content manager able to handle files.


getViewFactory

protected ViewFactory getViewFactory()
Returns a Swing view factory.


getPluginManager

protected PluginManager getPluginManager()
Returns the plugin manager of this application.


getId

public String getId()
Returns Sweet Home 3D application read from resources.

Overrides:
getId in class HomeApplication

getName

public String getName()
Returns the name of this application read from resources.

Overrides:
getName in class HomeApplication

getVersion

public String getVersion()
Returns information about the version of this application.

Overrides:
getVersion in class HomeApplication

main

public static void main(String[] args)
Sweet Home 3D entry point.

Parameters:
args - may contain one .sh3d, .sh3f or .sh3p file to open or install, following a -open option.

init

protected void init(String[] args)
Inits application instance.


createHomeFrameController

protected HomeFrameController createHomeFrameController(Home home)
Returns a new instance of a home frame controller after home was created.


start

protected void start(String[] args)
Starts application once initialized and opens home passed in arguments. This method is executed from Event Dispatch Thread.


showDefaultHomeFrame

public void showDefaultHomeFrame()
Shows a home frame, either a new one when no home is opened, or the last created home frame.


Sweet Home 3D 4.0

© Copyrights 2006-2013 eTeks - All rights reserved
Distributed under GNU General Public License