|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectlegacy.resource.ResourceGroup
public class ResourceGroup
ResourceGroup.class is a container for lists of specific resouces defined in a group of resources. This includes lists of images, midi, sound, fonts and pallets which are required for use. Warning This class relies heavily on the ResourceManager to set it status paramiter and should not be modifed lightly.
ResourceManager
Field Summary | |
---|---|
protected java.util.Hashtable<java.lang.Integer,NativeFontFormat> |
fonts
Container for fonts |
protected java.util.Hashtable<java.lang.Integer,NativeImageFormat> |
images
Container for images |
protected java.util.Hashtable<java.lang.Integer,NativeMidiFormat> |
midis
Container for Midis |
protected java.util.Hashtable<java.lang.Integer,NativePalletFormat> |
pallets
Container for pallets |
protected java.util.Hashtable<java.lang.Integer,NativeSoundFormat> |
sounds
Container for sound |
Constructor Summary | |
---|---|
ResourceGroup(java.lang.String group,
java.util.Properties resources)
Resource group is an arrangements of resouces in a given group. |
Method Summary | |
---|---|
java.lang.String |
getFontesource(int definition)
getFontesource returns the physical location for a file |
java.util.Hashtable<java.lang.Integer,java.lang.String> |
getFontResources()
getFontResources returns a list of resources and their definitions. |
int |
getFonts()
getFonts returns how many fonts are defined in this group |
java.lang.String |
getImageResource(int definition)
getImageResource returns the physical location for a file |
java.util.Hashtable<java.lang.Integer,java.lang.String> |
getImageResources()
getImageResources returns a list of resources and their definitions. |
int |
getImages()
getImages returns how many images are defined in this group |
float |
getLoadStatus()
Returns the load status as a fraction of 100% of loaded items in this group |
java.lang.String |
getMidiResource(int definition)
getMidiResource returns the physical location for a file |
java.util.Hashtable<java.lang.Integer,java.lang.String> |
getMidiResources()
getImageResources returns a list of resources and their definitions. |
int |
getMidis()
getImages returns how many midi's are defined in this group |
java.lang.String |
getName()
returns the name of this set of resources or group |
java.lang.String |
getPalletResource(int definition)
getPalletResource returns the physical location for a file |
java.util.Hashtable<java.lang.Integer,java.lang.String> |
getPalletResources()
getPalletResources returns a list of resources and their definitions. |
int |
getPallets()
getImages returns how many pallets are defined in this group |
int |
getResources()
getResources returns the amount of uniqure rsouces in totality. |
java.lang.String |
getSoundResource(int definition)
getSoundResource returns the physical location for a file |
java.util.Hashtable<java.lang.Integer,java.lang.String> |
getSoundResources()
getSoundResources returns a list of resources and their definitions. |
int |
getSounds()
getImages returns how many sounds are defined in this group |
boolean |
isCached()
isCached is essentialy equal to getLoadStatus()==100.00f |
boolean |
isReady()
isReady returns weather or not resources are ready to use |
boolean |
isValid()
isValid returns weather or not the ResourceManager has validated this group of resources |
protected void |
setLoadStatus(float loaded)
setLoadStatus is only called by ResourceManager to set the currently loaded state of resources. |
protected void |
setValid(boolean validation)
setValid is set by the ResourceManager after it has vilidated locations and files |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected java.util.Hashtable<java.lang.Integer,NativeImageFormat> images
protected java.util.Hashtable<java.lang.Integer,NativePalletFormat> pallets
protected java.util.Hashtable<java.lang.Integer,NativeMidiFormat> midis
protected java.util.Hashtable<java.lang.Integer,NativeSoundFormat> sounds
protected java.util.Hashtable<java.lang.Integer,NativeFontFormat> fonts
Constructor Detail |
---|
public ResourceGroup(java.lang.String group, java.util.Properties resources)
1 = images/hud/face01.bmp 2 = images/hud/face02.bmp 3 = images/hud/face03.bmp 4 = images/hud/bar.bmp 5 = fonts/hud.fnt ...
group
- Nmae of the groupresources
- a properties file as described above.Method Detail |
---|
public java.lang.String getImageResource(int definition)
definition
- defined name of resource
public java.util.Hashtable<java.lang.Integer,java.lang.String> getImageResources()
public int getImages()
public java.lang.String getPalletResource(int definition)
definition
- defined id of resource
public java.util.Hashtable<java.lang.Integer,java.lang.String> getPalletResources()
public int getPallets()
public java.lang.String getMidiResource(int definition)
definition
- defined id of resource
public java.util.Hashtable<java.lang.Integer,java.lang.String> getMidiResources()
public int getMidis()
public java.lang.String getSoundResource(int definition)
definition
- defined id of resource
public java.util.Hashtable<java.lang.Integer,java.lang.String> getSoundResources()
public int getSounds()
public java.lang.String getFontesource(int definition)
definition
- defined id of resource
public java.util.Hashtable<java.lang.Integer,java.lang.String> getFontResources()
public int getFonts()
public java.lang.String getName()
protected void setValid(boolean validation)
validation
- sets true if this group has been determined to be Valid false otherwise.public boolean isValid()
public boolean isReady()
protected void setLoadStatus(float loaded)
loaded
- percentage of loaded itrems in this group.public float getLoadStatus()
public boolean isCached()
public int getResources()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |