To create, manipulate and save collections of images.
Write a Java program using JFC and the Swing components that allows you to create sets of images. Your program should allow you to
In particular, your program should allow you to load files with the suffix "ist" (Image SeT), which should be a text file with the path of an image on each line. Only .jpg and .gif image files should be supported (you can ignore lines that specify anything else). Your program should allow users to save the current collection in an "ist" file.
The main window of the program should contain a set of image entries. Each entry should be a 200x250 square with 5 elements:
The main window should only have a vertical scrollbar. It should have a minimum horizontal size to fit one image entry horizontally, but should display as many image entries horizontally as will fit in the current window (based on its horizontal size).
New images should be added to the end of the image collection.
At the bottom of the main window should be a horizontal region that contains addition information about the current image. It should contain at least the file name and full path, the size of the image, the kind of image, and the file size.
Finally, double clicking on an image should open a new window containing the full size image in a scrolling image pane. Only one "full size image window" should exist per image. If the user double clicks on a new image, it should be given its own window, and if they double click on an image which already has an open window, that window should be brought to the front.
Your program should consist of a set of java files which should be commented with your name (the name you are registered under!) and ID number. The java file should implement a class "A2" (so the TA can save it as "A2.java", compile it and execute it using the command "java A2".) The files should be emailed to cs4470@cc.gatech.edu.
The time the mail is received will be used to determine whether or not the program is late, so be sure to allow a couple of minutes for the mail system to transmit your file if you are working right up to the deadline.
IMPORTANT: If the TA has to edit your files you will lose points. Similarly, the TA should be able to execute the class "A2", so using any other class as your main class will result in lost points.
This program is due on or before Monday, September 25th. This means it must be received by 11:59pm EDT on Monday to not be considered late.
Your program should create a default window of a reasonable size, and handle window resizing properly.
For an image named "path/foo.gif", the image title should be in a file called "path/foo.gif.ttl" and the description should be in a file called "path/foo.gif.dsc". If these files do not exist for an image, the fields are initially blank. If a user enters data in a previous blank field, the file should be created when they save the changes.
Each image entry will have a button ("Save changes") which is enabled when the title or description fields are changed. Clicking it saves the changes to the appropriate files (and disables the button).
There is only one possible extra credit for this assignment, and it is worth two additional points. You must provide the user the ability to rearrange images in the image collection by dragging the image entries around, in the same way slides can be rearranged in Powerpoints slide-sorter view. Clicking on an image and dragging it should continuously calculate where the image will end up, based on the current mouse location:
- If the mouse is over another entry (or in the space to the left of an entry), the image will be moved before that entry.
- If the mouse is to the right of the last entry on a line, it will be moved after that entry.
As with Powerpoint, you should draw a vertical line showing approximately where the image will end up.
Finally, the mouse should drag around a thumbnail of the image, with the following properties:
- An outline of the image entry (200x250 pixels) should be positioned around the mouse, relative to the location where the mouse was initially clicked inside the region
- A smaller thumbnail of the image (half the size of the thumbnail in the image entry) should be at the center of the image entry outline.