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

  // package com.vistech.events;
   import java.awt.*;
   import java.io.*;

  /** 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{
     protected Image image;
     protected Image[] imageset;
     protected int loadStatus = ImageLoadedListener.EMPTY;

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

     public int getLoadStatus() {
        return loadStatus;
     }

     /** @param obj the source object.
       * @param img the image set
       * */
     public ImageLoadedEvent(Object obj, Image[] img){
        super(obj);
        imageset = img;
        if((img != null) && (img.length >0))image = img[0];
     }

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

  }

