Skip to main content



      Home
Home » Eclipse Projects » GEF » Connection Color
Connection Color [message #83212] Wed, 11 June 2003 04:01 Go to next message
Eclipse UserFriend
Originally posted by: idan_zak2.walla.co.il

Hello Randy,

I asked how can i change the conection color.

Your answer was:

"The interface "Connection" was created with ConnectionRouters as the
intended clients. Therefore, all they really need to be able to do is set
the points.
If your ConnectionEditPart is updating its figure, just cast to
PolylineConnection, and call setLineWidth(n);"

my ConnectionEditPart extend AbstractConnectionEditPart so how can i just
cast it to PolylineConnection?

did you mean that when i create an instance of the connection in a
createConnecion method i should cast it to PolylineConnection?
Re: Connection Color [message #83262 is a reply to message #83212] Wed, 11 June 2003 09:56 Go to previous message
Eclipse UserFriend
Randy was talking about your ConnectionEditPart's *figure*, which should be a
PolylineConnection. If you're updating your figure (i.e. in refreshVisuals()),
do this:

PolylineConnection conn = (PolylineConnection)getConnectionFigure();
conn.setLineWidth(n);
conn.setForegroundColor(color);



Idan wrote:

> Hello Randy,
>
> I asked how can i change the conection color.
>
> Your answer was:
>
> "The interface "Connection" was created with ConnectionRouters as the
> intended clients. Therefore, all they really need to be able to do is set
> the points.
> If your ConnectionEditPart is updating its figure, just cast to
> PolylineConnection, and call setLineWidth(n);"
>
> my ConnectionEditPart extend AbstractConnectionEditPart so how can i just
> cast it to PolylineConnection?
>
> did you mean that when i create an instance of the connection in a
> createConnecion method i should cast it to PolylineConnection?
>
>
>
>
Previous Topic:[POLL] What are you doing with GEF? Screenshots?
Next Topic:Positioning label
Goto Forum:
  


Current Time: Wed Nov 19 01:55:58 EST 2025

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

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

Back to the top