/** * */ package image.create; import java.awt.*; import javax.swing.JPanel; import util.Defaults; /** *

Description: The abstract method for creating images * to be analyzed by the FrontEnd model *

* @author John H. Krantz, Ph.D. * @version 0.1 */ public abstract class CreateImage extends JPanel { static final long serialVersionUID = 0; protected int width = Defaults.IMAGE_SIZE; protected int height = Defaults.IMAGE_SIZE; // set methods /** * Sets the height of the image * @param w the width in pixels * @param h the height in pixels */ public void setMethods(int w, int h){ width = w; height = h; this.setSize(new Dimension(w,h)); this.setPreferredSize(new Dimension(w,h)); } // get methods /** * This is the key method. It is this image * that is processed by the model * @return the Image to be processed. */ public abstract Image getImage(); /** * Returns the name of the image so it can be known * in the program * @return the image name. */ public abstract String getName(); public abstract JPanel getControlPanel(); /** * Get the size of the image * @return the image size */ public Dimension getSize(){ return new Dimension(width,height); } }