   /*
    * @(#) PlanarImageLoadedEvent.java 1.0 2000/21/1
    * Copyright (c) 2000 Lawrence Rodrigues
    */

package com.vistech.jai.imageio;
import java.awt.*;
import java.io.*;
import javax.media.jai.*;

/** The event-state class for the planarImageLoaded event.
  * @version 1.0  21 Jan 2000
  * @author Lawrence Rodrigues
  **/
public class PlanarImageLoadedEvent  extends java.util.EventObject
       implements Serializable{
   protected PlanarImage image;
   protected PlanarImage[] imageset;

   /** The PlanarImageLoadedEvent constructor.
     * @param obj the source object.
     * @param img the image that is sent to the target.
     */
   public PlanarImageLoadedEvent(Object obj, PlanarImage img){
      super(obj);
      image = img;
      imageset = new PlanarImage[] {img};
   }

  /**  @param obj the source object.
     * @param img an array of images to be sent to the target.
     */
   public PlanarImageLoadedEvent(Object obj, PlanarImage[] img){
      super(obj);
      imageset = img;
      if((img != null) && (img.length >0))image = img[0];
   }

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

