/** * * Gets the min-width defined for the component. * <p> * Note that this does not return the actual size of the component but the * min-width which has been set using {@link #setMinWidth(String)}. * * @return the min-width which has been set for the component */ default String getMinWidth() { return getElement().getStyle().get(ElementConstants.STYLE_MIN_WIDTH); }
/** * * Gets the max-width defined for the component. * <p> * Note that this does not return the actual size of the component but the * max-width which has been set using {@link #setMaxWidth(String)}. * * @return the max-width which has been set for the component */ default String getMaxWidth() { return getElement().getStyle().get(ElementConstants.STYLE_MAX_WIDTH); }
/** * Gets the height defined for the component. * <p> * Note that this does not return the actual size of the component but the * height which has been set using {@link #setHeight(String)}. * * @return the height which has been set for the component */ default String getHeight() { return getElement().getStyle().get(ElementConstants.STYLE_HEIGHT); }
/** * Gets the min-height defined for the component. * <p> * Note that this does not return the actual size of the component but the * min-height which has been set using {@link #setMinHeight(String)}. * * @return the min-height which has been set for the component */ default String getMinHeight() { return getElement().getStyle().get(ElementConstants.STYLE_MIN_HEIGHT); }
/** * * Gets the width defined for the component. * <p> * Note that this does not return the actual size of the component but the * width which has been set using {@link #setWidth(String)}. * * @return the width which has been set for the component */ default String getWidth() { return getElement().getStyle().get(ElementConstants.STYLE_WIDTH); }
/** * Gets the max-height defined for the component. * <p> * Note that this does not return the actual size of the component but the * max-height which has been set using {@link #setMaxHeight(String)}. * * @return the max-height which has been set for the component */ default String getMaxHeight() { return getElement().getStyle().get(ElementConstants.STYLE_MAX_HEIGHT); }
/** * Sets the max-width of the component. * <p> * The width should be in a format understood by the browser, e.g. "100px" * or "2.5em". * <p> * If the provided {@code maxWidth} value is {@literal null} then max-width is * removed. * * @param maxWidth * the max-width value (if <code>null</code>, the property will be removed) */ default void setMaxWidth(String maxWidth) { getElement().getStyle().set(ElementConstants.STYLE_MAX_WIDTH, maxWidth); }
/** * Sets the height of the component. * <p> * The height should be in a format understood by the browser, e.g. "100px" * or "2.5em". * <p> * If the provided {@code height} value is {@literal null} then height is * removed. * * @param height * the height to set, may be {@code null} */ default void setHeight(String height) { getElement().getStyle().set(ElementConstants.STYLE_HEIGHT, height); }
/** * Sets the width of the component. * <p> * The width should be in a format understood by the browser, e.g. "100px" * or "2.5em". * <p> * If the provided {@code width} value is {@literal null} then width is * removed. * * @param width * the width to set, may be {@code null} */ default void setWidth(String width) { getElement().getStyle().set(ElementConstants.STYLE_WIDTH, width); }
/** * Sets the min-width of the component. * <p> * The width should be in a format understood by the browser, e.g. "100px" * or "2.5em". * <p> * If the provided {@code minWidth} value is {@literal null} then min-width is * removed. * * @param minWidth * the min-width value (if <code>null</code>, the property will be removed) */ default void setMinWidth(String minWidth) { getElement().getStyle().set(ElementConstants.STYLE_MIN_WIDTH, minWidth); }
/** * Sets the min-height of the component. * <p> * The height should be in a format understood by the browser, e.g. "100px" * or "2.5em". * <p> * If the provided {@code minHeight} value is {@literal null} then min-height is * removed. * * @param minHeight * the min-height value (if <code>null</code>, the property will be removed) */ default void setMinHeight(String minHeight) { getElement().getStyle().set(ElementConstants.STYLE_MIN_HEIGHT, minHeight); }
/** * Sets the max-height of the component. * <p> * The height should be in a format understood by the browser, e.g. "100px" * or "2.5em". * <p> * If the provided {@code maxHeight} value is {@literal null} then max-height is * removed. * * @param maxHeight * the max-height value (if <code>null</code>, the property will be removed) */ default void setMaxHeight(String maxHeight) { getElement().getStyle().set(ElementConstants.STYLE_MAX_HEIGHT, maxHeight); }