In this project you must use the work you did for the midterm project, for example, with images or with text, with suitable modifications.
A node icon may be added to the drawing by dragging it from the Object panel and moving it into position with the mouse. Any node may be selected with the mouse and scaled up or down in several discrete steps. If a node is moved, all the edges connected to it will be rubber banded dynamically as the node is moved. A selected node may be edited by (1) deleting it, along with any edges that connect to it, (2) replacing it by a different node icon, (3) changing its size, or (4) selecting edge (ie border) and fill colors from a color picker with 8 alternatives.
An edge may be added to the graph by pointing at the nodes it is to connect. A selected edge may be edited by (1) deleting it, (2) adding an arrow in the middle pointing in either direction, (3) removing the arrow, (4) setting the edge thickness, or (5) selecting the edge color. Edges are drawn between the centroids of the nodes they connect, and the nodes should be drawn on top of the edges to which they connect.
A text label may be added to a node by selecting the node and then the text icon in the Object panel. The text element may be scaled upward or downward in several discrete steps and translated. However, it is linked to the node and will move with the node when the node is moved. A selected text element may be edited by (1) deleting it, (2) moving it with the mouse, (3) changing its size, or (4) selecting the text color.
The background image icon permits a user to provide a background for the graph design to be taken from an image file. The user specifies a rectangular area of the screen with the mouse and enters the name and dimensions of a raw format image to be texture mapped into that rectangle. Initially the rectangle should have the same aspect ratio as the source image; several such rectangles may be positioned in the drawing, and they always appear behind the graph itself. A background image may be edited by (1) deleting it, (2) changing its size, or (3) changing its position.
It should be possible to store the current drawing and all node icons in a file and to restore a drawing from a file. A single level of UNDO should be provided to undo the previous operation. It should be possible to pan as required to view the current drawing, which may be larger than the viewing area.
VTIcon edgeIcon = new VTIcon ("Edge", "src/edge.gif");
The image files will also show in the default package in NetBeans. Also, they will be automatically included in the .jar file when you jar the src directoy. For example, to create from the command line the gracaninp2V3.jar file (attached) that illustrates this approach, from the src directory I used the command
jar cvMf ../gracaninp2V3.jar .
that created the .jar file in the NetBeans project directory.
Submit your program by 11:59pm the day it is due. 10% will be deducted from assignments 1 day late, and 50% from assignments 2 days late. Later assignments will not be accepted unless by prior arrangement. Partners should submit only a single copy of the project.
Here are the grading criterea. Note, however, that while ease of use counts only 20%, a poor interface may make it impossible for us to evaluate the functionality thoroughly.