Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » GEF » Problem about connection anchor location
Problem about connection anchor location [message #90757] Wed, 20 August 2003 03:59 Go to next message
Eclipse UserFriend
Originally posted by: lijiao_daniel.hotmail.com

hi,I have created my GEF example according to the Logic Example,but when I
drag my connection from paletteviewer and put it on the selected
anchor,the connection location always begins from the left corner of the
editor and ends
on the selected anchor.I don't know why it works in Logic example but it
cannot work in my example?
Re: Problem about connection anchor location [message #90802 is a reply to message #90757] Wed, 20 August 2003 14:20 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: none.us.ibm.com

See NodeEditPart, and your implementation (or lack of)
getSourceConnectionAnchor(Request).

this method is used during feedback, as opposed to the other similar message
which is used when a connection editpart exists.

"daniel" <lijiao_daniel@hotmail.com> wrote in message
news:bhurmc$nb0$1@eclipse.org...
> hi,I have created my GEF example according to the Logic Example,but when I
> drag my connection from paletteviewer and put it on the selected
> anchor,the connection location always begins from the left corner of the
> editor and ends
> on the selected anchor.I don't know why it works in Logic example but it
> cannot work in my example?
>
Re: Problem about connection anchor location [message #90832 is a reply to message #90802] Thu, 21 August 2003 03:32 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: liziwen.yahoo.com

I have implement the getSourceConnectionAnchor(Request) in class
ShapeEditPart(the same as the LogicEditPart) and then in class
RoundedRectangleEditPart(it is a subclass of ShapeEditPart) I let the
getSourceConnectionAnchor(Request)and getTargetConnectionAnchor(Request)
return null just like it does in the Logic example.Will I implement the
two methods in class RoundedRectangleEditPart?

Randy Hudson wrote:

> See NodeEditPart, and your implementation (or lack of)
> getSourceConnectionAnchor(Request).

> this method is used during feedback, as opposed to the other similar message
> which is used when a connection editpart exists.

> "daniel" <lijiao_daniel@hotmail.com> wrote in message
> news:bhurmc$nb0$1@eclipse.org...
> > hi,I have created my GEF example according to the Logic Example,but when I
> > drag my connection from paletteviewer and put it on the selected
> > anchor,the connection location always begins from the left corner of the
> > editor and ends
> > on the selected anchor.I don't know why it works in Logic example but it
> > cannot work in my example?
> >
Re: Problem about connection anchor location [message #90876 is a reply to message #90832] Thu, 21 August 2003 13:08 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: none.us.ibm.com

"Daniel" <liziwen@yahoo.com> wrote in message
news:bi1ego$14e$1@eclipse.org...
> I have implement the getSourceConnectionAnchor(Request) in class
> ShapeEditPart(the same as the LogicEditPart) and then in class
> RoundedRectangleEditPart(it is a subclass of ShapeEditPart) I let the
> getSourceConnectionAnchor(Request)and getTargetConnectionAnchor(Request)
> return null just like it does in the Logic example.

It doesn't return null in the Logic example:
public ConnectionAnchor getSourceConnectionAnchor(Request request) {

Point pt = new Point(((DropRequest)request).getLocation());

return getNodeFigure().getSourceConnectionAnchorAt(pt);

}


Will I implement the
> two methods in class RoundedRectangleEditPart?
>
> Randy Hudson wrote:
>
> > See NodeEditPart, and your implementation (or lack of)
> > getSourceConnectionAnchor(Request).
>
> > this method is used during feedback, as opposed to the other similar
message
> > which is used when a connection editpart exists.
>
> > "daniel" <lijiao_daniel@hotmail.com> wrote in message
> > news:bhurmc$nb0$1@eclipse.org...
> > > hi,I have created my GEF example according to the Logic Example,but
when I
> > > drag my connection from paletteviewer and put it on the selected
> > > anchor,the connection location always begins from the left corner of
the
> > > editor and ends
> > > on the selected anchor.I don't know why it works in Logic example but
it
> > > cannot work in my example?
> > >
>
>
Re: Problem about connection anchor location [message #90967 is a reply to message #90876] Fri, 22 August 2003 05:03 Go to previous message
Eclipse UserFriend
Originally posted by: lijiao_daniel.hotmail.com

I'am sorry to write the wrong code.After the correcting,it makes
progress.there are mutiple connections .
But still some problems like I asked the forum.Its beginning is still from
the left corner of the editor.
Sorry to bother you, Randy!I must implement the example.
I implement the getSourceConnectionAnchor's two methods and
getTargetConnectionAnchor's two methods in the ShapeEditPart(just like the
LogicEditPart in the Logic example.And in the subclass
RoundedRectangleEditPart of ShapeEditPart(just like the CircuitEditPart)I
do not implement the above four methods.
the rest code is the same as the CircuitEditPart of the Logic example.
I checked the rest but found no errors.
Lots of thanks!
Randy Hudson wrote:

> "Daniel" <liziwen@yahoo.com> wrote in message
> news:bi1ego$14e$1@eclipse.org...
> > I have implement the getSourceConnectionAnchor(Request) in class
> > ShapeEditPart(the same as the LogicEditPart) and then in class
> > RoundedRectangleEditPart(it is a subclass of ShapeEditPart) I let the
> > getSourceConnectionAnchor(Request)and getTargetConnectionAnchor(Request)
> > return null just like it does in the Logic example.

> It doesn't return null in the Logic example:
> public ConnectionAnchor getSourceConnectionAnchor(Request request) {

> Point pt = new Point(((DropRequest)request).getLocation());

> return getNodeFigure().getSourceConnectionAnchorAt(pt);

> }


> Will I implement the
> > two methods in class RoundedRectangleEditPart?
> >
> > Randy Hudson wrote:
> >
> > > See NodeEditPart, and your implementation (or lack of)
> > > getSourceConnectionAnchor(Request).
> >
> > > this method is used during feedback, as opposed to the other similar
> message
> > > which is used when a connection editpart exists.
> >
> > > "daniel" <lijiao_daniel@hotmail.com> wrote in message
> > > news:bhurmc$nb0$1@eclipse.org...
> > > > hi,I have created my GEF example according to the Logic Example,but
> when I
> > > > drag my connection from paletteviewer and put it on the selected
> > > > anchor,the connection location always begins from the left corner of
> the
> > > > editor and ends
> > > > on the selected anchor.I don't know why it works in Logic example but
> it
> > > > cannot work in my example?
> > > >
> >
> >
Previous Topic:extending command
Next Topic:clickable areas on borders
Goto Forum:
  


Current Time: Sat Nov 09 05:48:55 GMT 2024

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

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

Back to the top