Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » GEF » double line
double line [message #246113] Thu, 06 November 2008 14:12 Go to next message
Eclipse UserFriend
Originally posted by: jgreen.upb.de

Hi,
is it possible to create a double like in GEF? How?

Thanks

Joel
Re: double line [message #246118 is a reply to message #246113] Thu, 06 November 2008 16:14 Go to previous messageGo to next message
Jacques LESCOT is currently offline Jacques LESCOTFriend
Messages: 247
Registered: July 2009
Senior Member
You need to override the outlineShape(Graphics) method in your
connection figure class that may extend the PolylineConnection one.

Default implementation draws a single line :
protected void outlineShape(Graphics g) {
g.drawPolyline(points);
}

You probably need to draw twice the given points with a "translate"
between the two drawing.

Regards,
Jacques


Joel Greenyer a écrit :
> Hi,
> is it possible to create a double like in GEF? How?
>
> Thanks
>
> Joel
Re: double line [message #246141 is a reply to message #246118] Fri, 07 November 2008 10:40 Go to previous message
Eclipse UserFriend
Originally posted by: jgreen.upb.de

Thanks!

Jacques LESCOT wrote:
> You need to override the outlineShape(Graphics) method in your
> connection figure class that may extend the PolylineConnection one.
>
> Default implementation draws a single line :
> protected void outlineShape(Graphics g) {
> g.drawPolyline(points);
> }
>
> You probably need to draw twice the given points with a "translate"
> between the two drawing.
>
> Regards,
> Jacques
>
>
> Joel Greenyer a écrit :
>> Hi,
>> is it possible to create a double like in GEF? How?
>>
>> Thanks
>>
>> Joel
Previous Topic:Zest bi-directional connections
Next Topic:[ZEST] Initialize Graph with IGNORE_INVISIBLE_LAYOUT
Goto Forum:
  


Current Time: Sat Apr 27 01:21:23 GMT 2024

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

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

Back to the top