Methods Summary |
---|
public TR | addRow(java.util.Iterator values, boolean header, java.lang.String cssClass)
TR row = new TR();
while(values.hasNext()) {
CSSElement tableData = null;
if(header)
tableData = new TH();
else
tableData = new TD();
tableData.addText(values.next());
setCSSClass(tableData, cssClass);
row.add(tableData);
}
add(row);
return row;
|
public TR | addRow(java.util.ArrayList elements, java.lang.String cssClass)
TR row = new TR();
for(int i=0; i<elements.size();i++){
TD tableData = new TD();
tableData.add((Element)elements.get(i));
setCSSClass(tableData, cssClass);
row.add(tableData);
}
add(row);
return row;
|
public java.lang.String | getAlignment()
return alignment;
|
public int | getBorder()
return border;
|
public int | getCellSpacing()
return cellSpacing;
|
public float | getWidth()
return width;
|
public boolean | isAbsoluteWidth()
return absoluteWidth;
|
public void | setAlignment(java.lang.String alignment)
this.alignment = alignment;
setAttribute("alignment",alignment );
|
private void | setAttribute(java.lang.String property, java.lang.String value)
if(!(property==null || value==null)){
List<Attribute> attributes= getAttributes(property);
if(attributes.size()==0){
addAttribute(property,value);
}
else{
Attribute attribute = attributes.get(0);
attribute.setValue(value);
}
}
|
public void | setBorder(int border)Sets the border attribute for the table
this.border = border;
setAttribute("border",String.valueOf(border));
|
private void | setCSSClass(CSSElement element, java.lang.String cssClass)
if(cssClass != null){
element.setCSSClass(cssClass);
}
|
public void | setCellSpacing(int cellSpacing)
this.cellSpacing = cellSpacing;
setAttribute("cellspacing", String.valueOf(cellSpacing));
|
public void | setWidth(float width, boolean absolute)
this.width = width;
this.absoluteWidth = absolute;
if(absolute){
setAttribute("width",String.valueOf(width));
}
else{
setAttribute("width",String.valueOf(width)+"%" );
}
|