use of com.codename1.rad.nodes.FieldNode in project CodeRAD by shannah.
the class UI method textField.
public static FieldNode textField(Attribute... atts) {
FieldNode fieldNode = new FieldNode(atts);
fieldNode.setAttributes(TEXT);
return fieldNode;
}
use of com.codename1.rad.nodes.FieldNode in project CodeRAD by shannah.
the class UI method checkboxList.
public static FieldNode checkboxList(Attribute... atts) {
FieldNode fieldNode = new FieldNode(atts);
fieldNode.setAttributes(CHECKBOX_LIST);
return fieldNode;
}
use of com.codename1.rad.nodes.FieldNode in project CodeRAD by shannah.
the class UIBuilder method textArea.
public TextAreaPropertyView textArea(Tag... tags) {
FieldNode fn = new FieldNode(UI.tags(tags));
fn.setParent(parentNode);
return new TextAreaPropertyView(new TextArea(), entity, fn);
}
use of com.codename1.rad.nodes.FieldNode in project CodeRAD by shannah.
the class SectionNode method setAttributes.
public void setAttributes(Attribute... atts) {
if (fields == null) {
fields = new Fields();
}
for (Attribute att : atts) {
if (att.getClass() == FieldNode.class) {
att = ((FieldNode) att).createProxy(this);
fields.add((FieldNode) att);
// ((FieldNode)att).setParent(this);
} else {
super.setAttributes(att);
}
}
}
use of com.codename1.rad.nodes.FieldNode in project CodeRAD by shannah.
the class DefaultPropertyViewFactory method createPropertyView.
@Override
public PropertyView createPropertyView(Entity entity, FieldNode field) {
PropertyViewFactory typeFactory = registry.get(field.getWidgetType(entity.getEntity().getEntityType()));
if (typeFactory == null) {
throw new IllegalArgumentException("Type " + field.getWidgetType() + " not supported");
}
PropertyView out = typeFactory.createPropertyView(entity, field);
PropertyViewDecoratorAttribute decoratorAtt = (PropertyViewDecoratorAttribute) field.findAttribute(PropertyViewDecoratorAttribute.class);
if (decoratorAtt != null) {
out = decoratorAtt.getValue().decorate(out);
}
NodeList decorators = field.getChildNodes(PropertyViewDecoratorNode.class);
if (decorators != null) {
for (Node n : decorators) {
out = ((PropertyViewDecoratorNode) n).getValue().decorate(out);
}
}
return out;
}
Aggregations