Vispatch Tutorial (using Java 1.02) > TOC > Research Directions > Bootstrapping the Interface > Delete Figures

Delete Figures

The last technique needed for the editor is a way to delete figures. The program below demonstrates one technique for doing this with Vispatch rules. Figures with two characteristic points are deleted by dragging from the primary characteristic point of a figure to the secondary characteristic point. Figures with one characteristic point are deleted by clicking on the figure's characteristic point.

 
Notice the small rectangle in the head of the second rule. This is a special way of showing a rectangle whose primary and secondary points are in the same location. The rectangle is an ordinary black rectangle so it behaves as a wild card figure. Without this special representation, the rectangle would have zero height and width and would not be visible. The small arrow in the lower right corner indicates that that corner is really located in the same location as the upper left corner. The head will only match figures whose primary and secondary points, as well as a click event, are all in the same location. For this purpose, figures with one characteristic point are interpreted as having primary and secondary characteristic points at the same location.