Sweet Home 3D 4.1

com.eteks.sweethome3d.io
Class DefaultTexturesCatalog

java.lang.Object
  extended by com.eteks.sweethome3d.model.TexturesCatalog
      extended by com.eteks.sweethome3d.io.DefaultTexturesCatalog

public class DefaultTexturesCatalog
extends TexturesCatalog

Textures default catalog read from localized resources.

Author:
Emmanuel Puybaret

Nested Class Summary
static class DefaultTexturesCatalog.PropertyKey
          The keys of the properties values read in .properties files.
 
Field Summary
static String PLUGIN_TEXTURES_CATALOG_FAMILY
          The name of .properties family files in plugin textures catalog files.
 
Constructor Summary
DefaultTexturesCatalog()
          Creates a default textures catalog read from resources.
DefaultTexturesCatalog(File texturesPluginFolder)
          Creates a default textures catalog read from resources and textures plugin folder if texturesPluginFolder isn't null.
DefaultTexturesCatalog(URL[] pluginTexturesCatalogUrls)
          Creates a default textures catalog read only from resources in the given URLs.
DefaultTexturesCatalog(URL[] pluginTexturesCatalogUrls, URL texturesResourcesUrlBase)
          Creates a default textures catalog read only from resources in the given URLs.
DefaultTexturesCatalog(UserPreferences preferences, File texturesPluginFolder)
          Creates a default textures catalog read from resources and textures plugin folder if texturesPluginFolder isn't null.
DefaultTexturesCatalog(UserPreferences preferences, File[] texturesPluginFolders)
          Creates a default textures catalog read from resources and textures plugin folders if texturesPluginFolders isn't null.
 
Method Summary
 List<Library> getLibraries()
          Returns the furniture libraries at initialization.
protected  CatalogTexture readTexture(ResourceBundle resource, int index, URL texturesUrl, URL texturesResourcesUrlBase)
          Reads each texture described in resource bundle.
protected  TexturesCategory readTexturesCategory(ResourceBundle resource, int index)
          Returns the category of a texture at the given index of a localized resource bundle.
 
Methods inherited from class com.eteks.sweethome3d.model.TexturesCatalog
add, addTexturesListener, delete, getCategories, getCategoriesCount, getCategory, removeTexturesListener
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

PLUGIN_TEXTURES_CATALOG_FAMILY

public static final String PLUGIN_TEXTURES_CATALOG_FAMILY
The name of .properties family files in plugin textures catalog files.

See Also:
Constant Field Values
Constructor Detail

DefaultTexturesCatalog

public DefaultTexturesCatalog()
Creates a default textures catalog read from resources.


DefaultTexturesCatalog

public DefaultTexturesCatalog(File texturesPluginFolder)
Creates a default textures catalog read from resources and textures plugin folder if texturesPluginFolder isn't null.


DefaultTexturesCatalog

public DefaultTexturesCatalog(UserPreferences preferences,
                              File texturesPluginFolder)
Creates a default textures catalog read from resources and textures plugin folder if texturesPluginFolder isn't null.


DefaultTexturesCatalog

public DefaultTexturesCatalog(UserPreferences preferences,
                              File[] texturesPluginFolders)
Creates a default textures catalog read from resources and textures plugin folders if texturesPluginFolders isn't null.


DefaultTexturesCatalog

public DefaultTexturesCatalog(URL[] pluginTexturesCatalogUrls)
Creates a default textures catalog read only from resources in the given URLs.


DefaultTexturesCatalog

public DefaultTexturesCatalog(URL[] pluginTexturesCatalogUrls,
                              URL texturesResourcesUrlBase)
Creates a default textures catalog read only from resources in the given URLs. Texture image URLs will built from texturesResourcesUrlBase if it isn't null.

Method Detail

getLibraries

public List<Library> getLibraries()
Returns the furniture libraries at initialization.

Since:
4.0

readTexture

protected CatalogTexture readTexture(ResourceBundle resource,
                                     int index,
                                     URL texturesUrl,
                                     URL texturesResourcesUrlBase)
Reads each texture described in resource bundle. Resources described in texture properties will be loaded from texturesUrl if it isn't null.


readTexturesCategory

protected TexturesCategory readTexturesCategory(ResourceBundle resource,
                                                int index)
Returns the category of a texture at the given index of a localized resource bundle.

Throws:
MissingResourceException - if mandatory keys are not defined.

Sweet Home 3D 4.1

© Copyrights 2006-2013 eTeks - All rights reserved
Distributed under GNU General Public License