1 58 package org.apache.ecs.wml; 59 60 import org.apache.ecs.*; 61 62 69 public class Table extends MultiPartElement 70 { 71 74 { 75 setElementType("table"); 76 } 77 78 public Table(int columns) 79 { 80 setCols(columns); 81 } 82 83 84 88 public Table setAlign(String align) 89 { 90 addAttribute("align",align); 91 return(this); 92 } 93 94 98 public Table setCols(int cols) 99 { 100 addAttribute("columns",Integer.toString(cols)); 101 return(this); 102 } 103 104 108 public Table setCols(String cols) 109 { 110 addAttribute("columns",cols); 111 return(this); 112 } 113 114 119 public Table addElement(String hashcode,Element element) 120 { 121 addElementToRegistry(hashcode,element); 122 return(this); 123 } 124 125 130 public Table addElement(String hashcode,String element) 131 { 132 addElementToRegistry(hashcode,element); 133 return(this); 134 } 135 136 140 public Table addElement(Element element) 141 { 142 addElementToRegistry(element); 143 return(this); 144 } 145 146 150 public Table addElement(String element) 151 { 152 addElementToRegistry(element); 153 return(this); 154 } 155 156 160 public Table removeElement(String hashcode) 161 { 162 removeElementFromRegistry(hashcode); 163 return(this); 164 } 165 166 } 167 | Popular Tags |