1 7 package fr.improve.struts.taglib.layout.collection.header; 8 9 import java.util.ArrayList ; 10 import java.util.List ; 11 12 15 public class MultiLevelHeader { 16 protected String title; 17 protected String arg0; 18 protected String arg1; 19 protected String styleClass; 20 protected List childHeaders; 21 22 protected String tooltip; 23 24 protected int colSpan = 0; 25 protected int level = 0; 26 27 protected String sortProperty; 28 protected String width; 29 30 public MultiLevelHeader(String in_title, String in_arg0, String in_arg1, String in_styleClass, boolean in_lastLevel) { 31 title = in_title; 32 arg0 = in_arg0; 33 arg1 = in_arg1; 34 styleClass = in_styleClass; 35 colSpan = in_lastLevel?1:0; 36 if (in_title==null) { 37 level = -1; 39 } 40 } 41 42 public void setSortProperty(String in_sortProperty) { 43 sortProperty = in_sortProperty; 44 } 45 public void setWidth(String in_width) { 46 width = in_width; 47 } 48 49 public String getTitle() { 50 return title; 51 } 52 53 public int getColSpan() { 54 return colSpan; 55 } 56 57 public int getLevel() { 58 return level; 59 } 60 61 public String getStyleClass() { 62 return styleClass; 63 } 64 65 public String getArg0() { 66 return arg0; 67 } 68 public String getArg1() { 69 return arg1; 70 } 71 72 public String getSortProperty() { 73 return sortProperty; 74 } 75 public String getWidth() { 76 return width; 77 } 78 79 public List getChildHeaders() { 80 return childHeaders; 81 } 82 public String getTooltip() { 83 return tooltip; 84 } 85 public void setTooltip(String tooltip) { 86 this.tooltip = tooltip; 87 } 88 89 public void addHeader(MultiLevelHeader in_header) { 90 if (childHeaders==null) { 91 childHeaders = new ArrayList (); 92 } 93 level = Math.max(level, in_header.getLevel()+1); 94 childHeaders.add(in_header); 95 colSpan += in_header.getColSpan(); 96 } 97 } 98 | Popular Tags |