1 51 package org.apache.fop.layout; 52 53 import org.apache.fop.apps.FOPException; 54 55 public class AreaClass { 56 public static final String UNASSIGNED = "unassigned"; 57 58 public static final String XSL_NORMAL = "xsl-normal"; 59 public static final String XSL_ABSOLUTE = "xsl-absolute"; 60 public static final String XSL_FOOTNOTE = "xsl-footnote"; 61 public static final String XSL_SIDE_FLOAT = "xsl-side-float"; 62 public static final String XSL_BEFORE_FLOAT = "xsl-before-float"; 63 64 public static String setAreaClass(String areaClass) throws FOPException { 66 if (areaClass.equals(XSL_NORMAL) || areaClass.equals(XSL_ABSOLUTE) 67 || areaClass.equals(XSL_FOOTNOTE) 68 || areaClass.equals(XSL_SIDE_FLOAT) 69 || areaClass.equals(XSL_BEFORE_FLOAT)) 70 return areaClass; 71 else 72 throw new FOPException("Unknown area class '" + areaClass + "'"); 73 } 74 75 } 76 77 | Popular Tags |