Class EmfSpinnerDataBinding<T extends org.eclipse.emf.ecore.EObject,V>
java.lang.Object
com.amalgamasimulation.desktop.binding.widgets.AbstractSpinnerDataBinding<V>
com.amalgamasimulation.desktop.binding.widgets.ContainerSpinnerDataBinding<T,V>
com.amalgamasimulation.desktop.binding.widgets.EmfSpinnerDataBinding<T,V>
- Type Parameters:
T- The type of EObject containerV- The type of the bound feature value
- All Implemented Interfaces:
AbstractDataBinding<V>,ContainerDataBinding<T,,V> EmfDataBinding<T,V>
public class EmfSpinnerDataBinding<T extends org.eclipse.emf.ecore.EObject,V>
extends ContainerSpinnerDataBinding<T,V>
implements EmfDataBinding<T,V>
Spinner binding to a feature of an EMF object. The new value is set with a command,
so it can be undone.
- Author:
- Ionov Ivan
- See Also:
-
Field Summary
Fields inherited from class com.amalgamasimulation.desktop.binding.widgets.ContainerSpinnerDataBinding
containerObservable, handler, modelChangeListener, valueExtractorFields inherited from class com.amalgamasimulation.desktop.binding.widgets.AbstractSpinnerDataBinding
canBeNull, controlDecoration, digits, fromNumber, maximum, minimum, spinner, toNumber, validation, validationMessage -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidCreates the error icon, sets the range anddigitsof the spinner, subscribes to its events and shows the model value.feature(org.eclipse.emf.ecore.EStructuralFeature feature) org.eclipse.emf.ecore.EStructuralFeatureGets the EMF structural feature being bound.Methods inherited from class com.amalgamasimulation.desktop.binding.widgets.ContainerSpinnerDataBinding
containerObservable, doAction, executeToModel, executeToTarget, getContainer, getValue, handler, valueExtractorMethods inherited from class com.amalgamasimulation.desktop.binding.widgets.AbstractSpinnerDataBinding
canBeNull, converter, digits, enable, range, setControl, toSelection, validationMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.amalgamasimulation.desktop.binding.widgets.AbstractDataBinding
createControlDecoration, doAction, enable, executeToModel, executeToTarget, getValue, setControlMethods inherited from interface com.amalgamasimulation.desktop.binding.widgets.ContainerDataBinding
getContainer
-
Constructor Details
-
EmfSpinnerDataBinding
public EmfSpinnerDataBinding()
-
-
Method Details
-
feature
-
createBinding
public void createBinding()Description copied from class:AbstractSpinnerDataBindingCreates the error icon, sets the range anddigitsof the spinner, subscribes to its events and shows the model value. The arrow step is set to 1 and the page step to 10 in selection units; the section may replace them with its own aftercreateBinding. Throws IllegalArgumentException ifdigitsis below 0 or the minimum is greater than the maximum, because the spinner would ignore such values without an error. The tooltip of the icon is set here once, sovalidationmust be called beforecreateBinding. The listeners and the order of their events are described in the class Javadoc.- Specified by:
createBindingin interfaceAbstractDataBinding<T extends org.eclipse.emf.ecore.EObject>- Overrides:
createBindingin classContainerSpinnerDataBinding<T extends org.eclipse.emf.ecore.EObject,V>
-
getFeature
public org.eclipse.emf.ecore.EStructuralFeature getFeature()Description copied from interface:EmfDataBindingGets the EMF structural feature being bound.- Specified by:
getFeaturein interfaceEmfDataBinding<T extends org.eclipse.emf.ecore.EObject,V> - Returns:
- The
EStructuralFeaturerepresenting the model attribute being bound to the UI control. This defines which property of the EObject container is being observed/modified.
-