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