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

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


        return right;
    }

    @Override
    public Size getSize() {
        final Size size = wrappedView.getSize();
        size.extend(getLeft() + getRight(), getTop() + getBottom());

        return size;
    }
View Full Code Here


        }
    }

    @Override
    public void setSize(final Size size) {
        final Size wrappedViewSize = new Size(size);
        wrappedViewSize.contract(getLeft() + getRight(), getTop() + getBottom());
        wrappedView.setSize(wrappedViewSize);
    }
View Full Code Here

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

        final ViewState state = getState();
        if (state.isViewIdentified()) {
            final Size s = getSize();
            final int xExtent = s.getWidth();
            if (state.isViewIdentified()) {
                canvas.drawSolidRectangle(xExtent - BORDER + 1, top, BORDER - 2, s.getHeight() - 2 * top, Toolkit.getColor(ColorsAndFonts.COLOR_SECONDARY3));
            }
        }
    }
View Full Code Here

        }
    }

    @Override
    public ViewAreaType viewAreaType(final Location mouseLocation) {
        final Size size = wrappedView.getSize();
        final Bounds bounds = new Bounds(getLeft(), getTop(), size.getWidth(), size.getHeight());

        if (bounds.contains(mouseLocation)) {
            mouseLocation.subtract(getLeft(), getTop());

            return wrappedView.viewAreaType(mouseLocation);
View Full Code Here

    }

    @Override
    public void draw(final Canvas canvas) {
        super.draw(canvas);
        final Size s = getSize();
        final int width = s.getWidth();
        for (int i = 0; i < left - padding; i++) {
            // canvas.drawRectangle(i, i, width - 2 * i, s.getHeight() - 2 * i,
            // color);
            canvas.drawRoundedRectangle(i, i, width - 2 * i, s.getHeight() - 2 * i, arcRadius, arcRadius, color);
        }
    }
View Full Code Here

        debug.appendln("resizable ", (canExtend(UP) ? "Up " : "") + (canExtend(DOWN) ? "Down " : "") + (canExtend(LEFT) ? "Left " : "") + (canExtend(RIGHT) ? "Right " : ""));
    }

    @Override
    public void draw(final Canvas canvas) {
        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

            maximumSize.setWidth(width);
        }
        if (height > 0 && maximumSize.getHeight() > height) {
            maximumSize.setHeight(height);
        }
        final Size size = wrappedView.getRequiredSize(maximumSize);
        size.extend(getLeft() + getRight(), getTop() + getBottom());
        if (width > 0) {
            size.setWidth(width);
        }
        if (height > 0) {
            size.setHeight(height);
        }
        return size;
    }
View Full Code Here

        debug.appendln();
        debug.appendTitle("View");

        debug.appendln("Self", getView());
        debug.appendln("Parent's size", getParent() == null ? new Size() : getParent().getSize());
        debug.appendln("Size w/in parent", getView().getRequiredSize(getParent() == null ? new Size() : getParent().getSize()));
        debug.appendln("Location w/in parent", getView().getLocation());
        debug.appendln("Changable", canChangeValue());
        debug.appendln("Focus", (canFocus() ? "focusable" : "non-focusable"));
        debug.appendln("Has focus", hasFocus());
        debug.appendln("Contains focus", containsFocus());
View Full Code Here

        return parent == null ? null : parent.getView();
    }

    @Override
    public Size getRequiredSize(final Size maximumSize) {
        return new Size(maximumSize);
    }
View Full Code Here

        return new Size(maximumSize);
    }

    @Override
    public Size getSize() {
        return new Size(width, height);
    }
View Full Code Here

TOP

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

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.