How to use the Reo model

For loading, creating and saving Reo models from/to files, take a look at the class org.ect.reo.Reo. The core classes of the Reo model are located in the package org.ect.reo. Channels are defined in org.ect.reo.channels.

// Create a new connector.
Connector connector = new Connector("My connector");

// Add nodes.
Node node1 = new Node("A");
Node node2 = new Node("B");
connector.getNodes().add(node1);
connector.getNodes().add(node2);

// Add a channel.
Channel sync = new Sync(node1, node2);
connector.getPrimitives().add(sync);

// Saving the connector to a file.
try {
        // Create a module and save it.
        Module module = Reo.create("test.reo");
        module.getConnectors().add(connector);
        Reo.save(module);
}
catch (IOException e) {
        System.err.println(e);
}

You can also change the graphical model. Take a look at the classes in the package org.ect.reo.diagram.view.util.