/pyjs/tests/test028.py
Python | 37 lines | 24 code | 13 blank | 0 comment | 6 complexity | 34b303f3962a3c69b5728eda04ae6ed6 MD5 | raw file
Possible License(s): LGPL-2.1, Apache-2.0
1class RowDataAcceptorImpl: 2 3 def accept(self, startRow, data): 4 destRowCount = getDataRowCount() 5 destColCount = grid.getCellCount(0) 6 7 srcRowIndex = 0 8 srcRowCount = 5 9 destRowIndex = 1 10 11 while srcRowIndex < srcRowCount: 12 13 srcRowData = data[srcRowIndex] 14 15 for srcColIndex in range(destColCount): 16 cellHTML = srcRowData[srcColIndex] 17 grid.setText(destRowIndex, srcColIndex, cellHTML) 18 19 srcRowIndex += 1 20 destRowIndex += 1 21 22 isLastPage = False 23 24 while destRowIndex < destRowCount + 1: 25 26 isLastPage = True 27 28 for destColIndex in range(destColCount): 29 grid.clearCell(destRowIndex, destColIndex) 30 31 destRowIndex += 1 32 33 navbar.gotoNet.setEnabled(not isLstPage) 34 navbar.gotoFirst.setEnabled(startRow > 0) 35 navbar.gotoPrev.setEnabled(startRow > 0) 36 37 setStatusText((startRow + 1) + " - " + (startRow + srcRowCount))