code: private void setAlignments(String encodedAlignments, boolean horizontalThenVertical) {
          StringTokenizer tokenizer = new StringTokenizer(encodedAlignments, " ,");
          Alignment first = decodeAlignment(tokenizer.nextToken());
          Alignment second = decodeAlignment(tokenizer.nextToken());
          hAlign = horizontalThenVertical ? first : second;
          vAlign = horizontalThenVertical ? second : first;
          ensureValidOrientations(hAlign, vAlign);
      }
docs: Decodes a string description for the horizontal and vertical alignment and sets this
  CellConstraints' alignment values. If the boolean is {@code true} the horizontal alignment is
  the first token, and the vertical alignment is the second token. if the boolean is
  {@code false} the vertical alignment comes first.
  <p>
  
  Valid horizontal alignments are: left, center, right, default, and fill. Valid vertical
  alignments are: top, center, bottom, default, and fill. The anchor's string representation
  abbreviates the alignment: l, c, r, d, f, t, and b.<p>
  
  Anchor examples: "c, c" is centered, "l, t" is northwest, "c, t" is north, "r, c" east. "c,
  d" is horizontally centered and uses the row's default alignment. "d, t" is on top of the
  cell and uses the column's default alignment.<p>
  
  @param encodedAlignments represents horizontal and vertical alignment
  @throws IllegalArgumentException if an alignment orientation is invalid