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

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


        final int xt = x;
        final int yt = baseline;

        if (Toolkit.debug) {
            final int x2 = style.stringWidth(text);
            canvas.drawDebugOutline(new Bounds(xt, yt - style.getAscent(), x2, style.getTextHeight()), baseline, Toolkit.getColor(ColorsAndFonts.COLOR_DEBUG_BOUNDS_DRAW));
        }
        canvas.drawText(text, xt, yt, color, style);
    }
View Full Code Here


        this.view = display;
    }

    @Override
    public void debugData(final DebugBuilder debug) {
        view.draw(new DebugCanvas(debug, new Bounds(view.getBounds())));
    }
View Full Code Here

        return wrappedView.getBaseline();
    }

    @Override
    public Bounds getBounds() {
        return new Bounds(getLocation(), getSize());
    }
View Full Code Here

    @Override
    public void draw(final Canvas canvas) {
        super.draw(canvas);

        final Bounds r = getBounds();

        for (int i = 0; i < thickness; i++) {
            canvas.drawRectangle(i, i, r.getWidth() - i * 2 - 1, r.getHeight() - i * 2 - 1, Toolkit.getColor(ColorsAndFonts.COLOR_SECONDARY1));
        }
    }
View Full Code Here

        this.view = display;
    }

    @Override
    public void debugData(final DebugBuilder debug) {
        view.draw(new DebugCanvasAbsolute(debug, new Bounds(view.getAbsoluteLocation(), view.getSize())));
    }
View Full Code Here

            dumpGraph(collection, debug);
        }

        debug.append("\n\nDRAWING\n");
        debug.append("------\n");
        view.draw(new DebugCanvas(debug, new Bounds(view.getBounds())));
    }
View Full Code Here

    }

    public void draw(final Canvas canvas, final int x, final int baseline) {
        final int y = baseline - this.baseline + 1;
        if (Toolkit.debug) {
            canvas.drawDebugOutline(new Bounds(new Location(x, y), getSize()), getBaseline(), Toolkit.getColor(ColorsAndFonts.COLOR_DEBUG_BOUNDS_DRAW));
        }
        final Image icon = icon();
        if (icon == null) {
            canvas.drawSolidOval(x + 1, y, iconHeight, iconHeight, Toolkit.getColor(ColorsAndFonts.COLOR_PRIMARY3));
        } else {
View Full Code Here

        return 0;
    }

    @Override
    public Bounds getBounds() {
        return new Bounds(location, size);
    }
View Full Code Here

    protected AbstractBorder(final View view) {
        super(view);
    }

    protected Bounds contentArea() {
        return new Bounds(getLeft(), getTop(), getSize().getWidth() - getLeft() - getRight(), getSize().getHeight() - getTop() - getBottom());
    }
View Full Code Here

            return null;
        }
    }

    protected void clearBackground(final Canvas canvas, final Color color) {
        final Bounds bounds = getView().getBounds();
        canvas.drawSolidRectangle(0, 0, bounds.getWidth(), bounds.getHeight(), color);
    }
View Full Code Here

TOP

Related Classes of org.apache.isis.viewer.dnd.drawing.Bounds

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.