Class HtmlElement
- java.lang.Object
-
- se.idsec.utils.printcert.display.html.HtmlElement
-
- Direct Known Subclasses:
GenericHtmlElement,TableCellElement,TableElement,TableRowElement,TextObject
public abstract class HtmlElement extends Object
HTML element abstract class
-
-
Constructor Summary
Constructors Constructor Description HtmlElement()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description HtmlElementaddAction(String event, String function)Add javascript action to html elementHtmlElementaddAction(String event, String function, String arg)Add javascript action to html elementHtmlElementaddAction(String event, String function, String[] args)Add javascript action to html elementHtmlElementaddAttribute(String type, String value)Add attribute to html elementHtmlElementaddHtmlElement(HtmlElement element)Add a child html element to this html elementHtmlElementaddNewHtmlElement(HtmlElement element)Add a child html element to this html elementHtmlElementaddStyle(String type, String value)Add style to html elementList<HtmlElement>getElements()voidsetAction(List<se.idsec.utils.printcert.display.html.HtmlElement.Action> action)voidsetAttributes(List<se.idsec.utils.printcert.display.html.HtmlElement.Attribute> attributes)voidsetElements(List<HtmlElement> objects)voidsetStyles(List<se.idsec.utils.printcert.display.html.HtmlElement.Style> styles)HtmlElementsetText(String text)Sets text content within the html elementStringtoString()Generate a string representation of the Html element including all it's child elementsStringtoString(boolean lineBreak)Generate a string representation of the Html element including all it's child elements
-
-
-
Field Detail
-
LF
public static final String LF
System line separator string
-
-
Method Detail
-
toString
public String toString()
Generate a string representation of the Html element including all it's child elements
-
toString
public String toString(boolean lineBreak)
Generate a string representation of the Html element including all it's child elements- Parameters:
lineBreak- include line breaks in the html data for increased readability- Returns:
- html string
-
setText
public HtmlElement setText(String text)
Sets text content within the html element- Parameters:
text-
-
addHtmlElement
public HtmlElement addHtmlElement(HtmlElement element)
Add a child html element to this html element- Parameters:
element-- Returns:
- This element
-
addNewHtmlElement
public HtmlElement addNewHtmlElement(HtmlElement element)
Add a child html element to this html element- Parameters:
element-- Returns:
- The added html element
-
addStyle
public HtmlElement addStyle(String type, String value)
Add style to html element- Parameters:
type- style typevalue- style value- Returns:
- This object
-
addAttribute
public HtmlElement addAttribute(String type, String value)
Add attribute to html element- Parameters:
type- attribute namevalue- attribute value- Returns:
- This object
-
addAction
public HtmlElement addAction(String event, String function, String[] args)
Add javascript action to html element- Parameters:
event- toggle event (e.g. onclick)function- name of javscript function (not including parameter brackets "()"args- Arguments for the javascript function- Returns:
- This object
-
addAction
public HtmlElement addAction(String event, String function, String arg)
Add javascript action to html element- Parameters:
event- toggle event (e.g. onclick)function- name of javscript function (not including parameter brackets "()"arg- Argument for the javascript function- Returns:
- This object
-
addAction
public HtmlElement addAction(String event, String function)
Add javascript action to html element- Parameters:
event- toggle event (e.g. onclick)function- name of javscript function (not including parameter brackets "()"- Returns:
- This objecxt
-
setAction
public void setAction(List<se.idsec.utils.printcert.display.html.HtmlElement.Action> action)
-
setAttributes
public void setAttributes(List<se.idsec.utils.printcert.display.html.HtmlElement.Attribute> attributes)
-
setElements
public void setElements(List<HtmlElement> objects)
-
getElements
public List<HtmlElement> getElements()
-
setStyles
public void setStyles(List<se.idsec.utils.printcert.display.html.HtmlElement.Style> styles)
-
-