// Creating nine-patch icon
final NinePatchIcon ninePatchIcon = NinePatchIcon.create ( shade );
ninePatchIcon.addHorizontalStretch ( 0, shadeWidth + inner, true );
ninePatchIcon.addHorizontalStretch ( shadeWidth + inner + 1, width - shadeWidth - inner - 1, false );
ninePatchIcon.addHorizontalStretch ( width - shadeWidth - inner, width, true );
ninePatchIcon.addVerticalStretch ( 0, shadeWidth + inner, true );
ninePatchIcon.addVerticalStretch ( shadeWidth + inner + 1, width - shadeWidth - inner - 1, false );
ninePatchIcon.addVerticalStretch ( width - shadeWidth - inner, width, true );
ninePatchIcon.setMargin ( shadeWidth );
return ninePatchIcon;
}