Examples of BoundsGeometry


Examples of diva.canvas.interactor.BoundsGeometry

        /** Create a new instance of this figure.
         */
        public SitedRectangle(double x, double y, double width, double height,
                Color color) {
            super(x, y, width, height, color);
            _geometry = new BoundsGeometry(this, getBounds());
        }
View Full Code Here

Examples of diva.canvas.interactor.BoundsGeometry

        BasicRectangle square = new BasicRectangle(160, 80, 80, 80);
        square.setStrokePaint(Color.gray);
        layer.add(square);

        // Create a BoundsGeometry to help get sites
        BoundsGeometry _geometry = new BoundsGeometry(square, square
                .getBounds());

        // 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());

        //Site connectWest = west.getConnectSite();
        Arrowhead arrowWest = new Arrowhead();
        west.setEnd(arrowWest);
        layer.add(west);

        // EAST
        StraightTerminal east = new StraightTerminal(_geometry.getE());

        //Site connectEast = east.getConnectSite();
        Arrowhead arrowEast = new Arrowhead();
        arrowEast.setFlipped(true);
        east.setEnd(arrowEast);
View Full Code Here

Examples of diva.canvas.interactor.BoundsGeometry

            GrabHandle g = (GrabHandle) e.getFigureSource();
            g.translate(snapped[0], snapped[1]);

            // Transform the child.
            BoundsManipulator parent = (BoundsManipulator) g.getParent();
            BoundsGeometry geometry = parent.getGeometry();

            parent.getChild().transform(
                    CanvasUtilities.computeTransform(parent.getChild()
                            .getBounds(), geometry.getBounds()));
        }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.