Package pt.tecnico.uilib
Class Display
java.lang.Object
pt.tecnico.uilib.Display
Display lines of text.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionaddAll
(Collection<?> items) Add a line of text in a new-line.addNewLine
(Object toAdd, boolean force) Add a line of text in a new-line.void
clear()
Clear display.void
display()
Display the text.void
Easy display method.void
popup
(Collection<?> toPop) Easy display method.
-
Constructor Details
-
Display
public Display()Build a Display without a title and use the static IO -
Display
- Parameters:
title
- the title
-
Display
- Parameters:
ui
- the dialog drivertitle
- the title
-
-
Method Details
-
add
- Parameters:
text
- text to be added- Returns:
- the display
-
addAll
-
addLine
Add a line of text in a new-line. No new-line is added if there is no previous text.- Parameters:
text
- text to be added- Returns:
- the display
-
addNewLine
Add a line of text in a new-line. A new line is previously added if force is true or if there is already some text.- Parameters:
text
- text to be addedforce
- add a new-line even if no text is already present.- Returns:
- the display
-
display
public void display()Display the text. Only does something in the case there is some text to present. Clear the text after the text was shown to the user. -
popup
Easy display method.- Parameters:
toPop
-
-
popup
Easy display method.- Parameters:
toPop
-
-
clear
public void clear()Clear display. Empties the text to show.
-