Search in sources :

Example 6 with ElementDescriptor

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

the class FieldDescriptorTest method getLabelText_deriveFromPropertyName.

@Test
public void getLabelText_deriveFromPropertyName() {
    ElementDescriptor fieldDescriptor = new ElementDescriptor(adapter, "Test", Void.class, new ArrayList<>());
    assertEquals("Test", fieldDescriptor.getLabelText());
}
Also used : ElementDescriptor(org.linkki.core.ui.section.descriptor.ElementDescriptor) Test(org.junit.Test)

Example 7 with ElementDescriptor

use of org.linkki.core.ui.section.descriptor.ElementDescriptor 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

ElementDescriptor (org.linkki.core.ui.section.descriptor.ElementDescriptor)7 Test (org.junit.Test)6 TextField (com.vaadin.ui.TextField)1 LabelComponentWrapper (org.linkki.core.ui.components.LabelComponentWrapper)1 BindingDefinition (org.linkki.core.ui.section.annotations.BindingDefinition)1 UITextField (org.linkki.core.ui.section.annotations.UITextField)1 PropertyElementDescriptors (org.linkki.core.ui.section.descriptor.PropertyElementDescriptors)1 UIAnnotationReader (org.linkki.core.ui.section.descriptor.UIAnnotationReader)1