Element el = getElement(); Document doc = el.getDocument(); Segment seg = new Segment(); try { doc.getText(p0, p1 - p0, seg); } catch (BadLocationException ex) { AssertionError ae; ae = new AssertionError("BadLocationException must not be thrown " + "here"); ae.initCause(ex); throw ae; } FontMetrics fm = null; return Utilities.getTabbedTextWidth(seg, fm, 0, null, p0);
checkPainter(); return glyphPainter.getSpan(this, p0, p1, tabExpander, tabX);
  public float getPartialSpan(int p0, int p1)  {    Element el = getElement();    Document doc = el.getDocument();    Segment seg = new Segment();    try      {        doc.getText(p0, p1 - p0, seg);      }    catch (BadLocationException ex)      {	AssertionError ae;        ae = new AssertionError("BadLocationException must not be thrown "                                 + "here");	ae.initCause(ex);	throw ae;      }    FontMetrics fm = null; // Fetch font metrics somewhere.    return Utilities.getTabbedTextWidth(seg, fm, 0, null, p0);  }