case CalculatedStyle.LEFT:
return (int)(margin.left() + border.left() + padding.left());
case CalculatedStyle.RIGHT:
return (int)(margin.right() + border.right() + padding.right());
case CalculatedStyle.TOP:
return (int)(margin.top() + border.top() + padding.top());
case CalculatedStyle.BOTTOM:
return (int)(margin.bottom() + border.bottom() + padding.bottom());
default:
throw new IllegalArgumentException();
}