/** * Compute the cumulative height occupied by the text * * @return the height in points */ public double getTextHeight() { return getTextHeight(null); }
@Override public double getTextHeight(Graphics2D graphics) { DrawFactory drawFact = DrawFactory.getInstance(graphics); DrawTextShape dts = drawFact.getDrawable(this); return dts.getTextHeight(graphics); }
break; case BOTTOM: textHeight = getTextHeight(graphics); y += anchor.getHeight() - textHeight - insets.bottom; break; case MIDDLE: textHeight = getTextHeight(graphics); double delta = anchor.getHeight() - textHeight - insets.top - insets.bottom; y += insets.top + delta/2;
maxHeight = Math.max(maxHeight, dts.getTextHeight());
/** * Compute the cumulative height occupied by the text * * @return the height in points */ public double getTextHeight() { return getTextHeight(null); }
@Override public double getTextHeight(Graphics2D graphics) { DrawFactory drawFact = DrawFactory.getInstance(graphics); DrawTextShape dts = drawFact.getDrawable(this); return dts.getTextHeight(graphics); }
@Override public double getTextHeight(Graphics2D graphics) { DrawFactory drawFact = DrawFactory.getInstance(graphics); DrawTextShape dts = drawFact.getDrawable(this); return dts.getTextHeight(graphics); }
break; case BOTTOM: textHeight = getTextHeight(graphics); y += anchor.getHeight() - textHeight - insets.bottom; break; case MIDDLE: textHeight = getTextHeight(graphics); double delta = anchor.getHeight() - textHeight - insets.top - insets.bottom; y += insets.top + delta/2;
maxHeight = Math.max(maxHeight, dts.getTextHeight());