Class Index | File Index

Classes


Class HomeObject


Defined in: SweetHome3D.js.

Class Summary
Constructor Attributes Constructor Name and Description
 
Creates a new object with a unique ID prefixed by object-.
Method Summary
Method Attributes Method Name and Description
 
Returns a clone of this object.
<static>  
HomeObject.createId(prefix)
Returns a new ID prefixed by the given string.
 
Returns a copy of this object with a new id.
 
firePropertyChange(propertyName, oldValue, newValue)
Fires a property change of PropertyChangeEvent class to listeners.
 
Returns the ID of this object.
 
Returns the value of the property name associated with this object.
 
Returns the property names.
 
setProperty(name, value)
Sets a property associated with this object.
Class Detail
HomeObject()
Creates a new object with a unique ID prefixed by object-.
Author: Emmanuel Puybaret.
Method Detail
{HomeObject} clone()
Returns a clone of this object. The returned object has the same id as this object.
Returns:
{HomeObject}

<static> {string} HomeObject.createId(prefix)
Returns a new ID prefixed by the given string.
Parameters:
{string} prefix
Returns:
{string}

{HomeObject} duplicate()
Returns a copy of this object with a new id.
Returns:
{HomeObject}

firePropertyChange(propertyName, oldValue, newValue)
Fires a property change of PropertyChangeEvent class to listeners.
Parameters:
{string} propertyName
{Object} oldValue
{Object} newValue

{string} getId()
Returns the ID of this object.
Returns:
{string} a unique ID

{string} getProperty(name)
Returns the value of the property name associated with this object.
Parameters:
{string} name
Returns:
{string} the value of the property or null if it doesn't exist.

{string[]} getPropertyNames()
Returns the property names.
Returns:
{string[]} a collection of all the names of the properties set with {@link #setProperty(String, String) setProperty}

setProperty(name, value)
Sets a property associated with this object. Once the property is updated, listeners added to this object will receive a change event of UserPropertyChangeEvent class.
To avoid any issue with existing or future properties of Sweet Home 3D classes, do not use property names written with only upper case letters.
Parameters:
{string} name
the name of the property to set
{string} value
the new value of the property or null to remove an existing property

© 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)