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 |
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.
|
getElement
default 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 null
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 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 null
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 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 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 © 2018. All rights reserved.