Class StaticTableDocument
java.lang.Object
com.pnfsoftware.jeb.util.events.EventSource
com.pnfsoftware.jeb.core.output.table.impl.AbstractTableDocument
com.pnfsoftware.jeb.core.output.table.impl.StaticTableDocument
- All Implemented Interfaces:
IGenericDocument
,ITableDocument
,IEventSource
A simple table document. Such table document objects do not listen to unit changes events; in
fact, they are unaware of the
IUnit
family of classes. They are ideal to distribute
static, immutable contents. More complex table documents should implement ITableDocument
and/or extend AbstractTableDocument
.-
Field Summary
Fields inherited from class com.pnfsoftware.jeb.util.events.EventSource
onEventCallCount
-
Constructor Summary
ConstructorsConstructorDescriptionStaticTableDocument
(List<String> columnLabels, List<? extends ITableRow> rows) Create a static table document containing the provided rows. -
Method Summary
Modifier and TypeMethodDescriptionGet the column labels for this table document.int
Get the number of rows in this table document.getTable()
Get the entire document.getTablePart
(int start, int count) Get a part of the document.Methods inherited from class com.pnfsoftware.jeb.core.output.table.impl.AbstractTableDocument
addressToCoordinates, coordinatesToAddress, dispose, getPropertyManager
Methods inherited from class com.pnfsoftware.jeb.util.events.EventSource
addListener, countListeners, getListeners, getParentSource, insertListener, notifyListeners, notifyListeners, notifyListeners, relay, removeListener, setParentSource
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.pnfsoftware.jeb.util.events.IEventSource
addListener, countListeners, getListeners, getParentSource, insertListener, notifyListeners, removeListener, setParentSource
Methods inherited from interface com.pnfsoftware.jeb.core.output.IGenericDocument
getUnit
-
Constructor Details
-
StaticTableDocument
Create a static table document containing the provided rows.- Parameters:
columnLabels
- cannot be null or emptyrows
- cannot be null
-
-
Method Details
-
getRowCount
public int getRowCount()Description copied from interface:ITableDocument
Get the number of rows in this table document.- Returns:
- the number of rows
-
getColumnLabels
Description copied from interface:ITableDocument
Get the column labels for this table document.- Returns:
- the column labels
-
getTable
Description copied from interface:ITableDocument
Get the entire document.- Returns:
- a part representing the entire document
-
getTablePart
Description copied from interface:ITableDocument
Get a part of the document.- Parameters:
start
- starting row indexcount
- number of rows to be returned- Returns:
- the part
-