Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » GMF (Graphical Modeling Framework) » Draw rectangle on canvas and attach elements to it
Draw rectangle on canvas and attach elements to it [message #555901] Mon, 30 August 2010 07:24
Cedric Moonen is currently offline Cedric MoonenFriend
Messages: 274
Registered: August 2009
Senior Member
Hello,

I am currently designing a graphical editor which allow the user to place components on the diagram. These components have input ports and ouptut ports. The user can then connect the different elements via those ports (so, something very similar as an electronic logic diagram). All the elements have a predefined number of input/output ports but one element is a "composite" element: the user can add any number of input/output ports and double-click the component to open it in another diagram. The user can then add elements ("sub-elements") to this diagram.

I have been able to fulfill most of my requirements but now I am looking for something specific for this composite element. When the element is opened in another diagram, I would like to draw a rectangle on the canvas (which represents the component borders). This rectangle could be resized by the user if needed (it has a default size which might be too small for instance). Then, the input ports are affixed on the left side of the rectangle and the ouptut ports are affixed on the right side of the rectangle (they can be moved, but only on those two sides).

Any idea how I can achieve something like that ?
Thanks
Previous Topic:after switch to Helios, view node is duplicated on DnD
Next Topic:How to model connections with containment references
Goto Forum:
  


Current Time: Thu Sep 19 17:48:31 GMT 2024

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

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

Back to the top