Package org.linkki.core.ui.aspects
Class RequiredAspectDefinition
- java.lang.Object
-
- org.linkki.core.binding.descriptor.aspect.base.ModelToUiAspectDefinition<Boolean>
-
- org.linkki.core.ui.aspects.RequiredAspectDefinition
-
- All Implemented Interfaces:
LinkkiAspectDefinition
public class RequiredAspectDefinition extends ModelToUiAspectDefinition<Boolean>
Aspect definition forRequiredType. Assumes that the given component is anAbstractField.
-
-
Field Summary
Fields Modifier and Type Field Description static StringNAME-
Fields inherited from interface org.linkki.core.binding.descriptor.aspect.LinkkiAspectDefinition
DERIVED_BY_LINKKI, VALUE_ASPECT_NAME
-
-
Constructor Summary
Constructors Constructor Description RequiredAspectDefinition(RequiredType requiredType, EnabledAspectDefinition enabledTypeAspectDefinition)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Aspect<Boolean>createAspect()Consumer<Boolean>createComponentValueSetter(ComponentWrapper componentWrapper)-
Methods inherited from class org.linkki.core.binding.descriptor.aspect.base.ModelToUiAspectDefinition
createUiUpdater, handleUiUpdateException
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.linkki.core.binding.descriptor.aspect.LinkkiAspectDefinition
initModelUpdate, supports
-
-
-
-
Field Detail
-
NAME
public static final String NAME
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
RequiredAspectDefinition
public RequiredAspectDefinition(RequiredType requiredType, EnabledAspectDefinition enabledTypeAspectDefinition)
-
-
Method Detail
-
createAspect
public Aspect<Boolean> createAspect()
- Specified by:
createAspectin classModelToUiAspectDefinition<Boolean>
-
createComponentValueSetter
public Consumer<Boolean> createComponentValueSetter(ComponentWrapper componentWrapper)
This method only supports
AbstractFieldif theRequiredTypeis notRequiredType.NOT_REQUIRED. In this case,HasValue.setRequiredIndicatorVisible(boolean)is used.- Specified by:
createComponentValueSetterin classModelToUiAspectDefinition<Boolean>- Throws:
IllegalArgumentException- if theRequiredTypeis notRequiredType.NOT_REQUIREDand the component wrapped by givenComponentWrapperis not anAbstractField
-
-