public class SkinFactoryAdapter extends java.lang.Object implements SkinFactory
Constructor and Description |
---|
SkinFactoryAdapter()
Constructor.
|
SkinFactoryAdapter(java.lang.Class<? extends Skin> addonClass,
AddonMetadata metadata)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
addAddon(java.lang.Class<? extends Skin> addonClass,
AddonMetadata metadata)
Adds an addon.
|
Skin |
createSkin(java.lang.String typeIdentifier)
Creates a skin for the given type identifier
Throws a addon exception if the type identifier is not supported.
|
AddonMetadata |
getMetadata(java.lang.String typeIdentifier)
Returns the metadata (like human readable name) for a given skin.
|
java.lang.String[] |
getSupportedTypeIdentifiers()
Returns a list of all skin type identifiers supported by this factory.
|
boolean |
isSupportingTypeIdentifier(java.lang.String typeIdentifier)
Returns true if this factory supports skins with the given ID, false otherwise.
|
public SkinFactoryAdapter(java.lang.Class<? extends Skin> addonClass, AddonMetadata metadata)
addonClass
- The class of the look and feel exposed to the user.metadata
- Metadata about this look-and-feel.public SkinFactoryAdapter()
addAddon(java.lang.Class<? extends org.youscope.addon.skin.Skin>, org.youscope.addon.AddonMetadata)
to expose addons.public void addAddon(java.lang.Class<? extends Skin> addonClass, AddonMetadata metadata)
addonClass
- The class of the look-and-feel exposed to the user.metadata
- Metadata about this look-and-feel.public java.lang.String[] getSupportedTypeIdentifiers()
SkinFactory
getSupportedTypeIdentifiers
in interface SkinFactory
public boolean isSupportingTypeIdentifier(java.lang.String typeIdentifier)
SkinFactory
isSupportingTypeIdentifier
in interface SkinFactory
typeIdentifier
- The ID of the skin for which it should be queried if this factory supports its construction.public Skin createSkin(java.lang.String typeIdentifier) throws AddonException
SkinFactory
createSkin
in interface SkinFactory
typeIdentifier
- Type identifier of the look and feel.AddonException
- Thrown if an error occurred during the construction.public AddonMetadata getMetadata(java.lang.String typeIdentifier) throws AddonException
SkinFactory
getMetadata
in interface SkinFactory
typeIdentifier
- The type identifier of the skin for which the metadata should be returned.AddonException
- Thrown if identifier is not supported by the addon.