Class SwtGridView
- 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<GridViewModel,org.eclipse.nebula.widgets.grid.Grid>
-
- com._1c.g5.v8.dt.ui.aef.swt.views.grid.SwtGridView
-
- All Implemented Interfaces:
IView<SwtRenderingParameters,GridViewModel,org.eclipse.nebula.widgets.grid.Grid>
public class SwtGridView extends SwtStandardView<GridViewModel,org.eclipse.nebula.widgets.grid.Grid>
The SWT grid view.
Works withGridViewModel
and reflects it to Nebula grid control.It builds column structure in accordance with view model. Each column has an associated cell editor. Cell editor creation is handled by grid component to support AEF editors.
- See Also:
GridViewModel
,IGridEvent
-
-
Constructor Summary
Constructors Constructor Description SwtGridView()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
bind(GridViewModel viewModel, org.eclipse.nebula.widgets.grid.Grid grid)
Binds the view model and native control together to this view.protected org.eclipse.nebula.widgets.grid.Grid
createControl(org.eclipse.swt.widgets.Composite parent, GridViewModel viewModel)
Creates a native control for the view without decorations.protected void
handleEventChannelEvent(IEvent event, GridViewModel viewModel, org.eclipse.nebula.widgets.grid.Grid control)
Handles events fromIEventChannel
.void
unbind(GridViewModel viewModel, org.eclipse.nebula.widgets.grid.Grid nativeControl)
Unbinds the view model and the native control from this view.-
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
computeNativeStyle, getContentControl, handleFocusEvent, isControlDisposed, setContentControl, uiAsyncExec, uiSyncExec
-
Methods inherited from class com._1c.g5.aef2.views.View
bindListener, bindNativeControl, bindValue, bindValue, bindViewModel, getNativeControl, getParameters, getViewModel, initialize, manageObservable, queueAndWaitEvent, queueEvent, registerEventChannelListener, unbindNativeControl, unbindViewModel, unmanageObservable, unregisterEventChannelListener
-
-
-
-
Method Detail
-
bind
public void bind(GridViewModel viewModel, org.eclipse.nebula.widgets.grid.Grid grid)
Description copied from class:View
Binds the view model and native control together to this view. Override this method to customize the binding.- Overrides:
bind
in classSwtStandardView<GridViewModel,org.eclipse.nebula.widgets.grid.Grid>
- Parameters:
viewModel
- the view model to bind.grid
- the native control to bind.
-
unbind
public void unbind(GridViewModel viewModel, org.eclipse.nebula.widgets.grid.Grid nativeControl)
Description copied from class:View
Unbinds the view model and the native control from this view. Override this method to customize the unbinding.- Overrides:
unbind
in classView<SwtRenderingParameters,GridViewModel,org.eclipse.nebula.widgets.grid.Grid>
- Parameters:
viewModel
- the view mode to unbind.nativeControl
- the native control to unbind.
-
handleEventChannelEvent
protected void handleEventChannelEvent(IEvent event, GridViewModel viewModel, org.eclipse.nebula.widgets.grid.Grid control)
Description copied from class:View
Handles events fromIEventChannel
. By default handles only focus events.- Overrides:
handleEventChannelEvent
in classView<SwtRenderingParameters,GridViewModel,org.eclipse.nebula.widgets.grid.Grid>
- Parameters:
event
- the event, cannot benull
.viewModel
- the view model, cannot benull
.control
- the control, cannot benull
.
-
createControl
protected org.eclipse.nebula.widgets.grid.Grid createControl(org.eclipse.swt.widgets.Composite parent, GridViewModel viewModel)
Description copied from class:SwtStandardView
Creates a native control for the view without decorations.- Specified by:
createControl
in classSwtStandardView<GridViewModel,org.eclipse.nebula.widgets.grid.Grid>
- Parameters:
parent
- the parent composite to place a control in.viewModel
- the view mode to create a control for.- Returns:
- the newly created control
-
-