Using ChopBoxAnchor in GEF 0206 [message #63576] |
Sat, 08 February 2003 12:23  |
Eclipse User |
|
|
|
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   |
Eclipse User |
|
|
|
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;
> >
> > }
> >
> > }
> >
> >
> >
> >
>
>
|
|
|
Re: Using ChopBoxAnchor in GEF 0206 [message #63779 is a reply to message #63711] |
Sun, 09 February 2003 13:41  |
Eclipse User |
|
|
|
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;
> > >
> > > }
> > >
> > > }
> > >
> > >
> > >
> > >
> >
> >
>
>
>
|
|
|
Powered by
FUDForum. Page generated in 0.04805 seconds