05-830, User Interface Software, Spring, 2009

This is the OLD version of the course -- please see the Spring, 2013 version

Homework 3: Design and Implement an Input Model for your Retained Object System

18% of grade. Wed, Feb 18, 2009 - Wed, Mar 18, 2009

The goal of this assignment is to add input handling to your retained object model. This will allow the mouse the be used to manipulate the graphical objects. As discussed in lecture, input is one of the least-researched parts of toolkits, and there are basically only three models to choose from. It would be neat if you invented a new one (it might even be a research contribution worthy of publication). The models are:

  1. The Garnet-Amulet "Interactor" model, which might better be called a "behavior object" model.
  2. The SubArctic model, with multiple levels of "focus policies" and "dispatch agents".
  3. The Java model (also used in Visual Basic, etc.), where each individual graphical object has to directly handle all relevant input events (mouse down, up, etc.)

For this assignment, you can use #1, #2 or invent your own. For #1, I provide an implementation guide on a design you might use for Interactors to go with the Retained Object design used for assignment #2. This design is in another file.


The requirements for your implementation include:

Drawing Editor

For the last part of the assignment, you will use your GraphicalObjects and behavior objects to create a simple drawing editor. The editor should have the following features, at a minimum:

The user interface is up to you. Most drawing editors use a tool palette to switch between creating lines and rectangles. You can do this with Java Swing components if you want, but you can also use keyboard modifiers -- e.g., shift-drag to create lines, plain drag to create rectangles. If it isn't obvious how to use your editor, be sure to display Text objects that document it, preferably outside the drawing area.

Extra Credit

For extra credit, you can implement more selectable objects, more behaviors, more features in your drawing editor, or more widgets. Here are some ideas.

Selectable objects:



Drawing editor features:

See the detailed discussion for the design with behavior objects for further ideas and information.

As always, we will probably end up refining this design as you work on the assignment.

(Last revision of this page: 2/17/2009)

Back to Homework Overview
Back to 05-830 main page