It allows configuration for left and right media objects alongside a central media body.
Usage:
MediaObject media = MediaObject.create()
.setHeader("Sample Header")
.setLeftMedia(someElement)
.setRightMedia(someOtherElement);
public void MediaObject()
public static MediaObject create()
public HTMLElement getAppendTarget()
The HTML element of the media body.
public MediaObject setHeader(String header)
header
The header text.
The current media object instance.
public MediaObject setLeftMedia(Node content)
content
The node to be set as left media content.
The current media object instance.
public MediaObject setLeftMedia(IsElement<?> element)
element
The element to be set as left media content.
The current media object instance.
public MediaObject setRightMedia(Node content)
content
The node to be set as right media content.
The current media object instance.
public MediaObject setRightMedia(IsElement<?> element)
element
The element to be set as right media content.
The current media object instance.
public DivElement getMediaBody()
The div element of the media body.
public HeadingElement getMediaHeader()
The heading element of the media header.
public DivElement getLeftMedia()
The div element of the left media content.
public DivElement getRightMedia()
The div element of the right media content.
public MediaObject withHeader(ChildHandler<MediaObject, HeadingElement> handler)
handler
A handler that accepts the current media object instance and its media header.
The current media object instance.
public MediaObject withMediaBody(ChildHandler<MediaObject, DivElement> handler)
handler
A handler that accepts the current media object instance and its media body.
The current media object instance.
public MediaObject withLeftMedia(ChildHandler<MediaObject, DivElement> handler)
handler
A handler that accepts the current media object instance and its left media content.
The current media object instance.
public MediaObject withRightMedia(ChildHandler<MediaObject, DivElement> handler)
handler
A handler that accepts the current media object instance and its right media content.
The current media object instance.
public HTMLDivElement element()
The root HTMLDivElement of this media object.