Package com.vaadin.flow.component.html
Class IFrame
java.lang.Object
com.vaadin.flow.component.Component
com.vaadin.flow.component.HtmlComponent
com.vaadin.flow.component.html.IFrame
- All Implemented Interfaces:
AttachNotifier,DetachNotifier,HasAriaLabel,HasElement,HasSize,HasStyle,Serializable
Component representing a
<iframe> element.- Since:
- 1.3
- Author:
- Vaadin Ltd
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumImportance types.static enumSandbox types. -
Constructor Summary
ConstructorsConstructorDescriptionIFrame()Creates a new iframe.IFrame(DownloadHandler downloadHandler) Creates a new iframe with download handler callback that provides a resource from server.Creates a new iframe with a source URL. -
Method Summary
Modifier and TypeMethodDescriptiongetAllow()Gets the value of allow attribute.Gets the importance attribute value.getName()Gets the name attribute.Gets the list of sandbox attribute values.getSrc()Gets the source of the iframe.Gets the srcdoc of the iframe.voidreload()Reloads the IFrame.voidSets the allow property to specify a feature policy.voidsetImportance(IFrame.ImportanceType importance) Sets the importance attribute to the specifiedIFrame.ImportanceTypevalue.voidSets the name attribute.voidsetSandbox(IFrame.SandboxType... types) Sets the sandbox attribute to the givenIFrame.SandboxTypes.voidDeprecated, for removal: This API element is subject to removal in a future version.voidsetSrc(DownloadHandler downloadHandler) Sets the source of the iframe with a source URL with the URL of the givenDownloadHandlercallback.voidSets the source of the iframe.voidSets the srcdoc of the iframe.Methods inherited from class com.vaadin.flow.component.HtmlComponent
getTitle, setTitleMethods inherited from class com.vaadin.flow.component.Component
addListener, findAncestor, fireEvent, from, get, getChildren, getElement, getEventBus, getId, getListeners, getLocale, getParent, getTranslation, getTranslation, getTranslation, getTranslation, getTranslation, getTranslation, getUI, hasListener, isAttached, isTemplateMapped, isVisible, onAttach, onDetach, onEnabledStateChanged, removeFromParent, scrollIntoView, scrollIntoView, set, setElement, setId, setVisibleMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.vaadin.flow.component.AttachNotifier
addAttachListenerMethods inherited from interface com.vaadin.flow.component.DetachNotifier
addDetachListenerMethods inherited from interface com.vaadin.flow.component.HasAriaLabel
getAriaLabel, getAriaLabelledBy, setAriaLabel, setAriaLabelledByMethods inherited from interface com.vaadin.flow.component.HasElement
getElementMethods inherited from interface com.vaadin.flow.component.HasSize
getHeight, getHeightUnit, getMaxHeight, getMaxWidth, getMinHeight, getMinWidth, getWidth, getWidthUnit, setHeight, setHeight, setHeightFull, setMaxHeight, setMaxHeight, setMaxWidth, setMaxWidth, setMinHeight, setMinHeight, setMinWidth, setMinWidth, setSizeFull, setSizeUndefined, setWidth, setWidth, setWidthFullMethods inherited from interface com.vaadin.flow.component.HasStyle
addClassName, addClassNames, getClassName, getClassNames, getStyle, hasClassName, removeClassName, removeClassNames, setClassName, setClassName
-
Constructor Details
-
IFrame
public IFrame()Creates a new iframe. -
IFrame
Creates a new iframe with a source URL.- Parameters:
src- Source URL
-
IFrame
Creates a new iframe with download handler callback that provides a resource from server.Sets the
Content-Dispositionheader toinlinefor pre-defined download handlers, created by factory methods inDownloadHandler, as well as for otherAbstractDownloadHandlerimplementations.- Parameters:
downloadHandler- the download handler callback that provides a resource from server, not null
-
-
Method Details
-
setSrc
Sets the source of the iframe. If the contents at the src of the IFrame has changed and you want to refresh it in the user's browser, the src does not to be reset. In this case use the #reload() method.- Parameters:
src- Source URL.
-
setSrc
Deprecated, for removal: This API element is subject to removal in a future version.usesetSrc(DownloadHandler)insteadSets the source of the iframe with a source URL with the URL of the givenStreamResource.- Parameters:
src- the resource value, not null- See Also:
-
setSrc
Sets the source of the iframe with a source URL with the URL of the givenDownloadHandlercallback.Sets the
Content-Dispositionheader toinlinefor pre-defined download handlers, created by factory methods inDownloadHandler, as well as for otherAbstractDownloadHandlerimplementations.- Parameters:
downloadHandler- the download handler resource, not null- See Also:
-
getSrc
Gets the source of the iframe.- Returns:
- the source of the iframe.
-
setSrcdoc
Sets the srcdoc of the iframe.- Parameters:
srcdoc- srcdoc URL.
-
getSrcdoc
Gets the srcdoc of the iframe.- Returns:
- the srcdoc of the iframe.
-
setAllow
Sets the allow property to specify a feature policy.- Parameters:
allow- the allow attribute value.- See Also:
-
getAllow
Gets the value of allow attribute.- Returns:
- the currently applied allow value.
-
setName
Sets the name attribute.- Parameters:
name- the value for the name attribute.
-
getName
Gets the name attribute.- Returns:
- the name attribute.
-
setImportance
Sets the importance attribute to the specifiedIFrame.ImportanceTypevalue.- Parameters:
importance-IFrame.ImportanceTypevalue.- See Also:
-
getImportance
Gets the importance attribute value.- Returns:
- the importance value.
- See Also:
-
setSandbox
Sets the sandbox attribute to the givenIFrame.SandboxTypes.- Parameters:
types-IFrame.SandboxTypes.
-
getSandbox
Gets the list of sandbox attribute values.- Returns:
- the current
IFrame.SandboxTypes.
-
reload
public void reload()Reloads the IFrame.
-
setSrc(DownloadHandler)instead