001    package com.osbcp.css.constants;
002    
003    import java.io.Serializable;
004    
005    /**
006     * Values for the <i>white-space</i> property.
007     * 
008     * @see <a href="http://www.w3schools.com/cssref/pr_text_white-space.asp">CSS white-space Property</a>
009     * @author <a href="mailto:christoffer@christoffer.me">Christoffer Pettersson</a>
010     */
011    
012    public enum WhiteSpace implements Serializable {
013    
014            /**
015             *      Sequences of whitespace will collapse into a single whitespace. Text will wrap when necessary. This is default.
016             */
017            NORMAL,
018    
019            /**
020             * Sequences of whitespace will collapse into a single whitespace. Text will never wrap to the next line. The text continues on the same line until a &lt;br /&gt; tag is encountered.
021             */
022            NOWRAP,
023    
024            /**
025             * Whitespace is preserved by the browser. Text will only wrap on line breaks Acts like the &lt;pre&gt; tag in HTML.
026             */
027            PRE,
028    
029            /**
030             * Sequences of whitespace will collapse into a single whitespace. Text will wrap when necessary, and on line breaks.
031             */
032            PRE_LINE,
033    
034            /**
035             *      Whitespace is preserved by the browser. Text will wrap when necessary, and on line breaks.
036             */
037            PRE_WRAP,
038    
039            /**
040             *      Specifies that the value of the white-space property should be inherited from the parent element.
041             */
042            INHERIT;
043    
044            @Override
045            public String toString() {
046                    return name().toLowerCase().replace("_", "-");
047            }
048    
049    }