How to make a connector touch the shape [message #147857] |
Tue, 17 August 2004 13:24 |
Eclipse User |
|
|
|
Originally posted by: none.bphnx.com
It should be possible to make a connector touch the shape instead of the
rectangle that surrounds the shape when it is selected, but I cannot
figure out how to do this. For example, when you connect a connector to a
Triangle, the connector does not make contact with the Triangle itself.
Any hints on this?
many thanks,
B
|
|
|
Re: How to make a connector touch the shape [message #147872 is a reply to message #147857] |
Tue, 17 August 2004 13:55 |
Eclipse User |
|
|
|
Originally posted by: none.us.ibm.com
Use a different ConnectionAnchor for that shape.
"bandrews" <none@bphnx.com> wrote in message
news:cft0uc$nus$1@eclipse.org...
> It should be possible to make a connector touch the shape instead of the
> rectangle that surrounds the shape when it is selected, but I cannot
> figure out how to do this. For example, when you connect a connector to a
> Triangle, the connector does not make contact with the Triangle itself.
> Any hints on this?
>
>
>
> many thanks,
>
> B
>
|
|
|
Re: How to make a connector touch the shape [message #147942 is a reply to message #147872] |
Tue, 17 August 2004 18:15 |
Eclipse User |
|
|
|
Originally posted by: none.bphnx.com
Ok, so I believe I need to extend the AbstractConnectionAnchor and
override the Point getLocation(Point reference) method. Correct?
thanks,
B
Randy Hudson wrote:
> Use a different ConnectionAnchor for that shape.
> "bandrews" <none@bphnx.com> wrote in message
> news:cft0uc$nus$1@eclipse.org...
> > It should be possible to make a connector touch the shape instead of the
> > rectangle that surrounds the shape when it is selected, but I cannot
> > figure out how to do this. For example, when you connect a connector to a
> > Triangle, the connector does not make contact with the Triangle itself.
> > Any hints on this?
> >
> >
> >
> > many thanks,
> >
> > B
> >
|
|
|
Re: How to make a connector touch the shape [message #148012 is a reply to message #147872] |
Wed, 18 August 2004 19:11 |
Eclipse User |
|
|
|
Originally posted by: none.bphnx.com
Hi Randy,
I created my own class that extends AbstractConnectionAnchor. I
overrode the getLocation() method, but no matter what my implementation
is, the connector always attaches to the rectangle that surrounds the
shape ( in this case the shape is a diamond ). It seems to have no effect.
I even tried hardcoding a return new Point(100,100);, but it still
attaches to the rectangle around the diamond. I know I am missing
something else. Any help is greatly appreciated.
thanks,
B
Randy Hudson wrote:
> Use a different ConnectionAnchor for that shape.
> "bandrews" <none@bphnx.com> wrote in message
> news:cft0uc$nus$1@eclipse.org...
> > It should be possible to make a connector touch the shape instead of the
> > rectangle that surrounds the shape when it is selected, but I cannot
> > figure out how to do this. For example, when you connect a connector to a
> > Triangle, the connector does not make contact with the Triangle itself.
> > Any hints on this?
> >
> >
> >
> > many thanks,
> >
> > B
> >
|
|
|
Re: How to make a connector touch the shape [message #148016 is a reply to message #148012] |
Wed, 18 August 2004 21:23 |
Eclipse User |
|
|
|
Originally posted by: none.us.ibm.com
Are you sure you didn't override getReferencePoint instead?
Are you setting the anchor on the connection? Is anyone else overwriting
your anchor after you set it?
Put a breakpoint in PolylineConnection.route(), and see what your anchors
are at the time of routing.
"bandrews" <none@bphnx.com> wrote in message
news:cg09lv$21p$1@eclipse.org...
> Hi Randy,
>
> I created my own class that extends AbstractConnectionAnchor. I
> overrode the getLocation() method, but no matter what my implementation
> is, the connector always attaches to the rectangle that surrounds the
> shape ( in this case the shape is a diamond ). It seems to have no effect.
> I even tried hardcoding a return new Point(100,100);, but it still
> attaches to the rectangle around the diamond. I know I am missing
> something else. Any help is greatly appreciated.
>
>
> thanks,
>
> B
>
>
>
> Randy Hudson wrote:
>
> > Use a different ConnectionAnchor for that shape.
>
> > "bandrews" <none@bphnx.com> wrote in message
> > news:cft0uc$nus$1@eclipse.org...
> > > It should be possible to make a connector touch the shape instead of
the
> > > rectangle that surrounds the shape when it is selected, but I cannot
> > > figure out how to do this. For example, when you connect a connector
to a
> > > Triangle, the connector does not make contact with the Triangle
itself.
> > > Any hints on this?
> > >
> > >
> > >
> > > many thanks,
> > >
> > > B
> > >
>
>
|
|
|
Re: How to make a connector touch the shape [message #148225 is a reply to message #148016] |
Thu, 19 August 2004 21:05 |
Eclipse User |
|
|
|
Originally posted by: none.bphnx.com
Ahhh! The problem was I was overwriting the anchors on the connection
myself. Silly me. Thanks for the hints!
Randy Hudson wrote:
> Are you sure you didn't override getReferencePoint instead?
> Are you setting the anchor on the connection? Is anyone else overwriting
> your anchor after you set it?
> Put a breakpoint in PolylineConnection.route(), and see what your anchors
> are at the time of routing.
> "bandrews" <none@bphnx.com> wrote in message
> news:cg09lv$21p$1@eclipse.org...
> > Hi Randy,
> >
> > I created my own class that extends AbstractConnectionAnchor. I
> > overrode the getLocation() method, but no matter what my implementation
> > is, the connector always attaches to the rectangle that surrounds the
> > shape ( in this case the shape is a diamond ). It seems to have no effect.
> > I even tried hardcoding a return new Point(100,100);, but it still
> > attaches to the rectangle around the diamond. I know I am missing
> > something else. Any help is greatly appreciated.
> >
> >
> > thanks,
> >
> > B
> >
> >
> >
> > Randy Hudson wrote:
> >
> > > Use a different ConnectionAnchor for that shape.
> >
> > > "bandrews" <none@bphnx.com> wrote in message
> > > news:cft0uc$nus$1@eclipse.org...
> > > > It should be possible to make a connector touch the shape instead of
> the
> > > > rectangle that surrounds the shape when it is selected, but I cannot
> > > > figure out how to do this. For example, when you connect a connector
> to a
> > > > Triangle, the connector does not make contact with the Triangle
> itself.
> > > > Any hints on this?
> > > >
> > > >
> > > >
> > > > many thanks,
> > > >
> > > > B
> > > >
> >
> >
|
|
|
Powered by
FUDForum. Page generated in 0.28282 seconds