Search in sources :

Example 1 with ProfileAvatarsTitleComponent

use of com.codename1.rad.ui.entityviews.ProfileAvatarsTitleComponent in project CodeRAD by shannah.

the class ProfileAvatarsTitleComponentBuilder method build.

@Override
public ProfileAvatarsTitleComponent build() {
    ViewNode node = new ViewNode();
    node.setParent(getContext().getNode());
    EntityList l = (entity instanceof EntityList) ? (EntityList) entity : new EntityList();
    if (entity != l) {
        l.add(entity);
    }
    if (avatarSize <= 0) {
        avatarSize = CN.convertToPixels(1f, Style.UNIT_TYPE_REM);
    }
    return new ProfileAvatarsTitleComponent(l, node, avatarSize / (float) CN.convertToPixels(1f));
}
Also used : EntityList(com.codename1.rad.models.EntityList) ViewNode(com.codename1.rad.nodes.ViewNode) ProfileAvatarsTitleComponent(com.codename1.rad.ui.entityviews.ProfileAvatarsTitleComponent)

Aggregations

EntityList (com.codename1.rad.models.EntityList)1 ViewNode (com.codename1.rad.nodes.ViewNode)1 ProfileAvatarsTitleComponent (com.codename1.rad.ui.entityviews.ProfileAvatarsTitleComponent)1