Book a Demo

Author Topic: How to customize stereotype icons?  (Read 6939 times)

kosh.iii

  • EA Novice
  • *
  • Posts: 15
  • Karma: +0/-0
    • View Profile
How to customize stereotype icons?
« on: March 08, 2008, 01:03:06 am »
Is there any way to change the stereotype icons that are displayed in the top right corner or add new stereotypes with custom icons?

What I don't want to do is change the whole appearence of a node, component or class into a metafile or shape script! I just would like to use my own icon images inside the default drawings.

Examples for default stereotypes that have icons are <<server>> nodes or <<pc>> nodes.

What I'd like to have example are a <<tomcat>> node or <<database>> node with appropriate icons.

Does anyone know how to achieve this? I searched the user guide and forum but didn't find anything.
« Last Edit: March 08, 2008, 01:03:35 am by kosh.iii »

«Midnight»

  • EA Guru
  • *****
  • Posts: 5651
  • Karma: +0/-0
  • That nice Mister Grey
    • View Profile
Re: How to customize stereotype icons?
« Reply #1 on: March 08, 2008, 03:56:56 am »
I don't believe so.

In times gone by I asked for something like this but it never made the cut.

What I would like to see is:
  • The ability to use the EA built-in icons
  • The ability to add our own icons, along the same lines as importing images
  • The ability to designate multiple icons, and preferably their ordering
  • The ability to use icons in shapescript decorations
  • The ability to add multiple decorations in shapescripts
In all the above you could change icon to bitmap (or whatever); the important thing is the ability to use a small image of predictable size.

Perhaps you'd like to make the feature request this time.

David
No, you can't have it!

KP

  • EA Administrator
  • EA Expert
  • *****
  • Posts: 2919
  • Karma: +55/-3
    • View Profile
Re: How to customize stereotype icons?
« Reply #2 on: March 11, 2008, 09:49:54 am »
Quote
What I'd like to have example are a <<tomcat>> node or <<database>> node with appropriate icons.
Add your bitmap using "Settings > Images" then define the <<tomcat>> stereotype as having the following shape script:
Code: [Select]
decoration tomcat
{
    orientation="NE";
    image("tomcat.bmp",0,0,100,100);
}
The Sparx Team
[email protected]

kosh.iii

  • EA Novice
  • *
  • Posts: 15
  • Karma: +0/-0
    • View Profile
Re: How to customize stereotype icons?
« Reply #3 on: March 27, 2008, 01:32:23 am »
Thanks for your response! I've tried it that way and it worked. But when using the shape script below the icon is placed at the outermost NE corner of the UML element.

Is there a way to define a border to keep between icon and element boundary? I tried surrounding the image with a transparent border but transparency seems to be ignored in EA - at least for PNGs.

KP

  • EA Administrator
  • EA Expert
  • *****
  • Posts: 2919
  • Karma: +55/-3
    • View Profile
Re: How to customize stereotype icons?
« Reply #4 on: March 27, 2008, 08:56:58 am »
Quote
Is there a way to define a border to keep between icon and element boundary? I tried surrounding the image with a transparent border but transparency seems to be ignored in EA - at least for PNGs.
There's a couple of ways...

You can reduce the size of the image displayed:
Code: [Select]
decoration tomcat
{
      orientation="NE";
      image("tomcat.bmp",0,[highlight]10[/highlight],[highlight]90[/highlight],100);
}

Or you can keep the image the same size and shift it a couple of pixels left and down:
Code: [Select]
decoration tomcat
{
      orientation="NE";
      [highlight]setorigin("NE",-18,2);[/highlight]
      image("tomcat.bmp",0,0,100,100);
}
« Last Edit: March 27, 2008, 08:57:56 am by KP »
The Sparx Team
[email protected]