public class TextBlock extends Object
| Constructor and Description |
|---|
TextBlock(boolean wrap,
boolean comment)
New instance
|
| Modifier and Type | Method and Description |
|---|---|
TextBlock |
addBlank()
Add a blank line, added as a TextLine.BlankLine.
|
TextBlock |
addHR()
Add a Horizontal Rule line, added as a TextLine.HRLine.
|
TextBlock |
addLine(String strLine)
Add a String, which will be added as TextLine with the wrap setting inherited from this block.
|
TextLine |
getLine(int i)
Return a single TextLine
|
ArrayList<TextLine> |
getLines()
Return all the TextLines in this block.
|
boolean |
isBlankLineAfter()
Should a blank line be printed after this block?
|
boolean |
isBlankLineBefore()
Should a blank line be printed before this block?
|
boolean |
isComment()
Should the text in this block be printed as a comment?
|
boolean |
isWrap()
Should lines in this block be wrapped to the max column width?
|
void |
setBlankLineAfter(boolean blankLineAfter)
Specify if a blank line be printed after this block.
|
void |
setBlankLineBefore(boolean blankLineBefore)
Specify if a blank line be printed before this block.
|
public TextBlock(boolean wrap,
boolean comment)
wrap - Should contained text be wrapped to the max column width?comment - Should the text in this block be printed as a comment?public TextBlock addLine(String strLine)
strLine - public TextBlock addHR()
public TextBlock addBlank()
public boolean isWrap()
public boolean isComment()
public TextLine getLine(int i)
i - index is zero based.public boolean isBlankLineBefore()
public boolean isBlankLineAfter()
public void setBlankLineBefore(boolean blankLineBefore)
blankLineBefore - public void setBlankLineAfter(boolean blankLineAfter)
blankLineAfter - Copyright © 2022. All rights reserved.