convertDropDownToValue static method

Alignment convertDropDownToValue(
  1. String key
)

Implementation

static Alignment convertDropDownToValue(final String key) {
  var align = Alignment.topLeft;
  if (key == 'Top Center') align = Alignment.topCenter;
  if (key == 'Top Right') align = Alignment.topRight;
  if (key == 'Center Left') align = Alignment.centerLeft;
  if (key == 'Center') align = Alignment.center;
  if (key == 'Center Right') align = Alignment.centerRight;
  if (key == 'Bottom Left') align = Alignment.bottomLeft;
  if (key == 'Bottom Center') align = Alignment.bottomCenter;
  if (key == 'Bottom Right') align = Alignment.bottomRight;
  return align;
}