Package org.eclipse.emfforms.spi.editor
Class InitializeChildCallback
- java.lang.Object
-
- org.eclipse.emfforms.spi.editor.InitializeChildCallback
-
- All Implemented Interfaces:
CreateElementCallback
public class InitializeChildCallback extends java.lang.Object implements CreateElementCallback
This CreateElementCallback display a CreateDialog to the user that allows setting initial Values for the newly created element.- Author:
- Clemens Elflein
-
-
Constructor Summary
Constructors Constructor Description InitializeChildCallback()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
afterCreateElement(java.lang.Object newElement)
Gets called after a new element was added to the domain model.boolean
beforeCreateElement(java.lang.Object newElement)
Gets called after the new Element has been added to the containment tree.void
initElement(org.eclipse.emf.ecore.EObject parent, org.eclipse.emf.ecore.EReference reference, org.eclipse.emf.ecore.EObject newObject)
Gets called before the new object has been added to containment tree.
-
-
-
Method Detail
-
initElement
public void initElement(org.eclipse.emf.ecore.EObject parent, org.eclipse.emf.ecore.EReference reference, org.eclipse.emf.ecore.EObject newObject)
Description copied from interface:CreateElementCallback
Gets called before the new object has been added to containment tree. Users may make changes to the newObject inside this method only. Changing the passed parent or reachable classes in any way might cause unwanted side effects. The future parent is passed to this method for read only reasons in order to perform all necessary init tasks.- Specified by:
initElement
in interfaceCreateElementCallback
- Parameters:
parent
- the future parentreference
- the parent referencenewObject
- the newly created EObject, which should be initialized.
-
beforeCreateElement
public boolean beforeCreateElement(java.lang.Object newElement)
Description copied from interface:CreateElementCallback
Gets called after the new Element has been added to the containment tree. This method may be used to allow the user to modify the newly created element or to allow the user canceling the add.- Specified by:
beforeCreateElement
in interfaceCreateElementCallback
- Parameters:
newElement
- The new element- Returns:
true
if the element should be kept in the containment tree,false
if it should be removed again
-
afterCreateElement
public void afterCreateElement(java.lang.Object newElement)
Description copied from interface:CreateElementCallback
Gets called after a new element was added to the domain model.- Specified by:
afterCreateElement
in interfaceCreateElementCallback
- Parameters:
newElement
- the new Element.
-
-