private void traverse(Figure figure, Graphics graphics) { List children = figure.getChildren(); for (Iterator i = children.iterator(); i.hasNext(); ) { Figure object = (Figure)i.next(); if (object instanceof GenericGroupFigure) { GenericGroupFigure fig = (GenericGroupFigure) object; if (fig.hasText()) graphics.drawText(fig.getText(), fig.getTextCoordinates()); } traverse(object, graphics); } }
private void drawText(Graphics graphics) { String[] strings = splitString(getText()); int y = 0; int lineHeight = FigureUtilities.getFontMetrics(getFont()).getHeight(); for (int i = 0; i < strings.length; i++) { graphics.drawText(getSubStringText(strings[i]), 0, y); y += lineHeight; } }
if (frag._offset >= end || frag._offset + frag._length <= start) { g.drawText(draw, frag._x, frag._y); paintTextDecoration(g, frag.getRectangle(), textDecoration); } else if (frag._offset >= start .getTextExtents(draw, font).width, frag .getHeight()); g.drawText(draw, frag._x, frag._y); paintTextDecoration(g, frag.getRectangle(), textDecoration); } else { g.drawText(draw, frag._x, frag._y); g.fillRectangle(frag._x + x, frag._y, dimension.width - x, dimension.height); g.drawText(skip + todraw, frag._x, frag._y); if (color != null) { g.setForegroundColor(color); g.setForegroundColor(originalForeground); g.drawText(skip, frag._x, frag._y); paintTextDecoration(g, frag.getRectangle(), textDecoration);
g.setForegroundColor(color); g.drawText(draw, frag._x, frag._y); if ((textDecoration & TextDecorationMeta.UNDERLINE) != 0) { g.drawLine(frag._x, frag._y + frag.getHeight() - 1, frag._x