org.eclipse.gmt.umlx.editor.domain
Class CreateDomain

java.lang.Object
  extended by org.eclipse.gmt.umlx.editor.domain.CreateDomain

public class CreateDomain
extends java.lang.Object

CreateDomain manages a multi-object creation, coordinating re-use of objects.


Constructor Summary
CreateDomain(ISheetEditor sheetEditor, java.lang.String label, org.eclipse.draw2d.geometry.Point offset)
           
 
Method Summary
 java.lang.Object createElement(java.lang.Object templateObject, java.lang.Object dropContext)
          Create a graphical model element for templateObject and any additional graphical model elements to make sense of the new element at the context defined by parent.
 void createElements(java.util.Collection<?> templateObjects, java.lang.Object dropContext)
          Create a graphical model element for each of elements and any additional graphical model elements to make sense of the new elements at the context defined by dropContext.
<CCM> java.lang.Object
createOrFindCoModel(CCM coCoModel, java.lang.Object dropContext)
          Return a current or future graphical model element for coModel with parent as its grahical parent attempting to create one if none exists
<CM> java.lang.Object
createOrFindModel(CM coModel, java.lang.Object dropContext)
          Return a current or future graphical model element for coModel with parent as its grahical parent attempting to create one if none exists
<CM> java.lang.Object
findModel(CM coModel, java.lang.Object dropContext)
          Return a current or future graphical model element for coModel with parent as its grahical parent.
 IAbstractCommand getCommand()
           
 IActiveEditDomain getEditDomain()
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CreateDomain

public CreateDomain(ISheetEditor sheetEditor,
                    java.lang.String label,
                    org.eclipse.draw2d.geometry.Point offset)
Method Detail

createElement

public java.lang.Object createElement(java.lang.Object templateObject,
                                      java.lang.Object dropContext)
Create a graphical model element for templateObject and any additional graphical model elements to make sense of the new element at the context defined by parent. e.g. handle the model update of a drop of elements at parent.

Parameters:
templateObject -
targetObject -

createElements

public void createElements(java.util.Collection<?> templateObjects,
                           java.lang.Object dropContext)
Create a graphical model element for each of elements and any additional graphical model elements to make sense of the new elements at the context defined by dropContext. e.g. handle the model update of a drop of elements at parent.

Parameters:
sourceObjects -
dropContext -

createOrFindCoModel

public <CCM> java.lang.Object createOrFindCoModel(CCM coCoModel,
                                                  java.lang.Object dropContext)
Return a current or future graphical model element for coModel with parent as its grahical parent attempting to create one if none exists

Type Parameters:
CM -
Parameters:
coModel -
dropContext -
Returns:
graphical model element or null

createOrFindModel

public <CM> java.lang.Object createOrFindModel(CM coModel,
                                               java.lang.Object dropContext)
Return a current or future graphical model element for coModel with parent as its grahical parent attempting to create one if none exists

Type Parameters:
CM -
Parameters:
coModel -
dropContext -
Returns:
graphical model element or null

findModel

public <CM> java.lang.Object findModel(CM coModel,
                                       java.lang.Object dropContext)
Return a current or future graphical model element for coModel with parent as its grahical parent.

Type Parameters:
CM -
Parameters:
coModel -
dropContext -
Returns:
graphical model element or null

getCommand

public IAbstractCommand getCommand()

getEditDomain

public IActiveEditDomain getEditDomain()