Package org.orbisgis.commons.printer
Class Ascii
- java.lang.Object
-
- org.orbisgis.commons.printer.CustomPrinter
-
- org.orbisgis.commons.printer.Ascii
-
- All Implemented Interfaces:
ICustomPrinter
public class Ascii extends CustomPrinter
Extension ofCustomPrinterfor the printing of data in an Ascii style.- Author:
- Erwan Bocher (CNRS), Sylvain PALOMINOS (UBS 2019)
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.orbisgis.commons.printer.ICustomPrinter
ICustomPrinter.CellPosition
-
-
Field Summary
-
Fields inherited from class org.orbisgis.commons.printer.CustomPrinter
builder, columnCount, columnIndex, columnWidth, isDrawingTable
-
-
Constructor Summary
Constructors Constructor Description Ascii()Main constructor.Ascii(StringBuilder builder)Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidappendTableHeaderValue(Object value, ICustomPrinter.CellPosition position)Add a header value to the table.voidappendTableLineSeparator()Append a line separator to the builder.voidappendTableTitle(Object title)Add a title to the table.voidappendTableValue(Object value, ICustomPrinter.CellPosition position)Add a single value to the table.voidappendValue(Object value)Add a simple value.-
Methods inherited from class org.orbisgis.commons.printer.CustomPrinter
appendTableValue, appendText, endTable, startTable, toString
-
-
-
-
Constructor Detail
-
Ascii
public Ascii(StringBuilder builder)
Constructor.- Parameters:
builder- Not nullStringBuilderused for building the string.
-
Ascii
public Ascii()
Main constructor.
-
-
Method Detail
-
appendTableLineSeparator
public void appendTableLineSeparator()
Description copied from interface:ICustomPrinterAppend a line separator to the builder.
-
appendTableValue
public void appendTableValue(Object value, ICustomPrinter.CellPosition position)
Description copied from interface:ICustomPrinterAdd a single value to the table. Linebreak are automatically generated once the column count is reached.- Parameters:
value- Value to add to the table.
-
appendTableHeaderValue
public void appendTableHeaderValue(Object value, ICustomPrinter.CellPosition position)
Description copied from interface:ICustomPrinterAdd a header value to the table. Linebreak are automatically generated once the column count is reached.- Parameters:
value- Header value to add to the table.
-
appendTableTitle
public void appendTableTitle(Object title)
Description copied from interface:ICustomPrinterAdd a title to the table.- Parameters:
title- Not null title to add to the table.
-
appendValue
public void appendValue(Object value)
Description copied from interface:ICustomPrinterAdd a simple value. If a table has been started, useICustomPrinter.appendTableValue(Object).- Parameters:
value- Value to add.
-
-