public void redrawScale() {
    Image image = attribute.getImage();
    setNinePatchedImages(image);
    resizeScrollBar();

    canvas.redraw();
  }
  public void setNinePatchedImages(Image image) {

    int width = image.getImageData().width;
    int height = image.getImageData().height;
    int scaleValue = attribute.getScaleValue();

    disposePatchedImage();
    patchedWidthImage = NinePatchImage2.getImage(width * scaleValue, height, image);
    contentWidthData = NinePatchImage2.getContentData(width * scaleValue, height, image);
    patchedHeightImage = NinePatchImage2.getImage(width, height * scaleValue, image);
    contentHeightData = NinePatchImage2.getContentData(width, height * scaleValue, image);
    patchedBothImage = NinePatchImage2.getImage(scaleValue, image);
    contentBothData = NinePatchImage2.getContentData(scaleValue, image);
  }
 private void init() {
   setNinePatchedImages(attribute.getImage());
 }