Search in sources :

Example 1 with MultiTypePropertyViewAttributeBinder

use of org.robobinding.viewattribute.property.MultiTypePropertyViewAttributeBinder in project RoboBinding by RoboBinding.

the class ChildViewAttributesBuilderImpl method add.

@Override
public void add(String attributeName, OneWayMultiTypePropertyViewAttributeFactory<ViewType> factory) {
    ValueModelAttribute attribute = resolvedGroupAttributes.valueModelAttributeFor(attributeName);
    MultiTypePropertyViewAttributeBinder viewAttributeBinder = viewAttributeBinderFactory.binderFor(factory, attribute);
    childViewAttributeMap.put(attributeName, viewAttributeBinder);
}
Also used : MultiTypePropertyViewAttributeBinder(org.robobinding.viewattribute.property.MultiTypePropertyViewAttributeBinder) ValueModelAttribute(org.robobinding.attribute.ValueModelAttribute)

Example 2 with MultiTypePropertyViewAttributeBinder

use of org.robobinding.viewattribute.property.MultiTypePropertyViewAttributeBinder in project RoboBinding by RoboBinding.

the class ChildViewAttributesBuilderImpl method add.

@Override
public void add(String attributeName, TwoWayMultiTypePropertyViewAttribute<ViewType> viewAttribute) {
    ValueModelAttribute attribute = resolvedGroupAttributes.valueModelAttributeFor(attributeName);
    MultiTypePropertyViewAttributeBinder viewAttributeBinder = viewAttributeBinderFactory.binderFor(viewAttribute, attribute);
    childViewAttributeMap.put(attributeName, viewAttributeBinder);
}
Also used : MultiTypePropertyViewAttributeBinder(org.robobinding.viewattribute.property.MultiTypePropertyViewAttributeBinder) ValueModelAttribute(org.robobinding.attribute.ValueModelAttribute)

Example 3 with MultiTypePropertyViewAttributeBinder

use of org.robobinding.viewattribute.property.MultiTypePropertyViewAttributeBinder in project RoboBinding by RoboBinding.

the class ChildViewAttributesBuilderImpl method add.

@Override
public void add(String attributeName, TwoWayMultiTypePropertyViewAttributeFactory<ViewType> factory) {
    ValueModelAttribute attribute = resolvedGroupAttributes.valueModelAttributeFor(attributeName);
    MultiTypePropertyViewAttributeBinder viewAttributeBinder = viewAttributeBinderFactory.binderFor(factory, attribute);
    childViewAttributeMap.put(attributeName, viewAttributeBinder);
}
Also used : MultiTypePropertyViewAttributeBinder(org.robobinding.viewattribute.property.MultiTypePropertyViewAttributeBinder) ValueModelAttribute(org.robobinding.attribute.ValueModelAttribute)

Example 4 with MultiTypePropertyViewAttributeBinder

use of org.robobinding.viewattribute.property.MultiTypePropertyViewAttributeBinder in project RoboBinding by RoboBinding.

the class ChildViewAttributesBuilderImpl method add.

@Override
public void add(String attributeName, OneWayMultiTypePropertyViewAttribute<ViewType> viewAttribute) {
    ValueModelAttribute attribute = resolvedGroupAttributes.valueModelAttributeFor(attributeName);
    MultiTypePropertyViewAttributeBinder viewAttributeBinder = viewAttributeBinderFactory.binderFor(viewAttribute, attribute);
    childViewAttributeMap.put(attributeName, viewAttributeBinder);
}
Also used : MultiTypePropertyViewAttributeBinder(org.robobinding.viewattribute.property.MultiTypePropertyViewAttributeBinder) ValueModelAttribute(org.robobinding.attribute.ValueModelAttribute)

Example 5 with MultiTypePropertyViewAttributeBinder

use of org.robobinding.viewattribute.property.MultiTypePropertyViewAttributeBinder in project RoboBinding by RoboBinding.

the class ByBindingAttributeMappingsResolverTest method givenAMultiTypePropertyAttribute_whenResolve_thenAResolvedMultiTypePropertyViewAttributeShouldBeReturned.

@Test
public void givenAMultiTypePropertyAttribute_whenResolve_thenAResolvedMultiTypePropertyViewAttributeShouldBeReturned() {
    MultiTypePropertyViewAttributeBinder viewAttributeBinder = Mockito.mock(MultiTypePropertyViewAttributeBinder.class);
    ByBindingAttributeMappingsResolver byBindingAttributeMappingsResolver = newByBindingAttributeMappingsResolver(aBindingAttributeMappings().withMultiTypePropertyAttribute("multiTypePropertyAttribute", viewAttributeBinder).build());
    Collection<ViewAttributeBinder> viewAttributes = byBindingAttributeMappingsResolver.resolve(pendingAttributesForView);
    assertThat(Sets.newHashSet(viewAttributes), equalTo(Sets.<ViewAttributeBinder>newHashSet(viewAttributeBinder)));
}
Also used : MultiTypePropertyViewAttributeBinder(org.robobinding.viewattribute.property.MultiTypePropertyViewAttributeBinder) ViewAttributeBinder(org.robobinding.viewattribute.ViewAttributeBinder) PropertyViewAttributeBinder(org.robobinding.viewattribute.property.PropertyViewAttributeBinder) MultiTypePropertyViewAttributeBinder(org.robobinding.viewattribute.property.MultiTypePropertyViewAttributeBinder) GroupedViewAttributeBinder(org.robobinding.viewattribute.grouped.GroupedViewAttributeBinder) EventViewAttributeBinder(org.robobinding.viewattribute.event.EventViewAttributeBinder) Test(org.junit.Test)

Aggregations

MultiTypePropertyViewAttributeBinder (org.robobinding.viewattribute.property.MultiTypePropertyViewAttributeBinder)6 ValueModelAttribute (org.robobinding.attribute.ValueModelAttribute)5 Test (org.junit.Test)1 ViewAttributeBinder (org.robobinding.viewattribute.ViewAttributeBinder)1 EventViewAttributeBinder (org.robobinding.viewattribute.event.EventViewAttributeBinder)1 GroupedViewAttributeBinder (org.robobinding.viewattribute.grouped.GroupedViewAttributeBinder)1 MultiTypePropertyViewAttributeBinderFactory (org.robobinding.viewattribute.property.MultiTypePropertyViewAttributeBinderFactory)1 PropertyViewAttributeBinder (org.robobinding.viewattribute.property.PropertyViewAttributeBinder)1