|Automatically creating additional shapes on a drop from the pallete [message #235244]
||Thu, 07 June 2007 13:38
Originally posted by: jfolap.gmail.com|
I am experimenting with the Shape Diagram editor in an effort to prototype
some concepts I am considering for an application which I need to write and
become familiar with GEF. One of the concepts is that an item on the
palette would create several items on the canvas. Example: I drag an
Ellipse onto the palette and a triangle is created in addition to the
I know I can simply redefine the EllipseShape to be an IFigure that draws
both an ellipse and triangle, but I want both figures to be model elements
and managed by controllers so they are individually selectable.
I am a bit unclear on how to implement this. My first attempt was to have
the ShapeEditPart create another ShapeEditPart for the triangle (I created a
new TriangleShape) when creating the ellipse. For example I modified
ShapeEditPart.createFigureForModel() to create a ShapeEditPart to control
the triangle. However I am not having much success.
My other guess is that I need to use a customized CreationFactory when
creating the CombinedTemplateCreationEntry on the palette for the ellipse.
However it seems that the CreationFactory (as should be expected) only
returns a single object.
I am sure I am missing some basic insight into the framework and would
appreciate any clues.
Powered by FUDForum
. Page generated in 0.01411 seconds