Package csv.impl
Class JTableReader
java.lang.Object
csv.impl.AbstractTableReader
csv.impl.JTableReader
- All Implemented Interfaces:
TableReader,Iterable<Object[]>,Iterator<Object[]>
Reader for Swing's JTable.
- Author:
- ralph
-
Constructor Summary
ConstructorsConstructorDescriptionJTableReader(JTable table) Constructor with header row and selected rows only.JTableReader(JTable table, boolean selectedOnly) Constructor. -
Method Summary
Modifier and TypeMethodDescriptiongetTable()Returns the table.booleanhasNext()Returns true if there are more rows to be delivered.booleanReturns the selectedOnly.Object[]next()Returns the next row.protected voidReads the table header.voidremove()Removal is not supported.voidreset()Resets the reader.Methods inherited from class csv.impl.AbstractTableReader
close, convert, convert, convertArray, convertArray, get, getColumnIndex, getColumnType, getHeaderRow, getLineCount, getMapper, getMinimumColumnCount, getRowCount, hasHeaderRow, incrementLineCount, incrementRowCount, isHeaderRowRead, iterator, notifyComment, open, registerCommentCallBack, setColumnType, setHasHeaderRow, setHeaderRow, setHeaderRowRead, setMapper, setMinimumColumnCount, unregisterCommentCallBackMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface java.lang.Iterable
forEach, spliteratorMethods inherited from interface java.util.Iterator
forEachRemaining
-
Constructor Details
-
JTableReader
Constructor with header row and selected rows only.- Parameters:
table- table object to read from
-
JTableReader
Constructor.- Parameters:
table- table object to read fromselectedOnly- whether only selected rows shall be read
-
-
Method Details
-
reset
public void reset()Resets the reader.- Specified by:
resetin interfaceTableReader- Overrides:
resetin classAbstractTableReader- See Also:
-
hasNext
public boolean hasNext()Returns true if there are more rows to be delivered.- See Also:
-
next
Returns the next row.- See Also:
-
remove
public void remove()Removal is not supported.- See Also:
-
readHeaderRow
protected void readHeaderRow()Reads the table header.- Overrides:
readHeaderRowin classAbstractTableReader- See Also:
-
isSelectedOnly
public boolean isSelectedOnly()Returns the selectedOnly.- Returns:
- the selectedOnly
-
getTable
Returns the table.- Returns:
- the table
-