// 표 : 고소인 fun tablePlaintiff() { nextPage() /** 변수 **/ val cellHeight = 30 // Row Height : 30 val columnWidth = 60 // 내부선 val secondColumn = 260 // 두번쨰 열 val vcOffset = 4f // 세로 중간을 맞추기 위한 오프셋 plaintiffList?.forEachIndexed() { index, it -> nextPage(cellHeight * 3) // 첫째 행 // Rect val rect1 = Rect(currentPOS.X, currentPOS.Y, body.Width, currentPOS.Y + cellHeight) canvasList[pageNum].drawRect(rect1, linePaint) // 첫쨰 줄 val rect1head1 = Rect(currentPOS.X, currentPOS.Y, currentPOS.X + columnWidth, currentPOS.Y + cellHeight) canvasList[pageNum].drawRect(rect1head1, cellFill) // 첫쨰 줄 첫쨰 제목 val rect1head2 = Rect(currentPOS.X + secondColumn, currentPOS.Y, currentPOS.X + secondColumn + columnWidth, currentPOS.Y + cellHeight) canvasList[pageNum].drawRect(rect1head2, cellFill) // 첫쨰 줄 둘쨰 제목 // Text canvasList[pageNum].drawText("이 름", rect1head1.exactCenterX(), rect1head1.exactCenterY() + vcOffset , cellHeader) canvasList[pageNum].drawText(it.pName, currentPOS.X.toFloat() + columnWidth + (secondColumn - columnWidth) / 2, currentPOS.Y.toFloat() + cellHeight / 2 + vcOffset, cellBody) canvasList[pageNum].drawText("주민번호", currentPOS.X.toFloat() + secondColumn + columnWidth / 2, currentPOS.Y.toFloat() + cellHeight / 2 + vcOffset, cellHeader) // 2번쨰 칸 canvasList[pageNum].drawText(it.socialNumber, currentPOS.X.toFloat() + secondColumn + columnWidth + (body.Width - (currentPOS.X + secondColumn + columnWidth)) / 2, currentPOS.Y.toFloat() + cellHeight / 2 + vcOffset, cellBody) // 둘재 행 // Rect canvasList[pageNum].drawRect(currentPOS.X.toFloat(), currentPOS.Y.toFloat() + cellHeight, body.Width.toFloat(), currentPOS.Y.toFloat() + cellHeight * 2, linePaint) // 둘쨰 줄 canvasList[pageNum].drawRect(currentPOS.X.toFloat(), currentPOS.Y.toFloat() + cellHeight, currentPOS.X.toFloat() + columnWidth, currentPOS.Y.toFloat() + cellHeight * 2, cellFill) // 제목박스 // Text canvasList[pageNum].drawText("주 소", currentPOS.X.toFloat() + columnWidth / 2, currentPOS.Y.toFloat() + cellHeight * 1 + cellHeight / 2 + vcOffset, cellHeader) canvasList[pageNum].drawText(it.pAddress, currentPOS.X.toFloat() + columnWidth + (body.Width - (currentPOS.X + columnWidth)) / 2, currentPOS.Y.toFloat() + cellHeight * 1 + cellHeight / 2 + vcOffset, cellBody) // 셋쨰 행 // Rect canvasList[pageNum].drawRect(currentPOS.X.toFloat(), currentPOS.Y.toFloat() + cellHeight * 2, body.Width.toFloat(), currentPOS.Y.toFloat() + cellHeight * 3, linePaint) // 셋쨰 줄 canvasList[pageNum].drawRect(currentPOS.X.toFloat(), currentPOS.Y.toFloat() + cellHeight * 2, currentPOS.X.toFloat() + columnWidth, currentPOS.Y.toFloat() + cellHeight * 3, cellFill) // 제목박스 // Text canvasList[pageNum].drawText("연 락 처", currentPOS.X.toFloat() + columnWidth / 2, currentPOS.Y.toFloat() + cellHeight * 2 + cellHeight / 2 + vcOffset, cellHeader) // 제목 canvasList[pageNum].drawText(it.pPhoneNumber, currentPOS.X.toFloat() + columnWidth + (body.Width - (currentPOS.X + columnWidth)) / 2, currentPOS.Y.toFloat() + cellHeight * 2 + cellHeight / 2 + vcOffset, cellBody) // 내용 if (isRecording) { val jsonContact = setJsonContactPlaintiff(it) commandList.add(COMMAND("TablePlaintiff", pageNum, index.toString(), jsonContact.toString(), currentPOS)) } // 아래 여백 linePlus(cellHeight * 3 + 20) }?:{ canvasList[pageNum].drawRect(currentPOS.X.toFloat(), currentPOS.Y.toFloat(), body.Width.toFloat(), currentPOS.Y.toFloat() + cellHeight, linePaint) // 첫쨰 줄 canvasList[pageNum].drawText("당사자 정보가 없습니다. 당사자를 추가했는지 확인하세요!", currentPOS.X.toFloat() + body.Width / 2, currentPOS.Y.toFloat() + cellHeight / 2 + vcOffset , cellHeader) if (isRecording) { commandList.add(COMMAND("NoneContact", pageNum, "", "", currentPOS)) } // 아래 여백 linefeed() } }