/** * Applies alignment to a given list of fields * * @param alignment the alignment to apply * @param positions the positions of the fields that should be aligned */ public void setAlignment(FieldAlignment alignment, int... positions) { for (int position : positions) { setAlignment(position, alignment); } }
/** * Applies alignment to a given list of fields * * @param alignment the alignment to apply * @param names the names of the fields that should be aligned */ public void setAlignment(FieldAlignment alignment, String... names) { for (String name : names) { int position = indexOf(name); setAlignment(position, alignment); } }