Package io.wcm.handler.media
Class MediaArgs.PictureSource
- java.lang.Object
-
- io.wcm.handler.media.MediaArgs.PictureSource
-
- Enclosing class:
- MediaArgs
@ProviderType public static final class MediaArgs.PictureSource extends java.lang.Object
Picture source for responsive image handling.
-
-
Constructor Summary
Constructors Constructor Description PictureSource(@NotNull MediaFormat mediaFormat)
PictureSource(@Nullable java.lang.String mediaFormatName)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(java.lang.Object obj)
@Nullable java.lang.String
getMedia()
@Nullable MediaFormat
getMediaFormat()
@Nullable java.lang.String
getMediaFormatName()
@Nullable java.lang.String
getSizes()
@NotNull MediaArgs.WidthOption @Nullable []
getWidthOptions()
int
hashCode()
MediaArgs.PictureSource
media(@Nullable java.lang.String value)
MediaArgs.PictureSource
sizes(@Nullable java.lang.String value)
java.lang.String
toString()
MediaArgs.PictureSource
widthOptions(@NotNull MediaArgs.WidthOption @NotNull ... value)
MediaArgs.PictureSource
widths(long @NotNull ... value)
-
-
-
Constructor Detail
-
PictureSource
public PictureSource(@NotNull @NotNull MediaFormat mediaFormat)
- Parameters:
mediaFormat
- Media format
-
PictureSource
public PictureSource(@Nullable @Nullable java.lang.String mediaFormatName)
- Parameters:
mediaFormatName
- Media format name
-
-
Method Detail
-
getMediaFormat
@Nullable public @Nullable MediaFormat getMediaFormat()
- Returns:
- Media format
-
getMediaFormatName
@Nullable public @Nullable java.lang.String getMediaFormatName()
- Returns:
- Media format
-
widthOptions
public MediaArgs.PictureSource widthOptions(@NotNull @NotNull MediaArgs.WidthOption @NotNull ... value)
- Parameters:
value
- Widths for the renditions in thesrcset
attribute.- Returns:
- this
-
getWidthOptions
@NotNull public @NotNull MediaArgs.WidthOption @Nullable [] getWidthOptions()
- Returns:
- Widths for the renditions in the
srcset
attribute.
-
widths
public MediaArgs.PictureSource widths(long @NotNull ... value)
- Parameters:
value
- Widths for the renditions in thesrcset
attribute.- Returns:
- this
-
sizes
public MediaArgs.PictureSource sizes(@Nullable @Nullable java.lang.String value)
- Parameters:
value
- A valid source size list.- Returns:
- this
-
getSizes
@Nullable public @Nullable java.lang.String getSizes()
- Returns:
- A valid source size list.
-
media
public MediaArgs.PictureSource media(@Nullable @Nullable java.lang.String value)
- Parameters:
value
- A valid media query list.- Returns:
- this
-
getMedia
@Nullable public @Nullable java.lang.String getMedia()
- Returns:
- A valid media query list.
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equals
in classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-