The goal of this assignment is to learn a toolkit for creating informal pen-based UIs. You will create a simple sketching interface for a window with a collection of notes in it.
This assignment is to be done with the Satin toolkit (see http://guir.berkeley.edu/projects/satin). You will create a window that contains a Satin Sheet that is initially empty. The sheet should support the following interactions:
- The default gestures to pan, zoom, cut, copy, circle select, etc. on the right button.
- tap-select with both buttons, move selected objects with the left button.
- The ability to draw with the left button.
- When rectangle is drawn with the left button, a note is created (instead of drawing the rectangle).
- A popup menu that has the following structure (each level on parenthesis is a submenu): (set color, edit (cut, copy, paste, undo, redo), zoom in, zoom out). Set color changes the color of the currently selected objects, as well as setting the color for newly created objects.
The notes support the following interactions:
- use graffi ti gestures to enter text. The note contains one text string, initially empty, positioned slightly in and down from its upper left corner.
Your program should consist of a set of java files which should be commented with your name (the name you are registered under!). The java file should implement a class "A5" (so the TA can save it as "A5.java", compile it and execute it using the command "java A5".) 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 "A4", so using any other class as your main class will result in lost points.
This program is due on or before Monday, December 4th. This means it must be received by 11:59pm EDT on Monday to not be considered late. Graduating seniors are NOT ALLOWED TO HAND THE ASSIGNMENT IN LATE. Non-graduating students have the usual late rules described on the syllabus.
For this assignment, you should look at the various sample programs in the Satin source directory. Much of what you need to do is in these programs (or, something very close is). For the notes, you will need to create a new GraphicsObject for the text, based on the existing GObText in Satin. Similarly, you should create a new Interpreter based on the existing Grafitti interpreter object. Both of these existing objects are too simple, and have some problems that you should fix. For example:
- The graffiti recognizer creates a new text object if one doesn't exist. The text object is not at the correct location. Furthermore, if the text object that it uses is deleted, it continues to enter the text into it (so the new text doesn't get displayed).
- The text entered into the text object has some garbage in it. Also, it's bounding box is not being computed correctly.
There are other enhancements you can make, some of which are suggested for extra credit below.
For this assignment, there are a number of extra credit possibilities. You can do one or more suggested below, or if you have other ideas, talk to the instructor about them. Each are worth one point (unless noted)
- Extend the graffiti interpreter to handle carriage return, backspace, shift and caps lock (as they are on the Palm Pilot). Extend the text object to handle multiline text correctly. Use the standard interpreter gesture set to implement these.
- Extend the text object so its output wraps to new lines, based on the size of it's note box.
- Allow notes to be merged (draw a stroke from one to the other: the new box is the total size of both former boxes, and the text objects are merged, so one is after the other.) This can only be done if your text object supports multiline text.
- Allow notes to be split. Drawing a horizontal line through the box splits it into two, with the text above the line going to one box, and the text below (or intersecting) the line going to the other box. (2 points)
- Allow the grafitti recognizer to send the text to the most recently selected text object. Add a menu item to create a new text object in the selected note, and then keep track of the last created note.
- Train the graffiti recognizer to understand numbers, and use one of the available standard gestures to toggle into number mode for the next stroke.