de.esw.eengine.resource
Class Image

java.lang.Object
  extended by de.esw.eengine.resource.AbstractResource
      extended by de.esw.eengine.resource.Image
All Implemented Interfaces:
IResource

public class Image
extends AbstractResource
implements IResource

Since:
1.0
Version:
$Id: Image.java 157 2005-07-05 20:50:33Z markusw $
Author:
markusw

Constructor Summary
Image(int id, java.net.URL location, AbstractImageCodec codec)
           
 
Method Summary
 void dispose()
          Frees the memory occupied and disposes this resource.
 int getHeight()
           
 java.awt.image.BufferedImage getImage()
           
 int getWidth()
           
 void load()
          Loads the IResource.
 void save()
          Saves the IResource.
 void setImage(java.awt.image.BufferedImage image)
           
 
Methods inherited from class de.esw.eengine.resource.AbstractResource
getCodec, getId, getURL
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface de.esw.eengine.core.IResource
getCodec, getId, getURL
 

Constructor Detail

Image

public Image(int id,
             java.net.URL location,
             AbstractImageCodec codec)
Parameters:
id - The resource id to attach
location - Locator to the resource
codec - AbstractImageCodec responsible for this resource
Method Detail

getImage

public final java.awt.image.BufferedImage getImage()
                                            throws EEngineException
Returns:
Returns the image.
Throws:
EEngineException - Thrown on some image loading problems

setImage

public final void setImage(java.awt.image.BufferedImage image)
Parameters:
image - BufferedImage to store in this resource

getWidth

public final int getWidth()
Returns:
Width of the Image

getHeight

public final int getHeight()
Returns:
Height of the Image

load

public void load()
          throws EEngineException
Description copied from interface: IResource
Loads the IResource.

Specified by:
load in interface IResource
Specified by:
load in class AbstractResource
Throws:
EEngineException - Thrown on loading errors
See Also:
IResource.load()

save

public void save()
          throws EEngineException
Description copied from interface: IResource
Saves the IResource.

Specified by:
save in interface IResource
Specified by:
save in class AbstractResource
Throws:
EEngineException - Thrown on saving errors
See Also:
IResource.save()

dispose

public void dispose()
Description copied from interface: IResource
Frees the memory occupied and disposes this resource.

Specified by:
dispose in interface IResource
Specified by:
dispose in class AbstractResource
See Also:
IResource.dispose()