picturedream.model
Interface IPicture

All Known Implementing Classes:
Picture, PreviewPicture

public interface IPicture

Title: PictureDream

Description: base definition of a picture

Copyright: Copyright (c) 2003 MRoc

Organisation: MRoc Audiosolutions

Version:
1.0
Author:
MRoc mail@mroc.de

Method Summary
 void addListener(IPictureListener l)
          adds the given IPictureListener
 int[] getData()
          returns a reference to the internal 32 bit buffer
 int getHeight()
          returns the picture height
 java.awt.Image getImage()
          produces a image from the internal 32 bit buffer
 int getWidth()
          returns the picture width
 boolean isValid()
          returns the images state, false if no or a corrupted image was loaded, true if valid picture data is stored in the picture.
 void loadImage(java.lang.String fileName)
          loads a image from file, gif or jpg, java std ;-)
 void process(IPictureProcessor processor)
          uses the given processor to process the image data.
 void removeListener(IPictureListener l)
          removes the given IPictureListener
 void reset()
          resets the image
 void saveImage(java.lang.String fileName)
          save a image as Windows Bitmap
 void setData(int[] data, int width, int height)
          sets the picture data directly. the width and height must match the buffers length!
 

Method Detail

reset

public void reset()
resets the image

isValid

public boolean isValid()
returns the images state, false if no or a corrupted image was loaded, true if valid picture data is stored in the picture.

loadImage

public void loadImage(java.lang.String fileName)
               throws java.lang.Exception
loads a image from file, gif or jpg, java std ;-)
Parameters:
fileName - - the filename of the picture to be loaded
Throws:
java.lang.Exception -  

saveImage

public void saveImage(java.lang.String fileName)
               throws java.lang.Exception
save a image as Windows Bitmap

setData

public void setData(int[] data,
                    int width,
                    int height)
sets the picture data directly. the width and height must match the buffers length!
Parameters:
data - - a 32 bit buffer
width - - the picture width
height - - the picture height

getData

public int[] getData()
returns a reference to the internal 32 bit buffer

getImage

public java.awt.Image getImage()
produces a image from the internal 32 bit buffer

getWidth

public int getWidth()
returns the picture width

getHeight

public int getHeight()
returns the picture height

process

public void process(IPictureProcessor processor)
uses the given processor to process the image data.
Parameters:
processor - is the processor used tio process the image data

addListener

public void addListener(IPictureListener l)
adds the given IPictureListener

removeListener

public void removeListener(IPictureListener l)
removes the given IPictureListener