Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » GEF » Difference in Behavior between Drag and Drop [using TemplateTransferDropTargetListener] and Click an
Difference in Behavior between Drag and Drop [using TemplateTransferDropTargetListener] and Click an [message #223298] Fri, 22 September 2006 14:45
Eclipse UserFriend
Originally posted by: siddharth.star.gmail.com

Hi,

I encountered a minor bug in my application probabaly because of some error
on my side and would be glad if any one of you can point that out.The bug
(difference in behavior when doing a drag and drop from palette and when
doing a click and drop from palette) is described below:

Say I have a Figure [A sub class of Shape] and there's an edit part and
model corresponding to this shape
The figure that i create also has a label within it.(The label is added to
the shape in the paintFigure method which has been overridden)

Now in my edit part's perform request method the bounds of the label is same
as the bounds of the figure/ shape in case of drag and drop
(TemplateTransferDropTargetListener) which is what I desire but in case of
click and drop (Creation Tool) its not the same.

I have fixed it by doing the following:
While creating the shape I add the label to the Shape
In the paint figure method I set the size of the label to be the same as
that of shape

Although the above fix has so far wroked fine for me I wanted to know why
does the two approaches of drag and drop and click and drop behave
diffrently with regards to setting the bounds of the label and if there is
some better fix which I should incorporate

Thanks alot for your help in advance

--
Regards,
Siddharth
Previous Topic:No more handles Exception - Please need help
Next Topic:Ask for EclipseUML
Goto Forum:
  


Current Time: Thu Apr 18 17:07:24 GMT 2024

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

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

Back to the top