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.
Interface Summary Interface Description GeometryGeometry is an interface that captures the concept of an abstract figure geometry. GrabHandleA grab handle for manipulating figures and so on. GrabHandleFactoryA factory so that a client can create grab handles without knowing anything about their implementation. InteractorAn object that encapsulate the interaction that a figure plays in an interactive application. PointConstraintAn interface implemented by classes that can constrain a point to lie within a certain set of values. SelectionListenerA model for graph selections which can be listened to. SelectionModelA model for graph selections. SelectionRendererAn interface that defines rendering for selections. ShapedFigureAn interface that defines the setShape() method.
Class Summary Class Description AbstractInteractorAn abstract class that implements Interactor. ActionInteractorAn interactor that fires an Action when a mouse pressed event occurs. BasicGrabHandleA basic rectangle grab-handle implementation. BasicGrabHandleFactoryA factory that creates basic grab-handles. BasicSelectionModelA basic implementation of the SelectionModel interface. BasicSelectionRendererA basic implementation of a selection renderer. BoundedDragInteractorAn interactor that drags its target only within a given rectangular region. BoundsConstraintKeep a point within a given rectangular bounds. BoundsGeometryBoundsGeometry is a class that provides support for manipulating the bounds of a figure. BoundsManipulatorA manipulator which attaches grab handles to the bounds of the child figure. CircleGeometryA class that provides support for manipulating the bounds of a figure. CircleManipulatorA manipulator which attaches a grab handles to one of the bounds of the child figure. CompositeInteractorAn interactor that forwards events to other interactors. DragInteractorAn interactor that responds to mouse drag events. ManipulatorA Manipulator is an object that decorates some figure, and generally paint grab-handles or some other stuff to the figure to that it can be resized and manipulated. MoveHandleA grab-handle that is intended for acting as a "move me" handle. PathGeometryPathGeometry represents a path. PathManipulatorA manipulator which attaches grab handles to the sites of the child figure. QuadrantConstraintKeep a point within one of the four quadrants relative to some reference point. SelectionDraggerA class that implements rubber-banding on a canvas. SelectionEventAn event representing a change in the graph selection model. SelectionInteractorA SelectionInteractor is attached to an object that can be put into and out of a selection.