picturedream.resource
Class Resource

java.lang.Object
  |
  +--picturedream.resource.Resource

public class Resource
extends java.lang.Object

this class encapsulates resources like textfiles that should be placed in the resource package.


Field Summary
protected static Resource gvInstance
          singleton instance
 
Constructor Summary
Resource()
          constructors
 
Method Summary
 java.awt.Image getImage(java.lang.String fileName)
          loads a image resource
static Resource getSharedInstance()
          returns the singleton instance
 java.lang.String getTextResource(java.lang.String fileName)
          loads a text file located in the resource package
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, toString, wait, wait, wait
 

Field Detail

gvInstance

protected static Resource gvInstance
singleton instance
Constructor Detail

Resource

public Resource()
constructors
Method Detail

getSharedInstance

public static Resource getSharedInstance()
returns the singleton instance

getTextResource

public java.lang.String getTextResource(java.lang.String fileName)
                                 throws java.lang.Exception
loads a text file located in the resource package

getImage

public java.awt.Image getImage(java.lang.String fileName)
loads a image resource
Parameters:
fileName -  
Throws:
java.lang.Exception -