1 28 package net.sf.jasperreports.crosstabs.design; 29 30 import net.sf.jasperreports.crosstabs.base.JRBaseCrosstabGroup; 31 import net.sf.jasperreports.engine.JRVariable; 32 import net.sf.jasperreports.engine.design.JRDesignVariable; 33 34 40 public abstract class JRDesignCrosstabGroup extends JRBaseCrosstabGroup 41 { 42 protected JRDesignVariable designVariable; 43 44 protected JRDesignCrosstabGroup() 45 { 46 super(); 47 48 variable = designVariable = new JRDesignVariable(); 49 designVariable.setCalculation(JRVariable.CALCULATION_SYSTEM); 50 designVariable.setSystemDefined(true); 51 52 header = new JRDesignCellContents(); 53 totalHeader = new JRDesignCellContents(); 54 } 55 56 57 63 public void setName(String name) 64 { 65 this.name = name; 66 designVariable.setName(name); 67 } 68 69 70 76 public void setTotalPosition(byte totalPosition) 77 { 78 this.totalPosition = totalPosition; 79 } 80 81 82 88 public void setBucket(JRDesignCrosstabBucket bucket) 89 { 90 this.bucket = bucket; 91 } 92 93 94 100 public void setHeader(JRDesignCellContents header) 101 { 102 if (header == null) 103 { 104 header = new JRDesignCellContents(); 105 } 106 107 this.header = header; 108 } 109 110 111 117 public void setTotalHeader(JRDesignCellContents totalHeader) 118 { 119 if (totalHeader == null) 120 { 121 totalHeader = new JRDesignCellContents(); 122 } 123 124 this.totalHeader = totalHeader; 125 } 126 } 127 | Popular Tags |