void paintMeasurementString(int x, int y, int z, int radius, short colix,
                              boolean rightJustify, int yRef) {
    if (!showMeasurementNumbers)
      return;
    // XIE
    if(viewer instanceof ExtendedViewer) {
    	measurement.formatMeasurement();
    }
    if (!doJustify) {
      rightJustify = false;
      yRef = y;
    }
    String strMeasurement = measurement.strMeasurement;
    if (strMeasurement == null)
      return;
    int xT = x;
    if (rightJustify)
      xT -= radius / 2 + 2 + font3d.fontMetrics.stringWidth(strMeasurement);
    else
      xT += radius / 2 + 2;
    int yT = y
        + (yRef == 0 || yRef < y ? font3d.fontMetrics.getAscent() : -radius / 2);
    int zT = z - radius - 2;
    if (zT < 1)
      zT = 1;
    g3d.drawString(strMeasurement, font3d, colix, xT, yT, zT, zT);
  }