Search in sources :

Example 1 with UIAnnotationReader

use of org.linkki.core.ui.section.descriptor.UIAnnotationReader in project linkki by linkki-framework.

the class StaticValueDispatcherTest method setUp.

@Before
public void setUp() {
    objectWithUIAnnotations = new TestObjectWithUIAnnotations();
    UIAnnotationReader uiAnnotationReader = new UIAnnotationReader(objectWithUIAnnotations.getClass());
    uiAnnotationDispatchers = uiAnnotationReader.getUiElements().stream().collect(Collectors.toMap(e -> e.getPmoPropertyName(), e -> new StaticValueDispatcher(uiAnnotationFallbackDispatcher)));
}
Also used : UIAnnotationReader(org.linkki.core.ui.section.descriptor.UIAnnotationReader) Before(org.junit.Before)

Example 2 with UIAnnotationReader

use of org.linkki.core.ui.section.descriptor.UIAnnotationReader in project linkki by linkki-framework.

the class SectionCreationContext method createUiElements.

private void createUiElements(BaseSection section) {
    UIAnnotationReader annotationReader = new UIAnnotationReader(getPmo().getClass());
    for (PropertyElementDescriptors elementDescriptors : annotationReader.getUiElements()) {
        ElementDescriptor uiElement = elementDescriptors.getDescriptor(pmo);
        bindUiElement(uiElement, createLabelAndComponent(section, uiElement));
    }
}
Also used : UIAnnotationReader(org.linkki.core.ui.section.descriptor.UIAnnotationReader) PropertyElementDescriptors(org.linkki.core.ui.section.descriptor.PropertyElementDescriptors) ElementDescriptor(org.linkki.core.ui.section.descriptor.ElementDescriptor)

Aggregations

UIAnnotationReader (org.linkki.core.ui.section.descriptor.UIAnnotationReader)2 Before (org.junit.Before)1 ElementDescriptor (org.linkki.core.ui.section.descriptor.ElementDescriptor)1 PropertyElementDescriptors (org.linkki.core.ui.section.descriptor.PropertyElementDescriptors)1