@Override protected void paintTextRuns(@SuppressWarnings("rawtypes") List textRuns, Graphics2D g2d) { if (log.isTraceEnabled()) { log.trace("paintTextRuns: count = " + textRuns.size()); } if (!isSupported(g2d)) { super.paintTextRuns(textRuns, g2d); return; } for (Object textRun1 : textRuns) { TextRun textRun = (TextRun) textRun1; try { paintTextRun(textRun, g2d); } catch (IOException ioe) { //No other possibility than to use a RuntimeException throw new RuntimeException(ioe); } } }
/** * Paints the specified text node using the specified Graphics2D. * * @param node the text node to paint * @param g2d the Graphics2D to use */ public void paint(TextNode node, Graphics2D g2d) { AttributedCharacterIterator aci; aci = node.getAttributedCharacterIterator(); if (aci == null) return; List textRuns = getTextRuns(node, aci); // draw the underline and overline first, then the actual text // and finally the strikethrough paintDecorations(textRuns, g2d, TextSpanLayout.DECORATION_UNDERLINE); paintDecorations(textRuns, g2d, TextSpanLayout.DECORATION_OVERLINE); paintTextRuns(textRuns, g2d); paintDecorations (textRuns, g2d, TextSpanLayout.DECORATION_STRIKETHROUGH); }
/** * Paints the specified text node using the specified Graphics2D. * * @param node the text node to paint * @param g2d the Graphics2D to use */ public void paint(TextNode node, Graphics2D g2d) { AttributedCharacterIterator aci; aci = node.getAttributedCharacterIterator(); if (aci == null) return; List textRuns = getTextRuns(node, aci); // draw the underline and overline first, then the actual text // and finally the strikethrough paintDecorations(textRuns, g2d, TextSpanLayout.DECORATION_UNDERLINE); paintDecorations(textRuns, g2d, TextSpanLayout.DECORATION_OVERLINE); paintTextRuns(textRuns, g2d); paintDecorations (textRuns, g2d, TextSpanLayout.DECORATION_STRIKETHROUGH); }
/** * Paints the specified text node using the specified Graphics2D. * * @param node the text node to paint * @param g2d the Graphics2D to use */ public void paint(TextNode node, Graphics2D g2d) { AttributedCharacterIterator aci; aci = node.getAttributedCharacterIterator(); if (aci == null) return; List textRuns = getTextRuns(node, aci); // draw the underline and overline first, then the actual text // and finally the strikethrough paintDecorations(textRuns, g2d, TextSpanLayout.DECORATION_UNDERLINE); paintDecorations(textRuns, g2d, TextSpanLayout.DECORATION_OVERLINE); paintTextRuns(textRuns, g2d); paintDecorations (textRuns, g2d, TextSpanLayout.DECORATION_STRIKETHROUGH); }