Book a Demo

Author Topic: change connector color  (Read 7730 times)

zzcat

  • EA Novice
  • *
  • Posts: 7
  • Karma: +0/-0
  • I love YaBB 1G - SP1!
    • View Profile
change connector color
« on: November 27, 2006, 01:37:33 pm »
Hi,

I'm new user to EA and am creating use case with EA, I tried to change the color of the link between actor and use case, but didn't found that format tool. nor in association properties... And I didn't find answer in help.  I know it might be a very simple question for most of you, but it bothers me now... Appreciated if anyone would answer me.  Thank you!

KP

  • EA Administrator
  • EA Expert
  • *****
  • Posts: 2919
  • Karma: +55/-3
    • View Profile
Re: change connector color
« Reply #1 on: November 27, 2006, 01:48:43 pm »
If you want to change the colour of a single connector, right-click it and choose "Appearance..."

If you want to change the colour of all connectors, from the main menu choose "Tools | Options | Standard Colors" and change the value for "Connector Line".
The Sparx Team
[email protected]

zzcat

  • EA Novice
  • *
  • Posts: 7
  • Karma: +0/-0
  • I love YaBB 1G - SP1!
    • View Profile
Re: change connector color
« Reply #2 on: November 27, 2006, 01:53:20 pm »
Don't worry about it. I found it.  Thank you!

zzcat

  • EA Novice
  • *
  • Posts: 7
  • Karma: +0/-0
  • I love YaBB 1G - SP1!
    • View Profile
Re: change connector color
« Reply #3 on: November 27, 2006, 01:54:06 pm »
oh,

Just saw that I got answered already. Thanks a lot! :)

Dave_Bullet

  • EA User
  • **
  • Posts: 295
  • Karma: +0/-0
    • View Profile
Re: change connector color
« Reply #4 on: November 29, 2006, 12:11:26 pm »
If you want to change the connector colour dynamically based on a tagged value or property, you can use a shape script like this...

/* This script is used to show whether an interface
between systems is either current (green) or future
(yellow) based on the tag value.  The source and
target shapes are used to draw the arrowheads
depending on the direction of the dependency.
The main shape draws the dashed line connecting
the elements */
/*
shape source
{
if(HasProperty("Direction", "Destination -> Source"))
{
if(HasTag("Future interface","true"))
{
setpen(0,255,0,0);
setfillcolor(0,255,0);
}
else
{
setpen(255,51,0,0);
setfillcolor(255,51,0);
}
   polygon(10,0,3,10, 180);
}
else
{
if(HasProperty("Direction", "Bi-Directional"))
{
if(HasTag("Future interface","true"))
{
setpen(0,255,0,0);
setfillcolor(0,255,0);
}
else
{
setpen(255,51,0,0);
setfillcolor(255,51,0);
}
   polygon(10,0,3,10, 180);
   }
   }
}

shape target
{
if(HasProperty("Direction", "Source -> Destination"))
{
if(HasTag("Future interface","true"))
{
setpen(0,255,0,0);
setfillcolor(0,255,0);
}
else
{
setpen(255,51,0,0);
setfillcolor(255,51,0);
}
   polygon(10,0,3,10, 180);
}
else
{
if(HasProperty("Direction", "Bi-Directional"))
{
if(HasTag("Future interface","true"))
{
setpen(0,255,0,0);
setfillcolor(0,255,0);
}
else
{
setpen(255,51,0,0);
setfillcolor(255,51,0);
}
   polygon(10,0,3,10, 180);
   }
   }
}

shape main
{
layouttype="border";
noshadow="true";
setlinestyle("solid");
if(HasTag("Future interface","true"))
{
setpen(0,255,0,1);
}
else
{
setpen(255,51,0,1);
}
lineto(100,0);
}
*/

/* Just annotate whether the interface
is currently implemented or a future one via
adorning with the status */

shape main
{
h_align = "center";
v_align = "center";
if(HasTag("Future interface","true"))
Print("[future]");
else
Print("[current]");
}
« Last Edit: November 29, 2006, 12:11:47 pm by Dave_Bullet »
"I know I'm close to a good design, but it's like the balloon animals, squeeze in one spot and the problem moves down the line"