Class Preview


  • public class Preview
    extends java.lang.Object
    This class renders the contents of a VView in a Composite.
    • Constructor Summary

      Constructors 
      Constructor Description
      Preview​(org.eclipse.swt.widgets.Composite parent)
      The constructor.
    • Constructor Detail

      • Preview

        public Preview​(org.eclipse.swt.widgets.Composite parent)
        The constructor.
        Parameters:
        parent - - the Composite in which to render
    • Method Detail

      • render

        public void render​(VView view,
                           org.eclipse.emf.ecore.EObject sampleData)
        Render the contents of the VView.
        Parameters:
        view - the VView
        sampleData - the sample data to be displayed in the view
      • registerForViewModelChanges

        public void registerForViewModelChanges()
        Adds adapter to listen to changes in the currently cached view model.
      • removeAdapter

        public void removeAdapter()
      • clear

        public void clear()
        Removes the previous rendering result from the parent Composite.
      • removeView

        public void removeView()
        Removes the cached view.
      • isUpdateAutomatic

        public boolean isUpdateAutomatic()
        Returns:
        the canAutomaticallyRender
      • setUpdateAutomatic

        public void setUpdateAutomatic​(boolean canAutomaticallyRender)
        Parameters:
        canAutomaticallyRender - the canAutomaticallyRender to set
      • cleanSampleData

        public void cleanSampleData()
        Clears the data that is rendered in the preview.
      • getSampleData

        public org.eclipse.emf.ecore.EObject getSampleData()
        Returns:
        the domain model EObject containing the data that is being rendered in the preview.