1 6 7 package albel.tags.table.model; 8 9 13 public class Column 14 { 15 16 19 private String property; 20 private Table table; 21 22 25 private ColumnType type; 26 27 30 private int width; 31 32 35 private ColumnHeader header=new ColumnHeader(); 36 37 38 private Column() 39 { 40 } 41 42 public Column(Table table) 43 { 44 this.table=table; 45 } 46 public Column(Table table,String property) 47 { 48 this.table=table; 49 this.property=property; 50 } 51 public Table getTable() 52 { 53 return table; 54 } 55 public boolean equals(Object o) 56 { 57 if(o==null || !(o instanceof Column)) 58 return false; 59 return ((Column)o).getProperty().equals(getProperty()); 60 } 61 62 66 public String getProperty() 67 { 68 return this.property; 69 } 70 71 75 public void setProperty(String property) 76 { 77 this.property = property; 78 } 79 80 84 public ColumnType getType() 85 { 86 return this.type; 87 } 88 89 93 public void setType(ColumnType type) throws TableTagException 94 { 95 this.type = type; 96 } 97 98 102 public int getWidth() 103 { 104 return this.width; 105 } 106 107 111 public void setWidth(int width) 112 { 113 this.width = width; 114 } 115 116 120 public ColumnHeader getHeader() 121 { 122 return this.header; 123 } 124 125 129 public void setHeader(ColumnHeader header) 130 { 131 this.header = header; 132 } 133 134 } 135 | Popular Tags |