Class FactoryPolymorphicListAttribute<R extends FactoryBase<?,R>,L>
- java.lang.Object
-
- io.github.factoryfx.factory.attribute.Attribute<U,A>
-
- io.github.factoryfx.factory.attribute.dependency.ReferenceBaseAttribute<R,F,java.util.List<F>,A>
-
- io.github.factoryfx.factory.attribute.dependency.FactoryListBaseAttribute<R,L,FactoryBase<? extends L,R>,FactoryPolymorphicListAttribute<R,L>>
-
- io.github.factoryfx.factory.attribute.dependency.FactoryPolymorphicListAttribute<R,L>
-
- Type Parameters:
L- the base interface/class
- All Implemented Interfaces:
AttributeCopy<java.util.List<FactoryBase<? extends L,R>>>,AttributeMatch<java.util.List<FactoryBase<? extends L,R>>>,AttributeMerger<java.util.List<FactoryBase<? extends L,R>>>,AttributeValue<java.util.List<FactoryBase<? extends L,R>>>,FactoryChildrenEnclosingAttribute<R,FactoryPolymorphicListAttribute<R,L>>,java.lang.Iterable<FactoryBase<? extends L,R>>,java.util.Collection<FactoryBase<? extends L,R>>,java.util.List<FactoryBase<? extends L,R>>
public class FactoryPolymorphicListAttribute<R extends FactoryBase<?,R>,L> extends FactoryListBaseAttribute<R,L,FactoryBase<? extends L,R>,FactoryPolymorphicListAttribute<R,L>>
Attribute for polymorphic Reference. Usually interface with different implementations
-
-
Field Summary
-
Fields inherited from class io.github.factoryfx.factory.attribute.dependency.ReferenceBaseAttribute
additionalDeleteAction, clazz, parent
-
-
Constructor Summary
Constructors Constructor Description FactoryPolymorphicListAttribute()FactoryPolymorphicListAttribute(java.lang.Class<L> liveObjectClass, java.lang.Class<? extends PolymorphicFactory<?>>... possibleFactoriesClasses)FactoryPolymorphicListAttribute(java.util.function.Consumer<FactoryPolymorphicListAttribute<R,L>> setup)Explanation see:FactoryAttribute(Consumer)}
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description <T extends FactoryBase>
Tget(java.lang.Class<T> clazz)java.util.List<java.lang.Class<?>>internal_possibleFactoriesClasses()intended to be used from code generatorsvoidinternal_setReferenceClass(java.lang.Class<?> clazz)setup value selection and new value adding for user editingFactoryPolymorphicListAttribute<R,L>setup(java.lang.Class<L> liveObjectClass, java.lang.Class<? extends PolymorphicFactory<?>>... possibleFactoriesClasses)setup for select and new value editingFactoryPolymorphicListAttribute<R,L>setupUnsafe(java.lang.Class liveObjectClass, java.lang.Class... possibleFactoriesClasses)workaround: if possibleFactoriesClasses has generic parameter the normal setup method doesn't work-
Methods inherited from class io.github.factoryfx.factory.attribute.dependency.FactoryListBaseAttribute
add, add, addAll, addAll, batchModify, clear, contains, containsAll, defaultExpanded, filtered, forEach, get, get, getDisplayText, indexOf, instances, instances, internal_copyTo, internal_deleteFactory, internal_fixDuplicateObjects, internal_isDefaultExpanded, internal_merge, internal_mergeMatch, internal_semanticCopyTo, internal_visitChildren, isEmpty, iterator, lastIndexOf, listIterator, listIterator, parallelStream, remove, remove, removeAll, removeIf, retainAll, set, set, size, sort, spliterator, stream, subList, toArray, toArray
-
Methods inherited from class io.github.factoryfx.factory.attribute.dependency.ReferenceBaseAttribute
additionalDeleteAction, catalogueBased, createAttributeStorageMetadata, internal_addBackReferences, internal_createNewPossibleValues, internal_getCopySemantic, internal_getReferenceClass, internal_isCatalogueBased, internal_isUserCreatable, internal_isUserSelectable, internal_possibleValues, internal_reset, newValuesProvider, newValuesProvider, possibleValueProvider, setCopySemantic, userNotCreatable, userNotSelectable
-
Methods inherited from class io.github.factoryfx.factory.attribute.Attribute
addonText, de, en, es, fr, internal_addListener, internal_endUsage, internal_getAddonText, internal_getListeners, internal_getPreferredLabelText, internal_getPreferredTooltipText, internal_hasWritePermission, internal_isUserReadOnly, internal_removeAllListener, internal_removeListener, internal_required, internal_validate, it, labelText, labelText, listenersEmpty, permission, pt, tooltipDe, tooltipEn, updateListeners, userReadOnly, userReadOnly, validation
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface io.github.factoryfx.factory.attribute.AttributeMatch
internal_referenceEquals, internal_referenceListEquals
-
Methods inherited from interface io.github.factoryfx.factory.attribute.AttributeMerger
internal_mergeFactoryList
-
-
-
-
Constructor Detail
-
FactoryPolymorphicListAttribute
public FactoryPolymorphicListAttribute()
-
FactoryPolymorphicListAttribute
public FactoryPolymorphicListAttribute(java.util.function.Consumer<FactoryPolymorphicListAttribute<R,L>> setup)
Explanation see:FactoryAttribute(Consumer)}- Parameters:
setup- setup function
-
FactoryPolymorphicListAttribute
@SafeVarargs public FactoryPolymorphicListAttribute(java.lang.Class<L> liveObjectClass, java.lang.Class<? extends PolymorphicFactory<?>>... possibleFactoriesClasses)
-
-
Method Detail
-
setupUnsafe
@SafeVarargs public final FactoryPolymorphicListAttribute<R,L> setupUnsafe(java.lang.Class liveObjectClass, java.lang.Class... possibleFactoriesClasses)
workaround: if possibleFactoriesClasses has generic parameter the normal setup method doesn't work- Parameters:
liveObjectClass- liveObjectClasspossibleFactoriesClasses- possibleFactoriesClasses- Returns:
- self
-
setup
@SafeVarargs public final FactoryPolymorphicListAttribute<R,L> setup(java.lang.Class<L> liveObjectClass, java.lang.Class<? extends PolymorphicFactory<?>>... possibleFactoriesClasses)
setup for select and new value editing- Parameters:
liveObjectClass- type of liveobjectpossibleFactoriesClasses- possible factories that crate the liveobject, PolymorphicFactory<L> would be correct but doesn't work- Returns:
- self
-
internal_possibleFactoriesClasses
public java.util.List<java.lang.Class<?>> internal_possibleFactoriesClasses()
intended to be used from code generators- Returns:
- list of possible classes
-
get
public <T extends FactoryBase> T get(java.lang.Class<T> clazz)
-
internal_setReferenceClass
public void internal_setReferenceClass(java.lang.Class<?> clazz)
Description copied from class:ReferenceBaseAttributesetup value selection and new value adding for user editing- Specified by:
internal_setReferenceClassin interfaceFactoryChildrenEnclosingAttribute<R extends FactoryBase<?,R>,L>- Overrides:
internal_setReferenceClassin classReferenceBaseAttribute<R extends FactoryBase<?,R>,FactoryBase<? extends L,R extends FactoryBase<?,R>>,java.util.List<FactoryBase<? extends L,R extends FactoryBase<?,R>>>,FactoryPolymorphicListAttribute<R extends FactoryBase<?,R>,L>>- Parameters:
clazz- class
-
-