Class HomeObject
Defined in: SweetHome3D.js.
Constructor Attributes | Constructor Name and Description |
---|---|
Creates a new object with a unique ID prefixed by
object- . |
Method Attributes | Method Name and Description |
---|---|
clone()
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.
|
|
getContentProperty(name)
Returns the value of the content
name associated to this object. |
|
getId()
Returns the ID of this object.
|
|
getProperty(name)
Returns the value of the property
name associated with this object. |
|
Returns the property names.
|
|
isContentProperty(name)
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
Author: Emmanuel Puybaret.
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.
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