Class Display

java.lang.Object
pt.tecnico.uilib.Display

public class Display extends Object
Display lines of text.
  • Constructor Details

    • Display

      public Display()
      Build a Display without a title and use the static IO
    • Display

      public Display(String title)
      Parameters:
      title - the title
    • Display

      public Display(Dialog ui, String title)
      Parameters:
      ui - the dialog driver
      title - the title
  • Method Details

    • add

      public Display add(Object toAdd)
      Parameters:
      text - text to be added
      Returns:
      the display
    • addAll

      public Display addAll(Collection<?> items)
    • addLine

      public Display addLine(Object toAdd)
      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

      public Display addNewLine(Object toAdd, boolean force)
      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 added
      force - 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

      public void popup(Object toPop)
      Easy display method.
      Parameters:
      toPop -
    • popup

      public void popup(Collection<?> toPop)
      Easy display method.
      Parameters:
      toPop -
    • clear

      public void clear()
      Clear display. Empties the text to show.