|
|
|
Re: How to add two or more connections between two editpart? [message #165442 is a reply to message #165374] |
Tue, 25 January 2005 12:01 |
Eclipse User |
|
|
|
Originally posted by: zhlmmc.hotmail.com
I did what you said but it doesn't work.
protected IFigure createFigure() {
PolylineConnection connection = new PolylineConnection();
Label label = new Label();
label.setText("line");
FanRouter frouter = new FanRouter();
frouter.setSeparation(50);
frouter.setNextRouter(new BendpointConnectionRouter());
connection.setConnectionRouter(frouter);
connection.add(label,new
ConnectionLocator(connection,ConnectionLocator.MIDDLE));
return connection;
}
The connections are still displayed overlapped.
What's wrong?Is there any constraint with my EditPart?
Pratik Shah wrote:
> Use the FanRouter. It will fan out overlapping connections. You can invoke
> setSeparation() to specify the distance by which you want the connections to
> be spread out. Whatever router you're using currently, should be set as the
> next router on the FanRouter. Then, when you set the FanRouter as the
> router for your layer, it will use "the next router" for laying out the
> connections, and will fan out ones that are over-lapping.
> Look at EDiagram example's DiagramEditPart#refreshVisuals().
> "zhlmmc" <zhlmmc@hotmail.com> wrote in message
> news:ct2132$m3j$1@www.eclipse.org...
>> I mean the connections are displayed separatedly.
>> Both the ChorpboxAnchor and the EllipseAnchor will display the connections
>> overlaped.Should I write a new Anchor by myslfe?
>>
>> Thanks.
>>
|
|
|
Re: How to add two or more connections between two editpart? [message #165450 is a reply to message #165374] |
Tue, 25 January 2005 12:55 |
Eclipse User |
|
|
|
Originally posted by: zhlmmc.hotmail.com
hi~
I did what you said but it doesn't work.
protected IFigure createFigure() {
PolylineConnection connection = new PolylineConnection();
Label label = new Label();
label.setText("line");
FanRouter frouter = new FanRouter();
frouter.setSeparation(50);
frouter.setNextRouter(new BendpointConnectionRouter());
connection.setConnectionRouter(frouter);
connection.add(label,new
ConnectionLocator(connection,ConnectionLocator.MIDDLE));
return connection;
}
The connections are still displayed overlapped.
What's wrong?Is there any constraint with my EditPart?
Pratik Shah wrote:
> Use the FanRouter. It will fan out overlapping connections. You can invoke
> setSeparation() to specify the distance by which you want the connections to
> be spread out. Whatever router you're using currently, should be set as the
> next router on the FanRouter. Then, when you set the FanRouter as the
> router for your layer, it will use "the next router" for laying out the
> connections, and will fan out ones that are over-lapping.
> Look at EDiagram example's DiagramEditPart#refreshVisuals().
> "zhlmmc" <zhlmmc@hotmail.com> wrote in message
> news:ct2132$m3j$1@www.eclipse.org...
>> I mean the connections are displayed separatedly.
>> Both the ChorpboxAnchor and the EllipseAnchor will display the connections
>> overlaped.Should I write a new Anchor by myslfe?
>>
>> Thanks.
>>
|
|
|
Re: How to add two or more connections between two editpart? [message #165496 is a reply to message #165442] |
Tue, 25 January 2005 15:51 |
Eclipse User |
|
|
|
Originally posted by: none.us.ibm.com
3.0 had problems if you were using different instance of ChopBoxAnchors at
the ends of the connections. This is fixed in the latest code. If this is
your problem, reuse the same anchor instance at your nodes.
"zhlmmc" <zhlmmc@hotmail.com> wrote in message
news:ct5cea$hf2$1@www.eclipse.org...
>I did what you said but it doesn't work.
> protected IFigure createFigure() {
> PolylineConnection connection = new PolylineConnection();
> Label label = new Label();
> label.setText("line");
> FanRouter frouter = new FanRouter();
> frouter.setSeparation(50);
> frouter.setNextRouter(new BendpointConnectionRouter());
> connection.setConnectionRouter(frouter);
> connection.add(label,new
> ConnectionLocator(connection,ConnectionLocator.MIDDLE));
>
> return connection;
> }
> The connections are still displayed overlapped.
> What's wrong?Is there any constraint with my EditPart?
>
> Pratik Shah wrote:
>
>> Use the FanRouter. It will fan out overlapping connections. You can
>> invoke
>> setSeparation() to specify the distance by which you want the connections
>> to
>> be spread out. Whatever router you're using currently, should be set as
>> the
>> next router on the FanRouter. Then, when you set the FanRouter as the
>> router for your layer, it will use "the next router" for laying out the
>> connections, and will fan out ones that are over-lapping.
>
>> Look at EDiagram example's DiagramEditPart#refreshVisuals().
>
>> "zhlmmc" <zhlmmc@hotmail.com> wrote in message
>> news:ct2132$m3j$1@www.eclipse.org...
>>> I mean the connections are displayed separatedly.
>>> Both the ChorpboxAnchor and the EllipseAnchor will display the
>>> connections
>>> overlaped.Should I write a new Anchor by myslfe?
>>>
>>> Thanks.
>>>
>
>
|
|
|
|
Re: How to add two or more connections between two editpart? [message #165601 is a reply to message #165501] |
Wed, 26 January 2005 04:57 |
Eclipse User |
|
|
|
Originally posted by: zhlmmc.hotmail.com
Where can I download the ediagram example?
Pratik Shah wrote:
> You should be setting the connection router on the connection layer (and
> only once), not on the connection itself. Like I said, look at ediagram
> example's DiagramEditPart if you need more details.
> "zhlmmc" <zhlmmc@hotmail.com> wrote in message
> news:ct5cea$hf2$1@www.eclipse.org...
>> I did what you said but it doesn't work.
>> protected IFigure createFigure() {
>> PolylineConnection connection = new PolylineConnection();
>> Label label = new Label();
>> label.setText("line");
>> FanRouter frouter = new FanRouter();
>> frouter.setSeparation(50);
>> frouter.setNextRouter(new BendpointConnectionRouter());
>> connection.setConnectionRouter(frouter);
>> connection.add(label,new
>> ConnectionLocator(connection,ConnectionLocator.MIDDLE));
>>
>> return connection;
>> }
>> The connections are still displayed overlapped.
>> What's wrong?Is there any constraint with my EditPart?
>>
>> Pratik Shah wrote:
>>
>> > Use the FanRouter. It will fan out overlapping connections. You can
> invoke
>> > setSeparation() to specify the distance by which you want the
> connections to
>> > be spread out. Whatever router you're using currently, should be set as
> the
>> > next router on the FanRouter. Then, when you set the FanRouter as the
>> > router for your layer, it will use "the next router" for laying out the
>> > connections, and will fan out ones that are over-lapping.
>>
>> > Look at EDiagram example's DiagramEditPart#refreshVisuals().
>>
>> > "zhlmmc" <zhlmmc@hotmail.com> wrote in message
>> > news:ct2132$m3j$1@www.eclipse.org...
>> >> I mean the connections are displayed separatedly.
>> >> Both the ChorpboxAnchor and the EllipseAnchor will display the
> connections
>> >> overlaped.Should I write a new Anchor by myslfe?
>> >>
>> >> Thanks.
>> >>
>>
>>
|
|
|
Re: How to add two or more connections between two editpart? [message #165609 is a reply to message #165496] |
Wed, 26 January 2005 05:37 |
Eclipse User |
|
|
|
Originally posted by: zhlmmc.hotmail.com
You mean use the same ChopboxAnchor at the ends of the same connection?
I did that but it still doesn't work.
Randy Hudson wrote:
> 3.0 had problems if you were using different instance of ChopBoxAnchors at
> the ends of the connections. This is fixed in the latest code. If this is
> your problem, reuse the same anchor instance at your nodes.
> "zhlmmc" <zhlmmc@hotmail.com> wrote in message
> news:ct5cea$hf2$1@www.eclipse.org...
>>I did what you said but it doesn't work.
>> protected IFigure createFigure() {
>> PolylineConnection connection = new PolylineConnection();
>> Label label = new Label();
>> label.setText("line");
>> FanRouter frouter = new FanRouter();
>> frouter.setSeparation(50);
>> frouter.setNextRouter(new BendpointConnectionRouter());
>> connection.setConnectionRouter(frouter);
>> connection.add(label,new
>> ConnectionLocator(connection,ConnectionLocator.MIDDLE));
>>
>> return connection;
>> }
>> The connections are still displayed overlapped.
>> What's wrong?Is there any constraint with my EditPart?
>>
>> Pratik Shah wrote:
>>
>>> Use the FanRouter. It will fan out overlapping connections. You can
>>> invoke
>>> setSeparation() to specify the distance by which you want the connections
>>> to
>>> be spread out. Whatever router you're using currently, should be set as
>>> the
>>> next router on the FanRouter. Then, when you set the FanRouter as the
>>> router for your layer, it will use "the next router" for laying out the
>>> connections, and will fan out ones that are over-lapping.
>>
>>> Look at EDiagram example's DiagramEditPart#refreshVisuals().
>>
>>> "zhlmmc" <zhlmmc@hotmail.com> wrote in message
>>> news:ct2132$m3j$1@www.eclipse.org...
>>>> I mean the connections are displayed separatedly.
>>>> Both the ChorpboxAnchor and the EllipseAnchor will display the
>>>> connections
>>>> overlaped.Should I write a new Anchor by myslfe?
>>>>
>>>> Thanks.
>>>>
>>
>>
|
|
|
Re: How to add two or more connections between two editpart? [message #165625 is a reply to message #165501] |
Wed, 26 January 2005 06:19 |
Eclipse User |
|
|
|
Originally posted by: zhlmmc.hotmail.com
I've got it,thank you :)
Pratik Shah wrote:
> You should be setting the connection router on the connection layer (and
> only once), not on the connection itself. Like I said, look at ediagram
> example's DiagramEditPart if you need more details.
> "zhlmmc" <zhlmmc@hotmail.com> wrote in message
> news:ct5cea$hf2$1@www.eclipse.org...
>> I did what you said but it doesn't work.
>> protected IFigure createFigure() {
>> PolylineConnection connection = new PolylineConnection();
>> Label label = new Label();
>> label.setText("line");
>> FanRouter frouter = new FanRouter();
>> frouter.setSeparation(50);
>> frouter.setNextRouter(new BendpointConnectionRouter());
>> connection.setConnectionRouter(frouter);
>> connection.add(label,new
>> ConnectionLocator(connection,ConnectionLocator.MIDDLE));
>>
>> return connection;
>> }
>> The connections are still displayed overlapped.
>> What's wrong?Is there any constraint with my EditPart?
>>
>> Pratik Shah wrote:
>>
>> > Use the FanRouter. It will fan out overlapping connections. You can
> invoke
>> > setSeparation() to specify the distance by which you want the
> connections to
>> > be spread out. Whatever router you're using currently, should be set as
> the
>> > next router on the FanRouter. Then, when you set the FanRouter as the
>> > router for your layer, it will use "the next router" for laying out the
>> > connections, and will fan out ones that are over-lapping.
>>
>> > Look at EDiagram example's DiagramEditPart#refreshVisuals().
>>
>> > "zhlmmc" <zhlmmc@hotmail.com> wrote in message
>> > news:ct2132$m3j$1@www.eclipse.org...
>> >> I mean the connections are displayed separatedly.
>> >> Both the ChorpboxAnchor and the EllipseAnchor will display the
> connections
>> >> overlaped.Should I write a new Anchor by myslfe?
>> >>
>> >> Thanks.
>> >>
>>
>>
|
|
|
Powered by
FUDForum. Page generated in 0.04605 seconds