/** * Returns string representation of horizontal alignment. * * @return horizontal alignment as CSS value */ public String getHorizontalAlignment() { if (isRight()) { return "right"; } else if (isCenter()) { return "center"; } return "left"; }
/** * Writes the alignment to the given child element attributes. * * @since 7.6.4 * @param childElement * the child element * @param alignment * the component alignment */ public static void writeAlignment(Element childElement, Alignment alignment) { if (alignment.isMiddle()) { childElement.attr(":middle", true); } else if (alignment.isBottom()) { childElement.attr(":bottom", true); } if (alignment.isCenter()) { childElement.attr(":center", true); } else if (alignment.isRight()) { childElement.attr(":right", true); } }
childElement.attr(":bottom", true); if (alignment.isCenter()) { childElement.attr(":center", true); } else if (alignment.isRight()) {