AmpAttributes

Inheritance: java.lang.Object

public class AmpAttributes

Represents attributes used by the amp-components.

Constructors

Constructor Description
AmpAttributes()

Methods

Method Description
isFallback() Define that current element is fallback.
setFallback(boolean value) Define that current element is fallback.
getHeigths() The value of this attribute is a sizes expression based on media expressions.
setHeigths(String value) The value of this attribute is a sizes expression based on media expressions.
getLayout() AMP provides a set of layouts that specify how an AMP component behaves in the document layout.
setLayout(int value) AMP provides a set of layouts that specify how an AMP component behaves in the document layout.
getMedia() The value of media is a media query.
setMedia(String value) The value of media is a media query.
isNoloading() The noloading attribute indicates whether the “loading indicator” should be turned off for this element.
setNoloading(boolean value) The noloading attribute indicates whether the “loading indicator” should be turned off for this element.
getOn() The on attribute is used to install event handlers on elements.
setOn(String value) The on attribute is used to install event handlers on elements.
isPlaceHolder() The placeholder attribute indicates that the element marked with this attribute acts as a placeholder for the parent AMP element.
setPlaceHolder(boolean value) The placeholder attribute indicates that the element marked with this attribute acts as a placeholder for the parent AMP element.
getSizes() The value of the AMP sizes attribute is a sizes expression that selects the defined size corresponding to the media query based on the current window size.
setSizes(String value) The value of the AMP sizes attribute is a sizes expression that selects the defined size corresponding to the media query based on the current window size.
getWidth() Width of element.
setWidth(int value) Width of element.
getHeight() Height of element.
setHeight(int value) Height of element.
toAmpHtml() Represents amp html version of attributes.
toHtml() Represents html version of attributes.

AmpAttributes()

public AmpAttributes()

isFallback()

public final boolean isFallback()

Define that current element is fallback.

Returns: boolean

setFallback(boolean value)

public final void setFallback(boolean value)

Define that current element is fallback.

Parameters:

Parameter Type Description
value boolean

getHeigths()

public final String getHeigths()

The value of this attribute is a sizes expression based on media expressions.

Returns: java.lang.String

setHeigths(String value)

public final void setHeigths(String value)

The value of this attribute is a sizes expression based on media expressions.

Parameters:

Parameter Type Description
value java.lang.String

getLayout()

public final int getLayout()

AMP provides a set of layouts that specify how an AMP component behaves in the document layout.

Returns: int

setLayout(int value)

public final void setLayout(int value)

AMP provides a set of layouts that specify how an AMP component behaves in the document layout.

Parameters:

Parameter Type Description
value int

getMedia()

public final String getMedia()

The value of media is a media query. If the query does not match, the element is not rendered and its resources and potentially its child resources will not be fetched. If the browser window changes size or orientation, the media queries are re-evaluated and elements are hidden and shown based on the new results.

Returns: java.lang.String

setMedia(String value)

public final void setMedia(String value)

The value of media is a media query. If the query does not match, the element is not rendered and its resources and potentially its child resources will not be fetched. If the browser window changes size or orientation, the media queries are re-evaluated and elements are hidden and shown based on the new results.

Parameters:

Parameter Type Description
value java.lang.String

isNoloading()

public final boolean isNoloading()

The noloading attribute indicates whether the “loading indicator” should be turned off for this element.

Returns: boolean

setNoloading(boolean value)

public final void setNoloading(boolean value)

The noloading attribute indicates whether the “loading indicator” should be turned off for this element.

Parameters:

Parameter Type Description
value boolean

getOn()

public final String getOn()

The on attribute is used to install event handlers on elements.

Returns: java.lang.String

setOn(String value)

public final void setOn(String value)

The on attribute is used to install event handlers on elements.

Parameters:

Parameter Type Description
value java.lang.String

isPlaceHolder()

public final boolean isPlaceHolder()

The placeholder attribute indicates that the element marked with this attribute acts as a placeholder for the parent AMP element.

Returns: boolean

setPlaceHolder(boolean value)

public final void setPlaceHolder(boolean value)

The placeholder attribute indicates that the element marked with this attribute acts as a placeholder for the parent AMP element.

Parameters:

Parameter Type Description
value boolean

getSizes()

public final String getSizes()

The value of the AMP sizes attribute is a sizes expression that selects the defined size corresponding to the media query based on the current window size.

Returns: java.lang.String

setSizes(String value)

public final void setSizes(String value)

The value of the AMP sizes attribute is a sizes expression that selects the defined size corresponding to the media query based on the current window size.

Parameters:

Parameter Type Description
value java.lang.String

getWidth()

public final int getWidth()

Width of element.

Returns: int

setWidth(int value)

public final void setWidth(int value)

Width of element.

Parameters:

Parameter Type Description
value int

getHeight()

public final int getHeight()

Height of element.

Returns: int

setHeight(int value)

public final void setHeight(int value)

Height of element.

Parameters:

Parameter Type Description
value int

toAmpHtml()

public String toAmpHtml()

Represents amp html version of attributes.

Returns: java.lang.String -

toHtml()

public String toHtml()

Represents html version of attributes.

Returns: java.lang.String -