Search in sources :

Example 6 with FieldNode

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;
}
Also used : FieldNode(com.codename1.rad.nodes.FieldNode)

Example 7 with 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;
}
Also used : FieldNode(com.codename1.rad.nodes.FieldNode)

Example 8 with 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);
}
Also used : TextAreaPropertyView(com.codename1.rad.propertyviews.TextAreaPropertyView) FieldNode(com.codename1.rad.nodes.FieldNode) TextArea(com.codename1.ui.TextArea)

Example 9 with FieldNode

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);
        }
    }
}
Also used : Attribute(com.codename1.rad.models.Attribute)

Example 10 with FieldNode

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;
}
Also used : PropertyViewDecoratorAttribute(com.codename1.rad.attributes.PropertyViewDecoratorAttribute) PropertyViewFactoryNode(com.codename1.rad.nodes.PropertyViewFactoryNode) Node(com.codename1.rad.nodes.Node) PropertyViewDecoratorNode(com.codename1.rad.nodes.PropertyViewDecoratorNode) FieldNode(com.codename1.rad.nodes.FieldNode) OptionsNode(com.codename1.rad.nodes.OptionsNode) PropertyViewDecoratorNode(com.codename1.rad.nodes.PropertyViewDecoratorNode) LabelPropertyView(com.codename1.rad.propertyviews.LabelPropertyView) TextFieldPropertyView(com.codename1.rad.propertyviews.TextFieldPropertyView) TablePropertyView(com.codename1.rad.propertyviews.TablePropertyView) ButtonListPropertyView(com.codename1.rad.propertyviews.ButtonListPropertyView) CheckBoxPropertyView(com.codename1.rad.propertyviews.CheckBoxPropertyView) ComboBoxPropertyView(com.codename1.rad.propertyviews.ComboBoxPropertyView) SwitchPropertyView(com.codename1.rad.propertyviews.SwitchPropertyView) TextAreaPropertyView(com.codename1.rad.propertyviews.TextAreaPropertyView)

Aggregations

FieldNode (com.codename1.rad.nodes.FieldNode)25 Attribute (com.codename1.rad.models.Attribute)3 Entity (com.codename1.rad.models.Entity)3 LabelPropertyView (com.codename1.rad.propertyviews.LabelPropertyView)2 SpanLabelPropertyView (com.codename1.rad.propertyviews.SpanLabelPropertyView)2 TextAreaPropertyView (com.codename1.rad.propertyviews.TextAreaPropertyView)2 TextFieldPropertyView (com.codename1.rad.propertyviews.TextFieldPropertyView)2 SpanLabel (com.codename1.components.SpanLabel)1 Columns (com.codename1.rad.attributes.Columns)1 PropertyImageRendererAttribute (com.codename1.rad.attributes.PropertyImageRendererAttribute)1 PropertySelectorAttribute (com.codename1.rad.attributes.PropertySelectorAttribute)1 PropertyViewDecoratorAttribute (com.codename1.rad.attributes.PropertyViewDecoratorAttribute)1 Property (com.codename1.rad.models.Property)1 Editable (com.codename1.rad.models.Property.Editable)1 Node (com.codename1.rad.nodes.Node)1 OptionsNode (com.codename1.rad.nodes.OptionsNode)1 PropertyNode (com.codename1.rad.nodes.PropertyNode)1 PropertyViewDecoratorNode (com.codename1.rad.nodes.PropertyViewDecoratorNode)1 PropertyViewFactoryNode (com.codename1.rad.nodes.PropertyViewFactoryNode)1 ButtonListPropertyView (com.codename1.rad.propertyviews.ButtonListPropertyView)1