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

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


                drawOrderIndicator(canvas, axis, x + axis.getColumnWidth(i) - 10);
            }

            canvas.drawLine(0, 0, 0, getSize().getHeight() - 1, secondary1);
            canvas.drawLine(x, 0, x, getSize().getHeight() - 1, secondary1);
            final Canvas headerCanvas = canvas.createSubcanvas(x, 0, axis.getColumnWidth(i) - 1, height);
            headerCanvas.drawText(axis.getColumnName(i), ViewConstants.HPADDING, y, secondary1, Toolkit.getText(ColorsAndFonts.TEXT_LABEL));
            x += axis.getColumnWidth(i);
        }
        // Color secondary2 = Toolkit.getColor(ColorsAndFonts.COLOR_SECONDARY2);
        // canvas.drawLine(x, 0, x, getSize().getHeight() - 1, secondary2);
        // canvas.drawRectangle(0, height, getSize().getWidth() - 1,
View Full Code Here


    public void draw(final Canvas canvas) {
        final int baseline = getBaseline();

        final int width = axis.getHeaderOffset();
        final Size s = getSize();
        final Canvas subcanvas = canvas.createSubcanvas(0, 0, width, s.getHeight());
        int offset = ViewConstants.HPADDING;
        icon.draw(subcanvas, offset, baseline);
        offset += icon.getSize().getWidth() + ViewConstants.HPADDING + 0 + ViewConstants.HPADDING;
        title.draw(subcanvas, offset, baseline, getLeft() - offset);
View Full Code Here

        }
        if (UI_LOG.isDebugEnabled()) {
            UI_LOG.debug("------ repaint viewer #" + redrawCount + " " + paintArea.x + "," + paintArea.y + " " + paintArea.width + "x" + paintArea.height);
        }

        final Canvas c = createCanvas(graphic, paintArea);
        if (background != null) {
            background.draw(c.createSubcanvas(), rootView.getSize());
        }

        // paint views
        if (rootView != null) {
            rootView.draw(c.createSubcanvas());
        }
        // paint overlay

        final Bounds bounds = overlayView.getBounds();
        if (paintArea.intersects(new Rectangle(bounds.getX(), bounds.getY(), bounds.getWidth(), bounds.getHeight()))) {
            overlayView.draw(c.createSubcanvas(bounds));
        }

        /*
         * for (int i = 0; i < panes.length; i++) {
         * panes[i].draw(c.createSubcanvas()); }
View Full Code Here

        bufferGraphics.clearRect(paintArea.x, paintArea.y, paintArea.width, paintArea.height);
        bufferGraphics.clearRect(0, 0, w, h);

        bufferGraphics.setClip(paintArea.x, paintArea.y, paintArea.width, paintArea.height);
        final Canvas c = new AwtCanvas(bufferGraphics, renderingArea, paintArea.x, paintArea.y, paintArea.width, paintArea.height);
        // Canvas c = new Canvas(bufferGraphics, 0, 0, w, h);
        return c;
    }
View Full Code Here

                                                             // WindowControl.WIDTH;
        canvas.drawSolidRectangle(bw, top, width - bw - 3, height - top * 2, Toolkit.getColor(ColorsAndFonts.COLOR_SECONDARY3));
        canvas.drawLine(bw - 1, top, bw - 1, height - top * 2, lightColor);

        for (int i = 0; controls != null && i < controls.length; i++) {
            final Canvas controlCanvas = canvas.createSubcanvas(controls[i].getBounds());
            controls[i].draw(controlCanvas);
        }

        final Canvas c = canvas.createSubcanvas(iconView.getBounds());
        iconView.draw(c);
    }
View Full Code Here

    @Override
    public void draw(final Canvas canvas) {
        super.draw(canvas);
        if (menu != null) {
            final Canvas menuCanvas = canvas.createSubcanvas(menu.getBounds());
            menu.draw(menuCanvas);
        }
        if (submenu != null) {
            final Canvas submenuCanvas = canvas.createSubcanvas(submenu.getBounds());
            submenu.draw(submenuCanvas);
        }

        if (Toolkit.debug) {
            canvas.drawRectangleAround(getBounds(), Toolkit.getColor(ColorsAndFonts.COLOR_DEBUG_BOUNDS_VIEW));
View Full Code Here

        if (Toolkit.debug) {
            canvas.drawDebugOutline(new Bounds(getSize()), getBaseline(), Toolkit.getColor(ColorsAndFonts.COLOR_DEBUG_BOUNDS_BORDER));
        }
        final int width = getSize().getWidth() - getRight();
        final int height = getSize().getHeight() - getBottom();
        final Canvas subcanvas = canvas.createSubcanvas(getLeft(), getTop(), width, height);
        wrappedView.draw(subcanvas);
    }
View Full Code Here

        final Size size = getSize();
        final int width = size.getWidth();
        final int height = size.getHeight();
        drawResizeBorder(canvas, size);

        final Canvas subCanvas = canvas.createSubcanvas(left, top, width - left - right, height - top - bottom);
        wrappedView.draw(subCanvas);
    }
View Full Code Here

        final int y = offset.getDeltaY();

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

        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

            if (Toolkit.debug) {
                LOG.debug("compare: " + bounds + "  " + canvas);
            }
            if (canvas.overlaps(bounds)) {
                // Canvas subCanvas = canvas.createSubcanvas();
                final Canvas subCanvas = canvas.createSubcanvas(bounds.getX(), bounds.getY(), bounds.getWidth() - 0, bounds.getSize().getHeight());
                // subCanvas.offset(subview.getBounds().getX(),
                // subview.getBounds().getY());
                if (Toolkit.debug) {
                    LOG.debug("-- repainting " + subview);
                    LOG.debug("subcanvas " + subCanvas);
View Full Code Here

TOP

Related Classes of org.apache.isis.viewer.dnd.drawing.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.