
com.viaoa.web.html.HtmlColGroup Maven / Gradle / Ivy
package com.viaoa.web.html;
import java.util.*;
/**
* Control and Html colgroup element.
*
* @author vince
*/
public class HtmlColGroup extends HtmlElement {
private final List alCol = new ArrayList<>();
public HtmlColGroup() {
this(null);
}
public HtmlColGroup(String id) {
super(id);
}
public void addCol(HtmlCol col) {
this.alCol.add(col);
}
public List getCols() {
return alCol;
}
protected String createHtml() {
final StringBuilder sb = new StringBuilder();
sb.append("");
for (HtmlCol col : getCols()) {
sb.append(col.createHtml());
}
sb.append(" ");
return sb.toString();
}
private static Set hsSupported = new HashSet(); // lowercase
static {
// hsSupported.add("enabled");
}
public boolean isSupported(String name) {
if (name == null) return false;
return super.isSupported(name) || hsSupported.contains(name.toLowerCase());
}
}