Overview | Package | Class | Use | Tree | Deprecated | Index
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.eclipse.emfforms.spi.swt.core
Class AbstractSWTRenderer<VELEMENT extends VElement>

    java.lang.Object
      org.eclipse.emf.ecp.view.model.common.AbstractRenderer<VELEMENT>
          org.eclipse.emfforms.spi.swt.core.AbstractSWTRenderer<VELEMENT>

Type Parameters:
  `VELEMENT` - the actual type of the `VElement` to be drawn

Direct Known Subclasses:
  AbstractAdditionalSWTRenderer, AbstractControlSWTRenderer, AbstractJFaceTreeRenderer, AbstractSectionSWTRenderer, AbstractSWTTabRenderer, CompoundControlSWTRenderer, ContainerSWTRenderer, CustomControlSWTRenderer, EmbeddedGroupSWTRenderer, EmptyVElementSWTRenderer, GroupedGridSWTRenderer, HorizontalLayoutSWTRenderer, LabelSWTRenderer, SectionedAreaSWTRenderer, SWTCategorizationRenderer, SWTStackLayoutRenderer, TreeMasterDetailSWTRenderer, UnknownVElementSWTRenderer

    public abstract class AbstractSWTRenderer<VELEMENT extends VElement>

extends AbstractRenderer<VELEMENT>

Common base class for all SWT specific renderer classes. A renderer using other renderers to render its contents must call this methods in this order:

      getGridDescription(SWTGridDescription)
      for each SWTGridCell
            render(SWTGridCell, Composite)
     finalizeRendering(Composite)

If you don't call `finalizeRendering(Composite)` after the rendering, the automatic disposing of the renderer will not work, as well as the initial validation check.

Since:
  1.2
Author:
  Eugen Neufeld

Constructor Summary
`AbstractSWTRenderer(VELEMENT vElement, ViewModelContext viewContext, ReportService reportService)` Default Constructor.

Method Summary
`void` | `finalizeRendering(org.eclipse.swt.widgets.Composite parent)` Called by the framework to initialize listener.
`abstract SWTGridDescription` | `getGridDescription(SWTGridDescription gridDescription)` Returns the GridDescription for this Renderer.
`void` | `init()` Initializes the `AbstractSWTRenderer`.
`org.eclipse.swt.widgets.Control` | `render(SWTGridCell cell, org.eclipse.swt.widgets.Composite parent)` Renders the passed `VElement`.

Methods inherited from class org.eclipse.emf.ecp.view.model.common.AbstractRenderer
`getVElement, getViewModelContext`

Methods inherited from class java.lang.Object
`equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### AbstractSWTRenderer

    public AbstractSWTRenderer(VELEMENT vElement,
                               ViewModelContext viewContext,
                               ReportService reportService)

  Default Constructor.

  Parameters:
    `vElement` - the view element to be rendered
    `viewContext` - The view model context
    `reportService` - the ReportService to use
  Since:
    1.6

Method Detail

### getGridDescription

    public abstract SWTGridDescription getGridDescription(SWTGridDescription gridDescription)

  Returns the GridDescription for this Renderer.

  Parameters:
    `gridDescription` - the current `SWTGridDescription`
  Returns:
    the number of controls per row
  Since:
    1.3

### init

    public final void init()

  Initializes the `AbstractSWTRenderer`.

  Since:
    1.6

### render

    public org.eclipse.swt.widgets.Control render(SWTGridCell cell,
                                                  org.eclipse.swt.widgets.Composite parent)
                                           throws NoRendererFoundException,
                                                  NoPropertyDescriptorFoundExeption

  Renders the passed `VElement`.

  Parameters:
    `cell` - the `SWTGridCell` of the control to render
    `parent` - the `Composite` to render on
  Returns:
    the rendered `Control`
  Throws:
    `NoRendererFoundException` - this is thrown when a renderer cannot be found
    `NoPropertyDescriptorFoundExeption` - this is thrown when no property descriptor can be found
  Since:
    1.3

### finalizeRendering

    public void finalizeRendering(org.eclipse.swt.widgets.Composite parent)

  Called by the framework to initialize listener.

  Parameters:
    `parent` - the parent used during render
  Since:
    1.3

Overview | Package | Class | Use | Tree | Deprecated | Index
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2015. All Rights Reserved.