|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object | +--picturedream.implementation.Picture
Title: PictureDream
Description: Implementation of a 32bit picture
Copyright: Copyright (c) 2003 MRoc
Organisation: MRoc Audiosolutions
| Field Summary | |
private java.awt.Image |
ivCachedImage
image cached for faster access |
private java.util.Vector |
ivListeners
the picture listeners |
private PictureData |
picturedata
|
| Constructor Summary | |
Picture()
constructor |
|
| Method Summary | |
void |
addListener(IPictureListener l)
adds the given IPictureListener |
void |
fill(int value)
fills the entire buffer data with the given 32 bit value |
private void |
firePictureChanged()
fires a picture changed notify |
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 |
redoPicture()
|
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! |
void |
setDimension(int width,
int height)
allocates memory for a picture of the given width and height. |
void |
undoPicture()
|
| Methods inherited from class java.lang.Object |
|
| Field Detail |
private java.util.Vector ivListeners
private java.awt.Image ivCachedImage
private PictureData picturedata
| Constructor Detail |
public Picture()
| Method Detail |
public void reset()
reset in interface IPicturepublic boolean isValid()
isValid in interface IPicture
public void loadImage(java.lang.String fileName)
throws java.lang.Exception
loadImage in interface IPicturefileName - - the filename of the picture to be loadedjava.lang.Exception -
public void saveImage(java.lang.String fileName)
throws java.lang.Exception
IPicturesaveImage in interface IPicture
public void setData(int[] data,
int width,
int height)
setData in interface IPicturedata - - a 32 bit bufferwidth - - the picture widthheight - - the picture heightpublic int[] getData()
getData in interface IPicturepublic java.awt.Image getImage()
getImage in interface IPicturepublic int getWidth()
getWidth in interface IPicturepublic int getHeight()
getHeight in interface IPicturepublic void process(IPictureProcessor processor)
process in interface IPictureprocessor - is the processor used tio process the image datapublic void addListener(IPictureListener l)
addListener in interface IPicturepublic void removeListener(IPictureListener l)
removeListener in interface IPicture
public void setDimension(int width,
int height)
width - height - public void fill(int value)
value - private void firePictureChanged()
public void undoPicture()
public void redoPicture()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||