Package com.vaadin.flow.component.html
Enum Class AttachmentType
- All Implemented Interfaces:
Serializable,Comparable<AttachmentType>,Constable
Mode settings for anchor.
DOWNLOAD will set the download attribute to Anchor, where as
INLINE will remove it. When the anchor links to a
DownloadHandler, the type also decides
whether its content is served as an attachment or inline, when the handler
gives only a file name, as the built-in handlers do.
Content served inline is rendered by the browser on the application's origin. Do not serve untrusted content, such as user uploaded HTML or SVG files, inline.
- Since:
- 24.8
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum Constants -
Method Summary
Modifier and TypeMethodDescriptionstatic AttachmentTypeReturns the enum constant of this class with the specified name.static AttachmentType[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
DOWNLOAD
The linked resource is downloaded instead of being opened. -
INLINE
The linked resource is opened by the browser, which is the default.
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException- if this enum class has no constant with the specified nameNullPointerException- if the argument is null
-