Search in sources :

Example 11 with ViewNode

use of com.codename1.rad.nodes.ViewNode in project CodeRAD by shannah.

the class TabsEntityView method createViewTab.

private EntityView createViewTab(ViewNode vn) {
    EntityViewFactory factory = vn.getViewFactory(null);
    if (factory == null) {
        return null;
    }
    Entity tabEntity = null;
    PropertySelector sel = vn.createPropertySelector(getEntity());
    if (sel == null) {
        return null;
    }
    tabEntity = sel.getEntity(null);
    if (tabEntity == null) {
        return null;
    }
    return factory.createView(tabEntity, vn);
}
Also used : EntityViewFactory(com.codename1.rad.ui.EntityViewFactory) Entity(com.codename1.rad.models.Entity) PropertySelector(com.codename1.rad.models.PropertySelector)

Example 12 with ViewNode

use of com.codename1.rad.nodes.ViewNode in project CodeRAD by shannah.

the class TabsEntityView method createTab.

private EntityView createTab(Node node) {
    ViewNode vn = (ViewNode) node.as(ViewNode.class);
    if (vn != null) {
        return createViewTab(vn);
    }
    ListNode ln = (ListNode) node.as(ListNode.class);
    if (ln != null) {
        return createListTab(ln);
    }
    return null;
}
Also used : ViewNode(com.codename1.rad.nodes.ViewNode) ListNode(com.codename1.rad.nodes.ListNode)

Aggregations

ViewNode (com.codename1.rad.nodes.ViewNode)9 MultiButtonEntityView (com.codename1.rad.ui.entityviews.MultiButtonEntityView)3 WrapperEntityView (com.codename1.rad.ui.entityviews.WrapperEntityView)3 Attribute (com.codename1.rad.models.Attribute)2 Entity (com.codename1.rad.models.Entity)2 ActionNode (com.codename1.rad.nodes.ActionNode)2 SwipeContainer (com.codename1.rad.nodes.SwipeContainer)2 Container (com.codename1.ui.Container)2 SwipeableContainer (com.codename1.ui.SwipeableContainer)2 Switch (com.codename1.components.Switch)1 Log (com.codename1.io.Log)1 ViewType (com.codename1.rad.attributes.ViewType)1 EntityList (com.codename1.rad.models.EntityList)1 EntityTypeBuilder.entityTypeBuilder (com.codename1.rad.models.EntityTypeBuilder.entityTypeBuilder)1 PropertySelector (com.codename1.rad.models.PropertySelector)1 Tag (com.codename1.rad.models.Tag)1 ListNode (com.codename1.rad.nodes.ListNode)1 Node (com.codename1.rad.nodes.Node)1 Thing (com.codename1.rad.schemas.Thing)1 AbstractEntityView (com.codename1.rad.ui.AbstractEntityView)1