com.osbcp.css.constants
Enum WhiteSpace

java.lang.Object
  extended by java.lang.Enum<WhiteSpace>
      extended by com.osbcp.css.constants.WhiteSpace
All Implemented Interfaces:
java.io.Serializable, java.lang.Comparable<WhiteSpace>

public enum WhiteSpace
extends java.lang.Enum<WhiteSpace>
implements java.io.Serializable

Values for the white-space property.

Author:
Christoffer Pettersson
See Also:
CSS white-space Property

Enum Constant Summary
INHERIT
          Specifies that the value of the white-space property should be inherited from the parent element.
NORMAL
          Sequences of whitespace will collapse into a single whitespace.
NOWRAP
          Sequences of whitespace will collapse into a single whitespace.
PRE
          Whitespace is preserved by the browser.
PRE_LINE
          Sequences of whitespace will collapse into a single whitespace.
PRE_WRAP
          Whitespace is preserved by the browser.
 
Method Summary
 java.lang.String toString()
           
static WhiteSpace valueOf(java.lang.String name)
          Returns the enum constant of this type with the specified name.
static WhiteSpace[] values()
          Returns an array containing the constants of this enum type, in the order they are declared.
 
Methods inherited from class java.lang.Enum
compareTo, equals, getDeclaringClass, hashCode, name, ordinal, valueOf
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

NORMAL

public static final WhiteSpace NORMAL
Sequences of whitespace will collapse into a single whitespace. Text will wrap when necessary. This is default.


NOWRAP

public static final WhiteSpace NOWRAP
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 <br /> tag is encountered.


PRE

public static final WhiteSpace PRE
Whitespace is preserved by the browser. Text will only wrap on line breaks Acts like the <pre> tag in HTML.


PRE_LINE

public static final WhiteSpace PRE_LINE
Sequences of whitespace will collapse into a single whitespace. Text will wrap when necessary, and on line breaks.


PRE_WRAP

public static final WhiteSpace PRE_WRAP
Whitespace is preserved by the browser. Text will wrap when necessary, and on line breaks.


INHERIT

public static final WhiteSpace INHERIT
Specifies that the value of the white-space property should be inherited from the parent element.

Method Detail

values

public static WhiteSpace[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
for (WhiteSpace c : WhiteSpace.values())
    System.out.println(c);

Returns:
an array containing the constants of this enum type, in the order they are declared

valueOf

public static WhiteSpace valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)

Parameters:
name - the name of the enum constant to be returned.
Returns:
the enum constant with the specified name
Throws:
java.lang.IllegalArgumentException - if this enum type has no constant with the specified name
java.lang.NullPointerException - if the argument is null

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Enum<WhiteSpace>