Vispatch Tutorial (using Java 1.02) > TOC > The Vispatch Visual Language > Bodies of Rules > Events

Events

When a rule executes that has event figure(s) in the body, event(s) are generated that simulate user generated mouse events. A drag event figure simulates a mouse drag event. The click event figure simulates a mouse click. However, the color of the event makes a difference. Only events figures that are the same color as the rule simulate mouse events. Event figures that are a different color insert the figure into the document.

For example, in the Vispatch program below, all rules are black, so the red drag event figures are inserted into the document. Black event figures simulate new events, which in turn cause the rules to be called recursively.

 
Drag events that are less than 5 pixels long are do not generate new events in order to provide a simple way to stop recursion.