Class HtmlObject

java.lang.Object
com.vaadin.flow.component.Component
com.vaadin.flow.component.HtmlComponent
com.vaadin.flow.component.HtmlContainer
com.vaadin.flow.component.html.HtmlObject
All Implemented Interfaces:
com.vaadin.flow.component.AttachNotifier, com.vaadin.flow.component.BlurNotifier<HtmlObject>, com.vaadin.flow.component.ClickNotifier<HtmlObject>, com.vaadin.flow.component.DetachNotifier, com.vaadin.flow.component.Focusable<HtmlObject>, com.vaadin.flow.component.FocusNotifier<HtmlObject>, com.vaadin.flow.component.HasComponents, com.vaadin.flow.component.HasElement, com.vaadin.flow.component.HasEnabled, com.vaadin.flow.component.HasOrderedComponents, com.vaadin.flow.component.HasSize, com.vaadin.flow.component.HasStyle, com.vaadin.flow.component.HasText, Serializable

@Tag("object") public class HtmlObject extends com.vaadin.flow.component.HtmlContainer implements com.vaadin.flow.component.ClickNotifier<HtmlObject>, com.vaadin.flow.component.HasOrderedComponents, com.vaadin.flow.component.Focusable<HtmlObject>
Component representing a <object> element.
Author:
Vaadin Ltd
See Also:
  • Nested Class Summary

    Nested classes/interfaces inherited from interface com.vaadin.flow.component.BlurNotifier

    com.vaadin.flow.component.BlurNotifier.BlurEvent<C extends com.vaadin.flow.component.Component>

    Nested classes/interfaces inherited from interface com.vaadin.flow.component.FocusNotifier

    com.vaadin.flow.component.FocusNotifier.FocusEvent<C extends com.vaadin.flow.component.Component>

    Nested classes/interfaces inherited from interface com.vaadin.flow.component.HasText

    com.vaadin.flow.component.HasText.WhiteSpace
  • Constructor Summary

    Constructors
    Constructor
    Description
    Creates a new <object> component.
    HtmlObject(com.vaadin.flow.server.AbstractStreamResource data)
    Deprecated, for removal: This API element is subject to removal in a future version.
    HtmlObject(com.vaadin.flow.server.AbstractStreamResource data, Param... params)
    Deprecated, for removal: This API element is subject to removal in a future version.
    HtmlObject(com.vaadin.flow.server.AbstractStreamResource data, String type)
    Deprecated, for removal: This API element is subject to removal in a future version.
    HtmlObject(com.vaadin.flow.server.AbstractStreamResource data, String type, Param... params)
    Deprecated, for removal: This API element is subject to removal in a future version.
    HtmlObject(com.vaadin.flow.server.streams.DownloadHandler data)
    Creates a new <object> component with given data resource, type value and "param" components.
    HtmlObject(com.vaadin.flow.server.streams.DownloadHandler data, Param... params)
    Creates a new <object> component with given data resource, type value and "param" components.
    HtmlObject(com.vaadin.flow.server.streams.DownloadHandler data, String type)
    Creates a new <object> component with given DownloadHandler callback for providing an object data and type value.
    HtmlObject(com.vaadin.flow.server.streams.DownloadHandler data, String type, Param... params)
    Creates a new <object> component with given data resource, type value and "param" components.
    HtmlObject(String data, Param... params)
    Creates a new <object> component with given data and "param" components.
    HtmlObject(String data, String type)
    Creates a new <object> component with given data and type attribute values.
    HtmlObject(String data, String type, Param... params)
    Creates a new <object> component with given data, type attribute values and and "param" components.
  • Method Summary

    Modifier and Type
    Method
    Description
    Gets the "data" attribute value.
    Gets the "type" attribute value.
    void
    setData(com.vaadin.flow.server.AbstractStreamResource data)
    Deprecated, for removal: This API element is subject to removal in a future version.
    void
    setData(com.vaadin.flow.server.streams.DownloadHandler data)
    Sets the URL for DownloadHandler callback as "data" attribute value.
    void
    Sets the "data" attribute value.
    void
    Sets the "type" attribute value.

    Methods inherited from class com.vaadin.flow.component.HtmlComponent

    getTitle, setTitle

    Methods 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, setVisible

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface com.vaadin.flow.component.AttachNotifier

    addAttachListener

    Methods inherited from interface com.vaadin.flow.component.BlurNotifier

    addBlurListener

    Methods inherited from interface com.vaadin.flow.component.ClickNotifier

    addClickListener, addClickShortcut, addDoubleClickListener, addSingleClickListener

    Methods inherited from interface com.vaadin.flow.component.DetachNotifier

    addDetachListener

    Methods inherited from interface com.vaadin.flow.component.Focusable

    addFocusShortcut, blur, focus, getTabIndex, setTabIndex

    Methods inherited from interface com.vaadin.flow.component.FocusNotifier

    addFocusListener

    Methods inherited from interface com.vaadin.flow.component.HasComponents

    add, add, add, addComponentAsFirst, addComponentAtIndex, remove, remove, removeAll

    Methods inherited from interface com.vaadin.flow.component.HasElement

    getElement

    Methods inherited from interface com.vaadin.flow.component.HasEnabled

    isEnabled, setEnabled

    Methods inherited from interface com.vaadin.flow.component.HasOrderedComponents

    getChildren, getComponentAt, getComponentCount, indexOf, replace

    Methods 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, setWidthFull

    Methods inherited from interface com.vaadin.flow.component.HasStyle

    addClassName, addClassNames, getClassName, getClassNames, getStyle, hasClassName, removeClassName, removeClassNames, setClassName, setClassName

    Methods inherited from interface com.vaadin.flow.component.HasText

    getText, getWhiteSpace, setText, setWhiteSpace
  • Constructor Details

    • HtmlObject

      public HtmlObject()
      Creates a new <object> component.
    • HtmlObject

      public HtmlObject(String data, String type)
      Creates a new <object> component with given data and type attribute values.
      Parameters:
      data - a data attribute value
      type - a type attribute value
      See Also:
    • HtmlObject

      public HtmlObject(String data, String type, Param... params)
      Creates a new <object> component with given data, type attribute values and and "param" components.
      Parameters:
      data - a data attribute value
      type - a type attribute value
      params - parameter components
      See Also:
    • HtmlObject

      @Deprecated(since="24.8", forRemoval=true) public HtmlObject(com.vaadin.flow.server.AbstractStreamResource data, String type)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Creates a new <object> component with given data resource and type value.
      Parameters:
      data - the resource value, not null
      type - a type attribute value
      See Also:
    • HtmlObject

      @Deprecated(since="24.8", forRemoval=true) public HtmlObject(com.vaadin.flow.server.AbstractStreamResource data, String type, Param... params)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Creates a new <object> component with given data resource, type value and "param" components.
      Parameters:
      data - a data attribute value
      type - a type attribute value
      params - parameter components
      See Also:
    • HtmlObject

      public HtmlObject(com.vaadin.flow.server.streams.DownloadHandler data, String type)
      Creates a new <object> component with given DownloadHandler callback for providing an object data and type value. Sets the Content-Disposition header to inline for pre-defined download handlers, created by factory methods in DownloadHandler, as well as for other AbstractDownloadHandler implementations.
      Parameters:
      data - the callback for providing resource data, not null
      type - a type attribute value
      See Also:
    • HtmlObject

      public HtmlObject(com.vaadin.flow.server.streams.DownloadHandler data, String type, Param... params)
      Creates a new <object> component with given data resource, type value and "param" components. Sets the Content-Disposition header to inline for pre-defined download handlers, created by factory methods in DownloadHandler, as well as for other AbstractDownloadHandler implementations.
      Parameters:
      data - a data attribute value
      type - a type attribute value
      params - parameter components
      See Also:
    • HtmlObject

      public HtmlObject(com.vaadin.flow.server.streams.DownloadHandler data, Param... params)
      Creates a new <object> component with given data resource, type value and "param" components. Sets the Content-Disposition header to inline for pre-defined download handlers, created by factory methods in DownloadHandler, as well as for other AbstractDownloadHandler implementations.
      Parameters:
      data - a handler that defines the data to be set to this object component
      params - parameter components
      See Also:
    • HtmlObject

      public HtmlObject(com.vaadin.flow.server.streams.DownloadHandler data)
      Creates a new <object> component with given data resource, type value and "param" components. Sets the Content-Disposition header to inline for pre-defined download handlers, created by factory methods in DownloadHandler, as well as for other AbstractDownloadHandler implementations.
      Parameters:
      data - a handler that defines the data to be set to this object component
      See Also:
    • HtmlObject

      public HtmlObject(String data, Param... params)
      Creates a new <object> component with given data and "param" components.
      Parameters:
      data - a data attribute value
      params - parameter components
      See Also:
    • HtmlObject

      @Deprecated(since="24.8", forRemoval=true) public HtmlObject(com.vaadin.flow.server.AbstractStreamResource data)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Creates a new <object> component with given data resource value.
      Parameters:
      data - the resource value, not null
      See Also:
    • HtmlObject

      @Deprecated(since="24.8", forRemoval=true) public HtmlObject(com.vaadin.flow.server.AbstractStreamResource data, Param... params)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Creates a new <object> component with given data resource value and "param" components.
      Parameters:
      data - the resource value, not null
      params - parameter components
      See Also:
  • Method Details

    • setData

      public void setData(String data)
      Sets the "data" attribute value.
      Parameters:
      data - a "data" attribute value
    • setData

      @Deprecated(since="24.8", forRemoval=true) public void setData(com.vaadin.flow.server.AbstractStreamResource data)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Sets the StreamResource URL as "data" attribute value .
      Parameters:
      data - a "data" attribute value,, not null
    • setData

      public void setData(com.vaadin.flow.server.streams.DownloadHandler data)
      Sets the URL for DownloadHandler callback as "data" attribute value. Sets the Content-Disposition header to inline for pre-defined download handlers, created by factory methods in DownloadHandler, as well as for other AbstractDownloadHandler implementations.
      Parameters:
      data - a "data" attribute value, not null
    • getData

      public String getData()
      Gets the "data" attribute value.
      Returns:
      the "data" attribute value
      See Also:
    • setType

      public void setType(String type)
      Sets the "type" attribute value.
      Parameters:
      type - a "type" attribute value
    • getType

      public Optional<String> getType()
      Gets the "type" attribute value.
      Returns:
      the "type" attribute value
      See Also: