/** * 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); }