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

Examples of org.apache.isis.viewer.dnd.drawing.Bounds.translate()


    @Override
    public DragEvent dragStart(final DragStart drag) {
        if (isOverColumnBorder(drag.getLocation())) {
            resizeColumn = axis.getColumnBorderAt(drag.getLocation().getX());
            final Bounds resizeArea = new Bounds(getView().getAbsoluteLocation(), getSize());
            resizeArea.translate(getView().getPadding().getLeft(), getView().getPadding().getTop());
            if (resizeColumn == 0) {
                resizeArea.setWidth(axis.getHeaderOffset());
            } else {
                resizeArea.translate(axis.getLeftEdge(resizeColumn - 1), 0);
                resizeArea.setWidth(axis.getColumnWidth(resizeColumn - 1));
View Full Code Here


            final Bounds resizeArea = new Bounds(getView().getAbsoluteLocation(), getSize());
            resizeArea.translate(getView().getPadding().getLeft(), getView().getPadding().getTop());
            if (resizeColumn == 0) {
                resizeArea.setWidth(axis.getHeaderOffset());
            } else {
                resizeArea.translate(axis.getLeftEdge(resizeColumn - 1), 0);
                resizeArea.setWidth(axis.getColumnWidth(resizeColumn - 1));
            }

            final Size minimumSize = new Size(70, 0);
            return new ResizeDrag(this, resizeArea, ResizeDrag.RIGHT, minimumSize, null);
View Full Code Here

        updateNotifier.invalidateViewsForChangedObjects();
        synchronized (redrawArea) {
            if (!redrawArea.equals(NO_REDRAW) || refreshStatus) {
                UI_LOG.debug("repaint viewer " + redrawArea);
                final Bounds area = new Bounds(redrawArea);
                area.translate(insets.left, insets.top);
                renderingArea.repaint(area.getX(), area.getY(), area.getWidth(), area.getHeight());
                redrawArea.setBounds(NO_REDRAW);
            }
        }
    }
View Full Code Here

        assertEquals(0, b.getHeight());
    }

    public void testDownLeftIntersects() {
        final Bounds c = new Bounds(b);
        c.translate(-5, -5);
        assertTrue(b.intersects(c));

        c.translate(-b.getWidth(), 0);
        assertFalse(b.intersects(c));
    }
View Full Code Here

    public void testDownLeftIntersects() {
        final Bounds c = new Bounds(b);
        c.translate(-5, -5);
        assertTrue(b.intersects(c));

        c.translate(-b.getWidth(), 0);
        assertFalse(b.intersects(c));
    }

    public void testEnclosingUnion() {
        final Bounds c = new Bounds(10, 20, 5, 5);
View Full Code Here

        assertEquals(new Bounds(5, 10, 25, 50), u);
    }

    public void testOverlappingIntersects() {
        Bounds c = new Bounds(b);
        c.translate(-5, -5);
        c.extend(10, 10);
        assertTrue(b.intersects(c));

        c = new Bounds(b);
        c.translate(5, 5);
View Full Code Here

        c.translate(-5, -5);
        c.extend(10, 10);
        assertTrue(b.intersects(c));

        c = new Bounds(b);
        c.translate(5, 5);
        c.extend(-10, -10);
        assertTrue(b.intersects(c));
    }

    public void testOverlappingUnion() {
View Full Code Here

        assertEquals(20, b.getHeight());
    }

    public void testUpRightIntersects() {
        final Bounds c = new Bounds(b);
        c.translate(5, 5);
        assertTrue(b.intersects(c));

        c.translate(b.getWidth(), 0);
        assertFalse(b.intersects(c));
    }
View Full Code Here

    public void testUpRightIntersects() {
        final Bounds c = new Bounds(b);
        c.translate(5, 5);
        assertTrue(b.intersects(c));

        c.translate(b.getWidth(), 0);
        assertFalse(b.intersects(c));
    }

    public void testXNoOverlapToLeft() {
        final Bounds c = new Bounds(1, 15, 4, 0);
View Full Code Here

        updateNotifier.invalidateViewsForChangedObjects();
        synchronized (redrawArea) {
            if (!redrawArea.equals(NO_REDRAW) || refreshStatus) {
                UI_LOG.debug("repaint viewer " + redrawArea);
                final Bounds area = new Bounds(redrawArea);
                area.translate(insets.left, insets.top);
                renderingArea.repaint(area.getX(), area.getY(), area.getWidth(), area.getHeight());
                redrawArea.setBounds(NO_REDRAW);
            }
        }
    }
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.