public void setHeight(int height) {
    super.setHeight(height);

    createTextMeasurer();
  }
  public void setWidth(int width) {
    super.setWidth(width);

    createTextMeasurer();
  }
 protected void ensureTextMeasurer() {
   if (textMeasurer == null) {
     createTextMeasurer();
   }
 }