Package org.jgraph.graph

Examples of org.jgraph.graph.Port


        }
        else {
          // No smart editing, just draw connections
          if (e != null && !e.isConsumed() && port != null && firstPort != null && firstPort != port) {
            // Fetch the underlying source and target port
            Port source = (Port) firstPort.getCell();
            Port target = (Port) port.getCell();

            // Check if connection is valid
            CreationMap map = CreationMap.createMap();
            map.setArcSourceId(((AbstractPetriNetElementModel) ((DefaultPort) source).getParent()).getId());
            map.setArcTargetId(((AbstractPetriNetElementModel) ((DefaultPort) target).getParent()).getId());
View Full Code Here


     *
     * @param edge
     */
    public void connect(DefaultEdge edge, boolean insertIntoCache)
    {
        Port source = (Port) edge.getSource();
        Port target = (Port) edge.getTarget();
        // TODO: move validation in Editor
        if (isValidConnection(source, target))
        {
            source.addEdge(edge);
            target.addEdge(edge);
            // Use Edge to Connect Source and Target
            ConnectionSet cs = new ConnectionSet(edge, source, target);
            // Create a Map that holds the attributes for the edge
            AttributeMap attr = edge.getAttributes();// GraphConstants.createMap();
            // Construct a Map from cells to Maps (for insert)
View Full Code Here

TOP

Related Classes of org.jgraph.graph.Port

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.