com.vaadin.flow.component.

Interface HasSize

    • Method Summary

      All Methods
      Modifier and Type Method and Description
      default String getHeight()

      Gets the height defined for the component.

      default String getWidth()

      Gets the width defined for the component.

      default void setHeight(String height)

      Sets the height of the component.

      default void setSizeFull()

      Sets the width and the height of the component to "100%".

      default void setSizeUndefined()

      Removes the width and the height of the component.

      default void setWidth(String width)

      Sets the width of the component.

    • Method Detail

      • setWidth

        default void setWidth(String width)

        Sets the width of the component.

        The width should be in a format understood by the browser, e.g. "100px" or "2.5em".

        If the provided width value is null then width is removed.

        Parameters:

        width - the width to set, may be null

      • getWidth

        default String getWidth()

        Gets the width defined for the component.

        Note that this does not return the actual size of the component but the width which has been set using setWidth(String).

        Returns:

        the width which has been set for the component

      • setHeight

        default void setHeight(String height)

        Sets the height of the component.

        The height should be in a format understood by the browser, e.g. "100px" or "2.5em".

        If the provided height value is null then height is removed.

        Parameters:

        height - the height to set, may be null

      • getHeight

        default String getHeight()

        Gets the height defined for the component.

        Note that this does not return the actual size of the component but the height which has been set using setHeight(String).

        Returns:

        the height which has been set for the component

      • setSizeFull

        default void setSizeFull()

        Sets the width and the height of the component to "100%".

        This is just a convenience method which delegates its call to the setWidth(String) and setHeight(String) methods with "100%" as the argument value

      • setSizeUndefined

        default void setSizeUndefined()

        Removes the width and the height of the component.

        This is just a convenience method which delegates its call to the setWidth(String) and setHeight(String) methods with null as the argument value