| Connection Color [message #83212] |
Wed, 11 June 2003 04:01  |
Eclipse User |
|
|
|
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  |
Eclipse User |
|
|
|
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?
>
>
>
>
|
|
|
Powered by
FUDForum. Page generated in 0.04316 seconds