aboutsummaryrefslogtreecommitdiffstats
path: root/src/org/apache/fop/layout/AreaClass.java
blob: 764fd6cca4487f8942c96b74b2696c4d2d5b6ae3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
/* $Id$
 * Copyright (C) 2001 The Apache Software Foundation. All rights reserved.
 * For details on use and redistribution please refer to the
 * LICENSE file included with these sources.
 */

package org.apache.fop.layout;

import org.apache.fop.apps.FOPException;

public class AreaClass {
	public static String UNASSIGNED = "unassigned";

	public static String XSL_NORMAL = "xsl-normal";
	public static String XSL_ABSOLUTE = "xsl-absolute";
	public static String XSL_FOOTNOTE = "xsl-footnote";
	public static String XSL_SIDE_FLOAT = "xsl-side-float";
	public static String XSL_BEFORE_FLOAT = "xsl-before-float";
	
	// checker method
	public static String setAreaClass(String areaClass)
		throws FOPException {
		if (areaClass.equals(XSL_NORMAL) || areaClass.equals(XSL_ABSOLUTE) ||
			areaClass.equals(XSL_FOOTNOTE) || areaClass.equals(XSL_SIDE_FLOAT) ||
			areaClass.equals(XSL_BEFORE_FLOAT))
			return areaClass;
		else
			throw new FOPException("Unknown area class '" + areaClass + "'");
	}
}