Class HomeApplication
Defined in: SweetHome3D.js.
Constructor Attributes | Constructor Name and Description |
---|---|
Application managing a list of homes displayed at screen.
|
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. |
|
getHomeRecorder(type)
Returns a recorder of a given
type able to write and read homes. |
|
getHomes()
Returns a collection of the homes of this application.
|
|
getId()
Returns the id of this application.
|
|
getName()
Returns the name of this application.
|
|
Returns information about the version of this application.
|
|
removeHomesListener(listener)
Removes the home
listener in parameter from this application. |
Class Detail
HomeApplication()
Application managing a list of homes displayed at screen.
Author: Emmanuel Puybaret.
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