Class TextElement

java.lang.Object
org.apache.ecs.GenericElement
org.apache.ecs.ElementAttributes
org.apache.ecs.ConcreteElement
org.apache.ecs.StringElement
overit.geocall.ecs.TextElement
All Implemented Interfaces:
Serializable, Cloneable, org.apache.ecs.Attributes, org.apache.ecs.Element, org.apache.ecs.ElementRegistry, org.apache.ecs.Printable

public class TextElement extends org.apache.ecs.StringElement
This class manages a text element escaping the html/xml parts, and if needed the transformation of \n in "line break"
See Also:
  • Field Summary

    Fields inherited from class org.apache.ecs.GenericElement

    tabLevel

    Fields inherited from interface org.apache.ecs.Attributes

    NO_ATTRIBUTE_VALUE

    Fields inherited from interface org.apache.ecs.Element

    CENTER, LEFT, LOWERCASE, MIXEDCASE, RIGHT, UPPERCASE
  • Constructor Summary

    Constructors
    Constructor
    Description
    Creates a new instance of TextElement escaping the html/xml parts and transform \n in "line break"
    TextElement(String text, boolean cr2br, boolean space2nbsp)
    Creates a new instance of TextElement
  • Method Summary

    Modifier and Type
    Method
    Description
    org.apache.ecs.StringElement
     
    Transform the text to html

    Methods inherited from class org.apache.ecs.StringElement

    addElement, addElement, addElement, createEndTag, createStartTag, removeElement, reset

    Methods inherited from class org.apache.ecs.ConcreteElement

    addElementToRegistry, addElementToRegistry, addElementToRegistry, addElementToRegistry, addElementToRegistry, addElementToRegistry, addElementToRegistry, addElementToRegistry, clone, elements, getElement, isEmpty, output, output, output, output, registryHasElement, registryHasElement, removeElementFromRegistry, removeElementFromRegistry

    Methods inherited from class org.apache.ecs.ElementAttributes

    addAttribute, addAttribute, addAttribute, addAttribute, attributes, getAttribute, getAttributeEqualitySign, getAttributeFilter, getAttributeFilterState, getAttributeQuote, getAttributeQuoteChar, hasAttribute, removeAttribute, setAttributeEqualitySign, setAttributeFilter, setAttributeFilterState, setAttributeQuote, setAttributeQuoteChar, setClass, setDir, setID, setLang, setStyle, setTitle

    Methods inherited from class org.apache.ecs.GenericElement

    alterCase, getBeginEndModifier, getBeginEndModifierDefined, getBeginStartModifier, getBeginStartModifierDefined, getCase, getCodeSet, getElementHashEntry, getElementType, getEndEndModifier, getEndEndModifierDefined, getEndStartModifier, getEndStartModifierDefined, getEndTagChar, getFilter, getFilterState, getNeedClosingTag, getNeedLineBreak, getPrettyPrint, getStartTagChar, getTabLevel, getTagPosition, getTagText, getVersion, putTabs, putTabs, removeBeginEndModifier, removeBeginStartModifier, removeEndEndModifier, removeEndStartModifier, setBeginEndModifier, setBeginModifier, setBeginModifier, setBeginStartModifier, setCase, setCodeSet, setElementType, setEndEndModifier, setEndModifier, setEndModifier, setEndStartModifier, setEndTagChar, setFilter, setFilterState, setNeedClosingTag, setPrettyPrint, setStartTagChar, setTabLevel, setTagPosition, setTagText, toString, toString

    Methods inherited from class java.lang.Object

    equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
  • Constructor Details

    • TextElement

      public TextElement(String text)
      Creates a new instance of TextElement escaping the html/xml parts and transform \n in "line break"
      Parameters:
      text - The text to add
    • TextElement

      public TextElement(String text, boolean cr2br, boolean space2nbsp)
      Creates a new instance of TextElement
      Parameters:
      text - The text to add
      cr2br - Boolean value indicating the cr2br
      space2nbsp - Boolean value indicating space2nbsp
  • Method Details

    • addElement

      public org.apache.ecs.StringElement addElement(String text)
      Overrides:
      addElement in class org.apache.ecs.StringElement
    • text2html

      public String text2html(String text)
      Transform the text to html
      Parameters:
      text - The text to transform
      Returns:
      The transformed text