What's new? | Help | Directory | Sign in
Google
gwt-diagrams
Diagrams library for Google Web Toolkit (GWT)
  
  
  
  
    
Join project
Project owners:
  michal.balinski

Summary

gwt-diagrams is GWT library which provides diagramming capability to web applications.

Demo is available here.

Notes

0.2.RC01 is expected till end of March and stable 0.2 release is expected at end of April.

Hello world example

public class ExampleEntryPoint implements EntryPoint {

    public void onModuleLoad() {

        // elements to connect
        Widget label1 = new Label("Hello");
        Widget label2 = new Label("world");
        RootPanel.get().add(label1, 100, 100);
        RootPanel.get().add(label2, 200, 200);

        // gwt-diagrams stuff
        Connector c1 = UIObjectConnector.wrap(label1);
        Connector c2 = UIObjectConnector.wrap(label2);
        Connection connection = new RectilinearTwoEndedConnection(c1, c2);
        connection.appendTo(RootPanel.get());

    }
}

more code examples

Conceptions

Connector sth. that can be conneted with another Connector
Connection UI widget representing connection eg. line between two Connectors
Direction UP, DOWN, LEFT, RIGHT - direction in which Connection can grow from Connector
ConnectionData internal structure representing connection. It is internaly computed by ConnectonDataCalculator