Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Standard Widget Toolkit (SWT) » Complex figures problem
Complex figures problem [message #437647] Wed, 09 June 2004 12:38
Eclipse UserFriend
Originally posted by: raritzu.yahoo.co.uk

I dont have a huge experience with the draw2d objects, but I am quite
familiar with GEF.
I written a GEF framework. One of my figure that represents a model is a
org.eclipse.draw2d.Button (descendant). My problem is as follows: When I
select the button figure on my EditPart, it gets the click behaviour (like
the button would normally do), but I am not able to drag/move my button,
unless I catch it very nearly the edges. When I looked into a bit deeper, I
discovered that this behaviour is because the Button creates a child, it
calls it the "content", a Label instance, that will be layed out using
StackLayout, and will cover the Button's container Figure. So when I select
my Button (anywhere away from the edges) I actually select the Label hosted
in the Button. What happens next is that the SelectionTool.mouseUp will
discover that the dragTracker is null, which is a consequence of the Label
figure that is inside the Button does not have an editpart associated with
it (at least thats what I think), so the result is that I will not be able
to move the button.
But I want to be able to move the button, and I also want to keep the
clickable behaviour. What I thought is that if I could forward aswell these
mouse move,up,down,drag events from the Label hosted in the button, to the
button it would solve my problem. In one word I want to generate events like
the LightweightSystem does (mouse events). And I am not sure how would I do
this.

Any help would be appreciated.
Cheers,
Art.
Previous Topic:No More Handle when creating Image on Linux/motif
Next Topic:SWT Thread problem under Linux (GTK)
Goto Forum:
  


Current Time: Tue Apr 23 08:54:16 GMT 2024

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

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

Back to the top