Search in sources :

Example 51 with Entity

use of com.codename1.rad.models.Entity in project CodeRAD by shannah.

the class UIBuilder method htmlComponent.

public HTMLComponentPropertyView htmlComponent(Tag... tags) {
    FieldNode fn = new FieldNode(UI.tags(tags));
    fn.setParent(parentNode);
    return new HTMLComponentPropertyView(new HTMLComponent(), entity, fn);
}
Also used : HTMLComponentPropertyView(com.codename1.rad.propertyviews.HTMLComponentPropertyView) FieldNode(com.codename1.rad.nodes.FieldNode) HTMLComponent(com.codename1.ui.html.HTMLComponent)

Example 52 with Entity

use of com.codename1.rad.models.Entity in project CodeRAD by shannah.

the class UIBuilder method spanLabel.

public SpanLabelPropertyView spanLabel(Tag... tags) {
    FieldNode fn = new FieldNode(UI.tags(tags));
    fn.setParent(parentNode);
    return new SpanLabelPropertyView(new SpanLabel(), entity, fn);
}
Also used : FieldNode(com.codename1.rad.nodes.FieldNode) SpanLabelPropertyView(com.codename1.rad.propertyviews.SpanLabelPropertyView) SpanLabel(com.codename1.components.SpanLabel)

Example 53 with Entity

use of com.codename1.rad.models.Entity in project CodeRAD by shannah.

the class NodeUtilFunctions method buildBottomActionsBar.

static void buildBottomActionsBar(Node node, Container target, Entity entity) {
    Layout targetLayout = target.getLayout();
    if (targetLayout instanceof BorderLayout) {
        Container south = new Container(BoxLayout.y());
        target.add(SOUTH, south);
        target = south;
    }
    buildActionsBar(node, target, entity, node.getActions(FormNode.BOTTOM_RIGHT_MENU), node.getActions(FormNode.BOTTOM_LEFT_MENU), null, node.getActions(FormNode.BOTTOM_MENU));
}
Also used : Container(com.codename1.ui.Container) BorderLayout(com.codename1.ui.layouts.BorderLayout) Layout(com.codename1.ui.layouts.Layout) BoxLayout(com.codename1.ui.layouts.BoxLayout) BorderLayout(com.codename1.ui.layouts.BorderLayout) GridLayout(com.codename1.ui.layouts.GridLayout)

Example 54 with Entity

use of com.codename1.rad.models.Entity in project CodeRAD by shannah.

the class NodeUtilFunctions method buildTopActionsBar.

static void buildTopActionsBar(Node node, Container target, Entity entity) {
    Layout targetLayout = target.getLayout();
    if (targetLayout instanceof BorderLayout) {
        Container north = new Container(BoxLayout.y());
        target.add(NORTH, north);
        target = north;
    }
    buildActionsBar(node, target, entity, node.getActions(FormNode.TOP_RIGHT_MENU), node.getActions(FormNode.TOP_LEFT_MENU), node.getActions(FormNode.OVERFLOW_MENU), node.getActions(FormNode.TOP_MENU));
}
Also used : Container(com.codename1.ui.Container) BorderLayout(com.codename1.ui.layouts.BorderLayout) Layout(com.codename1.ui.layouts.Layout) BoxLayout(com.codename1.ui.layouts.BoxLayout) BorderLayout(com.codename1.ui.layouts.BorderLayout) GridLayout(com.codename1.ui.layouts.GridLayout)

Example 55 with Entity

use of com.codename1.rad.models.Entity in project CodeRAD by shannah.

the class SwitchPropertyView method commit.

@Override
public void commit() {
    if (getPropertySelector().isFalsey() != getComponent().isOff()) {
        Entity e = getPropertySelector().getLeafEntity();
        Property p = getPropertySelector().getLeafProperty();
        e.getEntity().setBoolean(p, getComponent().isOn());
    }
}
Also used : Entity(com.codename1.rad.models.Entity) Property(com.codename1.rad.models.Property)

Aggregations

Entity (com.codename1.rad.models.Entity)38 Property (com.codename1.rad.models.Property)15 EntityList (com.codename1.rad.models.EntityList)13 Container (com.codename1.ui.Container)12 BorderLayout (com.codename1.ui.layouts.BorderLayout)11 ActionNode (com.codename1.rad.nodes.ActionNode)10 FieldNode (com.codename1.rad.nodes.FieldNode)10 Form (com.codename1.ui.Form)8 ViewNode (com.codename1.rad.nodes.ViewNode)7 GridLayout (com.codename1.ui.layouts.GridLayout)7 SimpleDateFormat (com.codename1.l10n.SimpleDateFormat)6 ResultParser (com.codename1.rad.io.ResultParser)6 Component (com.codename1.ui.Component)6 Element (com.codename1.xml.Element)6 BadgeUIID (com.codename1.rad.attributes.BadgeUIID)5 Thing (com.codename1.rad.schemas.Thing)5 Button (com.codename1.ui.Button)5 BoxLayout (com.codename1.ui.layouts.BoxLayout)5 Map (java.util.Map)5 Log (com.codename1.io.Log)4