Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » Graphiti » Parent/Child hierarchy for shapes and GraphicsAlgorithm(Do I always need to create a shape for each child of a GraphicsAlgorithm ?)
Parent/Child hierarchy for shapes and GraphicsAlgorithm [message #1202727] Fri, 22 November 2013 09:33 Go to next message
Antoine Lorence is currently offline Antoine LorenceFriend
Messages: 3
Registered: September 2013
Junior Member
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 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 ?

[Updated on: Fri, 22 November 2013 15:49]

Report message to a moderator

Re: Parent/Child hierarchy for shapes and GraphicsAlgorithm [message #1208848 is a reply to message #1202727] Mon, 25 November 2013 07:54 Go to previous message
Hallvard Traetteberg is currently offline Hallvard TraettebergFriend
Messages: 601
Registered: July 2009
Location: Trondheim, Norway
Senior Member
Hi,

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 ?
Previous Topic:Create palette icons
Next Topic:Multiple textfields in AddFeature
Goto Forum:
  


Current Time: Thu Dec 18 14:26:21 GMT 2014

Powered by FUDForum. Page generated in 0.01626 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software