RootPanel.get().add(viewPanel, 0, 0);
final Diagram diagram = new Diagram(boundaryPanel);
boundaryPanel.add(new Label("Connectors example for GWT 2.4"), 10, 2);
Connector connector1 = new Connector(50, 80, 150, 200, new SectionDecoration(DecorationType.ARROW_SOLID), new SectionDecoration(DecorationType.ARROW_SOLID));
connector1.showOnDiagram(diagram);
ArrayList<CornerPoint> cp = new ArrayList<CornerPoint>();
cp.add(new CornerPoint(370, 200));
cp.add(new CornerPoint(370, 120));
cp.add(new CornerPoint(270, 120));
SectionDecoration startDecoration = new SectionDecoration(DecorationType.ARROW_LINE);
SectionDecoration endDecoration = new SectionDecoration(
new Image("http://code.google.com/images/code_sm.png"),
new Image("http://code.google.com/images/code_sm.png"));
Connector connector2 = new Connector(350, 200, 270, 80, cp, startDecoration, endDecoration);
connector2.style = ConnectorStyle.DASHED;
connector2.showOnDiagram(diagram);
Connector connector3 = new Connector(450, 120, 500, 80, new SectionDecoration(DecorationType.ARROW_SOLID), new SectionDecoration(DecorationType.ARROW_SOLID));
connector3.style = ConnectorStyle.DOTTED;
connector3.showOnDiagram(diagram);
FocusPanel diamond = new FocusPanel();
Image img = AbstractImagePrototype.create(ConnectorsBundle.INSTANCE.diamondImg()).createImage();
img.getElement().getStyle().setDisplay(Display.BLOCK);
diamond.setWidget(img);