Package org.eclipse.gef.fx.anchors
Class IComputationStrategy.Parameter<T>
java.lang.Object
javafx.beans.binding.ObjectExpression<T>
javafx.beans.property.ReadOnlyObjectProperty<T>
javafx.beans.property.ObjectProperty<T>
javafx.beans.property.ObjectPropertyBase<T>
org.eclipse.gef.fx.anchors.IComputationStrategy.Parameter<T>
- Type Parameters:
- T- The parameter value type.
- All Implemented Interfaces:
- javafx.beans.Observable,- javafx.beans.property.Property<T>,- javafx.beans.property.ReadOnlyProperty<T>,- javafx.beans.value.ObservableObjectValue<T>,- javafx.beans.value.ObservableValue<T>,- javafx.beans.value.WritableObjectValue<T>,- javafx.beans.value.WritableValue<T>
- Direct Known Subclasses:
- DynamicAnchor.AnchorageReferenceGeometry,- DynamicAnchor.AnchorageReferencePosition,- DynamicAnchor.AnchoredReferencePoint,- DynamicAnchor.PreferredOrientation
- Enclosing interface:
- IComputationStrategy
public abstract static class IComputationStrategy.Parameter<T>
extends javafx.beans.property.ObjectPropertyBase<T>
Base class for all computation parameters that can be passed to an
 
IComputationStrategy.- 
Nested Class SummaryNested ClassesModifier and TypeClassDescriptionstatic enumIndicates whether the parameter value can be shared to compute positions of all attached anchors or not.
- 
Constructor SummaryConstructorsConstructorDescriptionCreates a new mandatoryIComputationStrategy.Parameterof the given kind.Parameter(IComputationStrategy.Parameter.Kind kind, boolean optional) Creates a new optional parameter of the given kind.
- 
Method SummaryModifier and TypeMethodDescriptionvoidprotected static <T extends IComputationStrategy.Parameter<?>>
 Tget(Collection<? extends IComputationStrategy.Parameter<?>> parameters, Class<T> parameterType) Retrieves a parameter of the respective type from the set of given parameters.getBean()getKind()Retrieves theIComputationStrategy.Parameter.Kindof this parameter, which indicates whether a single value may be shared to compute the positions of all attachedAnchorKeys or not.getKind(Class<? extends IComputationStrategy.Parameter<?>> paramType) Returns theIComputationStrategy.Parameter.Kindreturned by an instance of the givenIComputationStrategy.Parametertype.getName()voidIf this parameter is bound, can be used to invalidate the underlying binding, so that the value is re-computed.final booleanIndicates whether this parameter is optionalstatic booleanisOptional(Class<? extends IComputationStrategy.Parameter<?>> paramType) Returnstrueif an instance of the givenIComputationStrategy.Parametertype is optional.voidunbind()Methods inherited from class javafx.beans.property.ObjectPropertyBaseaddListener, addListener, fireValueChangedEvent, get, invalidated, isBound, removeListener, removeListener, set, toStringMethods inherited from class javafx.beans.property.ObjectPropertybindBidirectional, setValue, unbindBidirectionalMethods inherited from class javafx.beans.binding.ObjectExpressionasString, asString, asString, getValue, isEqualTo, isEqualTo, isNotEqualTo, isNotEqualTo, isNotNull, isNull, objectExpressionMethods inherited from class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface javafx.beans.value.ObservableValuegetValueMethods inherited from interface javafx.beans.value.WritableValuegetValue
- 
Constructor Details- 
ParameterCreates a new mandatoryIComputationStrategy.Parameterof the given kind.- Parameters:
- kind- The parameter kind.
 
- 
ParameterCreates a new optional parameter of the given kind.- Parameters:
- kind- The parameter kin.
- optional- Whether this parameter is optional or not.
 
 
- 
- 
Method Details- 
getprotected static <T extends IComputationStrategy.Parameter<?>> T get(Collection<? extends IComputationStrategy.Parameter<?>> parameters, Class<T> parameterType) Retrieves a parameter of the respective type from the set of given parameters.- Type Parameters:
- T- The runtime type of the parameter.
- Parameters:
- parameters- The set of parameters to search.
- parameterType- The parameter type
- Returns:
- The parameter or null.
 
- 
getKindpublic static IComputationStrategy.Parameter.Kind getKind(Class<? extends IComputationStrategy.Parameter<?>> paramType) Returns theIComputationStrategy.Parameter.Kindreturned by an instance of the givenIComputationStrategy.Parametertype.- Parameters:
- paramType- The- IComputationStrategy.Parametertype for which to return the- IComputationStrategy.Parameter.Kind.
- Returns:
- The IComputationStrategy.Parameter.Kindfor the givenIComputationStrategy.Parametertype.
 
- 
isOptionalReturnstrueif an instance of the givenIComputationStrategy.Parametertype is optional. Otherwise returnsfalse.- Parameters:
- paramType- The- IComputationStrategy.Parametertype for which to determine optionality.
- Returns:
- trueif an instance of the given- IComputationStrategy.Parametertype is optional, otherwise- false.
 
- 
bind
- 
getBean
- 
getKindRetrieves theIComputationStrategy.Parameter.Kindof this parameter, which indicates whether a single value may be shared to compute the positions of all attachedAnchorKeys or not.- Returns:
- The parameter IComputationStrategy.Parameter.Kind.
 
- 
getName
- 
invalidateBindingpublic void invalidateBinding()If this parameter is bound, can be used to invalidate the underlying binding, so that the value is re-computed.
- 
isOptionalpublic final boolean isOptional()Indicates whether this parameter is optional- Returns:
- trueif the parameter is optional,- falseotherwise.
 
- 
unbindpublic void unbind()
 
-