use of com.revolsys.ui.html.view.ElementLabel in project com.revolsys.open by revolsys.
the class HtmlUiBuilder method getAttributeLabel.
public Decorator getAttributeLabel(final String key, final Element element) {
final Map<String, Decorator> fieldLabels = getAttributeLabels();
Decorator fieldLabel = fieldLabels.get(key);
if (fieldLabel == null) {
final String label = getLabel(key, element);
final String instructions = getAttributeInstruction(key);
if (element instanceof Field) {
fieldLabel = new FieldLabelDecorator(label, instructions);
} else {
fieldLabel = new ElementLabel(label, instructions);
}
fieldLabels.put(key, fieldLabel);
}
return fieldLabel;
}
Aggregations