Package org.apache.isis.viewer.dnd.drawing

Examples of org.apache.isis.viewer.dnd.drawing.Canvas.offset()


        final int contentWidth = contents.getWidth();
        final int contentHeight = contents.getHeight();

        final Canvas headerCanvasLeft = canvas.createSubcanvas(0, top, left, contentHeight);
        headerCanvasLeft.offset(0, -y);
        leftHeader.draw(headerCanvasLeft);

        final Canvas headerCanvasRight = canvas.createSubcanvas(left, 0, contentWidth, top);
        headerCanvasRight.offset(-x, 0);
        topHeader.draw(headerCanvasRight);
View Full Code Here


        final Canvas headerCanvasLeft = canvas.createSubcanvas(0, top, left, contentHeight);
        headerCanvasLeft.offset(0, -y);
        leftHeader.draw(headerCanvasLeft);

        final Canvas headerCanvasRight = canvas.createSubcanvas(left, 0, contentWidth, top);
        headerCanvasRight.offset(-x, 0);
        topHeader.draw(headerCanvasRight);

        final Color thumbColor = Toolkit.getColor(ColorsAndFonts.COLOR_PRIMARY2);
        drawVerticalScrollBar(canvas, contentWidth, contentHeight, thumbColor);
        drawHorizontalScrollBar(canvas, contentWidth, contentHeight, thumbColor);
View Full Code Here

        final Color thumbColor = Toolkit.getColor(ColorsAndFonts.COLOR_PRIMARY2);
        drawVerticalScrollBar(canvas, contentWidth, contentHeight, thumbColor);
        drawHorizontalScrollBar(canvas, contentWidth, contentHeight, thumbColor);

        final Canvas contentCanvas = canvas.createSubcanvas(left, top, contentWidth, contentHeight);
        contentCanvas.offset(-x, -y);

        if (Toolkit.debug) {
            canvas.drawRectangle(contents.getX(), contents.getY(), contents.getWidth(), contents.getHeight(), Toolkit.getColor(ColorsAndFonts.COLOR_DEBUG_BOUNDS_DRAW));
        }
View Full Code Here

        // draw buttons
        for (final View button : buttons) {
            final Canvas buttonCanvas = canvas.createSubcanvas(button.getBounds());
            button.draw(buttonCanvas);
            final int buttonWidth = button.getSize().getWidth();
            buttonCanvas.offset(BUTTON_SPACING + buttonWidth, 0);
        }

        // draw rest
        super.draw(canvas);
    }
View Full Code Here

        // draw buttons
        for (final View button : buttons) {
            final Canvas buttonCanvas = canvas.createSubcanvas(button.getBounds());
            button.draw(buttonCanvas);
            final int buttonWidth = button.getSize().getWidth();
            buttonCanvas.offset(BUTTON_SPACING + buttonWidth, 0);
        }

        // draw rest
        super.draw(canvas);
    }
View Full Code Here

        final int contentWidth = contents.getWidth();
        final int contentHeight = contents.getHeight();

        final Canvas headerCanvasLeft = canvas.createSubcanvas(0, top, left, contentHeight);
        headerCanvasLeft.offset(0, -y);
        leftHeader.draw(headerCanvasLeft);

        final Canvas headerCanvasRight = canvas.createSubcanvas(left, 0, contentWidth, top);
        headerCanvasRight.offset(-x, 0);
        topHeader.draw(headerCanvasRight);
View Full Code Here

        final Canvas headerCanvasLeft = canvas.createSubcanvas(0, top, left, contentHeight);
        headerCanvasLeft.offset(0, -y);
        leftHeader.draw(headerCanvasLeft);

        final Canvas headerCanvasRight = canvas.createSubcanvas(left, 0, contentWidth, top);
        headerCanvasRight.offset(-x, 0);
        topHeader.draw(headerCanvasRight);

        final Color thumbColor = Toolkit.getColor(ColorsAndFonts.COLOR_PRIMARY2);
        drawVerticalScrollBar(canvas, contentWidth, contentHeight, thumbColor);
        drawHorizontalScrollBar(canvas, contentWidth, contentHeight, thumbColor);
View Full Code Here

        final Color thumbColor = Toolkit.getColor(ColorsAndFonts.COLOR_PRIMARY2);
        drawVerticalScrollBar(canvas, contentWidth, contentHeight, thumbColor);
        drawHorizontalScrollBar(canvas, contentWidth, contentHeight, thumbColor);

        final Canvas contentCanvas = canvas.createSubcanvas(left, top, contentWidth, contentHeight);
        contentCanvas.offset(-x, -y);

        if (Toolkit.debug) {
            canvas.drawRectangle(contents.getX(), contents.getY(), contents.getWidth(), contents.getHeight(),
                Toolkit.getColor(ColorsAndFonts.COLOR_DEBUG_BOUNDS_DRAW));
        }
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.