[jboss-cvs] jboss-seam/src/pdf/org/jboss/seam/pdf ...
Norman Richards
norman.richards at jboss.com
Sun Dec 24 14:29:01 EST 2006
User: nrichards
Date: 06/12/24 14:29:01
Added: src/pdf/org/jboss/seam/pdf ITextUtils.java
Log:
update for the demo
Revision Changes Path
1.1 date: 2006/12/24 19:29:01; author: nrichards; state: Exp;jboss-seam/src/pdf/org/jboss/seam/pdf/ITextUtils.java
Index: ITextUtils.java
===================================================================
package org.jboss.seam.pdf;
import com.lowagie.text.*;
import com.lowagie.text.pdf.*;
public class ITextUtils {
/**
* not all itext objects accept a string value as input,
* so we'll copy that logic here.
*/
public static int alignmentValue(String alignment) {
if (ElementTags.ALIGN_CENTER.equalsIgnoreCase(alignment)) {
return Element.ALIGN_CENTER;
}
if (ElementTags.ALIGN_RIGHT.equalsIgnoreCase(alignment)) {
return Element.ALIGN_RIGHT;
}
if (ElementTags.ALIGN_JUSTIFIED.equalsIgnoreCase(alignment)) {
return Element.ALIGN_JUSTIFIED;
}
if (ElementTags.ALIGN_JUSTIFIED_ALL.equalsIgnoreCase(alignment)) {
return Element.ALIGN_JUSTIFIED_ALL;
}
return Element.ALIGN_LEFT;
}
}
More information about the jboss-cvs-commits
mailing list