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 enumSupported bullet styleprivate static enum -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final Stringprivate static final Stringprivate static final Stringprivate static final intprivate final intprivate booleanprivate intprivate final Stringprivate Stack<TroffPrinter.ListType> private booleanprivate static final Stringprivate static final Stringprivate static final Stringprivate static final Stringprivate static final Stringprivate static final Stringprivate static final Stringprivate static final Stringprivate static final Stringprivate static final Stringprivate static final Stringprivate static final Stringprivate final PrintWriter -
Constructor Summary
ConstructorsConstructorDescriptionTroffPrinter(PrintWriter writer) TroffPrinter(PrintWriter writer, int indentation, TroffPrinter.BulletStyle style) -
Method Summary
Modifier and TypeMethodDescriptionprivate voidappendLine(String line) private StringvoidendList()private Stringprivate Stringvoidfinish()voidflush()voidvoidvoidvoidvoidnextSection(String sectionTitle) voidMoves to the next titled list item without providing a title.voidnextTitledListItem(String title) protected voidprivate voidvoidvoidvoidprintBoldItalic(String value) protected voidvoidprintItalic(String value) voidprintln()voidprotected voidprintNumberedBullet(boolean first) protected voidvoidprintTable(List<List<String>> rows, boolean hasHeader) protected voidvoidvoidvoidvoidvoidvoidStarts a titled list, the next line of text printed will form the titlevoidstartTitledList(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()
-