Package org.linkki.core.ui.aspects
Class BindComboBoxItemStyleAspectDefinition
- java.lang.Object
-
- org.linkki.core.binding.descriptor.aspect.base.ModelToUiAspectDefinition<VALUE_TYPE>
-
- org.linkki.core.binding.descriptor.aspect.base.StaticModelToUiAspectDefinition<Function<Object,String>>
-
- org.linkki.core.ui.aspects.BindComboBoxItemStyleAspectDefinition
-
- All Implemented Interfaces:
LinkkiAspectDefinition
public class BindComboBoxItemStyleAspectDefinition extends StaticModelToUiAspectDefinition<Function<Object,String>>
Aspect definition that calls a method namedFunction<?,String> get<PropertyName>ItemStyle()in the pmo. The function is called for every item in the combobox drop down list and the returned string is set as class name for this item.The aspect definition extends
StaticModelToUiAspectDefinitionbecause it either uses a static list of style classes or it calls the returned function for every item. It is not supported to get different functions for every update. This is important to not set a new renderer with every ui update.
-
-
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 BindComboBoxItemStyleAspectDefinition(String... staticStyles)Creates a new aspect definition to modify the style names of combo box popup items.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Aspect<Function<Object,String>>createAspect()Consumer<Function<Object,String>>createComponentValueSetter(ComponentWrapper componentWrapper)org.linkki.util.handler.HandlercreateUiUpdater(PropertyDispatcher propertyDispatcher, ComponentWrapper componentWrapper)-
Methods inherited from class org.linkki.core.binding.descriptor.aspect.base.ModelToUiAspectDefinition
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
-
BindComboBoxItemStyleAspectDefinition
public BindComboBoxItemStyleAspectDefinition(String... staticStyles)
Creates a new aspect definition to modify the style names of combo box popup items.
-
-
Method Detail
-
createUiUpdater
public org.linkki.util.handler.Handler createUiUpdater(PropertyDispatcher propertyDispatcher, ComponentWrapper componentWrapper)
- Specified by:
createUiUpdaterin interfaceLinkkiAspectDefinition- Overrides:
createUiUpdaterin classStaticModelToUiAspectDefinition<Function<Object,String>>
-
createAspect
public Aspect<Function<Object,String>> createAspect()
- Specified by:
createAspectin classModelToUiAspectDefinition<Function<Object,String>>
-
createComponentValueSetter
public Consumer<Function<Object,String>> createComponentValueSetter(ComponentWrapper componentWrapper)
- Specified by:
createComponentValueSetterin classModelToUiAspectDefinition<Function<Object,String>>
-
-