Module org.tentackle.fx.rdc
Class RdcBoxDelegateImpl
java.lang.Object
org.tentackle.fx.rdc.component.delegate.RdcBoxDelegateImpl
Common implementation for choice- and combobox delegates.
-
Constructor Summary
ConstructorsConstructorDescriptionRdcBoxDelegateImpl(FxComponent component, Supplier<javafx.collections.ObservableList> itemSupplier, Supplier<PdoComponentAddon> pdoAddonSupplier) Creates the delegate impl. -
Method Summary
Modifier and TypeMethodDescriptionGets the domain context from the binding properties.<T extends PersistentDomainObject<T>>
javafx.util.Callback<T, Collection<T>> Gets the callback to load all PDOs.
Used byPdoComponentAddon.getAllPdos(PersistentDomainObject).voidprepareSetType(Class<?> type) Prepare the component's setType method.voidPrepare the component's setViewValue method.<T extends PersistentDomainObject<T>>
voidsetLoadAllPdosCallback(javafx.util.Callback<T, Collection<T>> loadAllPdosCallback) Sets the callback to load all PDOs.
Used byPdoComponentAddon.getAllPdos(PersistentDomainObject).
-
Constructor Details
-
RdcBoxDelegateImpl
public RdcBoxDelegateImpl(FxComponent component, Supplier<javafx.collections.ObservableList> itemSupplier, Supplier<PdoComponentAddon> pdoAddonSupplier) Creates the delegate impl.- Parameters:
component- the componentitemSupplier- gets the list of items shown by the componentpdoAddonSupplier- get the PDO addon
-
-
Method Details
-
prepareSetType
Prepare the component's setType method.- Parameters:
type- the type
-
getDomainContext
Gets the domain context from the binding properties.- Returns:
- the context, null if not bound or no such property
-
prepareSetViewValue
public void prepareSetViewValue()Prepare the component's setViewValue method. -
getLoadAllPdosCallback
public <T extends PersistentDomainObject<T>> javafx.util.Callback<T,Collection<T>> getLoadAllPdosCallback()Gets the callback to load all PDOs.
Used byPdoComponentAddon.getAllPdos(PersistentDomainObject).- Returns:
- the callback
-
setLoadAllPdosCallback
public <T extends PersistentDomainObject<T>> void setLoadAllPdosCallback(javafx.util.Callback<T, Collection<T>> loadAllPdosCallback) Sets the callback to load all PDOs.
Used byPdoComponentAddon.getAllPdos(PersistentDomainObject).- Parameters:
loadAllPdosCallback- the callback
-