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

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


        return 0;
    }

    @Override
    public Bounds getBounds() {
        return new Bounds(x, y, width, height);
    }
View Full Code Here


    }

    @Override
    public void draw(final Canvas canvas) {
        if (Toolkit.debug) {
            canvas.drawDebugOutline(new Bounds(getSize()), getBaseline(), Toolkit.getColor(ColorsAndFonts.COLOR_DEBUG_BOUNDS_VIEW));
        }
    }
View Full Code Here

        return 0;
    }

    @Override
    public Bounds getBounds() {
        return new Bounds(x, y, width, height);
    }
View Full Code Here

    /**
     * Limits the bounds of the this view (when being moved or dropped) so it
     * never extends outside the specified bounds e.g. outside of a parent view
     */
    public void limitBoundsWithin(final Bounds containerBounds) {
        final Bounds contentBounds = getView().getBounds();
        if (containerBounds.limitBounds(contentBounds)) {
            getView().setBounds(contentBounds);
        }
    }
View Full Code Here

        final Bounds c = new Bounds(1, 15, 6, 0);
        assertTrue(b.intersects(c));
    }

    public void testXOverlapToRight() {
        final Bounds c = new Bounds(14, 15, 5, 0);
        assertTrue(b.intersects(c));
    }
View Full Code Here

        final Bounds c = new Bounds(14, 15, 5, 0);
        assertTrue(b.intersects(c));
    }

    public void testYOverlapToTop() {
        final Bounds c = new Bounds(10, 29, 0, 5);
        assertTrue(b.intersects(c));
    }
View Full Code Here

        return ((NodeSpecification) getSpecification()).canOpen(getContent());
    }

    @Override
    protected Bounds contentArea() {
        return new Bounds(getLeft(), getTop(), wrappedView.getSize().getWidth(), wrappedView.getSize().getHeight());
    }
View Full Code Here

        return wrappedView.toString() + "/TreeNodeBorder";
    }

    @Override
    public ViewAreaType viewAreaType(final Location mouseLocation) {
        final Bounds bounds = new Bounds(left + 1, 0, getSize().getWidth() - left - BORDER, top);
        if (bounds.contains(mouseLocation)) {
            return ViewAreaType.CONTENT;
        } else {
            return super.viewAreaType(mouseLocation);
        }
    }
View Full Code Here

        final int height = overlay.getSize().getHeight();
        final int width = anchor.getX() - location.getX();
        overlay.setSize(new Size(width, height));
        final int x = anchor.getX() - width;
        final int y = anchor.getY();
        overlay.setBounds(new Bounds(x, y, width, height));
        overlay.markDamaged();
    }
View Full Code Here

        final int height = anchor.getY() - location.getY();
        final int width = overlay.getSize().getWidth();
        overlay.setSize(new Size(width, height));
        final int x = anchor.getX();
        final int y = anchor.getY() - height;
        overlay.setBounds(new Bounds(x, y, width, height));
        overlay.markDamaged();
    }
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.