public class AmpAttributes extends Object
Represents attributes used by the amp-components.
Constructor and Description |
---|
AmpAttributes() |
Modifier and Type | Method and Description |
---|---|
int |
getHeight()
Height of element.
|
String |
getHeigths()
The value of this attribute is a sizes expression based on media expressions.
|
int |
getLayout()
AMP provides a set of layouts that specify how an AMP component behaves in the document layout.
|
String |
getMedia()
The value of media is a media query.
|
String |
getOn()
The on attribute is used to install event handlers on elements.
|
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.
|
int |
getWidth()
Width of element.
|
boolean |
isFallback()
Define that current element is fallback.
|
boolean |
isNoloading()
The noloading attribute indicates whether the "loading indicator" should be turned off for this element.
|
boolean |
isPlaceHolder()
The placeholder attribute indicates that the element marked with this attribute acts as a placeholder for the parent AMP element.
|
void |
setFallback(boolean value)
Define that current element is fallback.
|
void |
setHeight(int value)
Height of element.
|
void |
setHeigths(String value)
The value of this attribute is a sizes expression based on media expressions.
|
void |
setLayout(int value)
AMP provides a set of layouts that specify how an AMP component behaves in the document layout.
|
void |
setMedia(String value)
The value of media is a media query.
|
void |
setNoloading(boolean value)
The noloading attribute indicates whether the "loading indicator" should be turned off for this element.
|
void |
setOn(String value)
The on attribute is used to install event handlers on elements.
|
void |
setPlaceHolder(boolean value)
The placeholder attribute indicates that the element marked with this attribute acts as a placeholder for the parent AMP element.
|
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.
|
void |
setWidth(int value)
Width of element.
|
String |
toAmpHtml()
Represents amp html version of attributes.
|
String |
toHtml()
Represents html version of attributes.
|
public final boolean isFallback()
Define that current element is fallback.
public final void setFallback(boolean value)
Define that current element is fallback.
public final String getHeigths()
The value of this attribute is a sizes expression based on media expressions.
public final void setHeigths(String value)
The value of this attribute is a sizes expression based on media expressions.
public final int getLayout()
AMP provides a set of layouts that specify how an AMP component behaves in the document layout.
public final void setLayout(int value)
AMP provides a set of layouts that specify how an AMP component behaves in the document layout.
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.
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.
public final boolean isNoloading()
The noloading attribute indicates whether the "loading indicator" should be turned off for this element.
public final void setNoloading(boolean value)
The noloading attribute indicates whether the "loading indicator" should be turned off for this element.
public final String getOn()
The on attribute is used to install event handlers on elements.
public final void setOn(String value)
The on attribute is used to install event handlers on elements.
public final boolean isPlaceHolder()
The placeholder attribute indicates that the element marked with this attribute acts as a placeholder for the parent AMP element.
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.
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.
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.
public final int getWidth()
Width of element.
public final void setWidth(int value)
Width of element.
public final int getHeight()
Height of element.
public final void setHeight(int value)
Height of element.
public String toAmpHtml()
Represents amp html version of attributes.
public String toHtml()
Represents html version of attributes.