Package com._1c.g5.aef2.swt.renderers
Class SwtDialogRenderer
- java.lang.Object
-
- com._1c.g5.aef2.swt.renderers.SwtDialogRenderer
-
- All Implemented Interfaces:
IRenderer<SwtDialogRenderingParameters>
- Direct Known Subclasses:
SwtStandardDialogRenderer
public abstract class SwtDialogRenderer extends Object implements IRenderer<SwtDialogRenderingParameters>
The SWT dialog renderer.
-
-
Constructor Summary
Constructors Constructor Description SwtDialogRenderer(SwtRenderer contentRenderer)
Instantiates a new SWT dialog renderer.
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected abstract org.eclipse.core.databinding.observable.value.IObservableValue<?>
createOkButtonEnableObservable(IDialogViewModel viewModel)
Creates theIObservableValue
for enable state of the ok button.void
dispose()
Disposes this renderer.protected abstract org.eclipse.swt.graphics.Point
getInitialSize(IDialogViewModel viewModel)
Returns the initial size of the dialog.protected SwtDialogRenderingParameters
getParameters()
protected String
getTitle(IDialogViewModel viewModel)
Returns the title of the dialog.protected ITreeTransformation
getTreeTransformation()
Returns theITreeTransformation
instance.void
initialize(SwtDialogRenderingParameters parameters)
Initialized the renderer with the given parameters.protected boolean
isResizable(IDialogViewModel viewModel)
Returns the resizable flag of the dialog.void
relayout()
Triggers layout processing.void
render(Iterable<IViewModel> viewModels)
Renders the provided view models.void
setTreeTransformation(ITreeTransformation treeTransformation)
Sets theITreeTransformation
instance.
-
-
-
Constructor Detail
-
SwtDialogRenderer
public SwtDialogRenderer(SwtRenderer contentRenderer)
Instantiates a new SWT dialog renderer.- Parameters:
contentRenderer
- the content renderer to use by this dialog renderer to display the content of dialog.
-
-
Method Detail
-
initialize
public void initialize(SwtDialogRenderingParameters parameters)
Description copied from interface:IRenderer
Initialized the renderer with the given parameters.- Specified by:
initialize
in interfaceIRenderer<SwtDialogRenderingParameters>
- Parameters:
parameters
- the renderer parameters.
-
relayout
public void relayout()
Description copied from interface:IRenderer
Triggers layout processing.- Specified by:
relayout
in interfaceIRenderer<SwtDialogRenderingParameters>
-
render
public void render(Iterable<IViewModel> viewModels)
Description copied from interface:IRenderer
Renders the provided view models.- Specified by:
render
in interfaceIRenderer<SwtDialogRenderingParameters>
- Parameters:
viewModels
- the view models to render.
-
dispose
public void dispose()
Description copied from interface:IRenderer
Disposes this renderer.- Specified by:
dispose
in interfaceIRenderer<SwtDialogRenderingParameters>
-
getParameters
protected final SwtDialogRenderingParameters getParameters()
- Returns:
- this renderer rendering parameters.
-
getTreeTransformation
protected final ITreeTransformation getTreeTransformation()
Returns theITreeTransformation
instance.- Returns:
- the
ITreeTransformation
instance.
-
setTreeTransformation
public void setTreeTransformation(ITreeTransformation treeTransformation)
Description copied from interface:IRenderer
Sets theITreeTransformation
instance.- Specified by:
setTreeTransformation
in interfaceIRenderer<SwtDialogRenderingParameters>
-
getInitialSize
protected abstract org.eclipse.swt.graphics.Point getInitialSize(IDialogViewModel viewModel)
Returns the initial size of the dialog.- Parameters:
viewModel
- the view model.- Returns:
- the initial size of the dialog.
-
createOkButtonEnableObservable
protected abstract org.eclipse.core.databinding.observable.value.IObservableValue<?> createOkButtonEnableObservable(IDialogViewModel viewModel)
Creates theIObservableValue
for enable state of the ok button.- Parameters:
viewModel
- the view model.- Returns:
- the newly created
IObservableValue
.
-
getTitle
protected String getTitle(IDialogViewModel viewModel)
Returns the title of the dialog.- Parameters:
viewModel
- the view model.- Returns:
- the title of the dialog.
-
isResizable
protected boolean isResizable(IDialogViewModel viewModel)
Returns the resizable flag of the dialog.- Parameters:
viewModel
- the view model.- Returns:
- the resizable flag of the dialog.
-
-