Class Index | File Index

Classes


Class DefaultFurnitureCatalog


Extends FurnitureCatalog.

Defined in: DefaultFurnitureCatalog.js.

Class Summary
Constructor Attributes Constructor Name and Description
 
DefaultFurnitureCatalog(preferences, furnitureCatalogUrls, furnitureResourcesUrlBase)
Creates a default furniture catalog read through resources referenced by preferences or from furnitureCatalogUrls if called with two parameters
Method Summary
Method Attributes Method Name and Description
 
getAdditionalProperties(resource, index)
Returns the properties of the piece at the given index different from default properties.
 
Returns the furniture libraries at initialization.
 
isDefaultProperty(keyPrefix)
Returns true if the given parameter is the prefix of a default property used as an attribute of a piece of furniture.
 
readFurnitureCategory(resource, index)
Returns the furniture category of a piece at the given index of a localized resource bundle.
 
readPieceOfFurniture(resource, index, furnitureCatalogUrl, furnitureResourcesUrlBase)
Returns the piece of furniture at the given index of a localized resource bundle.
Methods borrowed from class FurnitureCatalog:
add, addFurnitureListener, getCategories, getCategoriesCount, getCategory, removeFurnitureListener
Class Detail
DefaultFurnitureCatalog(preferences, furnitureCatalogUrls, furnitureResourcesUrlBase)
Creates a default furniture catalog read through resources referenced by preferences or from furnitureCatalogUrls if called with two parameters
Author: Emmanuel Puybaret.
Parameters:
{UserPreferences} preferences Optional
{Array} furnitureCatalogUrls Optional
{String} furnitureResourcesUrlBase Optional
Method Detail
{Object} getAdditionalProperties(resource, index)
Returns the properties of the piece at the given index different from default properties.
Parameters:
{java.util.ResourceBundle} resource
{number} index
Returns:
{Object}

{Object} getLibraries()
Returns the furniture libraries at initialization.
Returns:
{Object}

{boolean} isDefaultProperty(keyPrefix)
Returns true if the given parameter is the prefix of a default property used as an attribute of a piece of furniture.
Parameters:
{string} keyPrefix
Returns:
{boolean}

{FurnitureCategory} readFurnitureCategory(resource, index)
Returns the furniture category of a piece at the given index of a localized resource bundle.
Parameters:
{java.util.ResourceBundle} resource
{number} index
Throws:
MissingResourceException if mandatory keys are not defined.
Returns:
{FurnitureCategory}

{CatalogPieceOfFurniture} readPieceOfFurniture(resource, index, furnitureCatalogUrl, furnitureResourcesUrlBase)
Returns the piece of furniture at the given index of a localized resource bundle.
Parameters:
{java.util.ResourceBundle} resource
a resource bundle
{number} index
the index of the read piece
{string} furnitureCatalogUrl
the URL from which piece resources will be loaded or null if it's read from current classpath.
{string} furnitureResourcesUrlBase
the URL used as a base to build the URL to piece resources or null if it's read from current classpath or furnitureCatalogUrl
Throws:
MissingResourceException if mandatory keys are not defined.
Returns:
{CatalogPieceOfFurniture} the read piece of furniture or null if the piece at the given index doesn't exist.

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