com.flagstone.transform.fillstyle
Enum Spread

java.lang.Object
  extended by java.lang.Enum<Spread>
      extended by com.flagstone.transform.fillstyle.Spread
All Implemented Interfaces:
Serializable, Comparable<Spread>

public enum Spread
extends Enum<Spread>

The Spread describes how the gradient is used to fill the available shape when the area to be filled is larger than the area covered by the gradient.


Enum Constant Summary
PAD
          The last colour of the gradient is used to fill the remaining area.
REFLECT
          The gradient is reflected (repeatedly reversing the gradient) across the area to be filled.
REPEAT
          The gradient is repeated across the area to be filled.
 
Method Summary
static Spread fromInt(int value)
          Returns the Spread for a given type.
 int getValue()
          Get the value used to represent the Spread when it is encoded.
static Spread valueOf(String name)
          Returns the enum constant of this type with the specified name.
static Spread[] values()
          Returns an array containing the constants of this enum type, in the order they are declared.
 
Methods inherited from class java.lang.Enum
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

PAD

public static final Spread PAD
The last colour of the gradient is used to fill the remaining area.


REFLECT

public static final Spread REFLECT
The gradient is reflected (repeatedly reversing the gradient) across the area to be filled.


REPEAT

public static final Spread REPEAT
The gradient is repeated across the area to be filled.

Method Detail

values

public static Spread[] 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 (Spread c : Spread.values())
    System.out.println(c);

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

valueOf

public static Spread valueOf(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:
IllegalArgumentException - if this enum type has no constant with the specified name
NullPointerException - if the argument is null

fromInt

public static Spread fromInt(int value)
Returns the Spread for a given type.

Parameters:
value - the type that identifies the Spread when it is encoded.
Returns:
a shared instance of the object representing a given Spread type.

getValue

public int getValue()
Get the value used to represent the Spread when it is encoded.

Returns:
the encoded value for the Spread.


Copyright © 2002-2010 Flagstone Software Ltd.. All Rights Reserved.