1 28 package net.sf.jasperreports.engine.xml; 29 30 import net.sf.jasperreports.engine.design.JRDesignSortField; 31 32 import org.xml.sax.Attributes ; 33 34 35 39 public class JRSortFieldFactory extends JRBaseFactory 40 { 41 42 43 46 private static final String ATTRIBUTE_name = "name"; 47 private static final String ATTRIBUTE_order = "order"; 48 49 50 53 public Object createObject(Attributes atts) 54 { 55 JRDesignSortField sortField = new JRDesignSortField(); 56 57 sortField.setName(atts.getValue(ATTRIBUTE_name)); 58 59 Byte order = (Byte )JRXmlConstants.getSortOrderMap().get(atts.getValue(ATTRIBUTE_order)); 60 if (order != null) 61 { 62 sortField.setOrder(order.byteValue()); 63 } 64 65 return sortField; 66 } 67 68 69 } 70 | Popular Tags |