Class ImageData

java.lang.Object
   |
   +----framework.ModuleData
           |
           +----ImageData

class ImageData
extends ModuleData
ImageData is the java class that contains pictures. If a gif is read from disk in java the data is stored in an ImageData object.


Variable Index

 o image

Constructor Index

 o ImageData()

Method Index

 o display(String, String)
Display the java image in a dialog window.
 o getHeight()
 o getImage()
 o getLoadTags()
Define the valid extensions that files of this data type may use when loading data from disk.
 o getSaveTags()
Define the valid extensions that files of this data type may use when saving data to disk.
 o getWidth()
 o load(String)
Load a picture from disk.
 o main(String[])
 o save(String)
Save the picture to disk.
 o setImage(Image)

Variables

 o image
 private Image image

Constructors

 o ImageData
 ImageData()

Methods

 o getWidth
 public int getWidth()
 o getHeight
 public int getHeight()
 o getImage
 public Image getImage()
 o setImage
 public void setImage(Image image)
 o main
 public static void main(String args[])
 o getLoadTags
 protected String[] getLoadTags()
Define the valid extensions that files of this data type may use when loading data from disk.

Overrides:
getLoadTags in class ModuleData
 o getSaveTags
 protected String[] getSaveTags()
Define the valid extensions that files of this data type may use when saving data to disk.

Overrides:
getSaveTags in class ModuleData
 o load
 public void load(String filename) throws FileNotFoundException, IOException
Load a picture from disk. The picture can be in several data formats: gif, jpg, jpeg, bmp and tga. (When there are more than 1 picture of bmp or tga loaded the thread that loads pictures will hang :( )

Overrides:
load in class ModuleData
See Also:
ImageLoader
 o save
 public void save(String filename) throws FileNotFoundException, IOException
Save the picture to disk. It can be saved in 2 data formats at this point: gif and ppm.

Overrides:
save in class ModuleData
See Also:
ImageEncoder
 o display
 public DataVisualisation display(String title,
                                  String filename)
Display the java image in a dialog window.

Overrides:
display in class ModuleData