public interface HasSize extends HasElement
setWidth(String) and setHeight(String). The
sizes are set on the element as inline styles, i.e. using
Element.getStyle().| Modifier and Type | Method and Description |
|---|---|
default String |
getHeight()
Gets the height defined for the component.
|
default String |
getMaxHeight()
Gets the max-height defined for the component.
|
default String |
getMaxWidth()
Gets the max-width defined for the component.
|
default String |
getMinHeight()
Gets the min-height defined for the component.
|
default String |
getMinWidth()
Gets the min-width 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 |
setHeightFull()
Sets the height of the component to "100%".
|
default void |
setMaxHeight(String maxHeight)
Sets the max-height of the component.
|
default void |
setMaxWidth(String maxWidth)
Sets the max-width of the component.
|
default void |
setMinHeight(String minHeight)
Sets the min-height of the component.
|
default void |
setMinWidth(String minWidth)
Sets the min-width 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.
|
default void |
setWidthFull()
Sets the width of the component to "100%".
|
getElementdefault void setWidth(String width)
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.
width - the width to set, may be nulldefault void setMinWidth(String minWidth)
The width should be in a format understood by the browser, e.g. "100px" or "2.5em".
If the provided minWidth value is null then min-width is
removed.
minWidth - the min-width value (if null, the property will be removed)default void setMaxWidth(String maxWidth)
The width should be in a format understood by the browser, e.g. "100px" or "2.5em".
If the provided maxWidth value is null then max-width is
removed.
maxWidth - the max-width value (if null, the property will be removed)default String getWidth()
Note that this does not return the actual size of the component but the
width which has been set using setWidth(String).
default String getMinWidth()
Note that this does not return the actual size of the component but the
min-width which has been set using setMinWidth(String).
default String getMaxWidth()
Note that this does not return the actual size of the component but the
max-width which has been set using setMaxWidth(String).
default void setHeight(String height)
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.
height - the height to set, may be nulldefault void setMinHeight(String minHeight)
The height should be in a format understood by the browser, e.g. "100px" or "2.5em".
If the provided minHeight value is null then min-height is
removed.
minHeight - the min-height value (if null, the property will be removed)default void setMaxHeight(String maxHeight)
The height should be in a format understood by the browser, e.g. "100px" or "2.5em".
If the provided maxHeight value is null then max-height is
removed.
maxHeight - the max-height value (if null, the property will be removed)default String getHeight()
Note that this does not return the actual size of the component but the
height which has been set using setHeight(String).
default String getMinHeight()
Note that this does not return the actual size of the component but the
min-height which has been set using setMinHeight(String).
default String getMaxHeight()
Note that this does not return the actual size of the component but the
max-height which has been set using setMaxHeight(String).
default void setSizeFull()
This is just a convenience method which delegates its call to the
setWidth(String) and setHeight(String) methods with
"100%" as the argument value
default void setWidthFull()
This is just a convenience method which delegates its call to the
setWidth(String) with
"100%" as the argument value
default void setHeightFull()
This is just a convenience method which delegates its call to the
setHeight(String) with
"100%" as the argument value
default void setSizeUndefined()
This is just a convenience method which delegates its call to the
setWidth(String) and setHeight(String) methods with
null as the argument value
Copyright © 2000–2019 Vaadin Ltd. All rights reserved.