float span = 0;
  public float getPreferredSpan(int axis)  {    if (axis != X_AXIS && axis != Y_AXIS)      throw new IllegalArgumentException();    // make sure we have the metrics    updateMetrics();    float span = 0;    Element el = getElement();    switch (axis)      {      case X_AXIS:        span = determineMaxLineLength();      case Y_AXIS:      default:        span = metrics.getHeight() * el.getElementCount();        break;      }    return span;  }