The absolute basic example of draw2d. Neither user interaction nor other fancy stuff.
Just paint some basic figures with the draw2d API.
Absolute basic example with Drag&Drop interaction.
No Reocket science. ;-)
Try to resize or to move the figures around.
First example with objects with ports. You can Drag&Drop the ports and drop them onto other Ports to
create Connections.
draw2d.Ports are the basic class for draw2d.Connections between draw2.Figures.
Connections can be created with API calls or user interaction.
Additional, you can see a Tools Palette with some buttons for undo/redo. the Draw2D supports a undo/redo Stack for all user
operations. No additional coding is required.
You can add any figure as decoration to a connection. Addition you can hand over a DecorationLocator to place them
like your flavor.
Try it out. Drag&Drop the green objects to inspect the label relocation. The label will stay in the middle of the connection.
A simple figure with a form input field.