Package diva.canvas

Examples of diva.canvas.AbstractFigure


                .getSelectionInteractor();
        BoundsManipulator manip = new BoundsManipulator();
        defaultInteractor.setPrototypeDecorator(manip);

        // Create a custom rectangle and make it draggable
        AbstractFigure blue = new CustomRectangle(10.0, 10.0, 50.0, 50.0);
        layer.add(blue);
        blue.setInteractor(defaultInteractor);
        blue.setToolTipText("Blue figure 1");

        // Create a custom rectangle and make it draggable
        AbstractFigure blue2 = new CustomRectangle(100.0, 100.0, 100.0, 50.0);
        layer.add(blue2);
        blue2.setInteractor(defaultInteractor);
        blue2.setToolTipText("Blue figure 2");

        // Create an image figure and make it draggable
        Image img = Toolkit.getDefaultToolkit().getImage(IMAGE_FILE_NAME);
        MediaTracker tracker = new MediaTracker(canvas);
        tracker.addImage(img, 0);
View Full Code Here

TOP

Related Classes of diva.canvas.AbstractFigure

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.