1 28 package net.sf.jasperreports.crosstabs.xml; 29 30 import net.sf.jasperreports.crosstabs.design.JRDesignCrosstabColumnGroup; 31 import net.sf.jasperreports.engine.xml.JRXmlConstants; 32 33 import org.xml.sax.Attributes ; 34 35 39 public class JRCrosstabColumnGroupFactory extends JRCrosstabGroupFactory 40 { 41 public static final String ATTRIBUTE_height = "height"; 42 public static final String ATTRIBUTE_headerPosition = "headerPosition"; 43 44 public Object createObject(Attributes attributes) 45 { 46 JRDesignCrosstabColumnGroup group = new JRDesignCrosstabColumnGroup(); 47 48 setGroupAtts(attributes, group); 49 50 String heightAttr = attributes.getValue(ATTRIBUTE_height); 51 if (heightAttr != null) 52 { 53 group.setHeight(Integer.parseInt(heightAttr)); 54 } 55 56 String posAttr = attributes.getValue(ATTRIBUTE_headerPosition); 57 if (posAttr != null) 58 { 59 Byte pos = (Byte ) JRXmlConstants.getCrosstabColumnPositionMap().get(posAttr); 60 group.setPosition(pos.byteValue()); 61 } 62 63 return group; 64 } 65 66 } 67 | Popular Tags |