Class AbstractSwtSpinnerView<VM extends ControlViewModel>
- java.lang.Object
-
- com._1c.g5.aef2.views.View<SwtRenderingParameters,VM,NC>
-
- com._1c.g5.aef2.swt.views.SwtView<VM,NC>
-
- com._1c.g5.aef2.standard.swt.views.SwtStandardView<VM,org.eclipse.swt.widgets.Spinner>
-
- com._1c.g5.aef2.standard.swt.views.AbstractSwtSpinnerView<VM>
-
- All Implemented Interfaces:
IView<SwtRenderingParameters,VM,org.eclipse.swt.widgets.Spinner>
- Direct Known Subclasses:
SwtBigDecimalSpinnerView,SwtDoubleSpinnerView,SwtLongSpinnerView,SwtSpinnerView
public abstract class AbstractSwtSpinnerView<VM extends ControlViewModel> extends SwtStandardView<VM,org.eclipse.swt.widgets.Spinner>
Abstract parent for swt views for spinners.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description protected static classAbstractSwtSpinnerView.NumberToNumberConverter<F extends Number,T extends Number>The abstractIConverterfor spinner view that converts number to number.
-
Constructor Summary
Constructors Constructor Description AbstractSwtSpinnerView()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected voidbind(VM viewModel, org.eclipse.swt.widgets.Spinner nativeControl)Binds the view model and native control together to this view.protected intcomputeNativeStyle(VM viewModel)Computes an SWT widget style flags.org.eclipse.swt.widgets.SpinnercreateControl(org.eclipse.swt.widgets.Composite parent, VM viewModel)Creates a native control for the view without decorations.protected abstract org.eclipse.core.databinding.conversion.IConvertercreateControlToModelConverter()Creates control to model converter.protected abstract org.eclipse.core.databinding.conversion.IConvertercreateModelToControlConverter()Creates model to control converter.protected abstract org.eclipse.emf.ecore.EStructuralFeaturegetMaximumFeature()Gets the maximum feature.protected abstract org.eclipse.emf.ecore.EStructuralFeaturegetMinimumFeature()Gets the minimum feature.protected abstract org.eclipse.emf.ecore.EStructuralFeaturegetValueFeature()Gets the value feature.-
Methods inherited from class com._1c.g5.aef2.standard.swt.views.SwtStandardView
createNativeControl, setEnabledApperance
-
Methods inherited from class com._1c.g5.aef2.swt.views.SwtView
getContentControl, handleFocusEvent, isControlDisposed, setContentControl, uiAsyncExec, uiSyncExec
-
Methods inherited from class com._1c.g5.aef2.views.View
bindListener, bindNativeControl, bindValue, bindValue, bindViewModel, getNativeControl, getParameters, getViewModel, handleEventChannelEvent, initialize, manageObservable, queueAndWaitEvent, queueEvent, registerEventChannelListener, unbind, unbindNativeControl, unbindViewModel, unmanageObservable, unregisterEventChannelListener
-
-
-
-
Method Detail
-
bind
protected void bind(VM viewModel, org.eclipse.swt.widgets.Spinner nativeControl)
Description copied from class:ViewBinds the view model and native control together to this view. Override this method to customize the binding.- Overrides:
bindin classSwtStandardView<VM extends ControlViewModel,org.eclipse.swt.widgets.Spinner>- Parameters:
viewModel- the view model to bind.nativeControl- the native control to bind.
-
createControl
public org.eclipse.swt.widgets.Spinner createControl(org.eclipse.swt.widgets.Composite parent, VM viewModel)Description copied from class:SwtStandardViewCreates a native control for the view without decorations.- Specified by:
createControlin classSwtStandardView<VM extends ControlViewModel,org.eclipse.swt.widgets.Spinner>- Parameters:
parent- the parent composite to place a control in.viewModel- the view mode to create a control for.- Returns:
- the newly created control
-
computeNativeStyle
protected int computeNativeStyle(VM viewModel)
Description copied from class:SwtViewComputes an SWT widget style flags. Override it to customize the flags.- Overrides:
computeNativeStylein classSwtView<VM extends ControlViewModel,org.eclipse.swt.widgets.Spinner>- Parameters:
viewModel- the view model to compute a style from.- Returns:
- the computed style.
- See Also:
Widget.getStyle()
-
getMinimumFeature
protected abstract org.eclipse.emf.ecore.EStructuralFeature getMinimumFeature()
Gets the minimum feature.- Returns:
- The minimum feature.
-
getMaximumFeature
protected abstract org.eclipse.emf.ecore.EStructuralFeature getMaximumFeature()
Gets the maximum feature.- Returns:
- The maximum feature.
-
getValueFeature
protected abstract org.eclipse.emf.ecore.EStructuralFeature getValueFeature()
Gets the value feature.- Returns:
- The value feature.
-
createControlToModelConverter
protected abstract org.eclipse.core.databinding.conversion.IConverter createControlToModelConverter()
Creates control to model converter.- Returns:
IConverterinstance, cannot benull.
-
createModelToControlConverter
protected abstract org.eclipse.core.databinding.conversion.IConverter createModelToControlConverter()
Creates model to control converter.- Returns:
IConverterinstance, cannot benull.
-
-