diff options
Diffstat (limited to 'src/java/org/apache/fop/render/afp/AFPShadingMode.java')
-rw-r--r-- | src/java/org/apache/fop/render/afp/AFPShadingMode.java | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/src/java/org/apache/fop/render/afp/AFPShadingMode.java b/src/java/org/apache/fop/render/afp/AFPShadingMode.java index b45c33a8e..c2ae21f74 100644 --- a/src/java/org/apache/fop/render/afp/AFPShadingMode.java +++ b/src/java/org/apache/fop/render/afp/AFPShadingMode.java @@ -22,15 +22,12 @@ package org.apache.fop.render.afp; import java.io.ObjectStreamException; import java.io.Serializable; -/** Enumeration class for the AFP shading mode. */ -public final class AFPShadingMode implements Serializable { - - private static final long serialVersionUID = 8579867898716480779L; - +/** Enumeration of the AFP shading modes. */ +public enum AFPShadingMode implements Serializable { /** the color mode (the default) */ - public static final AFPShadingMode COLOR = new AFPShadingMode("COLOR"); + COLOR("COLOR"), /** the dithered mode */ - public static final AFPShadingMode DITHERED = new AFPShadingMode("DITHERED"); + DITHERED("DITHERED"); private String name; @@ -52,7 +49,7 @@ public final class AFPShadingMode implements Serializable { * @param name the name of the enumeration value * @return the enumeration object */ - public static AFPShadingMode valueOf(String name) { + public static AFPShadingMode getValueOf(String name) { if (COLOR.getName().equalsIgnoreCase(name)) { return COLOR; } else if (DITHERED.getName().equalsIgnoreCase(name)) { @@ -70,5 +67,4 @@ public final class AFPShadingMode implements Serializable { public String toString() { return getClass().getName() + ":" + name; } - } |