Eclipse Community Forums - RDF feed
https://www.eclipse.org/forums/
Eclipse Community ForumsParent/Child hierarchy for shapes and GraphicsAlgorithm
https://www.eclipse.org/forums/index.php/mv/msg/612182/1202727/#msg_1202727
I am writing a graph editor for a dataflow application. I follow Graphiti online help and create for each object on my diagram a top level ContainerShape containing other ContainerShapes or Shapes. Each one has its own corresponding GraphicsAlgorithm and it works but the resulting model is pretty complicated.
I saw that IGaCreateService.createXXX methods asks for a GraphicsAlgorithmContainer as parameter. So a new GraphicsAlgorithm can be created as child of a PictogramElement OR a GraphicsAlgorithm.
My question is : Is it interesting to create Shapes/ContainerShapes only when it is necessary and create complex graphical objects by appending GraphicsAlgorithm to other GraphicsAlgorithm (when it is possible) ?
Is it a mistake, a very bad thing or could it be a nice choice to simplify the diagram hierarchy ?]]>Antoine Lorence2013-11-22T09:33:46-00:00Re: Parent/Child hierarchy for shapes and GraphicsAlgorithm
https://www.eclipse.org/forums/index.php/mv/msg/612182/1208848/#msg_1208848
I think the answer to your question is yes. Shapes are created when you
want to link to a model element, whereas GraphicsAlgorithms provide the
visualization of the shape it's within and can be arbitrary complex and
nested.
Hallvard
On 22.11.13 10:33, Antoine Lorence wrote:
> Hi,
>
> I am writing a graph editor for a dataflow application. I follow
> Graphiti online help and create for each object on my diagram a top
> level ContainerShape containing other ContainerShapes or Shapes. Each
> one has its own corresponding GraphicsAlgorithm and it works but the
> resulting model is pretty complicated.
>
> I saw that IGaCreateService.createXXX methods asks for a
> GraphicsAlgorithmContainer as parameter. So a new GraphicsAlgorithm can
> be created as children of a PictogramElement OR a GraphicsAlgorithm.
>
> My question is : Is it interesting to create Shapes/ContainerShapes only
> when it is necessary and create complex graphical objects by appending
> GraphicsAlgorithm to other GraphicsAlgorithm (when it is possible) ?
>
> Is it a mistake, a very bad thing or could it be a nice choice to
> simplify the entire diagram hierarchy ?]]>Hallvard Traetteberg2013-11-25T07:54:58-00:00