|
|
|
@ -15,6 +15,7 @@ public class ModifiedVerifyContentCellWriteHandler implements CellWriteHandler { |
|
|
|
private static final int MODIFIED_VERIFY_CONTENT_COLUMN_INDEX = 6; |
|
|
|
private static final int MODIFIED_VERIFY_CONTENT_COLUMN_INDEX = 6; |
|
|
|
|
|
|
|
|
|
|
|
private Font labelFont; |
|
|
|
private Font labelFont; |
|
|
|
|
|
|
|
private Font arrowFont; |
|
|
|
private CellStyle wrappedStyle; |
|
|
|
private CellStyle wrappedStyle; |
|
|
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
@Override |
|
|
|
@ -38,6 +39,10 @@ public class ModifiedVerifyContentCellWriteHandler implements CellWriteHandler { |
|
|
|
if (separatorIndex > 0) { |
|
|
|
if (separatorIndex > 0) { |
|
|
|
richText.applyFont(offset, offset + separatorIndex, getLabelFont(workbook)); |
|
|
|
richText.applyFont(offset, offset + separatorIndex, getLabelFont(workbook)); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
int arrowIndex = line.indexOf('→', separatorIndex + 1); |
|
|
|
|
|
|
|
if (arrowIndex >= 0) { |
|
|
|
|
|
|
|
richText.applyFont(offset + arrowIndex, offset + arrowIndex + 1, getArrowFont(workbook)); |
|
|
|
|
|
|
|
} |
|
|
|
offset += line.length() + 1; |
|
|
|
offset += line.length() + 1; |
|
|
|
} |
|
|
|
} |
|
|
|
float requiredHeight = Math.max(cell.getRow().getHeightInPoints(), lines.length * 18F); |
|
|
|
float requiredHeight = Math.max(cell.getRow().getHeightInPoints(), lines.length * 18F); |
|
|
|
@ -54,6 +59,15 @@ public class ModifiedVerifyContentCellWriteHandler implements CellWriteHandler { |
|
|
|
return labelFont; |
|
|
|
return labelFont; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private Font getArrowFont(Workbook workbook) { |
|
|
|
|
|
|
|
if (arrowFont == null) { |
|
|
|
|
|
|
|
arrowFont = workbook.createFont(); |
|
|
|
|
|
|
|
arrowFont.setBold(true); |
|
|
|
|
|
|
|
arrowFont.setColor(IndexedColors.RED.getIndex()); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
return arrowFont; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
private void applyWrappedStyle(Workbook workbook, Cell cell) { |
|
|
|
private void applyWrappedStyle(Workbook workbook, Cell cell) { |
|
|
|
if (wrappedStyle == null) { |
|
|
|
if (wrappedStyle == null) { |
|
|
|
wrappedStyle = workbook.createCellStyle(); |
|
|
|
wrappedStyle = workbook.createCellStyle(); |
|
|
|
|