public class DefaultFurnitureCatalog extends FurnitureCatalog
.properties
files.Modifier and Type | Class and Description |
---|---|
static class |
DefaultFurnitureCatalog.PropertyKey
The keys of the properties values read in
.properties files. |
Modifier and Type | Field and Description |
---|---|
static String |
PLUGIN_FURNITURE_CATALOG_FAMILY
The name of
.properties family files in plugin furniture catalog files. |
Constructor and Description |
---|
DefaultFurnitureCatalog()
Creates a default furniture catalog read from resources in the package of this class.
|
DefaultFurnitureCatalog(File furniturePluginFolder)
Creates a default furniture catalog read from resources and
furniture plugin folder if
furniturePluginFolder isn't null . |
DefaultFurnitureCatalog(URL[] pluginFurnitureCatalogUrls)
Creates a default furniture catalog read only from resources in the given URLs.
|
DefaultFurnitureCatalog(URL[] pluginFurnitureCatalogUrls,
URL furnitureResourcesUrlBase)
Creates a default furniture catalog read only from resources in the given URLs
or in the classpath if the security manager doesn't allow to create class loaders.
|
DefaultFurnitureCatalog(UserPreferences preferences,
File furniturePluginFolder)
Creates a default furniture catalog read from resources and
furniture plugin folder if
furniturePluginFolder isn't null . |
DefaultFurnitureCatalog(UserPreferences preferences,
File[] furniturePluginFolders)
Creates a default furniture catalog read from resources and
furniture plugin folders if
furniturePluginFolders isn't null . |
Modifier and Type | Method and Description |
---|---|
List<Library> |
getLibraries()
Returns the furniture libraries at initialization.
|
protected FurnitureCategory |
readFurnitureCategory(ResourceBundle resource,
int index)
Returns the furniture category of a piece at the given
index of a
localized resource bundle. |
protected CatalogPieceOfFurniture |
readPieceOfFurniture(ResourceBundle resource,
int index,
URL furnitureCatalogUrl,
URL furnitureResourcesUrlBase)
Returns the piece of furniture at the given
index of a
localized resource bundle. |
add, addFurnitureListener, delete, getCategories, getCategoriesCount, getCategory, removeFurnitureListener
public static final String PLUGIN_FURNITURE_CATALOG_FAMILY
.properties
family files in plugin furniture catalog files.public DefaultFurnitureCatalog()
public DefaultFurnitureCatalog(File furniturePluginFolder)
furniturePluginFolder
isn't null
.public DefaultFurnitureCatalog(UserPreferences preferences, File furniturePluginFolder)
furniturePluginFolder
isn't null
.public DefaultFurnitureCatalog(UserPreferences preferences, File[] furniturePluginFolders)
furniturePluginFolders
isn't null
.public DefaultFurnitureCatalog(URL[] pluginFurnitureCatalogUrls)
public DefaultFurnitureCatalog(URL[] pluginFurnitureCatalogUrls, URL furnitureResourcesUrlBase)
furnitureResourcesUrlBase
if it isn't null
.public List<Library> getLibraries()
protected CatalogPieceOfFurniture readPieceOfFurniture(ResourceBundle resource, int index, URL furnitureCatalogUrl, URL furnitureResourcesUrlBase)
index
of a
localized resource
bundle.resource
- a resource bundleindex
- the index of the read piecefurnitureCatalogUrl
- the URL from which piece resources will be loaded
or null
if it's read from current classpath.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
null
if the piece at the given index doesn't exist.MissingResourceException
- if mandatory keys are not defined.protected FurnitureCategory readFurnitureCategory(ResourceBundle resource, int index)
index
of a
localized resource
bundle.MissingResourceException
- if mandatory keys are not defined.
© Copyrights 2006-2015 Emmanuel PUYBARET / eTeks
Distributed under GNU General Public License