Package org.apache.isis.viewer.dnd

Examples of org.apache.isis.viewer.dnd.Canvas


        // subcanvas
        x = 80;
        canvas.drawRectangle(x, y, width, height, gray);

        Canvas subcanvas = canvas.createSubcanvas(x + 1, y + 1, width - 1, height - 1);
        subcanvas.drawRectangle(0, 0, width - 2, height - 2, blue);

        x = 150;
        canvas.drawRectangle(x, y, width, height, gray);

        subcanvas = canvas.createSubcanvas(x + 1, y + 1, width - 1, height - 1);
        subcanvas.offset(-100, -200);

        subcanvas.drawRectangle(100, 200, width - 2, height - 2, red);
        subcanvas.drawRectangle(0, 0, 120, 220, green);

        // solid shapes
        x = 10;
        y = 105;

        canvas.drawRectangle(x - 1, y - 1, width + 2, height + 2, gray);
        canvas.drawSolidRectangle(x, y, width, height, black);
        canvas.drawSolidOval(x, y, width, height, green);
        canvas.drawLine(x, y, x + width - 1, y + height - 1, red);
        canvas.drawLine(x, y + height - 1, x + width - 1, y, red);

        x = 80;
        canvas.drawSolidRectangle(x, y, width, height, black);

        subcanvas = canvas.createSubcanvas(x + 1, y + 1, width - 1, height - 1);
        subcanvas.drawSolidRectangle(0, 0, width - 2, height - 2, blue);

        x = 150;
        canvas.drawRectangle(x, y, width, width, black);
        canvas.drawOval(x, y, width, width, green);
View Full Code Here


                canvas.drawLine(left, baseline, left + 10, baseline, markerDark);
                canvas.drawLine(right - 10, baseline, right, baseline, markerDark);
                canvas.drawLine(left + 10, baseline, right - 10, baseline, markerLight);
            }
            Canvas subcanvas = canvas.createSubcanvas(view.getBounds());
            view.draw(subcanvas);
        }

    }
View Full Code Here

TOP

Related Classes of org.apache.isis.viewer.dnd.Canvas

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.