This example demonstrates how to place image icons on the vertices.
The demo also shows how to extract the outline of the opaque part of
a transparent image and create a java.awt.Shape. By doing so:
- Vertex selection is constrained to the visible part of the image
- Edge arrows follow the outline of the visible part of the image.
Be sure to try out the mouse listeners:
Picking Mode:
- MouseButtonOne press on a Vertex or Edge to select it
- MouseButtonOne+Shift press on a Vertex or Edge to add or toggle selection
- MouseButtonOne+drag on a Vertex to move all selected vertices
- MouseButtonOne+drag to select Vertices in a rectangle
- MouseButtonOne+Shift+drag to add to selection with Vertices in a rectangle
TransformingMode:
- MouseButtonOne+drag to translate the display
- MouseButtonOne+Shift+drag to rotate the display
- MouseButtonOne+ctrl(or Command)+drag to shear the display
Both Modes:
- MouseWheel to scale. When scale < 1, view is scaled. When scale > 1, layout is scaled.