18 package org.turro.zkoss.label;
20 import org.zkoss.zk.ui.HtmlBasedComponent;
21 import org.zkoss.zul.Cell;
22 import org.zkoss.zul.Grid;
23 import org.zkoss.zul.Rows;
24 import org.zkoss.zul.Separator;
33 private String labelStyle =
"color:gray;padding-right:10px;", valueStyle =
"";
38 setOddRowSclass(
"none");
46 this.labelStyle = labelStyle;
54 this.valueStyle = valueStyle;
62 if(labelStyle !=
null) label.setStyle(labelStyle);
63 if(valueStyle !=
null) value.setStyle(valueStyle);
65 row.appendChild(label);
66 row.appendChild(value);
67 rows.appendChild(row);
76 if(labelStyle !=
null) caption.setStyle(labelStyle);
77 if(valueStyle !=
null) value.setStyle(valueStyle);
79 Cell cell =
new Cell();
81 cell.appendChild(caption);
82 row.appendChild(cell);
83 rows.appendChild(row);
87 cell.appendChild(value);
88 row.appendChild(cell);
89 rows.appendChild(row);
99 Cell cell =
new Cell();
101 cell.appendChild(button);
102 row.appendChild(cell);
103 rows.appendChild(row);
113 Separator separator =
new Separator(
"vertical");
114 separator.setSpacing(spacing);
115 Cell cell =
new Cell();
117 cell.appendChild(separator);
118 row.appendChild(cell);
119 rows.appendChild(row);
void setValueStyle(String valueStyle)
void setLabelStyle(String labelStyle)
LabelValueRow addCaptionValue(HtmlBasedComponent caption, HtmlBasedComponent value)
void addSpace(String spacing)
LabelValueRow addLabelValue(HtmlBasedComponent label, HtmlBasedComponent value)
LabelValueRow addButton(HtmlBasedComponent button)