Package diva.canvas.connector

Examples of diva.canvas.connector.Blob


        Site a = figureA.getE();
        Site b = figureB.getN();
        connectorA = new StraightConnector(a, b);

        // Add the circle and arrowhead to it
        Blob blob = new Blob(a.getX(), a.getY(), a.getNormal(),
                Blob.BLOB_CIRCLE);
        connectorA.setTailEnd(blob);

        Arrowhead arrow = new Arrowhead(b.getX(), b.getY(), b.getNormal());
        connectorA.setHeadEnd(arrow);

        // Add it to the layer
        layer.add(connectorA);

        // Create the second connector
        Site c = figureA.getS();
        Site d = figureB.getW();
        connectorB = new ManhattanConnector(c, d);

        // Add the diamond
        Blob diamond = new Blob(c.getX(), c.getY(), c.getNormal(),
                Blob.BLOB_DIAMOND);
        diamond.setSizeUnit(6.0);
        diamond.setFilled(false);
        connectorB.setTailEnd(diamond);

        // Add it to the layer
        layer.add(connectorB);
    }
View Full Code Here


        public void createTerminals(IconFigure icon) {
            // NORTH
            StraightTerminal north = new StraightTerminal();

            //Site connectNorth = north.getConnectSite();
            Blob blobNorth = new Blob();
            blobNorth.setSizeUnit(5.0);
            north.setEnd(blobNorth);
            icon.addTerminal(north, SwingConstants.NORTH, 50);

            // SOUTH
            StraightTerminal south = new StraightTerminal();

            //Site connectSouth = south.getConnectSite();
            Blob blobSouth = new Blob();
            blobSouth.setStyle(Blob.BLOB_DIAMOND);
            blobSouth.setSizeUnit(5.0);
            blobSouth.setFilled(false);
            south.setEnd(blobSouth);
            icon.addTerminal(south, SwingConstants.SOUTH, 50);

            // WEST
            StraightTerminal west = new StraightTerminal();
View Full Code Here

        // Create a set of terminals, one by one
        // NORTH
        StraightTerminal north = new StraightTerminal(_geometry.getN());

        //Site connectNorth = north.getConnectSite();
        Blob blobNorth = new Blob();
        blobNorth.setSizeUnit(5.0);
        north.setEnd(blobNorth);
        layer.add(north);

        // SOUTH
        StraightTerminal south = new StraightTerminal(_geometry.getS());

        //Site connectSouth = south.getConnectSite();
        Blob blobSouth = new Blob();
        blobSouth.setStyle(Blob.BLOB_DIAMOND);
        blobSouth.setSizeUnit(5.0);
        blobSouth.setFilled(false);
        south.setEnd(blobSouth);
        layer.add(south);

        // WEST
        StraightTerminal west = new StraightTerminal(_geometry.getW());
View Full Code Here

                    }
                } catch (IllegalActionException e) {
                    // Ignore erroneous parameter value.
                }
                if (transition.isPreemptive()) {
                    Blob blob = new Blob(0, 0, 0, Blob.BLOB_CIRCLE, 4.0,
                            Color.red);
                    blob.setFilled(true);
                    c.setTailEnd(blob);
                }
                if (transition.isNondeterministic()) {
                    c.setStrokePaint(Color.RED);
                }
View Full Code Here

        // NORTH
        StraightTerminal north = new StraightTerminal();

        //Site connectNorth = north.getConnectSite();
        Blob blobNorth = new Blob();
        blobNorth.setSizeUnit(5.0);
        north.setEnd(blobNorth);
        iconFigure.addTerminal(north, SwingConstants.NORTH, 50);

        // SOUTH
        StraightTerminal south = new StraightTerminal();

        //Site connectSouth = south.getConnectSite();
        Blob blobSouth = new Blob();
        blobSouth.setStyle(Blob.BLOB_DIAMOND);
        blobSouth.setSizeUnit(5.0);
        blobSouth.setFilled(false);
        south.setEnd(blobSouth);
        iconFigure.addTerminal(south, SwingConstants.SOUTH, 50);

        // WEST
        StraightTerminal west = new StraightTerminal();
View Full Code Here

TOP

Related Classes of diva.canvas.connector.Blob

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.