Package de.uzl.its.swat.common
Class PrintBox
java.lang.Object
de.uzl.its.swat.common.PrintBox
This class represents a utility for printing messages inside a box structure. The box has a
 dynamic size based on the content and can include a heading. Using the .toString() method will
 return the box as a string.
- 
Constructor SummaryConstructorsConstructorDescriptionPrintBox(int boxSize) Constructs a PrintBox with a specified box size.Constructs a PrintBox with a specified box size and heading.Constructs a PrintBox with a specified box size, heading and some or all content.
- 
Method SummaryModifier and TypeMethodDescriptionvoidAdds a message to the box.getMsgs()booleanvoidsetContentPresent(boolean contentPresent) voidsetHeading(String heading) voidtoString()Returns the box as a string.
- 
Constructor Details- 
PrintBoxpublic PrintBox(int boxSize) Constructs a PrintBox with a specified box size.- Parameters:
- boxSize- The size of the box.
 
- 
PrintBoxConstructs a PrintBox with a specified box size and heading.- Parameters:
- boxSize- The size of the box.
- heading- The heading of the box.
 
- 
PrintBoxConstructs a PrintBox with a specified box size, heading and some or all content.- Parameters:
- boxSize- The size of the box.
- heading- The heading of the box.
- msgs- The content of the box.
 
 
- 
- 
Method Details- 
addMsgAdds a message to the box.- Parameters:
- msg- The message to add.
 
- 
toStringReturns the box as a string.
- 
isContentPresentpublic boolean isContentPresent()
- 
setContentPresentpublic void setContentPresent(boolean contentPresent) 
- 
getHeading
- 
setHeading
- 
getMsgs
- 
setMsgs
 
-