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

Examples of org.apache.isis.viewer.dnd.drawing.Size.extend()


            final int itemWidth = item.isBlank ? 0 : style().stringWidth(item.name);
            size.ensureWidth(itemWidth);
            size.extendHeight(style().getLineHeight() + VPADDING);
        }

        size.extend(getPadding());
        size.extendWidth(HPADDING * 2);
        return size;
    }

    public int getOption() {
View Full Code Here


        }
        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);
View Full Code Here

    @Override
    public Size getRequiredSize(final Size availableSpace) {
        availableSpace.contract(getLeft() + getRight(), getTop() + getBottom());
        final Size size = wrappedView.getRequiredSize(availableSpace);
        size.extend(getLeft() + getRight(), getTop() + getBottom());
        return size;
    }

    protected int getRight() {
        return right;
View Full Code Here

    }

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

        return size;
    }

    protected int getTop() {
View Full Code Here

            final int itemWidth = item.isBlank ? 0 : style().stringWidth(item.name);
            size.ensureWidth(itemWidth);
            size.extendHeight(style().getLineHeight() + VPADDING);
        }

        size.extend(getPadding());
        size.extendWidth(HPADDING * 2);
        return size;
    }

    public int getOption() {
View Full Code Here

    }

    @Override
    public Size requiredSize(final Size availableSpace) {
        final Size size = layout.getRequiredSize(this);
        size.extend(getPadding());
        size.ensureHeight(1);
        return size;
    }

    @Override
View Full Code Here

            size.extendHeight(SCROLLBAR_WIDTH);
        }
        if (size.getHeight() > maximumSize.getHeight()) {
            size.extendWidth(SCROLLBAR_WIDTH);
        }
        size.extend(left, top);
        size.limitSize(maximumSize);
        return size;
    }

    @Override
View Full Code Here

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