Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » GEF » prevent child figures from capturing mouse
prevent child figures from capturing mouse [message #176322] Sat, 09 April 2005 00:41 Go to next message
Eclipse UserFriend
Originally posted by: christian.sell.netcologne.de

Hello,

I have a figure which itself holds a container figure with several
labels as children. This is similar to the UML and schema editor examples.
Now I would like mouse drag events to always go to the outermost
enclosing figure, instead of to the label figures. I removed the layout
policy and thus got rid of the selection and drag feedback, but if I
click on a label, the outermost figure still loses focus, and I cannot
drag the figure.

I hope I am somewhat clear. This has kept me searching for a while, and
its late..
thanks,
christian
Re: prevent child figures from capturing mouse [message #176411 is a reply to message #176322] Sun, 10 April 2005 16:11 Go to previous messageGo to next message
Pratik Shah is currently offline Pratik ShahFriend
Messages: 1077
Registered: July 2009
Senior Member
The EditParts corresponding to the inner figures should over isSelectable()
and return false.

"Christian Sell" <christian.sell@netcologne.de> wrote in message
news:d378jr$gki$1@news.eclipse.org...
> Hello,
>
> I have a figure which itself holds a container figure with several
> labels as children. This is similar to the UML and schema editor examples.
> Now I would like mouse drag events to always go to the outermost
> enclosing figure, instead of to the label figures. I removed the layout
> policy and thus got rid of the selection and drag feedback, but if I
> click on a label, the outermost figure still loses focus, and I cannot
> drag the figure.
>
> I hope I am somewhat clear. This has kept me searching for a while, and
> its late..
> thanks,
> christian
Re: prevent child figures from capturing mouse [message #176646 is a reply to message #176411] Mon, 11 April 2005 15:21 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: none.us.ibm.com

Or, if you want them selectable but not draggable, you would have to create
a custom DragEditPartsTracker which swaps out the source editpart as soon as
handleDragStarted occurs.
"Pratik Shah" <ppshah@us.ibm.com> wrote in message
news:d3bjh5$19b$1@news.eclipse.org...
> The EditParts corresponding to the inner figures should over
> isSelectable()
> and return false.
>
> "Christian Sell" <christian.sell@netcologne.de> wrote in message
> news:d378jr$gki$1@news.eclipse.org...
>> Hello,
>>
>> I have a figure which itself holds a container figure with several
>> labels as children. This is similar to the UML and schema editor
>> examples.
>> Now I would like mouse drag events to always go to the outermost
>> enclosing figure, instead of to the label figures. I removed the layout
>> policy and thus got rid of the selection and drag feedback, but if I
>> click on a label, the outermost figure still loses focus, and I cannot
>> drag the figure.
>>
>> I hope I am somewhat clear. This has kept me searching for a while, and
>> its late..
>> thanks,
>> christian
>
>
Re: prevent child figures from capturing mouse [message #177026 is a reply to message #176646] Tue, 12 April 2005 18:31 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: christian.sell.netcologne.de

thanks for the tip. In fact, I would prefer to have the child parts
(database column parts inside a table part) selectable, but have the
drag apply to the table as a whole. I tried to do as you advised,
returning a custom DragEditPartsTracker from the getDragTracker method
of the inner part. The Tracker had the following method overridden:

protected boolean handleDragStarted() {
setSourceEditPart(outerPart);
return super.handleDragStarted();
}

However, this did not change anything. The columns are selectable (I
have a custom SelectionEditPolicy installed for the
EditPolicy.SELECTION_FEEDBACK_ROLE), but the drag operation does not do
anything.

thanks,
christian

Randy Hudson wrote:
> Or, if you want them selectable but not draggable, you would have to create
> a custom DragEditPartsTracker which swaps out the source editpart as soon as
> handleDragStarted occurs.
> "Pratik Shah" <ppshah@us.ibm.com> wrote in message
> news:d3bjh5$19b$1@news.eclipse.org...
>
>>The EditParts corresponding to the inner figures should over
>>isSelectable()
>>and return false.
>>
>>"Christian Sell" <christian.sell@netcologne.de> wrote in message
>>news:d378jr$gki$1@news.eclipse.org...
>>
>>>Hello,
>>>
>>>I have a figure which itself holds a container figure with several
>>>labels as children. This is similar to the UML and schema editor
>>>examples.
>>>Now I would like mouse drag events to always go to the outermost
>>>enclosing figure, instead of to the label figures. I removed the layout
>>>policy and thus got rid of the selection and drag feedback, but if I
>>>click on a label, the outermost figure still loses focus, and I cannot
>>>drag the figure.
>>>
>>>I hope I am somewhat clear. This has kept me searching for a while, and
>>>its late..
>>>thanks,
>>>christian
>>
>>
>
>
Re: prevent child figures from capturing mouse [message #177104 is a reply to message #177026] Tue, 12 April 2005 19:30 Go to previous message
Eclipse UserFriend
Originally posted by: none.us.ibm.com

Perhaps the source editpart has already been read and copied into the
Request, and setting it has no effect because the refresh request method
doesn't expect that parametere to change.

"Christian Sell" <christian.sell@netcologne.de> wrote in message
news:d3h4gj$83f$1@news.eclipse.org...
> thanks for the tip. In fact, I would prefer to have the child parts
> (database column parts inside a table part) selectable, but have the drag
> apply to the table as a whole. I tried to do as you advised, returning a
> custom DragEditPartsTracker from the getDragTracker method of the inner
> part. The Tracker had the following method overridden:
>
> protected boolean handleDragStarted() {
> setSourceEditPart(outerPart);
> return super.handleDragStarted();
> }
>
> However, this did not change anything. The columns are selectable (I have
> a custom SelectionEditPolicy installed for the
> EditPolicy.SELECTION_FEEDBACK_ROLE), but the drag operation does not do
> anything.
Previous Topic:editing 3.1 example
Next Topic:how to update the palette
Goto Forum:
  


Current Time: Sat Feb 04 02:32:53 GMT 2023

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

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

Back to the top