org.ogre4j
Class Material

java.lang.Object
  extended by org.xbig.base.NativeObject
      extended by org.ogre4j.Material
All Implemented Interfaces:
IAllocatedObject<IResourceAllocPolicy>, IMaterial, IResource, IResourceAllocatedObject, IStringInterface, INativeObject

public class Material
extends NativeObject
implements IMaterial


Nested Class Summary
protected static class Material.BestTechniquesBySchemeList
           
static class Material.LodDistanceIterator
           
static class Material.LodDistanceList
           
protected static class Material.LodTechniques
           
static class Material.TechniqueIterator
           
protected static class Material.Techniques
           
 
Nested classes/interfaces inherited from interface org.ogre4j.IMaterial
IMaterial.IBestTechniquesBySchemeList, IMaterial.ILodDistanceIterator, IMaterial.ILodDistanceList, IMaterial.ILodTechniques, IMaterial.ITechniqueIterator, IMaterial.ITechniques
 
Nested classes/interfaces inherited from interface org.ogre4j.IResource
IResource.IListener, IResource.IListenerList
 
Field Summary
 
Fields inherited from class org.xbig.base.NativeObject
deleted, object, remote
 
Constructor Summary
  Material(InstancePointer p)
          This constructor is public for internal useage only!
protected Material(InstancePointer p, boolean remote)
          Creates a Java wrapper object for an existing C++ object.
  Material(IResourceManager creator, java.lang.String name, long handle, java.lang.String group, boolean isManual, IManualResourceLoader loader)
          Constructor - use resource manager's create method rather than this.
  Material(WithoutNativeObject val)
          Allows creation of Java objects without C++ objects.
 
Method Summary
 void _dirtyState()
          Manually mark the state of this resource as having been changed.
 void _fireBackgroundLoadingComplete()
          Firing of background loading complete event
 void _fireBackgroundPreparingComplete()
          Firing of background preparing complete event
 void _notifyNeedsRecompile()
          Tells the material that it needs recompilation.
 void _notifyOrigin(java.lang.String origin)
           
 void addListener(IResource.IListener lis)
          Register a listener on this resource.
 boolean applyTextureAliases(IAliasTextureNamePairList aliasList, boolean apply)
          Applies texture names to Unit State with matching texture name aliases.
 void changeGroupOwnership(java.lang.String newGroup)
          Change the resource group ownership of a .
static void cleanupDictionary()
          Cleans up the static 'msDictionary' required to reset , otherwise the containers are left with invalid pointers, which will lead to a crash as soon as one of the implementers (e.g. ) initializes.
 void clone(IMaterialPtr returnValue, java.lang.String newName, boolean changeGroup, java.lang.String newGroup)
          Creates a new copy of this material with the same settings but a new name.
 void compile(boolean autoManageTextureUnits)
          'Compiles' this .
 void copyDetailsTo(IMaterialPtr mat)
          Copies the details of this material into another, preserving the target's handle and name (unlike operator=) but copying everything else.
 void copyParametersTo(IStringInterface dest)
          Method for copying this object's parameters to another object.
 ITechnique createTechnique()
          Creates a new for this .
 void delete()
          Deletes the corresponding C++ object.
 void escalateLoading()
          Escalates the loading of a background loaded resource.
 void finalize()
           
 ITechnique getBestTechnique(int lodIndex, IRenderable rend)
          Gets the best supported technique.
 boolean getCompilationRequired()
          Gets the compilation status of the material.
 IResourceManager getCreator()
           
 java.lang.String getGroup()
           
 long getHandle()
           
 Resource.LoadingState getLoadingState()
          Returns the current loading state.
 void getLodDistanceIterator(IMaterial.ILodDistanceIterator returnValue)
          Gets an iterator over the list of distances at which each LOD comes into effect.
 int getLodIndex(float d)
          Gets the LOD index to use at the given distance.
 int getLodIndexSquaredDepth(float squaredDepth)
          Gets the LOD index to use at the given squared distance.
 java.lang.String getName()
          Gets resource name.
 int getNumLodLevels(int schemeIndex)
          Gets the number of levels-of-detail this material has in the given scheme, based on .
 int getNumLodLevels(java.lang.String schemeName)
          Gets the number of levels-of-detail this material has in the given scheme, based on .
 int getNumSupportedTechniques()
          Retrieves the number of supported techniques.
 int getNumTechniques()
          Retrieves the number of techniques.
 java.lang.String getOrigin()
          Get the origin of this resource, e.g. a script file name.
 IParamDictionary getParamDictionary_const()
           
 IParamDictionary getParamDictionary()
          Retrieves the parameter dictionary for this class.
 java.lang.String getParameter(java.lang.String name)
          Generic parameter retrieval method.
 IParameterList getParameters()
          Retrieves a list of parameters valid for this object.
 boolean getReceiveShadows()
          Returns whether or not objects using this material will receive shadows.
 int getSize()
          Retrieves info about the size of the resource.
 int getStateCount()
          Returns the number of times this resource has changed state, which generally means the number of times it has been loaded.
 ITechnique getSupportedTechnique(int index)
          Gets the indexed supported technique.
 void getSupportedTechniqueIterator(IMaterial.ITechniqueIterator returnValue)
          Gets an iterator over all the Techniques which are supported by the current card.
 ITechnique getTechnique(int index)
          Gets the indexed technique.
 ITechnique getTechnique(java.lang.String name)
          searches for the named technique.
 void getTechniqueIterator(IMaterial.ITechniqueIterator returnValue)
          Get an iterator over the Techniques in this .
 boolean getTransparencyCastsShadows()
          Returns whether or not objects using this material be classified as opaque to the shadow caster system.
 java.lang.String getUnsupportedTechniquesExplanation()
          Gets a string explaining why any techniques are not supported.
 boolean isBackgroundLoaded()
          Returns whether this has been earmarked for background loading.
 boolean isLoaded()
          Returns true if the has been loaded, false otherwise.
 boolean isLoading()
          Returns whether the resource is currently in the process of background loading.
 boolean isManuallyLoaded()
          Is this resource manually loaded?
 boolean isPrepared()
          Returns true if the has been prepared, false otherwise.
 boolean isReloadable()
          Returns true if the is reloadable, false otherwise.
 boolean isTransparent()
          Determines if the material has any transparency with the rest of the scene (derived from whether any Techniques say they involve transparency).
 void load(boolean backgroundThread)
          Loads the resource, if it is not already.
 IMaterial operatorAssignment(IMaterial rhs)
          Assignment operator to allow easy copying between materials.
 void prepare()
          Prepares the resource for load, if it is not already.
 void reload()
          Reloads the resource, if it is already loaded.
 void removeAllTechniques()
          Removes all the techniques in this .
 void removeListener(IResource.IListener lis)
          Remove a listener on this resource.
 void removeTechnique(int index)
          Removes the technique at the given index.
 void setAmbient(float red, float green, float blue)
          Sets the ambient colour reflectance properties for every in every .
 void setAmbient(IColourValue ambient)
          Sets the ambient colour reflectance properties for every in every .
 void setBackgroundLoaded(boolean bl)
          Tells the resource whether it is background loaded or not.
 void setColourWriteEnabled(boolean enabled)
          Sets whether or not colour buffer writing is enabled for each .
 void setCullingMode(CullingMode mode)
          Sets the culling mode for each pass based on the 'vertex winding'.
 void setDepthBias(float constantBias, float slopeScaleBias)
          Sets the depth bias to be used for each .
 void setDepthCheckEnabled(boolean enabled)
          Sets whether or not each renders with depth-buffer checking on or not.
 void setDepthFunction(CompareFunction func)
          Sets the function used to compare depth values when depth checking is on.
 void setDepthWriteEnabled(boolean enabled)
          Sets whether or not each renders with depth-buffer writing on or not.
 void setDiffuse(float red, float green, float blue, float alpha)
          Sets the diffuse colour reflectance properties of every in every .
 void setDiffuse(IColourValue diffuse)
          Sets the diffuse colour reflectance properties of every in every .
 void setFog(boolean overrideScene, FogMode mode, IColourValue colour, float expDensity, float linearStart, float linearEnd)
          Sets the fogging mode applied to each pass.
 void setLightingEnabled(boolean enabled)
          Sets whether or not dynamic lighting is enabled for every .
 void setLodLevels(IMaterial.ILodDistanceList lodDistances)
          Sets the distance at which level-of-detail (LOD) levels come into effect.
 void setManualCullingMode(ManualCullingMode mode)
          Sets the manual culling mode, performed by CPU rather than hardware.
 boolean setParameter(java.lang.String name, java.lang.String value)
          Generic parameter setting method.
 void setParameterList(INameValuePairList paramList)
          Generic multiple parameter setting method.
 void setPointSize(float ps)
          Sets the point size properties for every in every .
 void setReceiveShadows(boolean enabled)
          Sets whether objects using this material will receive shadows.
 void setSceneBlending(SceneBlendFactor sourceFactor, SceneBlendFactor destFactor)
          Allows very fine control of blending every with the existing contents of the scene.
 void setSceneBlending(SceneBlendType sbt)
          Sets the kind of blending every pass has with the existing contents of the scene.
 void setSelfIllumination(float red, float green, float blue)
          Sets the amount of self-illumination of every in every .
 void setSelfIllumination(IColourValue selfIllum)
          Sets the amount of self-illumination of every in every .
 void setSeparateSceneBlending(SceneBlendFactor sourceFactor, SceneBlendFactor destFactor, SceneBlendFactor sourceFactorAlpha, SceneBlendFactor destFactorAlpha)
          Allows very fine control of blending every with the existing contents of the scene, using individual factors for color and alpha channels
 void setSeparateSceneBlending(SceneBlendType sbt, SceneBlendType sbta)
          Sets the kind of blending every pass has with the existing contents of the scene, using individual factors for color and alpha channels
 void setShadingMode(ShadeOptions mode)
          Sets the type of light shading required
 void setShininess(float val)
          Sets the shininess properties of every in every .
 void setSpecular(float red, float green, float blue, float alpha)
          Sets the specular colour reflectance properties of every in every .
 void setSpecular(IColourValue specular)
          Sets the specular colour reflectance properties of every in every .
 void setTextureAnisotropy(int maxAniso)
          Sets the anisotropy level to be used for all textures.
 void setTextureFiltering(TextureFilterOptions filterType)
          Set texture filtering for every texture unit in every and
 void setTransparencyCastsShadows(boolean enabled)
          Sets whether objects using this material be classified as opaque to the shadow caster system.
 void touch()
          'Touches' the resource to indicate it has been used.
 void unload()
          Unloads the resource; this is not permanent, the resource can be reloaded later if required.
 
Methods inherited from class org.xbig.base.NativeObject
disconnectFromNativeObject, equals, getInstancePointer, hashCode, setInstancePointer, setInstancePointer, setInstancePointer, toString
 
Methods inherited from class java.lang.Object
clone, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.xbig.base.INativeObject
disconnectFromNativeObject, getInstancePointer, setInstancePointer, setInstancePointer, setInstancePointer
 

Constructor Detail

Material

public Material(InstancePointer p)
This constructor is public for internal useage only! Do not use it!


Material

protected Material(InstancePointer p,
                   boolean remote)
Creates a Java wrapper object for an existing C++ object. If remote is set to 'true' this object cannot be deleted in Java.


Material

public Material(WithoutNativeObject val)
Allows creation of Java objects without C++ objects.

See Also:
WithoutNativeObject, INativeObject.disconnectFromNativeObject()

Material

public Material(IResourceManager creator,
                java.lang.String name,
                long handle,
                java.lang.String group,
                boolean isManual,
                IManualResourceLoader loader)
Constructor - use resource manager's create method rather than this.

Method Detail

delete

public void delete()
Description copied from interface: INativeObject
Deletes the corresponding C++ object.

Subclasses must implement this but if the native instance was created by the underlying library the native call to dispose must not happen!

Specified by:
delete in interface INativeObject
Specified by:
delete in class NativeObject
See Also:
#remote

finalize

public void finalize()
Overrides:
finalize in class NativeObject

operatorAssignment

public IMaterial operatorAssignment(IMaterial rhs)
Assignment operator to allow easy copying between materials.

Specified by:
operatorAssignment in interface IMaterial

isTransparent

public boolean isTransparent()
Determines if the material has any transparency with the rest of the scene (derived from whether any Techniques say they involve transparency).

Specified by:
isTransparent in interface IMaterial

setReceiveShadows

public void setReceiveShadows(boolean enabled)
Sets whether objects using this material will receive shadows.

Specified by:
setReceiveShadows in interface IMaterial

getReceiveShadows

public boolean getReceiveShadows()
Returns whether or not objects using this material will receive shadows.

Specified by:
getReceiveShadows in interface IMaterial

setTransparencyCastsShadows

public void setTransparencyCastsShadows(boolean enabled)
Sets whether objects using this material be classified as opaque to the shadow caster system.

Specified by:
setTransparencyCastsShadows in interface IMaterial

getTransparencyCastsShadows

public boolean getTransparencyCastsShadows()
Returns whether or not objects using this material be classified as opaque to the shadow caster system.

Specified by:
getTransparencyCastsShadows in interface IMaterial

createTechnique

public ITechnique createTechnique()
Creates a new for this .

Specified by:
createTechnique in interface IMaterial

getTechnique

public ITechnique getTechnique(int index)
Gets the indexed technique.

Specified by:
getTechnique in interface IMaterial

getTechnique

public ITechnique getTechnique(java.lang.String name)
searches for the named technique. Return 0 if technique with name is not found

Specified by:
getTechnique in interface IMaterial

getNumTechniques

public int getNumTechniques()
Retrieves the number of techniques.

Specified by:
getNumTechniques in interface IMaterial

removeTechnique

public void removeTechnique(int index)
Removes the technique at the given index.

Specified by:
removeTechnique in interface IMaterial

removeAllTechniques

public void removeAllTechniques()
Removes all the techniques in this .

Specified by:
removeAllTechniques in interface IMaterial

getTechniqueIterator

public void getTechniqueIterator(IMaterial.ITechniqueIterator returnValue)
Get an iterator over the Techniques in this .

Specified by:
getTechniqueIterator in interface IMaterial

getSupportedTechniqueIterator

public void getSupportedTechniqueIterator(IMaterial.ITechniqueIterator returnValue)
Gets an iterator over all the Techniques which are supported by the current card.

Specified by:
getSupportedTechniqueIterator in interface IMaterial

getSupportedTechnique

public ITechnique getSupportedTechnique(int index)
Gets the indexed supported technique.

Specified by:
getSupportedTechnique in interface IMaterial

getNumSupportedTechniques

public int getNumSupportedTechniques()
Retrieves the number of supported techniques.

Specified by:
getNumSupportedTechniques in interface IMaterial

getUnsupportedTechniquesExplanation

public java.lang.String getUnsupportedTechniquesExplanation()
Gets a string explaining why any techniques are not supported.

Specified by:
getUnsupportedTechniquesExplanation in interface IMaterial

getNumLodLevels

public int getNumLodLevels(int schemeIndex)
Gets the number of levels-of-detail this material has in the given scheme, based on .

Specified by:
getNumLodLevels in interface IMaterial

getNumLodLevels

public int getNumLodLevels(java.lang.String schemeName)
Gets the number of levels-of-detail this material has in the given scheme, based on .

Specified by:
getNumLodLevels in interface IMaterial

getBestTechnique

public ITechnique getBestTechnique(int lodIndex,
                                   IRenderable rend)
Gets the best supported technique.

Specified by:
getBestTechnique in interface IMaterial

clone

public void clone(IMaterialPtr returnValue,
                  java.lang.String newName,
                  boolean changeGroup,
                  java.lang.String newGroup)
Creates a new copy of this material with the same settings but a new name.

Specified by:
clone in interface IMaterial

copyDetailsTo

public void copyDetailsTo(IMaterialPtr mat)
Copies the details of this material into another, preserving the target's handle and name (unlike operator=) but copying everything else.

Specified by:
copyDetailsTo in interface IMaterial

compile

public void compile(boolean autoManageTextureUnits)
'Compiles' this .

Specified by:
compile in interface IMaterial

setPointSize

public void setPointSize(float ps)
Sets the point size properties for every in every .

Specified by:
setPointSize in interface IMaterial

setAmbient

public void setAmbient(float red,
                       float green,
                       float blue)
Sets the ambient colour reflectance properties for every in every .

Specified by:
setAmbient in interface IMaterial

setAmbient

public void setAmbient(IColourValue ambient)
Sets the ambient colour reflectance properties for every in every .

Specified by:
setAmbient in interface IMaterial

setDiffuse

public void setDiffuse(float red,
                       float green,
                       float blue,
                       float alpha)
Sets the diffuse colour reflectance properties of every in every .

Specified by:
setDiffuse in interface IMaterial

setDiffuse

public void setDiffuse(IColourValue diffuse)
Sets the diffuse colour reflectance properties of every in every .

Specified by:
setDiffuse in interface IMaterial

setSpecular

public void setSpecular(float red,
                        float green,
                        float blue,
                        float alpha)
Sets the specular colour reflectance properties of every in every .

Specified by:
setSpecular in interface IMaterial

setSpecular

public void setSpecular(IColourValue specular)
Sets the specular colour reflectance properties of every in every .

Specified by:
setSpecular in interface IMaterial

setShininess

public void setShininess(float val)
Sets the shininess properties of every in every .

Specified by:
setShininess in interface IMaterial

setSelfIllumination

public void setSelfIllumination(float red,
                                float green,
                                float blue)
Sets the amount of self-illumination of every in every .

Specified by:
setSelfIllumination in interface IMaterial

setSelfIllumination

public void setSelfIllumination(IColourValue selfIllum)
Sets the amount of self-illumination of every in every .

Specified by:
setSelfIllumination in interface IMaterial

setDepthCheckEnabled

public void setDepthCheckEnabled(boolean enabled)
Sets whether or not each renders with depth-buffer checking on or not.

Specified by:
setDepthCheckEnabled in interface IMaterial

setDepthWriteEnabled

public void setDepthWriteEnabled(boolean enabled)
Sets whether or not each renders with depth-buffer writing on or not.

Specified by:
setDepthWriteEnabled in interface IMaterial

setDepthFunction

public void setDepthFunction(CompareFunction func)
Sets the function used to compare depth values when depth checking is on.

Specified by:
setDepthFunction in interface IMaterial

setColourWriteEnabled

public void setColourWriteEnabled(boolean enabled)
Sets whether or not colour buffer writing is enabled for each .

Specified by:
setColourWriteEnabled in interface IMaterial

setCullingMode

public void setCullingMode(CullingMode mode)
Sets the culling mode for each pass based on the 'vertex winding'.

Specified by:
setCullingMode in interface IMaterial

setManualCullingMode

public void setManualCullingMode(ManualCullingMode mode)
Sets the manual culling mode, performed by CPU rather than hardware.

Specified by:
setManualCullingMode in interface IMaterial

setLightingEnabled

public void setLightingEnabled(boolean enabled)
Sets whether or not dynamic lighting is enabled for every .

Specified by:
setLightingEnabled in interface IMaterial

setShadingMode

public void setShadingMode(ShadeOptions mode)
Sets the type of light shading required

Specified by:
setShadingMode in interface IMaterial

setFog

public void setFog(boolean overrideScene,
                   FogMode mode,
                   IColourValue colour,
                   float expDensity,
                   float linearStart,
                   float linearEnd)
Sets the fogging mode applied to each pass.

Specified by:
setFog in interface IMaterial

setDepthBias

public void setDepthBias(float constantBias,
                         float slopeScaleBias)
Sets the depth bias to be used for each .

Specified by:
setDepthBias in interface IMaterial

setTextureFiltering

public void setTextureFiltering(TextureFilterOptions filterType)
Set texture filtering for every texture unit in every and

Specified by:
setTextureFiltering in interface IMaterial

setTextureAnisotropy

public void setTextureAnisotropy(int maxAniso)
Sets the anisotropy level to be used for all textures.

Specified by:
setTextureAnisotropy in interface IMaterial

setSceneBlending

public void setSceneBlending(SceneBlendType sbt)
Sets the kind of blending every pass has with the existing contents of the scene.

Specified by:
setSceneBlending in interface IMaterial

setSeparateSceneBlending

public void setSeparateSceneBlending(SceneBlendType sbt,
                                     SceneBlendType sbta)
Sets the kind of blending every pass has with the existing contents of the scene, using individual factors for color and alpha channels

Specified by:
setSeparateSceneBlending in interface IMaterial

setSceneBlending

public void setSceneBlending(SceneBlendFactor sourceFactor,
                             SceneBlendFactor destFactor)
Allows very fine control of blending every with the existing contents of the scene.

Specified by:
setSceneBlending in interface IMaterial

setSeparateSceneBlending

public void setSeparateSceneBlending(SceneBlendFactor sourceFactor,
                                     SceneBlendFactor destFactor,
                                     SceneBlendFactor sourceFactorAlpha,
                                     SceneBlendFactor destFactorAlpha)
Allows very fine control of blending every with the existing contents of the scene, using individual factors for color and alpha channels

Specified by:
setSeparateSceneBlending in interface IMaterial

_notifyNeedsRecompile

public void _notifyNeedsRecompile()
Tells the material that it needs recompilation.

Specified by:
_notifyNeedsRecompile in interface IMaterial

setLodLevels

public void setLodLevels(IMaterial.ILodDistanceList lodDistances)
Sets the distance at which level-of-detail (LOD) levels come into effect.

Specified by:
setLodLevels in interface IMaterial

getLodDistanceIterator

public void getLodDistanceIterator(IMaterial.ILodDistanceIterator returnValue)
Gets an iterator over the list of distances at which each LOD comes into effect.

Specified by:
getLodDistanceIterator in interface IMaterial

getLodIndex

public int getLodIndex(float d)
Gets the LOD index to use at the given distance.

Specified by:
getLodIndex in interface IMaterial

getLodIndexSquaredDepth

public int getLodIndexSquaredDepth(float squaredDepth)
Gets the LOD index to use at the given squared distance.

Specified by:
getLodIndexSquaredDepth in interface IMaterial

touch

public void touch()
Description copied from interface: IResource
'Touches' the resource to indicate it has been used.

Specified by:
touch in interface IMaterial
Specified by:
touch in interface IResource

applyTextureAliases

public boolean applyTextureAliases(IAliasTextureNamePairList aliasList,
                                   boolean apply)
Applies texture names to Unit State with matching texture name aliases. All techniques, passes, and Unit States within the material are checked. If matching texture aliases are found then true is returned.

Specified by:
applyTextureAliases in interface IMaterial

getCompilationRequired

public boolean getCompilationRequired()
Gets the compilation status of the material.

Specified by:
getCompilationRequired in interface IMaterial

prepare

public void prepare()
Prepares the resource for load, if it is not already. One can call before , but this is not required as will call itself, if needed. When OGRE_THREAD_SUPPORT==1 both and are thread-safe. When OGRE_THREAD_SUPPORT==2 however, only is thread-safe. The reason for this function is to allow a background thread to do some of the loading work, without requiring the whole render system to be thread-safe. The background thread would call while the main render loop would later call . So long as remains thread-safe, subclasses can arbitrarily split the work of loading a resource between and . It is best to try and do as much work in , however, since this will leave less work for the main render thread to do and thus increase FPS.

Specified by:
prepare in interface IResource

load

public void load(boolean backgroundThread)
Loads the resource, if it is not already.

Specified by:
load in interface IResource

reload

public void reload()
Reloads the resource, if it is already loaded.

Specified by:
reload in interface IResource

isReloadable

public boolean isReloadable()
Returns true if the is reloadable, false otherwise.

Specified by:
isReloadable in interface IResource

isManuallyLoaded

public boolean isManuallyLoaded()
Is this resource manually loaded?

Specified by:
isManuallyLoaded in interface IResource

unload

public void unload()
Unloads the resource; this is not permanent, the resource can be reloaded later if required.

Specified by:
unload in interface IResource

getSize

public int getSize()
Retrieves info about the size of the resource.

Specified by:
getSize in interface IResource

getName

public java.lang.String getName()
Gets resource name.

Specified by:
getName in interface IResource

getHandle

public long getHandle()
Specified by:
getHandle in interface IResource

isPrepared

public boolean isPrepared()
Returns true if the has been prepared, false otherwise.

Specified by:
isPrepared in interface IResource

isLoaded

public boolean isLoaded()
Returns true if the has been loaded, false otherwise.

Specified by:
isLoaded in interface IResource

isLoading

public boolean isLoading()
Returns whether the resource is currently in the process of background loading.

Specified by:
isLoading in interface IResource

getLoadingState

public Resource.LoadingState getLoadingState()
Returns the current loading state.

Specified by:
getLoadingState in interface IResource

isBackgroundLoaded

public boolean isBackgroundLoaded()
Returns whether this has been earmarked for background loading.

Specified by:
isBackgroundLoaded in interface IResource

setBackgroundLoaded

public void setBackgroundLoaded(boolean bl)
Tells the resource whether it is background loaded or not.

Specified by:
setBackgroundLoaded in interface IResource

escalateLoading

public void escalateLoading()
Escalates the loading of a background loaded resource.

Specified by:
escalateLoading in interface IResource

addListener

public void addListener(IResource.IListener lis)
Register a listener on this resource.

Specified by:
addListener in interface IResource

removeListener

public void removeListener(IResource.IListener lis)
Remove a listener on this resource.

Specified by:
removeListener in interface IResource

getGroup

public java.lang.String getGroup()
Specified by:
getGroup in interface IResource

changeGroupOwnership

public void changeGroupOwnership(java.lang.String newGroup)
Change the resource group ownership of a .

Specified by:
changeGroupOwnership in interface IResource

getCreator

public IResourceManager getCreator()
Specified by:
getCreator in interface IResource

getOrigin

public java.lang.String getOrigin()
Get the origin of this resource, e.g. a script file name.

Specified by:
getOrigin in interface IResource

_notifyOrigin

public void _notifyOrigin(java.lang.String origin)
Specified by:
_notifyOrigin in interface IResource

getStateCount

public int getStateCount()
Returns the number of times this resource has changed state, which generally means the number of times it has been loaded. Objects that build derived data based on the resource can check this value against a copy they kept last time they built this derived data, in order to know whether it needs rebuilding. This is a nice way of monitoring changes without having a tightly-bound callback.

Specified by:
getStateCount in interface IResource

_dirtyState

public void _dirtyState()
Manually mark the state of this resource as having been changed.

Specified by:
_dirtyState in interface IResource

_fireBackgroundLoadingComplete

public void _fireBackgroundLoadingComplete()
Firing of background loading complete event

Specified by:
_fireBackgroundLoadingComplete in interface IResource

_fireBackgroundPreparingComplete

public void _fireBackgroundPreparingComplete()
Firing of background preparing complete event

Specified by:
_fireBackgroundPreparingComplete in interface IResource

getParamDictionary

public IParamDictionary getParamDictionary()
Retrieves the parameter dictionary for this class.

Specified by:
getParamDictionary in interface IStringInterface

getParamDictionary_const

public IParamDictionary getParamDictionary_const()
Specified by:
getParamDictionary_const in interface IStringInterface

getParameters

public IParameterList getParameters()
Retrieves a list of parameters valid for this object.

Specified by:
getParameters in interface IStringInterface

setParameter

public boolean setParameter(java.lang.String name,
                            java.lang.String value)
Generic parameter setting method.

Specified by:
setParameter in interface IStringInterface

setParameterList

public void setParameterList(INameValuePairList paramList)
Generic multiple parameter setting method.

Specified by:
setParameterList in interface IStringInterface

getParameter

public java.lang.String getParameter(java.lang.String name)
Generic parameter retrieval method.

Specified by:
getParameter in interface IStringInterface

copyParametersTo

public void copyParametersTo(IStringInterface dest)
Method for copying this object's parameters to another object.

Specified by:
copyParametersTo in interface IStringInterface

cleanupDictionary

public static void cleanupDictionary()
Cleans up the static 'msDictionary' required to reset , otherwise the containers are left with invalid pointers, which will lead to a crash as soon as one of the implementers (e.g. ) initializes.



Copyright © 2007 netAllied GmbH. All Rights Reserved.