Package g3.project.elements
Class TextElement
- java.lang.Object
-
- nu.xom.Node
-
- nu.xom.ParentNode
-
- nu.xom.Element
-
- g3.project.elements.TextElement
-
- All Implemented Interfaces:
Includable
public class TextElement extends nu.xom.Element implements Includable
- Author:
- Group 3
-
-
Field Summary
-
Fields inherited from interface g3.project.elements.Includable
INCLUDE_ATTR
-
-
Constructor Summary
Constructors Constructor Description TextElement(java.lang.String name)
TextElement(java.lang.String name, java.lang.String uri)
TextElement(java.lang.String name, java.lang.String uri, java.util.ArrayList<StyledTextSeg> textSegs)
TextElement(nu.xom.Element element)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.HashMap<java.lang.String,java.lang.Object>
getAlignmentProps()
Get my alignment properties.java.util.Optional<java.lang.String>
getSourceLoc()
Return the source path or URL.java.util.ArrayList<StyledTextSeg>
getText()
Get all font blocks in this text section.-
Methods inherited from class nu.xom.Element
addAttribute, addNamespaceDeclaration, appendChild, copy, getAttribute, getAttribute, getAttribute, getAttributeCount, getAttributeValue, getAttributeValue, getBaseURI, getChildElements, getChildElements, getChildElements, getFirstChildElement, getFirstChildElement, getLocalName, getNamespaceDeclarationCount, getNamespacePrefix, getNamespacePrefix, getNamespaceURI, getNamespaceURI, getQualifiedName, getValue, insertChild, removeAttribute, removeChildren, removeNamespaceDeclaration, setBaseURI, setLocalName, setNamespacePrefix, setNamespaceURI, shallowCopy, toString, toXML
-
Methods inherited from class nu.xom.ParentNode
appendChild, getChild, getChildCount, indexOf, insertChild, removeChild, removeChild, replaceChild
-
-
-
-
Constructor Detail
-
TextElement
public TextElement(java.lang.String name)
-
TextElement
public TextElement(java.lang.String name, java.lang.String uri)
-
TextElement
public TextElement(nu.xom.Element element)
-
TextElement
public TextElement(java.lang.String name, java.lang.String uri, java.util.ArrayList<StyledTextSeg> textSegs)
-
-
Method Detail
-
getText
public final java.util.ArrayList<StyledTextSeg> getText()
Get all font blocks in this text section.- Returns:
- ArrayList of styled text segments.
-
getAlignmentProps
public final java.util.HashMap<java.lang.String,java.lang.Object> getAlignmentProps()
Get my alignment properties.- Returns:
- Alignment properties.
-
getSourceLoc
public final java.util.Optional<java.lang.String> getSourceLoc()
Description copied from interface:Includable
Return the source path or URL.- Specified by:
getSourceLoc
in interfaceIncludable
- Returns:
- Location string.
-
-