Same Source Target- Bendpoint Problem [message #176595] |
Sun, 10 April 2005 23:03  |
Eclipse User |
|
|
|
Originally posted by: binti.ksu.edu
Hi All,
I tried inserting the bendpoint in my connection after recognizing that the
source and target are same. I tried the following code which is given at
eclipsewiki. I even set the connection layer's router as benpoint router.
Still it does not work. I have added this code in the connection's edit part
class.
RelativeBendpoint rbp = new RelativeBendpoint(conn);
rbp.setRelativeDimensions(new Dimension(1, 1), new Dimension(2, 2));
ArrayList list = new ArrayList();
list.add(rbp);
conn.setRoutingConstraint(list);
conn.setConnectionRouter(new BendpointConnectionRouter());
What could be the possible problem? Is there something obvious that I am
missing?
Thanks in Advance,
Binti.
|
|
|
|
|
|
Re: Same Source Target- Bendpoint Problem [message #176866 is a reply to message #176723] |
Tue, 12 April 2005 09:25   |
Eclipse User |
|
|
|
Originally posted by: binti.ksu.edu
Thanks, I saw that. But I do not have an initialGraphicalViewer methode in
my editor. But it is an editor with flyout palette. Is it ok if I add it
still? I will try it now anyways.
Also, I have another version of draw2d, I guess. Where can I get the latest
version from?
Binti.
"Pratik Shah" <ppshah@us.ibm.com> wrote in message
news:d3ep98$433$1@news.eclipse.org...
> You need to catch up with the latest code.
>
> "Binti Sepaha" <binti@ksu.edu> wrote in message
> news:d3ells$u9f$1@news.eclipse.org...
>> Alright, But where in teh shapes editor is this done?
>>
>> The method you asked me to see is -
>>
>> protected void initializeGraphicalViewer() {
>> super.initializeGraphicalViewer();
>> GraphicalViewer graphicalViewer = getGraphicalViewer();
>> graphicalViewer.setContents(getModel()); // set the contents of this
> editor
>> // listen for dropped parts
>>
> graphicalViewer.addDropTargetListener(createTransferDropTarg etListener());
>> }
>>
>> Where am I supposed to set the connection layer's router? Can I do it in
> the
>> diagram edit part?
>>
>> Thanks,
>> Binti.
>>
>> "Pratik Shah" <ppshah@us.ibm.com> wrote in message
>> news:d3d3h3$jks$1@news.eclipse.org...
>> > You shouldn't create a new router for each connection. You need to
> create
>> > one router that you register with the connection layer. Then you don't
>> > need
>> > to set the router on the connection yourself. Look at our examples.
>> > ShapesEditor#initializeGraphicalViewer().
>> >
>> > "Binti Sepaha" <binti@ksu.edu> wrote in message
>> > news:d3cpoi$9fk$1@news.eclipse.org...
>> >> Hi All,
>> >>
>> >> I tried inserting the bendpoint in my connection after recognizing
>> >> that
>> > the
>> >> source and target are same. I tried the following code which is given
> at
>> >> eclipsewiki. I even set the connection layer's router as benpoint
> router.
>> >> Still it does not work. I have added this code in the connection's
>> >> edit
>> > part
>> >> class.
>> >>
>> >> RelativeBendpoint rbp = new RelativeBendpoint(conn);
>> >> rbp.setRelativeDimensions(new Dimension(1, 1), new Dimension(2,
>> >> 2));
>> >> ArrayList list = new ArrayList();
>> >> list.add(rbp);
>> >> conn.setRoutingConstraint(list);
>> >> conn.setConnectionRouter(new BendpointConnectionRouter());
>> >>
>> >> What could be the possible problem? Is there something obvious that I
> am
>> >> missing?
>> >>
>> >> Thanks in Advance,
>> >> Binti.
>> >>
>> >>
>> >
>> >
>>
>>
>
>
|
|
|
|
Re: Same Source Target- Bendpoint Problem [message #176890 is a reply to message #176866] |
Tue, 12 April 2005 09:47  |
Eclipse User |
|
|
|
Binti,
http://www.eclipse.org/downloads/download.php?file=/tools/ge f/downloads/index.php
or
http://download.eclipse.org/tools/gef/downloads/index.php
That will give you a list of GEF builds. For the latest code, use the 3.1
stream Integration Builds - or you can always pull it right off CVS.
Best,
Brian.
"Binti Sepaha" <binti@ksu.edu> wrote in message
news:d3gij8$b8r$1@news.eclipse.org...
> Thanks, I saw that. But I do not have an initialGraphicalViewer methode in
> my editor. But it is an editor with flyout palette. Is it ok if I add it
> still? I will try it now anyways.
>
> Also, I have another version of draw2d, I guess. Where can I get the
> latest version from?
>
> Binti.
>
>
> "Pratik Shah" <ppshah@us.ibm.com> wrote in message
> news:d3ep98$433$1@news.eclipse.org...
>> You need to catch up with the latest code.
>>
>> "Binti Sepaha" <binti@ksu.edu> wrote in message
>> news:d3ells$u9f$1@news.eclipse.org...
>>> Alright, But where in teh shapes editor is this done?
>>>
>>> The method you asked me to see is -
>>>
>>> protected void initializeGraphicalViewer() {
>>> super.initializeGraphicalViewer();
>>> GraphicalViewer graphicalViewer = getGraphicalViewer();
>>> graphicalViewer.setContents(getModel()); // set the contents of this
>> editor
>>> // listen for dropped parts
>>>
>> graphicalViewer.addDropTargetListener(createTransferDropTarg etListener());
>>> }
>>>
>>> Where am I supposed to set the connection layer's router? Can I do it in
>> the
>>> diagram edit part?
>>>
>>> Thanks,
>>> Binti.
>>>
>>> "Pratik Shah" <ppshah@us.ibm.com> wrote in message
>>> news:d3d3h3$jks$1@news.eclipse.org...
>>> > You shouldn't create a new router for each connection. You need to
>> create
>>> > one router that you register with the connection layer. Then you
>>> > don't
>>> > need
>>> > to set the router on the connection yourself. Look at our examples.
>>> > ShapesEditor#initializeGraphicalViewer().
>>> >
>>> > "Binti Sepaha" <binti@ksu.edu> wrote in message
>>> > news:d3cpoi$9fk$1@news.eclipse.org...
>>> >> Hi All,
>>> >>
>>> >> I tried inserting the bendpoint in my connection after recognizing
>>> >> that
>>> > the
>>> >> source and target are same. I tried the following code which is given
>> at
>>> >> eclipsewiki. I even set the connection layer's router as benpoint
>> router.
>>> >> Still it does not work. I have added this code in the connection's
>>> >> edit
>>> > part
>>> >> class.
>>> >>
>>> >> RelativeBendpoint rbp = new RelativeBendpoint(conn);
>>> >> rbp.setRelativeDimensions(new Dimension(1, 1), new Dimension(2,
>>> >> 2));
>>> >> ArrayList list = new ArrayList();
>>> >> list.add(rbp);
>>> >> conn.setRoutingConstraint(list);
>>> >> conn.setConnectionRouter(new BendpointConnectionRouter());
>>> >>
>>> >> What could be the possible problem? Is there something obvious that I
>> am
>>> >> missing?
>>> >>
>>> >> Thanks in Advance,
>>> >> Binti.
>>> >>
>>> >>
>>> >
>>> >
>>>
>>>
>>
>>
>
>
|
|
|
Powered by
FUDForum. Page generated in 0.09449 seconds