AmpImage

Inheritance: java.lang.Object, com.aspose.email.AmpComponent

public class AmpImage extends AmpComponent

Constructors

ConstructorDescription
AmpImage(int width, int height)Create instance of AmpImage.

Methods

MethodDescription
equals(Object arg0)
getAlt()A string of alternate text, similar to the alt attribute on img.
getAttributes()AMP provides a set of common attributes that are extended to many AMP components.
getClass()
getFallback()A fallback is a convention that allows the element to communicate to the reader that the browser does not support the element.
getPlaceholder()The element marked with the placeholder attribute acts as a placeholder for the parent AMP element.
getRequiredScript()Required script that muct be added to head section.
getSrc()Similar to the src attribute on the img tag.
hashCode()
isValid()Indicates whether this image is valid of AmpImage.
notify()
notifyAll()
setAlt(String value)A string of alternate text, similar to the alt attribute on img.
setFallback(String value)A fallback is a convention that allows the element to communicate to the reader that the browser does not support the element.
setPlaceholder(AmpComponent value)The element marked with the placeholder attribute acts as a placeholder for the parent AMP element.
setSrc(String value)Similar to the src attribute on the img tag.
toAmpHtml()Represents amp html version of component.
toHtml()Represents html version of component.
toString()
wait()
wait(long arg0)
wait(long arg0, int arg1)

AmpImage(int width, int height)

public AmpImage(int width, int height)

Create instance of AmpImage.

Parameters:

ParameterTypeDescription
widthintwidth of AmpImage
heightintheight of AmpImage

equals(Object arg0)

public boolean equals(Object arg0)

Parameters:

ParameterTypeDescription
arg0java.lang.Object

Returns: boolean

getAlt()

public final String getAlt()

A string of alternate text, similar to the alt attribute on img.

Returns: java.lang.String

getAttributes()

public final AmpAttributes getAttributes()

AMP provides a set of common attributes that are extended to many AMP components.

Returns: AmpAttributes

getClass()

public final native Class<?> getClass()

Returns: java.lang.Class

getFallback()

public final String getFallback()

A fallback is a convention that allows the element to communicate to the reader that the browser does not support the element.

Returns: java.lang.String

getPlaceholder()

public final AmpComponent getPlaceholder()

The element marked with the placeholder attribute acts as a placeholder for the parent AMP element. If specified, a placeholder element must be a direct child of the AMP element.

Returns: AmpComponent

getRequiredScript()

public String getRequiredScript()

Required script that muct be added to head section.

Returns: java.lang.String

getSrc()

public final String getSrc()

Similar to the src attribute on the img tag. The value must be a URL that points to a publicly-cacheable image file

Returns: java.lang.String

hashCode()

public native int hashCode()

Returns: int

isValid()

public final boolean isValid()

Indicates whether this image is valid of AmpImage.

Returns: boolean

notify()

public final native void notify()

notifyAll()

public final native void notifyAll()

setAlt(String value)

public final void setAlt(String value)

A string of alternate text, similar to the alt attribute on img.

Parameters:

ParameterTypeDescription
valuejava.lang.String

setFallback(String value)

public final void setFallback(String value)

A fallback is a convention that allows the element to communicate to the reader that the browser does not support the element.

Parameters:

ParameterTypeDescription
valuejava.lang.String

setPlaceholder(AmpComponent value)

public final void setPlaceholder(AmpComponent value)

The element marked with the placeholder attribute acts as a placeholder for the parent AMP element. If specified, a placeholder element must be a direct child of the AMP element.

Parameters:

ParameterTypeDescription
valueAmpComponent

setSrc(String value)

public final void setSrc(String value)

Similar to the src attribute on the img tag. The value must be a URL that points to a publicly-cacheable image file

Parameters:

ParameterTypeDescription
valuejava.lang.String

toAmpHtml()

public String toAmpHtml()

Represents amp html version of component.

Returns: java.lang.String -

toHtml()

public String toHtml()

Represents html version of component.

Returns: java.lang.String -

toString()

public String toString()

Returns: java.lang.String

wait()

public final void wait()

wait(long arg0)

public final native void wait(long arg0)

Parameters:

ParameterTypeDescription
arg0long

wait(long arg0, int arg1)

public final void wait(long arg0, int arg1)

Parameters:

ParameterTypeDescription
arg0long
arg1int