Class TextScene
java.lang.Object
com.calebleavell.textinterface.scenes.GenericScene
com.calebleavell.textinterface.scenes.TextScene
Displays a piece of text
-
Nested Class Summary
Nested Classes -
Field Summary
Fields inherited from class com.calebleavell.textinterface.scenes.GenericScene
MAX_ITERATIONS_ON_TOSTRING
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected
TextScene
(TextScene.Builder builder) Return new TextScene based on builder fields -
Method Summary
Methods inherited from class com.calebleavell.textinterface.scenes.GenericScene
addChild, executeFunctions, getChild, getChild, getChild, getChild, getChildren, getFunctions, getID, getName, isTerminated, runChildren, setChildren, setName, terminate, toString, toString
-
Constructor Details
-
TextScene
Return new TextScene based on builder fields- Parameters:
builder
- The builder
-
-
Method Details
-
getText
Getter for text- Returns:
- Text
-
setText
Setter for text- Parameters:
text
- The new text
-
setEndWithNewLine
public void setEndWithNewLine(boolean endWithNewLine) Setter for endWithNewLine- Parameters:
endWithNewLine
- Whether or not the program should end with a newline
-
run
Displays the input if that's set, or more commonly, displays its set text. Ends with a newline if that's set, then display children and run functions.- Specified by:
run
in interfaceFunction
- Overrides:
run
in classGenericScene
- Throws:
Exception
-