Module com.github.rvesse.airline.io
Class TroffPrinter
java.lang.Object
com.github.rvesse.airline.io.printers.TroffPrinter
Printer class for generating Troff output
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enum
Supported bullet styleprivate static enum
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final String
private static final String
private static final String
private static final int
private final int
private boolean
private int
private final String
private Stack
<TroffPrinter.ListType> private boolean
private static final String
private static final String
private static final String
private static final String
private static final String
private static final String
private static final String
private static final String
private static final String
private static final String
private static final String
private static final String
private final PrintWriter
-
Constructor Summary
ConstructorsConstructorDescriptionTroffPrinter
(PrintWriter writer) TroffPrinter
(PrintWriter writer, int indentation, TroffPrinter.BulletStyle style) -
Method Summary
Modifier and TypeMethodDescriptionprivate void
appendLine
(String line) private String
void
endList()
private String
private String
void
finish()
void
flush()
void
void
void
void
void
nextSection
(String sectionTitle) void
Moves to the next titled list item without providing a title.void
nextTitledListItem
(String title) protected void
private void
void
void
void
printBoldItalic
(String value) protected void
void
printItalic
(String value) void
println()
void
protected void
printNumberedBullet
(boolean first) protected void
void
printTable
(List<List<String>> rows, boolean hasHeader) protected void
void
void
void
void
void
void
Starts a titled list, the next line of text printed will form the titlevoid
startTitledList
(String title) Starts a titled list with the given title
-
Field Details
-
REQUEST_TABLE_END
- See Also:
-
REQUEST_TABLE_START
- See Also:
-
REQUEST_FONT_ROMAN
- See Also:
-
REQUEST_FONT_BOLD
- See Also:
-
REQUEST_FONT_ITALIC
- See Also:
-
REQUEST_FONT_BOLD_ITALIC
- See Also:
-
REQUEST_PARAGRAPH_TITLED
- See Also:
-
REQUEST_PARAGRAPH_CURRENT_INDENTATION
- See Also:
-
REQUEST_PARAGRAPH_NO_INDENTATION
- See Also:
-
REQUEST_RESET_LEFT_MARGIN
- See Also:
-
REQUEST_MOVE_LEFT_MARGIN
- See Also:
-
REQUEST_BREAK
- See Also:
-
BULLET_STYLE_BULLET
- See Also:
-
BULLET_STYLE_DASH
- See Also:
-
BULLET_STYLE_EM_DASH
- See Also:
-
DEFAULT_INDENTATION
private static final int DEFAULT_INDENTATION- See Also:
-
writer
-
level
private int level -
newline
private boolean newline -
inSection
private boolean inSection -
indentation
private final int indentation- See Also:
-
lists
-
listGlyph
-
-
Constructor Details
-
TroffPrinter
-
TroffPrinter
-
-
Method Details
-
start
-
start
-
nextSection
-
print
-
println
-
println
public void println() -
lineBreak
public void lineBreak() -
printBold
-
printItalic
-
printBoldItalic
-
appendLine
-
startBulletedList
public void startBulletedList() -
startPlainList
public void startPlainList() -
startNumberedList
public void startNumberedList() -
startTitledList
public void startTitledList()Starts a titled list, the next line of text printed will form the title -
startTitledList
Starts a titled list with the given title- Parameters:
title
-
-
nextBulletedListItem
public void nextBulletedListItem() -
nextPlainListItem
public void nextPlainListItem() -
notInList
protected void notInList() -
nextNumberedListItem
public void nextNumberedListItem() -
nextTitledListItem
public void nextTitledListItem()Moves to the next titled list item without providing a title. The next line of text written will therefore be treated as the title for this item. -
nextTitledListItem
-
endList
public void endList() -
printTable
-
prepareLine
private void prepareLine() -
printBullet
protected void printBullet() -
printTitledBullet
protected void printTitledBullet() -
printPlainBullet
protected void printPlainBullet() -
printNumberedBullet
protected void printNumberedBullet(boolean first) -
asArg
-
escapeArg
-
escape
-
flush
public void flush() -
finish
public void finish()
-