Class Index | File Index

Classes


Class HomeApplication


Defined in: SweetHome3D.js.

Class Summary
Constructor Attributes Constructor Name and Description
 
Application managing a list of homes displayed at screen.
Method Summary
Method Attributes Method Name and Description
 
addHome(home)
Adds a given home to the homes list of this application.
 
addHomesListener(listener)
Adds the home listener in parameter to this application.
 
Returns a new home.
 
deleteHome(home)
Removes a given home from the homes list of this application.
 
Returns a recorder of a given type able to write and read homes.
 
Returns a collection of the homes of this application.
 
Returns the id of this application.
 
Returns the name of this application.
 
Returns information about the version of this application.
 
Removes the home listener in parameter from this application.
Class Detail
HomeApplication()
Application managing a list of homes displayed at screen.
Author: Emmanuel Puybaret.
Method Detail
addHome(home)
Adds a given home to the homes list of this application. Once the home is added, home listeners added to this application will receive a {@link CollectionListener#collectionChanged(CollectionEvent) collectionChanged} notification, with an {@link CollectionEvent#getType() event type} equal to CollectionEvent.Type#ADD.
Parameters:
{Home} home

addHomesListener(listener)
Adds the home listener in parameter to this application.
Parameters:
{Object} listener

{Home} createHome()
Returns a new home.
Returns:
{Home} a new home with wall heights equal to the one in user preferences.

deleteHome(home)
Removes a given home from the homes list of this application. Once the home is removed, home listeners added to this application will receive a {@link CollectionListener#collectionChanged(CollectionEvent) collectionChanged} notification, with an {@link CollectionEvent#getType() event type} equal to CollectionEvent.Type#DELETE.
Parameters:
{Home} home

{Object} getHomeRecorder(type)
Returns a recorder of a given type able to write and read homes. Subclasses may override this method to return a recorder matching type.
Parameters:
{HomeRecorder.Type} type
a hint for the application to choose the returned recorder.
Returns:
{Object} the default recorder able to write and read homes.

{Home[]} getHomes()
Returns a collection of the homes of this application.
Returns:
{Home[]}

{string} getId()
Returns the id of this application. Default implementation returns null.
Returns:
{string}

{string} getName()
Returns the name of this application. Default implementation returns Sweet Home 3D.
Returns:
{string}

{string} getVersion()
Returns information about the version of this application. Default implementation returns an empty string.
Returns:
{string}

removeHomesListener(listener)
Removes the home listener in parameter from this application.
Parameters:
{Object} listener

© Copyright 2021 Emmanuel PUYBARET / eTeks
Distributed under GNU General Public License
Documentation generated by JsDoc Toolkit 2.4.0 on Tue Mar 02 2021 19:55:52 GMT+0100 (CET)