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 value of the content name associated to this object.
 
Returns the ID of this object.
 
Returns the value of the property name associated with this object.
 
Returns the property names.
 
Returns true if the type of given property is a content.
 
setProperty(name, value)
Sets the value of 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

{Object} getContentProperty(name)
Returns the value of the content name associated to this object.
Parameters:
{string} name
Returns:
{Object} the value of the content or null if it doesn't exist or if it's not a content.

{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}

{boolean} isContentProperty(name)
Returns true if the type of given property is a content.
Parameters:
{string} name
Returns:
{boolean}

setProperty(name, value)
Sets the value of a property associated with this object. Once the property is updated, listeners added to this object will receive a change event of PropertyChangeEvent 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 2024 Space Mushrooms
Distributed under GNU General Public License
Documentation generated by JsDoc Toolkit 2.4.0 on Wed Aug 21 2024 17:43:24 GMT+0200 (CEST)