double percentage = parsePercent(percentWidth);
allocatedContentWidth = availableWidth * (percentage / 100);
reportActualRelativeWidth(Math.round((float) allocatedContentWidth));
}
AlignmentInfo alignment = getAlignment();
if (!alignment.isLeft()) {
double usedWidth;
if (isRelativeWidth()) {
usedWidth = allocatedContentWidth;
} else {
usedWidth = getWidgetWidth();
}
if (alignment.isHorizontalCenter()) {
currentLocation += (allocatedSpace - usedWidth) / 2d;
if (captionAboveCompnent) {
captionStyle.setLeft(
Math.round(usedWidth - captionWidth) / 2, Unit.PX);
}