Package org.orbisgis.commons.printer
Interface ICustomPrinter
-
- All Known Implementing Classes:
Ascii,CustomPrinter,Html
public interface ICustomPrinterInterface used for the customisation of the printing of Java Objects.- Author:
- Erwan Bocher (CNRS), Sylvain PALOMINOS (UBS 2019)
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static classICustomPrinter.CellPositionCell positions.
-
Method Summary
All Methods Instance Methods Abstract 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)Add a single value to the table.voidappendTableValue(Object value, ICustomPrinter.CellPosition position)Add a single value to the table.voidappendText(String text)voidappendValue(Object value)Add a simple value.voidendTable()End the table drawing.voidstartTable(int columnWidth, int columnCount)Start the drawing of a table.StringtoString()Return the not null string representation of the data contained by theICustomPrinterin its specific format.
-
-
-
Method Detail
-
startTable
void startTable(int columnWidth, int columnCount)Start the drawing of a table.- Parameters:
columnWidth- Width in character number of a single column.columnCount- Count of column.
-
endTable
void endTable()
End the table drawing.
-
appendTableLineSeparator
void appendTableLineSeparator()
Append a line separator to the builder.
-
appendTableValue
void appendTableValue(Object value)
Add a single value to the table. Linebreak are automatically generated once the column count is reached.- Parameters:
value- Value to add to the table.
-
appendTableValue
void appendTableValue(Object value, ICustomPrinter.CellPosition position)
Add 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
void appendTableHeaderValue(Object value, ICustomPrinter.CellPosition position)
Add 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
void appendTableTitle(Object title)
Add a title to the table.- Parameters:
title- Not null title to add to the table.
-
appendValue
void appendValue(Object value)
Add a simple value. If a table has been started, useappendTableValue(Object).- Parameters:
value- Value to add.
-
toString
String toString()
Return the not null string representation of the data contained by theICustomPrinterin its specific format.- Overrides:
toStringin classObject- Returns:
- The not null string representation of the data contained by the
ICustomPrinter
-
appendText
void appendText(String text)
-
-