Skip to main content



      Home
Home » Eclipse Projects » GEF » Using ChopBoxAnchor in GEF 0206
Using ChopBoxAnchor in GEF 0206 [message #63576] Sat, 08 February 2003 12:23 Go to next message
Eclipse UserFriend
I download GEF/Logic Editor 0206 and use Eclipse M5.
And i modify a figure (a child of NodeFigure) to use ChopBoxAnchor instead
of FixedConnectionAnchor.
So I just create ChopboxAnchor in the constructor and return that in all the
getConnectionAnchor methods.

But the result connection are not connecting the two MyFigure figures, they
are somewhere in the diagram. Can someone please let me know what did I do
wrong? I use the same logic in the older example (not build 0206), it works.

Thank for any help.


public MyFigure() {
private ConnectionAnchor connectionAnchor = new ChopboxAnchor(this);

public ConnectionAnchor connectionAnchorAt(Point p) {

return connectionAnchor;

}

public ConnectionAnchor getConnectionAnchor(String terminal) {

return connectionAnchor;

}

public String getConnectionAnchorName(ConnectionAnchor c) {

return "A";

}

public ConnectionAnchor getSourceConnectionAnchorAt(Point p) {

return connectionAnchor;

}

public ConnectionAnchor getTargetConnectionAnchorAt(Point p) {

return connectionAnchor;

}

}
Re: Using ChopBoxAnchor in GEF 0206 [message #63599 is a reply to message #63576] Sat, 08 February 2003 13:58 Go to previous messageGo to next message
Eclipse UserFriend
What I am seeing is After chose the "connection " tool, and I click in on
one of MyFigure, a plug icon shows up,
and I click on it, but it does not draw any line as I move my mouse (I see
this when I click on a CircuitFigure, but not MyFigure) and then I move the
plug icon to another MyFigure and click on it, no line is drawn but the tool
switch to "selection" tool.

Can someone please let me with this problem?
Thanks


"yinglcs" <yinglcs@netscape.com> wrote in message
news:b23d12$9uh$1@rogue.oti.com...
> I download GEF/Logic Editor 0206 and use Eclipse M5.
> And i modify a figure (a child of NodeFigure) to use ChopBoxAnchor instead
> of FixedConnectionAnchor.
> So I just create ChopboxAnchor in the constructor and return that in all
the
> getConnectionAnchor methods.
>
> But the result connection are not connecting the two MyFigure figures,
they
> are somewhere in the diagram. Can someone please let me know what did I do
> wrong? I use the same logic in the older example (not build 0206), it
works.
>
> Thank for any help.
>
>
> public MyFigure() {
> private ConnectionAnchor connectionAnchor = new ChopboxAnchor(this);
>
> public ConnectionAnchor connectionAnchorAt(Point p) {
>
> return connectionAnchor;
>
> }
>
> public ConnectionAnchor getConnectionAnchor(String terminal) {
>
> return connectionAnchor;
>
> }
>
> public String getConnectionAnchorName(ConnectionAnchor c) {
>
> return "A";
>
> }
>
> public ConnectionAnchor getSourceConnectionAnchorAt(Point p) {
>
> return connectionAnchor;
>
> }
>
> public ConnectionAnchor getTargetConnectionAnchorAt(Point p) {
>
> return connectionAnchor;
>
> }
>
> }
>
>
>
>
Re: Using ChopBoxAnchor in GEF 0206 [message #63688 is a reply to message #63576] Sat, 08 February 2003 17:09 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: none.us.ibm.com

There is a bug in BendpointConnectionRouter (actually, in PrecisionPoint)
that is fixed in the CVS stream. You might be seeing something related to
this. Try bending a connection and moving it in the Logic example. If this
is broken, then you aren't doing anything wrong. The next build will fix
this, or you can try connecting to the CVS server if you are brave enough.

BTW, how are you able to compile GEF on M5 given the bug in the JDT
compiler?

"yinglcs" <yinglcs@netscape.com> wrote in message
news:b23d12$9uh$1@rogue.oti.com...
> I download GEF/Logic Editor 0206 and use Eclipse M5.
> And i modify a figure (a child of NodeFigure) to use ChopBoxAnchor instead
> of FixedConnectionAnchor.
> So I just create ChopboxAnchor in the constructor and return that in all
the
> getConnectionAnchor methods.
>
> But the result connection are not connecting the two MyFigure figures,
they
> are somewhere in the diagram. Can someone please let me know what did I do
> wrong? I use the same logic in the older example (not build 0206), it
works.
>
> Thank for any help.
>
>
> public MyFigure() {
> private ConnectionAnchor connectionAnchor = new ChopboxAnchor(this);
>
> public ConnectionAnchor connectionAnchorAt(Point p) {
>
> return connectionAnchor;
>
> }
>
> public ConnectionAnchor getConnectionAnchor(String terminal) {
>
> return connectionAnchor;
>
> }
>
> public String getConnectionAnchorName(ConnectionAnchor c) {
>
> return "A";
>
> }
>
> public ConnectionAnchor getSourceConnectionAnchorAt(Point p) {
>
> return connectionAnchor;
>
> }
>
> public ConnectionAnchor getTargetConnectionAnchorAt(Point p) {
>
> return connectionAnchor;
>
> }
>
> }
>
>
>
>
Re: Using ChopBoxAnchor in GEF 0206 [message #63711 is a reply to message #63688] Sat, 08 February 2003 17:19 Go to previous messageGo to next message
Eclipse UserFriend
Randy,
Thanks for your response.

I try your suggestion, but I am able to bend the line if I draw a connection
between 2 LEDs.
But if I draw a connection between 2 MyFigure (the rectangles), the
connection is not connected at all. Only a small black traingle show up in
the Editor. (Please refer to the attached Screen shot).

For the compile problem I have yesterday, I just go to the directiory of my
project, remove all *.class file, and refresh the project and then rebuild
the project. The project went away.

Thank you.

"Randy Hudson" <none@us.ibm.com> wrote in message
news:b23tq8$i05$1@rogue.oti.com...
> There is a bug in BendpointConnectionRouter (actually, in PrecisionPoint)
> that is fixed in the CVS stream. You might be seeing something related to
> this. Try bending a connection and moving it in the Logic example. If
this
> is broken, then you aren't doing anything wrong. The next build will fix
> this, or you can try connecting to the CVS server if you are brave enough.
>
> BTW, how are you able to compile GEF on M5 given the bug in the JDT
> compiler?
>
> "yinglcs" <yinglcs@netscape.com> wrote in message
> news:b23d12$9uh$1@rogue.oti.com...
> > I download GEF/Logic Editor 0206 and use Eclipse M5.
> > And i modify a figure (a child of NodeFigure) to use ChopBoxAnchor
instead
> > of FixedConnectionAnchor.
> > So I just create ChopboxAnchor in the constructor and return that in all
> the
> > getConnectionAnchor methods.
> >
> > But the result connection are not connecting the two MyFigure figures,
> they
> > are somewhere in the diagram. Can someone please let me know what did I
do
> > wrong? I use the same logic in the older example (not build 0206), it
> works.
> >
> > Thank for any help.
> >
> >
> > public MyFigure() {
> > private ConnectionAnchor connectionAnchor = new ChopboxAnchor(this);
> >
> > public ConnectionAnchor connectionAnchorAt(Point p) {
> >
> > return connectionAnchor;
> >
> > }
> >
> > public ConnectionAnchor getConnectionAnchor(String terminal) {
> >
> > return connectionAnchor;
> >
> > }
> >
> > public String getConnectionAnchorName(ConnectionAnchor c) {
> >
> > return "A";
> >
> > }
> >
> > public ConnectionAnchor getSourceConnectionAnchorAt(Point p) {
> >
> > return connectionAnchor;
> >
> > }
> >
> > public ConnectionAnchor getTargetConnectionAnchorAt(Point p) {
> >
> > return connectionAnchor;
> >
> > }
> >
> > }
> >
> >
> >
> >
>
>


  • Attachment: untitled1.jpg
    (Size: 68.99KB, Downloaded 133 times)
Re: Using ChopBoxAnchor in GEF 0206 [message #63779 is a reply to message #63711] Sun, 09 February 2003 13:41 Go to previous message
Eclipse UserFriend
Randy,

Could you please tell me if it is a problem with the latest GEF or there is
a problem with my code.


Thank you.


"yinglcs" <yinglcs@netscape.com> wrote in message
news:b23ud2$i8f$1@rogue.oti.com...
> Randy,
> Thanks for your response.
>
> I try your suggestion, but I am able to bend the line if I draw a
connection
> between 2 LEDs.
> But if I draw a connection between 2 MyFigure (the rectangles), the
> connection is not connected at all. Only a small black traingle show up in
> the Editor. (Please refer to the attached Screen shot).
>
> For the compile problem I have yesterday, I just go to the directiory of
my
> project, remove all *.class file, and refresh the project and then rebuild
> the project. The project went away.
>
> Thank you.
>
> "Randy Hudson" <none@us.ibm.com> wrote in message
> news:b23tq8$i05$1@rogue.oti.com...
> > There is a bug in BendpointConnectionRouter (actually, in
PrecisionPoint)
> > that is fixed in the CVS stream. You might be seeing something related
to
> > this. Try bending a connection and moving it in the Logic example. If
> this
> > is broken, then you aren't doing anything wrong. The next build will
fix
> > this, or you can try connecting to the CVS server if you are brave
enough.
> >
> > BTW, how are you able to compile GEF on M5 given the bug in the JDT
> > compiler?
> >
> > "yinglcs" <yinglcs@netscape.com> wrote in message
> > news:b23d12$9uh$1@rogue.oti.com...
> > > I download GEF/Logic Editor 0206 and use Eclipse M5.
> > > And i modify a figure (a child of NodeFigure) to use ChopBoxAnchor
> instead
> > > of FixedConnectionAnchor.
> > > So I just create ChopboxAnchor in the constructor and return that in
all
> > the
> > > getConnectionAnchor methods.
> > >
> > > But the result connection are not connecting the two MyFigure figures,
> > they
> > > are somewhere in the diagram. Can someone please let me know what did
I
> do
> > > wrong? I use the same logic in the older example (not build 0206), it
> > works.
> > >
> > > Thank for any help.
> > >
> > >
> > > public MyFigure() {
> > > private ConnectionAnchor connectionAnchor = new ChopboxAnchor(this);
> > >
> > > public ConnectionAnchor connectionAnchorAt(Point p) {
> > >
> > > return connectionAnchor;
> > >
> > > }
> > >
> > > public ConnectionAnchor getConnectionAnchor(String terminal) {
> > >
> > > return connectionAnchor;
> > >
> > > }
> > >
> > > public String getConnectionAnchorName(ConnectionAnchor c) {
> > >
> > > return "A";
> > >
> > > }
> > >
> > > public ConnectionAnchor getSourceConnectionAnchorAt(Point p) {
> > >
> > > return connectionAnchor;
> > >
> > > }
> > >
> > > public ConnectionAnchor getTargetConnectionAnchorAt(Point p) {
> > >
> > > return connectionAnchor;
> > >
> > > }
> > >
> > > }
> > >
> > >
> > >
> > >
> >
> >
>
>
>
Previous Topic:How to draw Transparent Figure has a shadow?
Next Topic:GEF build problem
Goto Forum:
  


Current Time: Thu May 08 02:08:46 EDT 2025

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

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

Back to the top