public static int AlignmentValue(String alignment) {
if (alignment == null) return Element.ALIGN_UNDEFINED;
if (Util.EqualsIgnoreCase(ALIGN_CENTER, alignment)) {
return Element.ALIGN_CENTER;
}
if (Util.EqualsIgnoreCase(ALIGN_LEFT, alignment)) {
return Element.ALIGN_LEFT;
}
if (Util.EqualsIgnoreCase(ALIGN_RIGHT, alignment)) {
return Element.ALIGN_RIGHT;
}
if (Util.EqualsIgnoreCase(ALIGN_JUSTIFIED, alignment)) {
return Element.ALIGN_JUSTIFIED;
}
if (Util.EqualsIgnoreCase(ALIGN_JUSTIFIED_ALL, alignment)) {
return Element.ALIGN_JUSTIFIED_ALL;
}
if (Util.EqualsIgnoreCase(ALIGN_TOP, alignment)) {
return Element.ALIGN_TOP;
}
if (Util.EqualsIgnoreCase(ALIGN_MIDDLE, alignment)) {
return Element.ALIGN_MIDDLE;
}
if (Util.EqualsIgnoreCase(ALIGN_BOTTOM, alignment)) {
return Element.ALIGN_BOTTOM;
}
if (Util.EqualsIgnoreCase(ALIGN_BASELINE, alignment)) {
return Element.ALIGN_BASELINE;
}
return Element.ALIGN_UNDEFINED;
}