Skip to main content



      Home
Home » Eclipse Projects » GEF » Selecting nodes
Selecting nodes [message #68448] Thu, 06 March 2003 00:59 Go to next message
Eclipse UserFriend
Originally posted by: m.spork.NOSPAMtpg.com.au

In the Logic example - what role and edit policy enables a Circuit to
be selected?

As I said in a previsous post I've been using the logic example as a
guide to creating my own container nodes. I must have mucked something
up because I cannot select my container node by clicking on it with
the mouse like you can with Circuit in the Logic example.

When I first create a new container node it is selected and this
enables me to reposition it and resize it. But if I deselect it by
clicking on any other node I can not reselect it. All I can do is drag
a selection box around the whole container node which selects the
container as well as any children it contains.

Any hints where I should be looking?

Thanks
Murray
Re: Selecting nodes [message #68472 is a reply to message #68448] Thu, 06 March 2003 02:42 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: m.spork.NOSPAMtpg.com.au

On Thu, 06 Mar 2003 15:59:54 +1000, Murray Spork
<m.spork@NOSPAMtpg.com.au> wrote:

>
>In the Logic example - what role and edit policy enables a Circuit to
>be selected?
> As I said in a previsous post I've been using the logic example as a
>guide to creating my own container nodes. I must have mucked something
>up because I cannot select my container node by clicking on it with
>the mouse like you can with Circuit in the Logic example.
[...]

I have a feeling this is related to Randy's suggestion in a previous
thread that I override boolean EditPart.isSelectable() in my child
container's edit part - these children are contained within a parent
container - and it is the parent container that I want to be
selectable. I suspect that as the child containers do not have an
associated selection edit policy - clicking on the child containers is
not being delegated to the parent container.

I tried overiding isSelectable to return false in the Child container
edit part but this didn't work. I'm wondering if this is because this
functionality was not present in the I20030107 build - in which case I
need to upgrade? I was kinda hoping to avoid upgrading at this point
but if this is the case I will do so.

Thanks again,

Murray
Re: Selecting nodes [message #68649 is a reply to message #68472] Thu, 06 March 2003 08:49 Go to previous message
Eclipse UserFriend
Originally posted by: none.us.ibm.com

The best way to find out what is happening is put a breakpoing in the
SelectionTool's mouse down and find out what is getting targeted
(GraphicalViewerImpl.findObjectAt(...)). A Selection editpolicy is not
needed to allow your EditPart to be selected. It is usually needed however
if you want to *see* (via handles) that the part is selected.

We also have a trace view that can log useful information such as what is
under the active tool. But, we have to disable this view by default because
otherwise it would appear in products.

"Murray Spork" <m.spork@NOSPAMtpg.com.au> wrote in message
news:jjud6v8k39ailo2n9tbce37tu9sei8709e@4ax.com...
> On Thu, 06 Mar 2003 15:59:54 +1000, Murray Spork
> <m.spork@NOSPAMtpg.com.au> wrote:
>
> >
> >In the Logic example - what role and edit policy enables a Circuit to
> >be selected?
> > As I said in a previsous post I've been using the logic example as a
> >guide to creating my own container nodes. I must have mucked something
> >up because I cannot select my container node by clicking on it with
> >the mouse like you can with Circuit in the Logic example.
> [...]
>
> I have a feeling this is related to Randy's suggestion in a previous
> thread that I override boolean EditPart.isSelectable() in my child
> container's edit part - these children are contained within a parent
> container - and it is the parent container that I want to be
> selectable. I suspect that as the child containers do not have an
> associated selection edit policy - clicking on the child containers is
> not being delegated to the parent container.
>
> I tried overiding isSelectable to return false in the Child container
> edit part but this didn't work. I'm wondering if this is because this
> functionality was not present in the I20030107 build - in which case I
> need to upgrade? I was kinda hoping to avoid upgrading at this point
> but if this is the case I will do so.
>
> Thanks again,
>
> Murray
Previous Topic:GEF dependencies?
Next Topic:Getting the contents of the current EditPartViewer
Goto Forum:
  


Current Time: Sun May 04 10:47:01 EDT 2025

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

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

Back to the top