Package diva.canvas.interactor

Examples of diva.canvas.interactor.BoundedDragInteractor


    public void createBoundedDraggableFigure() {
        FigureLayer layer = graphicsPane.getForegroundLayer();

        // Create the interactor and set it up for a 200x200 rectangle
        Rectangle2D bounds = new Rectangle2D.Double(100.0, 100.0, 200.0, 200.0);
        Interactor boundedDragger = new BoundedDragInteractor(bounds);
        boundedDragger.setMouseFilter(MouseFilter.defaultFilter);

        // Create an outline rectangle that shows the boundaries
        graphicsPane.getOverlayLayer().add(bounds);

        // Create a green rectangle that stays inside the boundary
View Full Code Here

TOP

Related Classes of diva.canvas.interactor.BoundedDragInteractor

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.