001    package com.osbcp.css.constants;
002    
003    import java.io.Serializable;
004    
005    /**
006     * Values for the <i>vertical-align</i> property.
007     * 
008     * @see <a href="http://www.w3schools.com/cssref/pr_pos_vertical-align.asp">CSS vertical-align Property</a>
009     * @author <a href="mailto:christoffer@christoffer.me">Christoffer Pettersson</a>
010     */
011    
012    public enum VerticalAlign implements Serializable {
013    
014            /**
015             * Align the baseline of the element with the baseline of the parent element. This is default.
016             */
017            BASELINE,
018    
019            /**
020             *      Aligns the element as it was subscript.
021             */
022            SUB,
023    
024            /**
025             * Aligns the element as it was superscript.
026             */
027            SUPER,
028    
029            /**
030             * The top of the element is aligned with the top of the tallest element on the line.
031             */
032            TOP,
033    
034            /**
035             * The top of the element is aligned with the top of the parent element's font.
036             */
037            TEXT_TOP,
038    
039            /**
040             *      The element is placed in the middle of the parent element.
041             */
042            MIDDLE,
043    
044            /**
045             * The bottom of the element is aligned with the lowest element on the line.
046             */
047            BOTTOM,
048    
049            /**
050             * The bottom of the element is aligned with the bottom of the parent element's font.
051             */
052            TEXT_BOTTOM,
053    
054            /**
055             * Specifies that the value of the vertical-align property should be inherited from the parent element.
056             */
057            INHERIT;
058    
059            @Override
060            public String toString() {
061                    return name().toLowerCase().replace("_", "-");
062            }
063    
064    }