Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » GEF » How to attach a model to another one?
How to attach a model to another one? [message #200368] Sat, 22 October 2005 03:45
victor fiu is currently offline victor fiuFriend
Messages: 37
Registered: July 2009
Member
Hi, all,

I have two kinds of models. One's figure is a large rectangular and the
other's is a small circle. My program needs rectangular created before
circle. This is easy. But it also needs the diameter of the circle to be
part of one border of the rectangular (Half of the circle is inside the
rectangular, the other half outside). Does someone have good idea to do
this?

I was thinking of recording position and size of rectangular model and
adjusting the position of circle model during the creation of circle model.
The problem is that this would introduce to model many viewer stuff, so is
no good to MVC structure. More important thing is that it only happens after
the user drops the circle to editor (Idealy, when user drags circle from
palette, the mouse would enable dropping, disable dropping, or adsorb the
mouse to right position according to where the mouse is. But how to do
this?).

Thank you!
Miaohua Xu
Previous Topic:initializing a GraphicalEditor with an xml file
Next Topic:Show mouse position in status bar
Goto Forum:
  


Current Time: Tue Nov 12 16:05:59 GMT 2024

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

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

Back to the top