Class Text
- java.lang.Object
-
- ch.sahits.game.openpatrician.utilities.model.Text
-
public class Text extends java.lang.Object
Text representing a sequence of headers and paragraphs.- Author:
- Andi Hotz, (c) Sahits GmbH, 2013 Created on Jul 10, 2013
-
-
Field Summary
Fields Modifier and Type Field Description private java.util.ArrayList<ITextComponent>
text
-
Constructor Summary
Constructors Constructor Description Text()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addCenteredLine(CenteredLine line)
Add a centered line to the text.void
addHeading(Heading heading)
Add a heading to the text.void
addParagraph(Paragraph paragraph)
Add a paragraph to the text.java.util.List<ITextComponent>
getText()
Retrieve the unmodifiable sequence of headings and paragraphs.
-
-
-
Field Detail
-
text
private final java.util.ArrayList<ITextComponent> text
-
-
Method Detail
-
getText
public java.util.List<ITextComponent> getText()
Retrieve the unmodifiable sequence of headings and paragraphs.- Returns:
- List of ITextComponents
-
addHeading
public void addHeading(Heading heading)
Add a heading to the text.- Parameters:
heading
- to be added
-
addParagraph
public void addParagraph(Paragraph paragraph)
Add a paragraph to the text.- Parameters:
paragraph
- to be added
-
addCenteredLine
public void addCenteredLine(CenteredLine line)
Add a centered line to the text.- Parameters:
line
- to be added
-
-