Package com.vaadin.terminal.gwt.client.RenderInformation

Examples of com.vaadin.terminal.gwt.client.RenderInformation.Size


            return false;
        }
    }

    protected void deEmphasis(boolean doLayout) {
        Size size = null;
        if (doLayout) {
            size = new RenderInformation.Size(getOffsetWidth(),
                    getOffsetHeight());
        }
        if (emphasizedVDrop != null) {
View Full Code Here


            handleVaadinRelatedSizeChange(size);
        }
    }

    protected void emphasis(VDragEvent drag) {
        Size size = new RenderInformation.Size(getOffsetWidth(),
                getOffsetHeight());
        deEmphasis(false);
        VDragAndDropWrapper.setStyleName(getElement(), OVER_STYLE, true);
        VDragAndDropWrapper.setStyleName(getElement(), OVER_STYLE + "-"
                + verticalDropLocation.toString().toLowerCase(), true);
View Full Code Here

        isRendering = false;
        sizeHasChangedDuringRendering = false;
    }

    private void layoutSizeMightHaveChanged() {
        Size oldSize = new Size(activeLayoutSize.getWidth(),
                activeLayoutSize.getHeight());
        calculateLayoutDimensions();

        /*
         * If layout dimension changes we must also update container sizes
         */
        if (!oldSize.equals(activeLayoutSize)) {
            calculateContainerSize();
        }
    }
View Full Code Here

        } else {
            summedWidgetHeight += activeSpacing.vSpacing
                    * (widgetToComponentContainer.size() - 1);
        }

        Size layoutSize = updateLayoutDimensions(summedWidgetWidth,
                summedWidgetHeight, maxWidgetWidth, maxWidgetHeight);

        int remainingSpace;
        if (isHorizontal()) {
            remainingSpace = layoutSize.getWidth() - summedWidgetWidth;
        } else {
            remainingSpace = layoutSize.getHeight() - summedWidgetHeight;
        }
        if (remainingSpace < 0) {
            remainingSpace = 0;
        }

View Full Code Here

        // "Layout size: " + activeLayoutSize);
        return remainingSpace;
    }

    private int getWidgetHeight(ChildComponentContainer childComponentContainer) {
        Size s = childComponentContainer.getWidgetSize();
        return s.getHeight()
                + childComponentContainer.getCaptionHeightAboveComponent();
    }
View Full Code Here

        return s.getHeight()
                + childComponentContainer.getCaptionHeightAboveComponent();
    }

    private int getWidgetWidth(ChildComponentContainer childComponentContainer) {
        Size s = childComponentContainer.getWidgetSize();
        int widgetWidth = s.getWidth()
                + childComponentContainer.getCaptionWidthAfterComponent();

        /*
         * If the component does not have a specified size in the main direction
         * the caption may determine the space used by the component
View Full Code Here

             * size may have changed
             */
            componentContainer.updateCaptionSize();
        }

        Size sizeBefore = new Size(activeLayoutSize.getWidth(),
                activeLayoutSize.getHeight());

        recalculateLayoutAndComponentSizes();
        boolean sameSize = (sizeBefore.equals(activeLayoutSize));
        if (!sameSize) {
            /* Must inform child components about possible size updates */
            client.runDescendentsLayout(this);
        }

View Full Code Here

        return sameSize;
    }

    @Override
    public void setHeight(String height) {
        Size sizeBefore = new Size(activeLayoutSize.getWidth(),
                activeLayoutSize.getHeight());

        super.setHeight(height);

        if (height != null && !height.equals("")) {
            setActiveLayoutHeight(getOffsetHeight()
                    - activeMargins.getVertical());
        }

        if (isRendering) {
            sizeHasChangedDuringRendering = true;
        } else {
            recalculateLayoutAndComponentSizes();
            boolean sameSize = (sizeBefore.equals(activeLayoutSize));
            if (!sameSize) {
                /* Must inform child components about possible size updates */
                client.runDescendentsLayout(this);
            }
        }
View Full Code Here

    @Override
    public void setWidth(String width) {
        if (this.width.equals(width) || !isVisible()) {
            return;
        }
        Size sizeBefore = new Size(activeLayoutSize.getWidth(),
                activeLayoutSize.getHeight());

        super.setWidth(width);
        this.width = width;
        if (width != null && !width.equals("")) {
            setActiveLayoutWidth(getOffsetWidth()
                    - activeMargins.getHorizontal());
        }

        if (isRendering) {
            sizeHasChangedDuringRendering = true;
        } else {
            recalculateLayoutAndComponentSizes();
            boolean sameSize = (sizeBefore.equals(activeLayoutSize));
            if (!sameSize) {
                /* Must inform child components about possible size updates */
                client.runDescendentsLayout(this);
            }
            /*
             * If the height changes as a consequence of this we must inform the
             * parent also
             */
            if (isDynamicHeight()
                    && sizeBefore.getHeight() != activeLayoutSize.getHeight()) {
                Util.notifyParentOfSizeChange(this, false);
            }

        }
    }
View Full Code Here

                for (Paintable paintable : updatedWidgets) {
                    ComponentDetail detail = idToPaintableDetail
                            .get(getPid(paintable));
                    Widget widget = (Widget) paintable;
                    Size oldSize = detail.getOffsetSize();
                    Size newSize = new Size(widget.getOffsetWidth(),
                            widget.getOffsetHeight());

                    if (oldSize == null || !oldSize.equals(newSize)) {
                        sizeUpdatedWidgets.add(paintable);
                        detail.setOffsetSize(newSize);
View Full Code Here

TOP

Related Classes of com.vaadin.terminal.gwt.client.RenderInformation.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.