Book a Demo

Author Topic: Icon in Node  (Read 13281 times)

kepNCI

  • EA User
  • **
  • Posts: 127
  • Karma: +1/-0
    • View Profile
Icon in Node
« on: August 30, 2012, 04:44:40 am »
Some of the EA supplied stereotypes for a Node have a small icon in the upper right hand corner of the node rectancle.
Are these icons defined by UML (as in the case of the component icon)?
Is there a way to add your own icon to node and device stereotypes that are user created?
(if so, would hope that it also works for stereotypes defined within an MDG profile).

RoyC

  • EA Administrator
  • EA Practitioner
  • *****
  • Posts: 1297
  • Karma: +21/-4
  • Read The Help!
    • View Profile
Re: Icon in Node
« Reply #1 on: August 30, 2012, 09:31:35 am »
Yes, your custom element would have a stereotype that applies a shape script to define the object's appearance. Part of this shape script would define the position and appearance of a decoration, which is what the 'in element' icons are.

There is a small example of adding a decoration in a shape script, towards the end of the Write Scripts Help topic.

So, your MDG Technology would contain a profile that defines Stereotypes, one of which would apply to your custom Node element, and that stereotype would contain a shape script that defines a decoration.
Best Regards, Roy

kepNCI

  • EA User
  • **
  • Posts: 127
  • Karma: +1/-0
    • View Profile
Re: Icon in Node
« Reply #2 on: August 30, 2012, 11:59:46 pm »
Thanks, Roy

Will play with that today. I have not done much with scripting, yet.

Will I run into the same issue with a shape script decoratation as f I do with using a shape script to assign an alternate image to a stereotype, that is, when I use the stereotype with a shape script image, the Feature Visibility option to display the tags and notes does not work.

Karl

KP

  • EA Administrator
  • EA Expert
  • *****
  • Posts: 2919
  • Karma: +55/-3
    • View Profile
Re: Icon in Node
« Reply #3 on: August 31, 2012, 08:58:30 am »
If you have a shape script containing a "decoration" shape only, the decoration will be super-imposed on the default rendering of the element, so all feature visibility options will work. It's only when the shape script includes a "shape main" shape that the feature visibility options are overridden.
The Sparx Team
[email protected]