Package org.apache.juneau.dto.html5
Class HtmlElement
java.lang.Object
org.apache.juneau.dto.html5.HtmlElement
- Direct Known Subclasses:
HtmlElementContainer
,HtmlElementMixed
,HtmlElementRawText
,HtmlElementText
,HtmlElementVoid
Superclass for all HTML elements.
These are beans that when serialized using HtmlSerializer
generate valid HTML5 elements.
See Also:
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionclass attribute.accesskey attribute.Adds an arbitrary attribute to this element.Adds an arbitrary URI attribute to this element.contenteditable
(Object contenteditable) contenteditable attribute.protected Object
deminimize
(Object value, String attr) If the specified attribute is a boolean, it gets converted to the attribute name iftrue ornull iffalse .dir attribute.<T> T
Returns the attribute with the specified name converted to the specified class type.Returns the attribute with the specified name.getAttrs()
The attributes of this element.hidden attribute.id attribute.lang attribute.onabort attribute.onblur attribute.oncancel attribute.oncanplay attribute.oncanplaythrough
(String oncanplaythrough) oncanplaythrough attribute.onchange attribute.onclick attribute.oncuechange
(String oncuechange) oncuechange attribute.ondblclick
(String ondblclick) ondblclick attribute.ondurationchange
(String ondurationchange) ondurationchange attribute.onemptied attribute.onended attribute.onerror attribute.onfocus attribute.oninput attribute.oninvalid attribute.onkeydown attribute.onkeypress
(String onkeypress) onkeypress attribute.onkeyup attribute.onload attribute.onloadeddata
(String onloadeddata) onloadeddata attribute.onloadedmetadata
(String onloadedmetadata) onloadedmetadata attribute.onloadstart
(String onloadstart) onloadstart attribute.onmousedown
(String onmousedown) onmousedown attribute.onmouseenter
(String onmouseenter) onmouseenter attribute.onmouseleave
(String onmouseleave) onmouseleave attribute.onmousemove
(String onmousemove) onmousemove attribute.onmouseout
(String onmouseout) onmouseout attribute.onmouseover
(String onmouseover) onmouseover attribute.onmouseup attribute.onmousewheel
(String onmousewheel) onmousewheel attribute.onpause attribute.onplay attribute.onplaying attribute.onprogress
(String onprogress) onprogress attribute.onratechange
(String onratechange) onratechange attribute.onreset attribute.onresize attribute.onscroll attribute.onseeked attribute.onseeking attribute.onselect attribute.onshow attribute.onstalled attribute.onsubmit attribute.onsuspend attribute.ontimeupdate
(String ontimeupdate) ontimeupdate attribute.ontoggle attribute.onvolumechange
(String onvolumechange) onvolumechange attribute.onwaiting attribute.setAttrs
(LinkedHashMap<String, Object> attrs) Sets the attributes for this element.spellcheck
(Object spellcheck) spellcheck attribute.style attribute.tabindex attribute.title attribute.toString()
translate attribute.
-
Constructor Details
-
HtmlElement
public HtmlElement()
-
-
Method Details
-
getAttrs
The attributes of this element.- Returns:
- The attributes of this element.
-
setAttrs
Sets the attributes for this element.- Parameters:
attrs
- The new attributes for this element.- Returns:
- This object.
-
attr
Adds an arbitrary attribute to this element.- Parameters:
key
- The attribute name.val
- The attribute value.- Returns:
- This object.
-
attrUri
Adds an arbitrary URI attribute to this element.Same as
attr(String, Object)
, except if the value is a string that appears to be a URI (e.g."servlet:/xxx" ).The value can be of any of the following types:
URI
,URL
,String
. Strings must be valid URIs.URIs defined by
UriResolver
can be used for values.- Parameters:
key
- The attribute name.val
- The attribute value.- Returns:
- This object.
-
getAttr
Returns the attribute with the specified name.- Parameters:
key
- The attribute name.- Returns:
- The attribute value, or
null if the named attribute does not exist.
-
getAttr
Returns the attribute with the specified name converted to the specified class type.- Type Parameters:
T
- The class type to convert this class to.- Parameters:
type
- The class type to convert this class to. SeeConverterUtils
for a list of supported conversion types.key
- The attribute name.- Returns:
- The attribute value, or
null if the named attribute does not exist.
-
accesskey
accesskey attribute.- Parameters:
accesskey
- The new value for this attribute.- Returns:
- This object.
-
_class
class attribute.- Parameters:
_class
- The new value for this attribute.- Returns:
- This object.
-
contenteditable
contenteditable attribute. -
dir
dir attribute.- Parameters:
dir
- The new value for this attribute.- Returns:
- This object.
-
id
id attribute.- Parameters:
id
- The new value for this attribute.- Returns:
- This object.
-
lang
lang attribute.- Parameters:
lang
- The new value for this attribute.- Returns:
- This object.
-
onabort
onabort attribute.- Parameters:
onabort
- The new value for this attribute.- Returns:
- This object.
-
onblur
onblur attribute.- Parameters:
onblur
- The new value for this attribute.- Returns:
- This object.
-
oncancel
oncancel attribute.- Parameters:
oncancel
- The new value for this attribute.- Returns:
- This object.
-
oncanplay
oncanplay attribute.- Parameters:
oncanplay
- The new value for this attribute.- Returns:
- This object.
-
oncanplaythrough
oncanplaythrough attribute.- Parameters:
oncanplaythrough
- The new value for this attribute.- Returns:
- This object.
-
onchange
onchange attribute.- Parameters:
onchange
- The new value for this attribute.- Returns:
- This object.
-
onclick
onclick attribute.- Parameters:
onclick
- The new value for this attribute.- Returns:
- This object.
-
oncuechange
oncuechange attribute.- Parameters:
oncuechange
- The new value for this attribute.- Returns:
- This object.
-
ondblclick
ondblclick attribute.- Parameters:
ondblclick
- The new value for this attribute.- Returns:
- This object.
-
ondurationchange
ondurationchange attribute.- Parameters:
ondurationchange
- The new value for this attribute.- Returns:
- This object.
-
onemptied
onemptied attribute.- Parameters:
onemptied
- The new value for this attribute.- Returns:
- This object.
-
onended
onended attribute.- Parameters:
onended
- The new value for this attribute.- Returns:
- This object.
-
onerror
onerror attribute.- Parameters:
onerror
- The new value for this attribute.- Returns:
- This object.
-
onfocus
onfocus attribute.- Parameters:
onfocus
- The new value for this attribute.- Returns:
- This object.
-
oninput
oninput attribute.- Parameters:
oninput
- The new value for this attribute.- Returns:
- This object.
-
oninvalid
oninvalid attribute.- Parameters:
oninvalid
- The new value for this attribute.- Returns:
- This object.
-
onkeydown
onkeydown attribute.- Parameters:
onkeydown
- The new value for this attribute.- Returns:
- This object.
-
onkeypress
onkeypress attribute.- Parameters:
onkeypress
- The new value for this attribute.- Returns:
- This object.
-
onkeyup
onkeyup attribute.- Parameters:
onkeyup
- The new value for this attribute.- Returns:
- This object.
-
onload
onload attribute.- Parameters:
onload
- The new value for this attribute.- Returns:
- This object.
-
onloadeddata
onloadeddata attribute.- Parameters:
onloadeddata
- The new value for this attribute.- Returns:
- This object.
-
onloadedmetadata
onloadedmetadata attribute.- Parameters:
onloadedmetadata
- The new value for this attribute.- Returns:
- This object.
-
onloadstart
onloadstart attribute.- Parameters:
onloadstart
- The new value for this attribute.- Returns:
- This object.
-
onmousedown
onmousedown attribute.- Parameters:
onmousedown
- The new value for this attribute.- Returns:
- This object.
-
onmouseenter
onmouseenter attribute.- Parameters:
onmouseenter
- The new value for this attribute.- Returns:
- This object.
-
onmouseleave
onmouseleave attribute.- Parameters:
onmouseleave
- The new value for this attribute.- Returns:
- This object.
-
onmousemove
onmousemove attribute.- Parameters:
onmousemove
- The new value for this attribute.- Returns:
- This object.
-
onmouseout
onmouseout attribute.- Parameters:
onmouseout
- The new value for this attribute.- Returns:
- This object.
-
onmouseover
onmouseover attribute.- Parameters:
onmouseover
- The new value for this attribute.- Returns:
- This object.
-
onmouseup
onmouseup attribute.- Parameters:
onmouseup
- The new value for this attribute.- Returns:
- This object.
-
onmousewheel
onmousewheel attribute.- Parameters:
onmousewheel
- The new value for this attribute.- Returns:
- This object.
-
onpause
onpause attribute.- Parameters:
onpause
- The new value for this attribute.- Returns:
- This object.
-
onplay
onplay attribute.- Parameters:
onplay
- The new value for this attribute.- Returns:
- This object.
-
onplaying
onplaying attribute.- Parameters:
onplaying
- The new value for this attribute.- Returns:
- This object.
-
onprogress
onprogress attribute.- Parameters:
onprogress
- The new value for this attribute.- Returns:
- This object.
-
onratechange
onratechange attribute.- Parameters:
onratechange
- The new value for this attribute.- Returns:
- This object.
-
onreset
onreset attribute.- Parameters:
onreset
- The new value for this attribute.- Returns:
- This object.
-
onresize
onresize attribute.- Parameters:
onresize
- The new value for this attribute.- Returns:
- This object.
-
onscroll
onscroll attribute.- Parameters:
onscroll
- The new value for this attribute.- Returns:
- This object.
-
onseeked
onseeked attribute.- Parameters:
onseeked
- The new value for this attribute.- Returns:
- This object.
-
onseeking
onseeking attribute.- Parameters:
onseeking
- The new value for this attribute.- Returns:
- This object.
-
onselect
onselect attribute.- Parameters:
onselect
- The new value for this attribute.- Returns:
- This object.
-
onshow
onshow attribute.- Parameters:
onshow
- The new value for this attribute.- Returns:
- This object.
-
onstalled
onstalled attribute.- Parameters:
onstalled
- The new value for this attribute.- Returns:
- This object.
-
onsubmit
onsubmit attribute.- Parameters:
onsubmit
- The new value for this attribute.- Returns:
- This object.
-
onsuspend
onsuspend attribute.- Parameters:
onsuspend
- The new value for this attribute.- Returns:
- This object.
-
ontimeupdate
ontimeupdate attribute.- Parameters:
ontimeupdate
- The new value for this attribute.- Returns:
- This object.
-
ontoggle
ontoggle attribute.- Parameters:
ontoggle
- The new value for this attribute.- Returns:
- This object.
-
onvolumechange
onvolumechange attribute.- Parameters:
onvolumechange
- The new value for this attribute.- Returns:
- This object.
-
onwaiting
onwaiting attribute.- Parameters:
onwaiting
- The new value for this attribute.- Returns:
- This object.
-
spellcheck
spellcheck attribute. -
style
style attribute.- Parameters:
style
- The new value for this attribute.- Returns:
- This object.
-
tabindex
tabindex attribute. -
title
title attribute.- Parameters:
title
- The new value for this attribute.- Returns:
- This object.
-
translate
translate attribute. -
deminimize
If the specified attribute is a boolean, it gets converted to the attribute name iftrue ornull iffalse .- Parameters:
value
- The attribute value.attr
- The attribute name.- Returns:
- The deminimized value, or the same value if the value wasn't a boolean.
-
toString
-