Color foreground = view.getForeground(); g.setColor(foreground); Utilities.drawTabbedText(txt, bounds.x, bounds.y, g, tabEx, txt.offset);
Color background = view.getBackground(); g.setColor(background); int width = Utilities.getTabbedTextWidth(txt, g.getFontMetrics(), bounds.x, tabEx, txt.offset); g.fillRect(bounds.x, bounds.y, width, height);   g.setColor(view.getForeground()); g.setFont(view.getFont()); if (view.isSuperscript())  Utilities.drawTabbedText(txt, bounds.x, bounds.y - height / 2, g, tabEx, txt.offset); else if (view.isSubscript())  Utilities.drawTabbedText(txt, bounds.x, bounds.y + height / 2, g, tabEx, txt.offset); else Utilities.drawTabbedText(txt, bounds.x, bounds.y, g, tabEx, txt.offset);  if (view.isStikeThrough()) { int strikeHeight = (int) (getAscent(view) / 2); g.drawLine(bounds.x, bounds.y + strikeHeight, bounds.height + width, bounds.y + strikeHeight); } if (view.isUnderline()) { int lineHeight = (int) getAscent(view); g.drawLine(bounds.x, bounds.y + lineHeight, bounds.height + width, bounds.y + lineHeight); }
    public void paint(GlyphView view, Graphics g, Shape a, int p0,                      int p1)    {      int height = (int) getHeight(view);      Segment txt = view.getText(p0, p1);      Rectangle bounds = a.getBounds();      TabExpander tabEx = null;      View parent = view.getParent();      if (parent instanceof TabExpander)        tabEx = (TabExpander) parent;      // FIXME: Set character attributes like font-family, font-size, colors.      Color foreground = view.getForeground();      g.setColor(foreground);      Utilities.drawTabbedText(txt, bounds.x, bounds.y, g, tabEx,                               txt.offset);    }