com.sysord.mad.emitter.impl
Class SWTViewBuilder

java.lang.Object
  extended by com.sysord.mad.emitter.impl.AbstractViewBuilder
      extended by com.sysord.mad.emitter.impl.SWTViewBuilder
All Implemented Interfaces:
com.sysord.mad.emitter.ViewBuilder, com.sysord.mad.widget.SpecificContextHolder

public class SWTViewBuilder
extends com.sysord.mad.emitter.impl.AbstractViewBuilder
implements com.sysord.mad.widget.SpecificContextHolder

Implementation of the AbstractViewBuilder using FormToolkit.

Author:
Fabien Vignal

Nested Class Summary
 
Nested classes/interfaces inherited from class com.sysord.mad.emitter.impl.AbstractViewBuilder
com.sysord.mad.emitter.impl.AbstractViewBuilder.ViewBuilderEventImpl
 
Field Summary
protected  java.util.Map<java.lang.String,SWTSpecificWidgetContext> contexts
          Contexts for each tab
protected  SWTSpecificWidgetContext currentContext
          Current populating context
protected  com.sysord.mad.evaluator.FormatExpressionEvaluationService formatExprEvaluationService
           
static int GRID_COLUMNS
           
protected  com.sysord.emf.tools.misc.EMFImageProvider imageProvider
           
 org.eclipse.swt.graphics.Point lastOrigin
           
protected  boolean tabListenerActive
           
protected  java.util.Map<org.eclipse.emf.ecore.EClass,java.lang.Integer> tabsCache
          Selected tab for a specific selected object.
protected  com.sysord.mad.emitter.ModelElementView view
          Current view
protected  com.sysord.mad.widget.WidgetBuilder widgetBuilder
           
 
Fields inherited from class com.sysord.mad.emitter.impl.AbstractViewBuilder
configurationManager, context, listeners, logger, mao
 
Constructor Summary
SWTViewBuilder()
          Create a FormViewBuilder.
 
Method Summary
protected  void createSpecificView(com.sysord.mad.emitter.ModelElementView view)
           
protected  org.eclipse.swt.widgets.Composite createView(SWTSpecificWidgetContext swtContext)
          Create the composite view corresponding to the ModelElementView using FormToolkit.
protected  void dispose()
          Dispose this ViewBuilder.
 com.sysord.mad.widget.SpecificWidgetContext getSpecificWidgetContext()
           
 org.eclipse.ui.forms.widgets.FormToolkit getToolkit(org.eclipse.swt.widgets.Composite composite)
          Return the value of toolkit.
 void setSpecificWidgetContext(com.sysord.mad.widget.SpecificWidgetContext specificWidgetContext)
           
 
Methods inherited from class com.sysord.mad.emitter.impl.AbstractViewBuilder
addViewBuilderListener, buildView, createView, getCurrentContext, getOutputWidget, notify, removeViewBuilderListener, updateCurrentView, updateCurrentViewOuputputWidgets
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

GRID_COLUMNS

public static final int GRID_COLUMNS
See Also:
Constant Field Values

lastOrigin

public org.eclipse.swt.graphics.Point lastOrigin

contexts

protected java.util.Map<java.lang.String,SWTSpecificWidgetContext> contexts
Contexts for each tab


currentContext

protected SWTSpecificWidgetContext currentContext
Current populating context


view

protected com.sysord.mad.emitter.ModelElementView view
Current view


tabsCache

protected java.util.Map<org.eclipse.emf.ecore.EClass,java.lang.Integer> tabsCache
Selected tab for a specific selected object.


tabListenerActive

protected boolean tabListenerActive

widgetBuilder

@Inject
protected com.sysord.mad.widget.WidgetBuilder widgetBuilder

imageProvider

@Inject
protected com.sysord.emf.tools.misc.EMFImageProvider imageProvider

formatExprEvaluationService

@Inject
protected com.sysord.mad.evaluator.FormatExpressionEvaluationService formatExprEvaluationService
Constructor Detail

SWTViewBuilder

public SWTViewBuilder()
Create a FormViewBuilder.

Method Detail

createSpecificView

protected void createSpecificView(com.sysord.mad.emitter.ModelElementView view)
Specified by:
createSpecificView in class com.sysord.mad.emitter.impl.AbstractViewBuilder

getToolkit

public org.eclipse.ui.forms.widgets.FormToolkit getToolkit(org.eclipse.swt.widgets.Composite composite)
Return the value of toolkit.

Parameters:
composite -
Returns:
the value of toolkit.

getSpecificWidgetContext

public com.sysord.mad.widget.SpecificWidgetContext getSpecificWidgetContext()
Specified by:
getSpecificWidgetContext in interface com.sysord.mad.widget.SpecificContextHolder

setSpecificWidgetContext

public void setSpecificWidgetContext(com.sysord.mad.widget.SpecificWidgetContext specificWidgetContext)
Specified by:
setSpecificWidgetContext in interface com.sysord.mad.widget.SpecificContextHolder

createView

protected org.eclipse.swt.widgets.Composite createView(SWTSpecificWidgetContext swtContext)
Create the composite view corresponding to the ModelElementView using FormToolkit.

Parameters:
swtContext -

dispose

protected void dispose()
Dispose this ViewBuilder.