CSC 221 Team Project

Spring 2009

Objective

To develop a software package that will function as a tool for designing simple Java Swing Graphical User Interfaces. The tool must allow

User Interface

Your software will include the following user interface elements:

  1. A menu bar with the following options (and sub-options):

    1. File (New, Open, Save, Export, Exit)

    2. Edit (Cut, Resize, Properties)
  2. A tool section with the following controls. These can be simple buttons with text captions.

    1. JFrame
    2. JButton
    3. JLabel
    4. JTextField
    5. JTextArea
    6. Cut control
    7. Resize control
    8. Edit Properties control
    9. Refresh drawing control

Desired functionality

The software will have the following functionality:

  1. (20 points) Allow user to design Swing user interfaces that contain Swing components specified above. The user will specify location and dimensions of the components using mouse interaction as specified below.

  2. (10 points) Allow user to save GUI to a user specified file. Allow user to read, display, and modify a GUI previously saved in a file.

  3. (10 points) Completely erase current GUI. Tie this action to the File-New menu option.
  4. (10 points) Component selection: Allow user to select a component that appears in the GUI being designed. The user indicates the component to be selected by a right mouse click within (or on) the component to be selected . The software responds by drawing a red rectangle around the selected component.
  5. (10 points) Allow user to cut (remove) selected component from the GUI.
  6. Note that the user has to select a component before it can be cut.

  7. (10 points) Allow user to resize a component.
  8.  Note that the user has to select a component before it can be resized. Only the dimensions of the component, not its location, can be modified. The behavior of the software during resizing is the same as in 1 above.

  9. (10 points) Allow user to specify the following properties for a component: name, label, attached Java code. For example, in the context of a JButton in the GUI, the properties might be "calcButton", "Calc", "calcButton.addActionListener(this)". Note that the user has to select a component before its properties can be set. All objects created must have default, generic, values for properties when created. For instance, the JButtons may be named button1, button2 etc. and have labels "b1", "b2", etc.
  10. (20 points) Export source code to a user-specified file. The code must compile without further editing by the user and, when compiled, must generate a GUI identical to the one designed by the user.
  11. Tie this action to the File-Export menu option.. Here is an example of a Java source file created by the tool and a screenshot of the corresponding user interface designed using the tool.
  12. (10 points) Extra Credit - add-a-feature. You will receive up to 10 extra points for a feature that you add to the tool. How many extra credit points you receive depends on the utility and slickness of your enhancement.

Software Design

  1. Download the file SwingMan.jar and add it as an external jar file to your project. It contains the class BasicGUITool and the interface SwingThing
  2. . Your GUITool will extend BasicGUITool.
  3. You will implement your own classes, like MyJButton,MyJFrame, MyJLabel etc. that extend the corresponding Swing components  JFrame, JButton, JLabel, JTextField, JTextArea. Each of these classes MUST implement the  SwingThing interface.
  4. A class corresponding to your design tool that extends the BasicGUITool.java class. The BasicGUITool class provides some basic functionality of a GUI design tool.
  5. You may not modify SwingThing.java or BasicGUITool.java.

Team composition and due date

Teams will be composed of three members each. Team member names are due to me in class on Friday, March 20, 2009. Each team will demonstrate its project in the lab on Friday, April 24, 2009. The following intermediate deadlines are STRONGLY SUGGESTED.

Project Grading

Credit will given for completing the tasks identified in the section above. Each task will be scored on a boolean basis. That is, your software either fully provides the desired functionality or it does not. No partial credit will be given for any feature.