   /*
    * @(#) ImageLoadedEvent.java 1.0 99/21/1 
    * Copyright (c) 1999 Lawrence Rodrigues
    */

   package com.vistech.events;
   import java.awt.*;
   import java.io.*;
   import java.awt.image.RenderedImage;
   import javax.media.jai.JAI;
   import javax.media.jai.PlanarImage;
   import com.sun.media.jai.codec.*;

  /** ImageLoadedEvent Class.
    * This is an event-state class for the imageLoaded event.
    * @version 1.0  21 Jan 1999
    * @author Lawrence Rodrigues
    **/
  public class ImageLoadedEvent  extends java.util.EventObject
         implements Serializable{
     PlanarImage image;
     PlanarImage[] imageset;

     /**
       * @param obj the source object.
       * @param img the screen image which is the image loaded event
       * data that is carried to the target.
       */
     public ImageLoadedEvent(Object obj, PlanarImage img){
        super(obj);
        image = img;
        imageset = new PlanarImage[] {img};
     }

    /**
       * @param obj the source object.
       * @param img the screen image which is the image loaded event
       * data that is carried to the target.
       */
     public ImageLoadedEvent(Object obj, PlanarImage[] img){
        super(obj);
        imageset = img;
        if((img != null) && (img.length >0))image = img[0];
     }

     /**
       * @return the screen image.
       */
     public PlanarImage getImage(){
        return image;
     }
     public PlanarImage[] getImages(){
        return imageset;
     }

  }

