Search in sources :

Example 1 with ViewType

use of com.codename1.rad.attributes.ViewType in project CodeRAD by shannah.

the class DefaultEntityViewFactory method createView.

@Override
public EntityView createView(Entity entity, ViewNode node) {
    ViewType type = (ViewType) node.findAttribute(ViewType.class);
    if (type == null) {
        type = ViewType.MULTIBUTTON;
    }
    EntityViewFactory f = registry.get(type);
    if (f == null) {
        throw new IllegalArgumentException("Factory doesn't know how to build view " + type);
    }
    EntityView out = f.createView(entity, node);
    return makeSwipeable(entity, node, (Component) out);
}
Also used : WrapperEntityView(com.codename1.rad.ui.entityviews.WrapperEntityView) MultiButtonEntityView(com.codename1.rad.ui.entityviews.MultiButtonEntityView) ViewType(com.codename1.rad.attributes.ViewType)

Aggregations

ViewType (com.codename1.rad.attributes.ViewType)1 MultiButtonEntityView (com.codename1.rad.ui.entityviews.MultiButtonEntityView)1 WrapperEntityView (com.codename1.rad.ui.entityviews.WrapperEntityView)1