Skip to main content



      Home
Home » Eclipse Projects » GEF » How to make an editpart not selectable ?
How to make an editpart not selectable ? [message #105325] Mon, 17 November 2003 05:31 Go to next message
Eclipse UserFriend
Originally posted by: arnaud.siminski.infotel.com

Hello,

I am looking for a method to make an editpart not selectable.
I thought that removing the EditPolicy.COMPONENT_ROLE from its
EditPolicies would be enough but it seems that as soon as an EditPart is
contained in a parent that has a EditPolicy.LAYOUT_ROLE installed, the
editpart "child" turns into an object that we can select. Am I right with
my diagnostic?
What I am trying to do is just make the children of a certain EditPart no
selectable, thus all the events in the parent EditPart area would be
treated by the parent and no by the child contained inside. As I said i
tried to remove the COMENT_ROLE from these "children" editpart but it does
not work because the "parent" has got a "LAYOUT_ROLE" installed. Is there
another way to do it ?

Thanks for your help !

Regards,

Arnaud
Re: How to make an editpart not selectable ? [message #105342 is a reply to message #105325] Mon, 17 November 2003 05:51 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: nospam.gmx.net

Hello Arnaud,

have a look at the parent?s editpolicies (espacially the one, that is
assigned to LAYOUT_ROLE):
there could be a method called createChildEditPolicy.
I assume it returns new ResizableEditpolicy
Simply return null here.
Hope it fulfills your desired purposes!

Regards, Ingo



"Arnaud Siminski" <arnaud.siminski@infotel.com> wrote in message
news:bpa81v$m4h$1@eclipse.org...
> Hello,
>
> I am looking for a method to make an editpart not selectable.
> I thought that removing the EditPolicy.COMPONENT_ROLE from its
> EditPolicies would be enough but it seems that as soon as an EditPart is
> contained in a parent that has a EditPolicy.LAYOUT_ROLE installed, the
> editpart "child" turns into an object that we can select. Am I right with
> my diagnostic?
> What I am trying to do is just make the children of a certain EditPart no
> selectable, thus all the events in the parent EditPart area would be
> treated by the parent and no by the child contained inside. As I said i
> tried to remove the COMENT_ROLE from these "children" editpart but it does
> not work because the "parent" has got a "LAYOUT_ROLE" installed. Is there
> another way to do it ?
>
> Thanks for your help !
>
> Regards,
>
> Arnaud
>
Re: How to make an editpart not selectable ? [message #105355 is a reply to message #105342] Mon, 17 November 2003 06:20 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: arnaud.siminski.infotel.com

Thank you for the hint, that works just fine!


<nospam@gmx.net> wrote:

> Hello Arnaud,

> have a look at the parent?s editpolicies (espacially the one, that is
> assigned to LAYOUT_ROLE):
> there could be a method called createChildEditPolicy.
> I assume it returns new ResizableEditpolicy
> Simply return null here.
> Hope it fulfills your desired purposes!

> Regards, Ingo
Re: How to make an editpart not selectable ? [message #105370 is a reply to message #105325] Mon, 17 November 2003 10:14 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: none.us.ibm.com

When you editpart is grouped, have it return false from
EditPart.isSelectable.

"Arnaud Siminski" <arnaud.siminski@infotel.com> wrote in message
news:bpa81v$m4h$1@eclipse.org...
> Hello,
>
> I am looking for a method to make an editpart not selectable.
> I thought that removing the EditPolicy.COMPONENT_ROLE from its
> EditPolicies would be enough but it seems that as soon as an EditPart is
> contained in a parent that has a EditPolicy.LAYOUT_ROLE installed, the
> editpart "child" turns into an object that we can select. Am I right with
> my diagnostic?
> What I am trying to do is just make the children of a certain EditPart no
> selectable, thus all the events in the parent EditPart area would be
> treated by the parent and no by the child contained inside. As I said i
> tried to remove the COMENT_ROLE from these "children" editpart but it does
> not work because the "parent" has got a "LAYOUT_ROLE" installed. Is there
> another way to do it ?
>
> Thanks for your help !
>
> Regards,
>
> Arnaud
>
Re: How to make an editpart not selectable ? [message #105383 is a reply to message #105370] Mon, 17 November 2003 10:36 Go to previous message
Eclipse UserFriend
Originally posted by: arnaud.siminski.infotel.com

works out just fine, and the selection behavior is just what i needed,
thanks !

> Randy Hudson wrote:
> When you editpart is grouped, have it return false from
> EditPart.isSelectable.
Previous Topic:grouping EditParts
Next Topic:about call sequence of the editpart and figure?
Goto Forum:
  


Current Time: Sun Jun 08 08:48:55 EDT 2025

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

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

Back to the top