Class Preview
- java.lang.Object
-
- org.eclipse.emf.ecp.view.model.preview.common.Preview
-
public class Preview extends java.lang.Object
This class renders the contents of aVView
in aComposite
.
-
-
Constructor Summary
Constructors Constructor Description Preview(org.eclipse.swt.widgets.Composite parent)
The constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
cleanSampleData()
Clears the data that is rendered in the preview.void
clear()
Removes the previous rendering result from the parent Composite.org.eclipse.emf.ecore.EObject
getSampleData()
boolean
isUpdateAutomatic()
void
registerForViewModelChanges()
Adds adapter to listen to changes in the currently cached view model.void
removeAdapter()
void
removeView()
Removes the cached view.void
render(VView view, org.eclipse.emf.ecore.EObject sampleData)
Render the contents of theVView
.void
setUpdateAutomatic(boolean canAutomaticallyRender)
-
-
-
Method Detail
-
render
public void render(VView view, org.eclipse.emf.ecore.EObject sampleData)
Render the contents of theVView
.- Parameters:
view
- theVView
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.
-
-