Skip navigation links

Package diva.canvas.interactor

The library of interactors and other interaction support.

See: Description

Package diva.canvas.interactor Description

The library of interactors and other interaction support. This package is built on top of the basic event-handling provided by diva.canvas.event.

An interactor is an object that captures the notion of the interaction that a figure performs. For example, in a simple graph editor I might create two interactors: one for edges and one for nodes. Each edge object has a pointer to the edge interactor (using the method setInteractor()), and the nodes similarly have pointers to the node interactor.

This means several things. First, we have a clear way to make all edges and nodes (for example) behave in the same way. Second, we can change the behaviour of all nodes or edges by modifying the one interactor. Third, we can build re-usable interaction styles as interactors.

Skip navigation links