Home » Eclipse Projects » GEF » How can I select a connection
How can I select a connection [message #92068] |
Tue, 02 September 2003 13:00  |
Eclipse User |
|
|
|
Originally posted by: felix.mayer.cingular.com
I know that I can select a connection by clicking on it with the mouse.
However, I would also like to select it in two different ways:
1. By dragging a selection box over it with the mouse cursor. This works
fine with nodes, but connections are unaffected. I think need this in
order to move AbsoluteBendpoints.
2. By clicking close (defined in pixels) to the connection instead of
directly on it. This is just for convenience.
I would be grateful for any ideas.
|
|
| |
Re: How can I select a connection [message #92132 is a reply to message #92086] |
Tue, 02 September 2003 15:57   |
Eclipse User |
|
|
|
Originally posted by: felix.mayer.cingular.com
Thanks, Randy.
I think I need the selection for my bendpoint handling. Once a user has
manually created a bendpoint on a connection, I suspend automatic routing.
Since the user moved the bendpoint to a particular place, it should
usually stay there (i.e. an AbsoluteBendpoint). This can be inconvenient
when moving nodes around, so it would be nice if there was a convenient
way to select connections as well. I tried your suggestion (Shift+LMB) to
select two nodes and one connection: the nodes were moved, but the
connection stayed where it was. Any ideas?
I also thought about moving the bendpoints in my ChangeConstraintCommand,
but abandoned the idea because there is one command per node, so when
should I do it?
Randy Hudson wrote:
> "Felix Mayer" <felix.mayer@cingular.com> wrote in message
> news:bj2ib4$9pp$1@eclipse.org...
> > I know that I can select a connection by clicking on it with the mouse.
> > However, I would also like to select it in two different ways:
> >
> > 1. By dragging a selection box over it with the mouse cursor. This works
> this currently is disabled because such selection is done based on a
> bounding box around each editpart. The bounding box of a connection is
> often not intuitive to the user. I'm not sure when this is important. In
> fact, if the marquee tool were to always select nodes and connection, then
> the propertysheet would not be able to show you any common properties. The
> user can always use SHIFT+LMB to select multiple connections.
> > fine with nodes, but connections are unaffected. I think need this in
> > order to move AbsoluteBendpoints.
> Bendpoint handles?
> > 2. By clicking close (defined in pixels) to the connection instead of
> > directly on it. This is just for convenience.
> This is already done. The amount of "sloppiness" in connections is
> hard-coded to 2 pixels.
> You can also select a connection by using the forward slash key.
|
|
|
Re: How can I select a connection [message #92254 is a reply to message #92132] |
Wed, 03 September 2003 10:25   |
Eclipse User |
|
|
|
Originally posted by: none.us.ibm.com
"Felix Mayer" <felix.mayer@cingular.com> wrote in message
news:bj2smq$le9$1@eclipse.org...
> Thanks, Randy.
>
> I think I need the selection for my bendpoint handling. Once a user has
> manually created a bendpoint on a connection, I suspend automatic routing.
> Since the user moved the bendpoint to a particular place, it should
> usually stay there (i.e. an AbsoluteBendpoint). This can be inconvenient
> when moving nodes around, so it would be nice if there was a convenient
> way to select connections as well. I tried your suggestion (Shift+LMB) to
> select two nodes and one connection: the nodes were moved, but the
> connection stayed where it was. Any ideas?
Sure, use relative bendpoint just like we do in the logic example. This is
why we created that class.
Or, fake the use of relative bendpoint with absolute bendpoint. Each time a
node is moved, it could forward something to all of its connections asking
them to move their bendpoints 50% in the same direction.
> I also thought about moving the bendpoints in my ChangeConstraintCommand,
> but abandoned the idea because there is one command per node, so when
> should I do it?
If you always did it 1/2 way for each node, then when you move both nodes it
will correspond to a complete move of the bendpoints.
>
> Randy Hudson wrote:
>
> > "Felix Mayer" <felix.mayer@cingular.com> wrote in message
> > news:bj2ib4$9pp$1@eclipse.org...
> > > I know that I can select a connection by clicking on it with the
mouse.
> > > However, I would also like to select it in two different ways:
> > >
> > > 1. By dragging a selection box over it with the mouse cursor. This
works
>
> > this currently is disabled because such selection is done based on a
> > bounding box around each editpart. The bounding box of a connection is
> > often not intuitive to the user. I'm not sure when this is important.
In
> > fact, if the marquee tool were to always select nodes and connection,
then
> > the propertysheet would not be able to show you any common properties.
The
> > user can always use SHIFT+LMB to select multiple connections.
>
> > > fine with nodes, but connections are unaffected. I think need this in
> > > order to move AbsoluteBendpoints.
>
> > Bendpoint handles?
>
> > > 2. By clicking close (defined in pixels) to the connection instead of
> > > directly on it. This is just for convenience.
>
> > This is already done. The amount of "sloppiness" in connections is
> > hard-coded to 2 pixels.
>
> > You can also select a connection by using the forward slash key.
>
>
|
|
|
Re: How can I select a connection [message #92479 is a reply to message #92254] |
Thu, 04 September 2003 13:32   |
Eclipse User |
|
|
|
Originally posted by: felix.mayer.cingular.com
The problem is that a RelativeBendpoint (or the other solution you
mention) does not provide the behavior I am looking for:
1. I want to select two nodes and a connection between them and then move
them all together.
2. If the connection is not selected, its bendpoints stay where they are,
even when its nodes are moved.
A RelativeBendpoint can fulfill the first requirement, but not the second.
An AbsoluteBendpoint can fulfill the second requirement, but not the first
(see below).
I looked into it with the debugger. I selected 2 nodes and a connection
with a bendpoint between them. I found that AbstractEditPart.getCommand()
does not even get called for the connection, even though the connection is
selected. Is this the desired behavior? I would expect that
AbstractEditPart.getCommand() is called for every selected edit part, and
if I don't want to do anything about the request, I can handle that in my
installed edit policies.
Randy Hudson wrote:
> "Felix Mayer" <felix.mayer@cingular.com> wrote in message
> news:bj2smq$le9$1@eclipse.org...
> > Thanks, Randy.
> >
> > I think I need the selection for my bendpoint handling. Once a user has
> > manually created a bendpoint on a connection, I suspend automatic routing.
> > Since the user moved the bendpoint to a particular place, it should
> > usually stay there (i.e. an AbsoluteBendpoint). This can be inconvenient
> > when moving nodes around, so it would be nice if there was a convenient
> > way to select connections as well. I tried your suggestion (Shift+LMB) to
> > select two nodes and one connection: the nodes were moved, but the
> > connection stayed where it was. Any ideas?
> Sure, use relative bendpoint just like we do in the logic example. This is
> why we created that class.
> Or, fake the use of relative bendpoint with absolute bendpoint. Each time a
> node is moved, it could forward something to all of its connections asking
> them to move their bendpoints 50% in the same direction.
> > I also thought about moving the bendpoints in my ChangeConstraintCommand,
> > but abandoned the idea because there is one command per node, so when
> > should I do it?
> If you always did it 1/2 way for each node, then when you move both nodes it
> will correspond to a complete move of the bendpoints.
> >
> > Randy Hudson wrote:
> >
> > > "Felix Mayer" <felix.mayer@cingular.com> wrote in message
> > > news:bj2ib4$9pp$1@eclipse.org...
> > > > I know that I can select a connection by clicking on it with the
> mouse.
> > > > However, I would also like to select it in two different ways:
> > > >
> > > > 1. By dragging a selection box over it with the mouse cursor. This
> works
> >
> > > this currently is disabled because such selection is done based on a
> > > bounding box around each editpart. The bounding box of a connection is
> > > often not intuitive to the user. I'm not sure when this is important.
> In
> > > fact, if the marquee tool were to always select nodes and connection,
> then
> > > the propertysheet would not be able to show you any common properties.
> The
> > > user can always use SHIFT+LMB to select multiple connections.
> >
> > > > fine with nodes, but connections are unaffected. I think need this in
> > > > order to move AbsoluteBendpoints.
> >
> > > Bendpoint handles?
> >
> > > > 2. By clicking close (defined in pixels) to the connection instead of
> > > > directly on it. This is just for convenience.
> >
> > > This is already done. The amount of "sloppiness" in connections is
> > > hard-coded to 2 pixels.
> >
> > > You can also select a connection by using the forward slash key.
> >
> >
|
|
|
Re: How can I select a connection [message #92539 is a reply to message #92479] |
Thu, 04 September 2003 14:14  |
Eclipse User |
|
|
|
Originally posted by: none.us.ibm.com
"Felix Mayer" <felix.mayer@cingular.com> wrote in message
news:bj7sun$jg4$1@eclipse.org...
> The problem is that a RelativeBendpoint (or the other solution you
> mention) does not provide the behavior I am looking for:
> 1. I want to select two nodes and a connection between them and then move
> them all together.
> 2. If the connection is not selected, its bendpoints stay where they are,
> even when its nodes are moved.
>
> A RelativeBendpoint can fulfill the first requirement, but not the second.
> An AbsoluteBendpoint can fulfill the second requirement, but not the first
> (see below).
>
> I looked into it with the debugger. I selected 2 nodes and a connection
> with a bendpoint between them. I found that AbstractEditPart.getCommand()
> does not even get called for the connection, even though the connection is
> selected. Is this the desired behavior? I would expect that
> AbstractEditPart.getCommand() is called for every selected edit part, and
What happens is the selection set is filtered once using
understandRequest(req). Since connections don't say that they understand
MOVE, they don't get asked later for getCommand().
You should be able to do exactly what you want by adding an editpolicy to
connections which says that they understand move. (I hope)
> if I don't want to do anything about the request, I can handle that in my
> installed edit policies.
>
>
> Randy Hudson wrote:
>
> > "Felix Mayer" <felix.mayer@cingular.com> wrote in message
> > news:bj2smq$le9$1@eclipse.org...
> > > Thanks, Randy.
> > >
> > > I think I need the selection for my bendpoint handling. Once a user
has
> > > manually created a bendpoint on a connection, I suspend automatic
routing.
> > > Since the user moved the bendpoint to a particular place, it should
> > > usually stay there (i.e. an AbsoluteBendpoint). This can be
inconvenient
> > > when moving nodes around, so it would be nice if there was a
convenient
> > > way to select connections as well. I tried your suggestion (Shift+LMB)
to
> > > select two nodes and one connection: the nodes were moved, but the
> > > connection stayed where it was. Any ideas?
>
> > Sure, use relative bendpoint just like we do in the logic example. This
is
> > why we created that class.
>
> > Or, fake the use of relative bendpoint with absolute bendpoint. Each
time a
> > node is moved, it could forward something to all of its connections
asking
> > them to move their bendpoints 50% in the same direction.
>
> > > I also thought about moving the bendpoints in my
ChangeConstraintCommand,
> > > but abandoned the idea because there is one command per node, so when
> > > should I do it?
>
> > If you always did it 1/2 way for each node, then when you move both
nodes it
> > will correspond to a complete move of the bendpoints.
>
> > >
> > > Randy Hudson wrote:
> > >
> > > > "Felix Mayer" <felix.mayer@cingular.com> wrote in message
> > > > news:bj2ib4$9pp$1@eclipse.org...
> > > > > I know that I can select a connection by clicking on it with the
> > mouse.
> > > > > However, I would also like to select it in two different ways:
> > > > >
> > > > > 1. By dragging a selection box over it with the mouse cursor. This
> > works
> > >
> > > > this currently is disabled because such selection is done based on a
> > > > bounding box around each editpart. The bounding box of a connection
is
> > > > often not intuitive to the user. I'm not sure when this is
important.
> > In
> > > > fact, if the marquee tool were to always select nodes and
connection,
> > then
> > > > the propertysheet would not be able to show you any common
properties.
> > The
> > > > user can always use SHIFT+LMB to select multiple connections.
> > >
> > > > > fine with nodes, but connections are unaffected. I think need this
in
> > > > > order to move AbsoluteBendpoints.
> > >
> > > > Bendpoint handles?
> > >
> > > > > 2. By clicking close (defined in pixels) to the connection instead
of
> > > > > directly on it. This is just for convenience.
> > >
> > > > This is already done. The amount of "sloppiness" in connections is
> > > > hard-coded to 2 pixels.
> > >
> > > > You can also select a connection by using the forward slash key.
> > >
> > >
>
>
|
|
|
Goto Forum:
Current Time: Wed Jul 16 22:50:50 EDT 2025
Powered by FUDForum. Page generated in 0.07965 seconds
|