Author Topic: Different appearence of model element in different  (Read 3411 times)

cuninghamd

  • EA User
  • **
  • Posts: 25
  • Karma: +0/-0
  • I love YaBB 1G - SP1!
    • View Profile
Different appearence of model element in different
« on: August 20, 2007, 06:12:32 am »
Sorry if this is such a basic question but...
  I have a requirement to show classes with the analysis stereotype of Entity as circular on one view/diagram , and on another view/diagram I wish to see the same element in a more traditional object rectangle shape, with the Entity stereotype icon in the top right of the rectangle, and also to show any attributes or operations that belong to the class.

Is this possible ?

Thanks.

Dave.
« Last Edit: August 20, 2007, 06:13:29 am by cuninghamd »

thomaskilian

  • Guest
Re: Different appearence of model element in diffe
« Reply #1 on: August 20, 2007, 11:05:05 am »
Yes. RTFM. Try the help file. It is quite useful. Search for interface, circular and rectangel.

peter.zrnko

  • EA User
  • **
  • Posts: 253
  • Karma: +0/-0
    • View Profile
Re: Different appearence of model element in diffe
« Reply #2 on: August 20, 2007, 10:55:03 pm »
The setting you are looking for is
Diagram - Properties - Elements - Use Stereotype Icons
Peter

cuninghamd

  • EA User
  • **
  • Posts: 25
  • Karma: +0/-0
  • I love YaBB 1G - SP1!
    • View Profile
Re: Different appearence of model element in diffe
« Reply #3 on: August 21, 2007, 01:25:32 am »
Peter & Thomas,
  Thanks for your replies - almost there - however...
Diagram - properties - elements with the use stereotype icons unchecked shows me a rectangle, with no compartments & no stereotype icon in the top right hand corner of the rectangle - what it does show is the <<entity>> stereotype, the name of the class, the attributes , but not in a compartment (the compartment only shows when I add an operation - which I don't wish to do)

is it possible to do what I want - the help file seems to indicate that because EA has the whole shape defined, then it is not possible ask it to display the icon in the top right corner ?

Thanks
Dave.

«Midnight»

  • EA Guru
  • *****
  • Posts: 5651
  • Karma: +0/-0
  • That nice Mister Grey
    • View Profile
Re: Different appearence of model element in diffe
« Reply #4 on: August 21, 2007, 02:30:18 am »
I think Peter is correct in this case, there seems to be something missing from the mix. EA can almost handle the case Peter is talking about, but not quite.

As to the ability to add an icon, we're at a bit of a loss. EA deals with this gracefully for its own internal drawing engine. Unfortunately, the shape script engine does not have access to this ability, nor does there appear to be any way to get at the 'internal' icons from EA. Thus, we cannot use EA's icon set, nor can we draw multiple icons, nor can we designate icons to decorate shapes directly rendered (i.e. without shape scripts) by EA.

I've asked about some of this quite some time ago, but received no response.

Perhaps someone else would like to start a Request thread, to add weight to this...

David
No, you can't have it!

mark.myers

  • EA User
  • **
  • Posts: 97
  • Karma: +0/-0
    • View Profile
Re: Different appearence of model element in diffe
« Reply #5 on: August 21, 2007, 02:25:41 pm »
Dave, you can define a decoration shape script for a stereotype which will show an icon in the top right corner and render the element using the default shape.

If a stereotype has this as its shapescript then you will see a little green ellipse in the top corner.

decoration myIcon
{
   orientation = "NE";
   setfillcolor(0,255,0); // (R,G,B)
   ellipse(0,30,90,60);  // (x1,y1,x2,y2)
}

from the shapescript you can also draw images from the Images loaded into the project.

Is this the sort of thing you are after?

Mark.
Cheers, Mark