Examples of ensureHeight()


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

    @Override
    public Size getRequiredSize(final Size maximumSize) {
        final Size size = super.getRequiredSize(maximumSize);
        size.ensureWidth(left + 45 + right);
        size.ensureHeight(24);
        return size;
    }

    @Override
    public void draw(final Canvas canvas) {
View Full Code Here

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

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

    @Override
    protected void buildView() {
View Full Code Here

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

        final Size rightPanelRequiredSize = right == null ? new Size() : right.getRequiredSize(new Size(availableSpace));

        // combine the two sizes
        final Size totalSize = new Size(leftPanelRequiredSize);
        totalSize.extendWidth(rightPanelRequiredSize.getWidth());
        totalSize.ensureHeight(rightPanelRequiredSize.getHeight());

        if (totalSize.getWidth() > availableSpace.getWidth()) {
            /*
             * If the combined width is greater than the available then we need
             * to divide the space between the two sides and recalculate
View Full Code Here

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

        }

        // combine the two required sizes
        final Size combinedSize = new Size(leftPanelRequiredSize);
        combinedSize.extendWidth(rightPanelRequiredSize.getWidth());
        combinedSize.ensureHeight(rightPanelRequiredSize.getHeight());
        return combinedSize;
    }

    protected void showInRightPane(final View view) {
        replaceView(getSubviews()[1], view);
View Full Code Here

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

        final Size size = new Size();

        final String message = ((MessageContent) getContent()).getMessage();
        final String heading = ((MessageContent) getContent()).title();

        size.ensureHeight(errorIcon.getHeight());
        final Text text = Toolkit.getText(ColorsAndFonts.TEXT_NORMAL);
        final Text titleText = Toolkit.getText(ColorsAndFonts.TEXT_TITLE);
        size.extendWidth(text.stringWidth(message, MAX_TEXT_WIDTH));
        int textHeight = titleText.getLineHeight();
        textHeight += text.stringHeight(message, MAX_TEXT_WIDTH);
View Full Code Here

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

        final Text text = Toolkit.getText(ColorsAndFonts.TEXT_NORMAL);
        final Text titleText = Toolkit.getText(ColorsAndFonts.TEXT_TITLE);
        size.extendWidth(text.stringWidth(message, MAX_TEXT_WIDTH));
        int textHeight = titleText.getLineHeight();
        textHeight += text.stringHeight(message, MAX_TEXT_WIDTH);
        size.ensureHeight(textHeight);

        size.ensureWidth(titleText.stringWidth(heading));

        size.extendWidth(errorIcon.getWidth());
        size.extendWidth(PADDING);
View Full Code Here

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

            if (orientation == COLUMNS) {
                x += max[column];
                s.ensureWidth(max[column]);
            } else {
                y += max[column];
                s.ensureHeight(max[column]);
            }
            v.setSize(s);
            column++;
            if (column >= size) {
                column = 0;
View Full Code Here

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

    @Override
    public Size getRequiredSize(final Size maximumSize) {
        final Size size = super.getRequiredSize(maximumSize);
        size.ensureWidth(left + 45 + right);
        size.ensureHeight(24);
        return size;
    }

    @Override
    public void draw(final Canvas canvas) {
View Full Code Here

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

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

    @Override
    protected void buildView() {
View Full Code Here

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

            right == null ? new Size() : right.getRequiredSize(new Size(availableSpace));

        // combine the two sizes
        final Size totalSize = new Size(leftPanelRequiredSize);
        totalSize.extendWidth(rightPanelRequiredSize.getWidth());
        totalSize.ensureHeight(rightPanelRequiredSize.getHeight());

        if (totalSize.getWidth() > availableSpace.getWidth()) {
            /*
             * If the combined width is greater than the available then we need to divide the space between the two
             * sides and recalculate
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.