Class Index | File Index

Classes


Class FurnitureCatalog


Defined in: SweetHome3D.js.

Class Summary
Constructor Attributes Constructor Name and Description
 
Furniture catalog.
Method Summary
Method Attributes Method Name and Description
 
add(category, piece)
Adds piece of a given category to this catalog.
 
Adds the furniture listener in parameter to this catalog.
 
Returns the categories list sorted by name.
 
Returns the count of categories in this catalog.
 
getCategory(index)
Returns the category at a given index.
 
Returns the piece of furniture with the given id if it exists.
 
Removes the furniture listener in parameter from this catalog.
Class Detail
FurnitureCatalog()
Furniture catalog.
Author: Emmanuel Puybaret.
Method Detail
add(category, piece)
Adds piece of a given category to this catalog. Once the piece is added, furniture listeners added to this catalog will receive a {@link CollectionListener#collectionChanged(CollectionEvent) collectionChanged} notification.
Parameters:
{FurnitureCategory} category
the category of the piece.
{CatalogPieceOfFurniture} piece
a piece of furniture.

addFurnitureListener(listener)
Adds the furniture listener in parameter to this catalog.
Parameters:
{Object} listener

{FurnitureCategory[]} getCategories()
Returns the categories list sorted by name.
Returns:
{FurnitureCategory[]} a list of categories.

{number} getCategoriesCount()
Returns the count of categories in this catalog.
Returns:
{number}

{FurnitureCategory} getCategory(index)
Returns the category at a given index.
Parameters:
{number} index
Returns:
{FurnitureCategory}

{CatalogPieceOfFurniture} getPieceOfFurnitureWithId(id)
Returns the piece of furniture with the given id if it exists.
Parameters:
{string} id
Returns:
{CatalogPieceOfFurniture}

removeFurnitureListener(listener)
Removes the furniture listener in parameter from this catalog.
Parameters:
{Object} listener

© Copyright 2024 Emmanuel PUYBARET / eTeks
Distributed under GNU General Public License
Documentation generated by JsDoc Toolkit 2.4.0 on Thu Apr 04 2024 17:30:25 GMT+0200 (CEST)