1 28 package net.sf.jasperreports.engine.design; 29 30 import java.util.List ; 31 import java.util.ArrayList ; 32 33 import net.sf.jasperreports.engine.JRStyle; 34 import net.sf.jasperreports.engine.JRConditionalStyle; 35 import net.sf.jasperreports.engine.base.JRBaseStyle; 36 37 41 public class JRDesignStyle extends JRBaseStyle 42 { 43 44 47 private static final long serialVersionUID = 10001; 48 49 private List conditionalStylesList = new ArrayList (); 50 51 52 55 public JRDesignStyle() 56 { 57 } 58 59 62 public void setName(String name) 63 { 64 this.name = name; 65 } 66 67 70 public void setDefault(boolean isDefault) 71 { 72 this.isDefault = isDefault; 73 } 74 75 78 public void setParentStyle(JRStyle parentStyle) 79 { 80 this.parentStyle = parentStyle; 81 } 82 83 86 public void addConditionalStyle(JRConditionalStyle conditionalStyle) 87 { 88 conditionalStylesList.add(conditionalStyle); 89 } 90 91 94 public boolean removeConditionalStyle(JRConditionalStyle conditionalStyle) 95 { 96 return conditionalStylesList.remove(conditionalStyle); 97 } 98 99 102 public JRConditionalStyle[] getConditionalStyles() 103 { 104 return (JRConditionalStyle[]) conditionalStylesList.toArray(new JRDesignConditionalStyle[conditionalStylesList.size()]); 105 } 106 107 110 public List getConditionalStyleList() 111 { 112 return conditionalStylesList; 113 } 114 115 } 116 | Popular Tags |