Book a Demo

Author Topic: Changing the way classes are displayed  (Read 9619 times)

Modesto Vega

  • EA Practitioner
  • ***
  • Posts: 1183
  • Karma: +30/-8
    • View Profile
Changing the way classes are displayed
« on: March 13, 2015, 01:01:26 am »
I am using again EA12 to create a conceptual model. I have done this before but always encountered 2 aesthetic problems I would like to solve this time.

1) Is it possible to get a class to display the way it displays when attributes and operations are added but without actually adding any any attributes or operations -  i.e., like http://en.wikipedia.org/wiki/Class_diagram#/media/File:BankAccount1.svg?


2) On parent child classes, is it possible to stop the class from being displayed A:B:C and just displayed as C?

skiwi

  • EA Expert
  • ****
  • Posts: 2081
  • Karma: +46/-82
    • View Profile
Re: Changing the way classes are displayed
« Reply #1 on: March 13, 2015, 02:12:11 pm »
0) EA doesn't do aesthetics
1) if you mean then you get what you get, but try Diagram > Properties > Elements > Show Compartments
2) try Diagram > Properties > Diagram > Show Namespace (untick)
Orthogonality rules
Position and Team disestablished, thanks austerity.
Now itinerant.

Uffe

  • EA Practitioner
  • ***
  • Posts: 1859
  • Karma: +133/-14
  • Flutes: 1; Clarinets: 1; Saxes: 5 and counting
    • View Profile
Re: Changing the way classes are displayed
« Reply #2 on: March 13, 2015, 08:32:55 pm »
2) Also same dialog, "Disable fully scoped object names."
There are several variables, including where the diagram is located in relation to its contents, so play around with different combinations of those two flags.

/Uffe
My theories are always correct, just apply them to the right reality.

Modesto Vega

  • EA Practitioner
  • ***
  • Posts: 1183
  • Karma: +30/-8
    • View Profile
Re: Changing the way classes are displayed
« Reply #3 on: March 13, 2015, 10:21:19 pm »
Thanks Uffe and skiwi, that gets the diagram looking the way I want.

Modesto Vega

  • EA Practitioner
  • ***
  • Posts: 1183
  • Karma: +30/-8
    • View Profile
Re: Changing the way classes are displayed
« Reply #4 on: March 18, 2015, 03:06:05 am »
Inevitably there have to be 3 follow up questions to this:

1) Is it possible to have a "default" style for a diagram where Show Additional Parents and Show Namespace are disabled, and Disable fully scoped names are enabled?

2) Is it possible to have a "default" style for a class where Structure Compartment under Feature and Compartment Visibility is enabled by default?

3) Is it possible to show just the attributes compartment and not the operations compartment? If an attribute is added but no operations are added, the operations compartment appears blank?

Thanks for the help


Eve

  • EA Administrator
  • EA Guru
  • *****
  • Posts: 8110
  • Karma: +119/-20
    • View Profile
Re: Changing the way classes are displayed
« Reply #5 on: March 18, 2015, 08:45:47 am »
Quote
0) EA doesn't do aesthetics
Really? All of the recent versions that have added all sorts of aesthetic diagram options.
« Last Edit: March 18, 2015, 08:46:39 am by simonm »

KP

  • EA Administrator
  • EA Expert
  • *****
  • Posts: 2919
  • Karma: +55/-3
    • View Profile
Re: Changing the way classes are displayed
« Reply #6 on: March 18, 2015, 09:42:08 am »
Quote
1) Is it possible to have a "default" style for a diagram where Show Additional Parents and Show Namespace are disabled, and Disable fully scoped names are enabled?
Yes, you will need to define a Project Template Package (in EA 12, the command is Project > Settings > Project Template Package...) and create a diagram of the required type with all the required settings under that package. Then when you next create a diagram of that type, it will copy the template diagram's settings.

Quote
2) Is it possible to have a "default" style for a class where Structure Compartment under Feature and Compartment Visibility is enabled by default?
Yes, put a class on your template diagram and enable its structure compartment.

Quote
3) Is it possible to show just the attributes compartment and not the operations compartment? If an attribute is added but no operations are added, the operations compartment appears blank?
The line above the operations compartment isn't drawn if the compartment is empty. I think the only compartment that draws a line above when empty is the structure compartment.
The Sparx Team
[email protected]

Modesto Vega

  • EA Practitioner
  • ***
  • Posts: 1183
  • Karma: +30/-8
    • View Profile
Re: Changing the way classes are displayed
« Reply #7 on: March 19, 2015, 09:26:40 pm »
Thanks for the reply.

I think I got 1 and 2 working (for new classes only). 2 only seems to work for new classes; if I add a class already existing in the model it is displayed just as a rectangle without any compartments.

3 does not work as described in your post. As soon as I add an attribute to a class the boundary line between the attributes and operations compartment appears irrespective of whether there are any operations defined or not.

« Last Edit: March 19, 2015, 09:59:52 pm by modesto.vega »