Class EmfSpinnerBuilder.Builder<T extends org.eclipse.emf.ecore.EObject,V>
java.lang.Object
com.amalgamasimulation.desktop.ui.editor.builders.custom.EmfSpinnerBuilder.Builder<T,V>
- All Implemented Interfaces:
EmfSpinnerBuilder.ConverterBuilder<T,,V> EmfSpinnerBuilder.DigitsBuilder<T,,V> EmfSpinnerBuilder.FeatureBuilder<T,,V> EmfSpinnerBuilder.FinalBuilder<T,,V> EmfSpinnerBuilder.RangeBuilder<T,,V> ICanBeNullBuilder<EmfSpinnerBuilder.FinalBuilder<T,,V>> IContainerHandlerBuilder<T,,V, EmfSpinnerBuilder.FinalBuilder<T, V>> IConverterBuilder<V,,EmfSpinnerBuilder.RangeBuilder<T, V>> ICreateBuilder<CustomSectionBuilder.FinalBuilder>,IDigitsBuilder<EmfSpinnerBuilder.FinalBuilder<T,,V>> IEmfButtonBuilder<EmfSpinnerBuilder.FinalBuilder<T,,V>> IFeatureBuilder<EmfSpinnerBuilder.ConverterBuilder<T,,V>> ISpinnerPropertiesBuilder<V,,EmfSpinnerBuilder.FinalBuilder<T, V>> IValidationBuilder<V,EmfSpinnerBuilder.FinalBuilder<T, V>>
- Enclosing class:
EmfSpinnerBuilder
public static class EmfSpinnerBuilder.Builder<T extends org.eclipse.emf.ecore.EObject,V>
extends Object
implements EmfSpinnerBuilder.FeatureBuilder<T,V>, EmfSpinnerBuilder.ConverterBuilder<T,V>, EmfSpinnerBuilder.RangeBuilder<T,V>, EmfSpinnerBuilder.DigitsBuilder<T,V>, EmfSpinnerBuilder.FinalBuilder<T,V>
-
Method Summary
Modifier and TypeMethodDescriptionaddButton(IButtonProperties buttonProperties) canBeNull(BooleanSupplier canBeNull) converter(ToDoubleFunction<V> toNumber, DoubleFunction<V> fromNumber) Sets how a value is turned into the number of the spinner and back.create()static <T1 extends org.eclipse.emf.ecore.EObject,V1>
EmfSpinnerBuilder.FeatureBuilder<T1, V1> create(org.eclipse.core.databinding.observable.value.IObservableValue<T1> containerObservable, CustomSectionBuilder.FinalBuilder parentBuilder, BiConsumer<EmfSpinnerDataBinding<T1, V1>, SpinnerProperties<V1>> createAction, BiConsumer<EmfSpinnerDataBinding<T1, V1>, IButtonProperties> buttonAction) digits(int digits) Sets the number of digits after the point; the spinner shows the value rounded to them.feature(org.eclipse.emf.ecore.EStructuralFeature feature) handler(BiConsumer<T, V> handler) spinnerProperties(SpinnerProperties<V> spinnerProperties) Sets the spinner settings.validation(Predicate<V> validation, String message) Sets a check of the value.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.amalgamasimulation.desktop.ui.editor.builders.interfaces.IEmfButtonBuilder
addButtonIf
-
Method Details
-
create
public static <T1 extends org.eclipse.emf.ecore.EObject,V1> EmfSpinnerBuilder.FeatureBuilder<T1,V1> create(org.eclipse.core.databinding.observable.value.IObservableValue<T1> containerObservable, CustomSectionBuilder.FinalBuilder parentBuilder, BiConsumer<EmfSpinnerDataBinding<T1, V1>, SpinnerProperties<V1>> createAction, BiConsumer<EmfSpinnerDataBinding<T1, V1>, IButtonProperties> buttonAction) -
feature
public EmfSpinnerBuilder.ConverterBuilder<T,V> feature(org.eclipse.emf.ecore.EStructuralFeature feature) - Specified by:
featurein interfaceIFeatureBuilder<T extends org.eclipse.emf.ecore.EObject>
-
converter
public EmfSpinnerBuilder.RangeBuilder<T,V> converter(ToDoubleFunction<V> toNumber, DoubleFunction<V> fromNumber) Description copied from interface:IConverterBuilderSets how a value is turned into the number of the spinner and back.- Specified by:
converterin interfaceIConverterBuilder<T extends org.eclipse.emf.ecore.EObject,V> - Parameters:
toNumber- turns a value into a number; gets a value that is notnullfromNumber- turns a number of the spinner back into a value- Returns:
- the next step of the builder
-
range
- Specified by:
rangein interfaceEmfSpinnerBuilder.RangeBuilder<T extends org.eclipse.emf.ecore.EObject,V>
-
digits
Description copied from interface:IDigitsBuilderSets the number of digits after the point; the spinner shows the value rounded to them. If digits is below 0,create()throws IllegalArgumentException.- Specified by:
digitsin interfaceIDigitsBuilder<T extends org.eclipse.emf.ecore.EObject>- Parameters:
digits- the number of digits after the point- Returns:
- the next step of the builder
-
handler
- Specified by:
handlerin interfaceIContainerHandlerBuilder<T extends org.eclipse.emf.ecore.EObject,V, EmfSpinnerBuilder.FinalBuilder<T extends org.eclipse.emf.ecore.EObject, V>>
-
spinnerProperties
public EmfSpinnerBuilder.FinalBuilder<T,V> spinnerProperties(SpinnerProperties<V> spinnerProperties) Description copied from interface:ISpinnerPropertiesBuilderSets the spinner settings. A second call replaces the settings of the first one.- Specified by:
spinnerPropertiesin interfaceISpinnerPropertiesBuilder<T extends org.eclipse.emf.ecore.EObject,V> - Parameters:
spinnerProperties- the spinner settings- Returns:
- the next step of the builder
-
addButton
- Specified by:
addButtonin interfaceIEmfButtonBuilder<T extends org.eclipse.emf.ecore.EObject>
-
validation
Description copied from interface:IValidationBuilderSets a check of the value. A value that fails it is not written, and an error icon with the message as its tooltip is shown next to the spinner.- Specified by:
validationin interfaceIValidationBuilder<T extends org.eclipse.emf.ecore.EObject,V> - Parameters:
validation- the check; gets a value that is notnullmessage- the tooltip of the error icon- Returns:
- the next step of the builder
-
canBeNull
- Specified by:
canBeNullin interfaceICanBeNullBuilder<T extends org.eclipse.emf.ecore.EObject>
-
create
- Specified by:
createin interfaceICreateBuilder<T extends org.eclipse.emf.ecore.EObject>
-