private static HorizontalAlignment convertToOdaHorizontalAlignment(String tmpAlign) { if (tmpAlign == null) return HorizontalAlignment.get(HorizontalAlignment.AUTOMATIC); if (DesignChoiceConstants.TEXT_ALIGN_JUSTIFY.equalsIgnoreCase(tmpAlign)) return HorizontalAlignment.get(HorizontalAlignment.LEFT_AND_RIGHT); if (DesignChoiceConstants.TEXT_ALIGN_CENTER.equalsIgnoreCase(tmpAlign)) return HorizontalAlignment.get(HorizontalAlignment.CENTER); if (DesignChoiceConstants.TEXT_ALIGN_LEFT.equalsIgnoreCase(tmpAlign)) return HorizontalAlignment.get(HorizontalAlignment.LEFT); if (DesignChoiceConstants.TEXT_ALIGN_RIGHT.equalsIgnoreCase(tmpAlign)) return HorizontalAlignment.get(HorizontalAlignment.RIGHT); return null; }
static String convertToROMHorizontalAlignment(HorizontalAlignment tmpAlign) { if (tmpAlign == null) return null; switch (tmpAlign.getValue()) { case HorizontalAlignment.AUTOMATIC: return null; case HorizontalAlignment.CENTER: return DesignChoiceConstants.TEXT_ALIGN_CENTER; case HorizontalAlignment.LEFT: return DesignChoiceConstants.TEXT_ALIGN_LEFT; case HorizontalAlignment.RIGHT: return DesignChoiceConstants.TEXT_ALIGN_RIGHT; case HorizontalAlignment.LEFT_AND_RIGHT: return DesignChoiceConstants.TEXT_ALIGN_JUSTIFY; } return null; }