public CaptionPosition getCaptionPositionFromElement(
com.google.gwt.user.client.Element captionWrap) {
RegExp captionPositionRegexp = RegExp.compile("v-caption-on-(\\S+)");
// Get caption position from the classname
MatchResult matcher = captionPositionRegexp.exec(captionWrap
.getClassName());
if (matcher == null || matcher.getGroupCount() < 2) {
return CaptionPosition.TOP;
}
String captionClass = matcher.getGroup(1);