Java Code Examples for com.lowagie.text.Element#ALIGN_BASELINE

The following examples show how to use com.lowagie.text.Element#ALIGN_BASELINE . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: HtmlEncoder.java    From gcs with Mozilla Public License 2.0 6 votes vote down vote up
/**
* Translates the alignment value.
*
* @param   alignment   the alignment value
* @return  the translated value
*/
   
   public static String getAlignment(int alignment) {
       switch(alignment) {
           case Element.ALIGN_LEFT:
               return HtmlTags.ALIGN_LEFT;
           case Element.ALIGN_CENTER:
               return HtmlTags.ALIGN_CENTER;
           case Element.ALIGN_RIGHT:
               return HtmlTags.ALIGN_RIGHT;
           case Element.ALIGN_JUSTIFIED:
           case Element.ALIGN_JUSTIFIED_ALL:
               return HtmlTags.ALIGN_JUSTIFIED;
           case Element.ALIGN_TOP:
               return HtmlTags.ALIGN_TOP;
           case Element.ALIGN_MIDDLE:
               return HtmlTags.ALIGN_MIDDLE;
           case Element.ALIGN_BOTTOM:
               return HtmlTags.ALIGN_BOTTOM;
           case Element.ALIGN_BASELINE:
               return HtmlTags.ALIGN_BASELINE;
               default:
                   return "";
       }
   }
 
Example 2
Source File: HtmlEncoder.java    From itext2 with GNU Lesser General Public License v3.0 6 votes vote down vote up
/**
* Translates the alignment value.
*
* @param   alignment   the alignment value
* @return  the translated value
*/
   
   public static String getAlignment(int alignment) {
       switch(alignment) {
           case Element.ALIGN_LEFT:
               return HtmlTags.ALIGN_LEFT;
           case Element.ALIGN_CENTER:
               return HtmlTags.ALIGN_CENTER;
           case Element.ALIGN_RIGHT:
               return HtmlTags.ALIGN_RIGHT;
           case Element.ALIGN_JUSTIFIED:
           case Element.ALIGN_JUSTIFIED_ALL:
               return HtmlTags.ALIGN_JUSTIFIED;
           case Element.ALIGN_TOP:
               return HtmlTags.ALIGN_TOP;
           case Element.ALIGN_MIDDLE:
               return HtmlTags.ALIGN_MIDDLE;
           case Element.ALIGN_BOTTOM:
               return HtmlTags.ALIGN_BOTTOM;
           case Element.ALIGN_BASELINE:
               return HtmlTags.ALIGN_BASELINE;
               default:
                   return "";
       }
   }
 
Example 3
Source File: HtmlEncoder.java    From MesquiteCore with GNU Lesser General Public License v3.0 6 votes vote down vote up
/**
* Translates the alignment value.
*
* @param   alignment   the alignment value
* @return  the translated value
*/
   
   public static String getAlignment(int alignment) {
       switch(alignment) {
           case Element.ALIGN_LEFT:
               return HtmlTags.ALIGN_LEFT;
           case Element.ALIGN_CENTER:
               return HtmlTags.ALIGN_CENTER;
           case Element.ALIGN_RIGHT:
               return HtmlTags.ALIGN_RIGHT;
           case Element.ALIGN_JUSTIFIED:
           case Element.ALIGN_JUSTIFIED_ALL:
               return HtmlTags.ALIGN_JUSTIFIED;
           case Element.ALIGN_TOP:
               return HtmlTags.ALIGN_TOP;
           case Element.ALIGN_MIDDLE:
               return HtmlTags.ALIGN_MIDDLE;
           case Element.ALIGN_BOTTOM:
               return HtmlTags.ALIGN_BOTTOM;
           case Element.ALIGN_BASELINE:
               return HtmlTags.ALIGN_BASELINE;
               default:
                   return "";
       }
   }