Event Driven
Software
Description of the Final Project
Due on the date of the last scheduled class
For the final project you will design an Applet that presents the user with a GUI interface and a Canvas for drawing shapes and adding text. Your interface will have a (North) Panel that contains Choice Menus for selecting the shape (or text) that you will draw on the canvas, the color selected for this shape, and whether the shape is to be filled or only outlined. It will also contain Buttons for selecting "load", "save", "undo", or "clear". You must provide the user with the ability to perform a succession of undos to remove a sequence of drawings in reverse order of how they were formed. You must be able to save an editing session (using the IP address of the client) and load a previous session for viewing or re-editing. The (North) Panel should also contain a CheckboxGroup of background color settings. The Center Panel will contain the Canvas where shapes will be drawn and text added by dragging a mouse across the region where you want to place the object that you have previously selected. The East Panel will contain Scrollbars for customizing the color of the object you wish to draw, a text field for writing any text that you want to transfer to the Canvas, and components for selecting the font style and whether to bold, itallicize, or underline the indicated text.
You will include with your applet a Server application that I will run in the background to test your project. This server must be able to receive commands "Save" and "Load" and provide separate input/output streams for exchanging the Object (shape vector) to be saved. Inside your applet you will need to declare a Socket, Object Input/Output streams for saving and retrieving your work, and a data stream (PrintStream) for sending commands to the server. The server will be running as "localhost" at IP address 127.0.0.1. The server will save the object in a file named as the IP address of the client. This is of little significance for the demonstration project, but would mean that if this server were generally accessible only one file per client IP address could be saved and the user would have to use the same machine (which would have to have the same IP address) to access the file. You will be able to incorporate much of your work from the last regular assignment into this part of the project. All of the features of your applet should work when you use appletviewer. Most of the save and load features should also work in Netscape, however there may be a problem there with saving and retrieving text objects. You might expect less success in Internet Explorer where security will prevent you from incorporating the save/load features.
A demonstration of a previous student project will give you an indication of what you may do in this project. You have a degree of lattitude as to how you may design your interface as long as the basic components of the project are present. Future assignments will be useful in helping you to construct the required features of this project. You will build on the design you have submitted for the basic outline of the interface, and submit your design with the Applet and the .java files for all of the constituent classes.