public final class DOMBuilder extends Object
Modifier and Type | Method and Description |
---|---|
Canvas |
createCanvasElement()
Creates a <canvas> element.
|
BaseNativeEvent |
createChangeEvent()
Creates a change event (based on a mouse event, type
BaseEventTypes.CONTEXT_MENU ) for internal use. |
Div |
createDivElement()
Creates a <div> element.
|
Heading |
createHeadingElement()
Creates a <h3> element.
|
Img |
createImageElement()
Creates a <img> element.
|
Img |
createImageElement(String src)
Creates a <img> element with the full URL of the image.
|
LineBreak |
createLineBreakElement()
Creates a <br> element.
|
Script |
createScriptElement()
Creates a <script> element.
|
Span |
createSpanElement()
Creates a <span> element.
|
Style |
createStyleElement()
Creates a <style> element.
|
TableCell |
createTableCellElement()
Creates a <td> element.
|
Table |
createTableElement()
Creates a <table> element.
|
TableRow |
createTableRowElement()
Creates a <tr> element.
|
TextNode |
createTextNode(String data)
Creates a text node.
|
String |
createUniqueId()
Creates an unique id for CHARBA charts id.
|
static DOMBuilder |
get()
Returns the singleton instance of the builder.
|
boolean |
isCanvasSupported()
Returns
true if the canvas is supported by browser. |
public static DOMBuilder get()
public String createUniqueId()
public boolean isCanvasSupported()
true
if the canvas is supported by browser.true
if the canvas is supported by browserpublic Canvas createCanvasElement()
public Div createDivElement()
public Script createScriptElement()
public Style createStyleElement()
public LineBreak createLineBreakElement()
public Span createSpanElement()
public Img createImageElement()
public Img createImageElement(String src)
src
- the full URL of the imagepublic Table createTableElement()
public TableRow createTableRowElement()
public TableCell createTableCellElement()
public Heading createHeadingElement()
public TextNode createTextNode(String data)
data
- the text node's initial textpublic BaseNativeEvent createChangeEvent()
BaseEventTypes.CONTEXT_MENU
) for internal use.BaseEventTypes.CONTEXT_MENU
)