//import java.awt.*; import javax.swing.*; import java.util.Hashtable; import java.util.Vector; /** *
* Image manipulating program. This program illustrates several * object-oriented idioms and patterns. A program similar in * functionality is available in C++, for information send email to * ola@cs.duke.edu ** * @see PixGui * @see Command * @see Pixmap * @see PixIcon * @see PixmapOperator * * @author Syam Gadde (gadde@cs.duke.edu) * @author Owen Astrachan (ola@cs.duke.edu) * @version 2.0 * */ public class PixApp { /** * start a PixApp application */ public static void main(String argv[]) { PixController control = new PixController(); PixGui gui = new PixGui(control); control.addGui(gui); } }* functionality: the program allows the you to to display images * (gif or jpg, or anything supported by Java's getToolkit().getImage() * Images are specified using a file dialog, but a simple modification * would allow the user to use an http: URL (currently a file: URL is used) *
* Each image is shown as a full image, with a thumbnail sketch added * to the program GUI. Clicking on the thumbnail makes that image the * active image, the program options for manipulating images always * act on the active image. *
* Current image processing is simple: reflect horizontally/vertically * and invert (change black-to-white or vice-versa, and do the right * thing with color pixels, e.g., red = 255 - red). *
* This program is reasonably well-designed, but it is meant to be * be used as a teaching program, so students are urged to * suggest/make modificiations to improve the design and to increase * the functionality of the program *