Sweet Home 3D 3.4

com.eteks.sweethome3d.model
Class TexturesCatalog

java.lang.Object
  extended by com.eteks.sweethome3d.model.TexturesCatalog
Direct Known Subclasses:
DefaultTexturesCatalog

public abstract class TexturesCatalog
extends java.lang.Object

Textures catalog.

Author:
Emmanuel Puybaret

Constructor Summary
TexturesCatalog()
           
 
Method Summary
 void add(TexturesCategory category, CatalogTexture texture)
          Adds texture of a given category to this catalog.
 void addTexturesListener(CollectionListener<CatalogTexture> listener)
          Adds the texture listener in parameter to this catalog.
 void delete(CatalogTexture texture)
          Deletes the texture from this catalog.
 java.util.List<TexturesCategory> getCategories()
          Returns the categories list sorted by name.
 int getCategoriesCount()
          Returns the count of categories in this catalog.
 TexturesCategory getCategory(int index)
          Returns the category at a given index.
 void removeTexturesListener(CollectionListener<CatalogTexture> listener)
          Removes the texture listener in parameter from this catalog.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TexturesCatalog

public TexturesCatalog()
Method Detail

getCategories

public java.util.List<TexturesCategory> getCategories()
Returns the categories list sorted by name.

Returns:
an unmodifiable list of categories.

getCategoriesCount

public int getCategoriesCount()
Returns the count of categories in this catalog.


getCategory

public TexturesCategory getCategory(int index)
Returns the category at a given index.


addTexturesListener

public void addTexturesListener(CollectionListener<CatalogTexture> listener)
Adds the texture listener in parameter to this catalog.


removeTexturesListener

public void removeTexturesListener(CollectionListener<CatalogTexture> listener)
Removes the texture listener in parameter from this catalog.


add

public void add(TexturesCategory category,
                CatalogTexture texture)
Adds texture of a given category to this catalog. Once the texture is added, texture listeners added to this catalog will receive a collectionChanged notification.

Parameters:
category - the category of the texture.
texture - a texture.

delete

public void delete(CatalogTexture texture)
Deletes the texture from this catalog. If then texture category is empty, it will be removed from the categories of this catalog. Once the texture is deleted, texture listeners added to this catalog will receive a collectionChanged notification.

Parameters:
texture - a texture.

Sweet Home 3D 3.4

? Copyrights 2006-2011 eTeks - All rights reserved
Distributed under GNU General Public License