Book a Demo

Author Topic: Support for consistent coloring of classes  (Read 3379 times)

Gero

  • EA Novice
  • *
  • Posts: 1
  • Karma: +0/-0
    • View Profile
Support for consistent coloring of classes
« on: January 22, 2009, 08:32:06 pm »
Dear engineers from SPARX,

we created a huge class model; we have a big diagram showing the majority of all classes and separate diagrams for each package (showing also connected classes from other packages). Thus an average class would appear in three or four different diagrams.

We want to use a coloring scheme for classes based on their home package, i.e. classes Alpha and Apple belonging to package A should be painted with a light yellow background color - regardless where they appear.

We suggest to offer a set of default layout attributes for the classes of a package and a small function which would the user allow to apply these defaults to all occurences of all classes of that package (thus overwriting individual settings applied to these objects in the various graphs). Ideally the user should be able to select a single visual property (like background color) which is to be overwritten - all other visual attribute should not be affected.

A simpler would at least allow to enforce defaults defined on class level (and not on package level) to all visual appearances of an object. This solution would not have to be restricted to classes, of course.

Do you think such a feature could be useful? Is there a way to do this based on current functionality of EAR? Doing all this manually is quite time consuming ..

Regards
Gero

Eve

  • EA Administrator
  • EA Guru
  • *****
  • Posts: 8110
  • Karma: +119/-20
    • View Profile
Re: Support for consistent coloring of classes
« Reply #1 on: January 23, 2009, 08:17:43 am »
You can already set the default appearance for an object wherever it appears on a diagram (but isn't overridden locally).

See http://www.sparxsystems.com/uml_tool_guide/what_is_uml_modeling/configuredefaultappearance.html for details.

I wouldn't suggest that doing this on a package basis would be useful for most users, but perhaps you could iterate over the elements in a package at set the colors via the automation interface.  (See http://www.sparxsystems.com/uml_tool_guide/sdk_for_enterprise_architect/element2.html, and look for SetAppearance)

«Midnight»

  • EA Guru
  • *****
  • Posts: 5651
  • Karma: +0/-0
  • That nice Mister Grey
    • View Profile
Re: Support for consistent coloring of classes
« Reply #2 on: January 23, 2009, 11:00:09 am »
If you just need to highlight elements from other packages - those not owned by the same package as the diagram - you can do this textually. It is not as immediately (for lack of a better word) visual, but it does serve the purpose.

Doing this has two other potential advantages, depending on your corporate environment. First, it is a more common paradigm in the UML world, so technical viewers (and those business users who have become comfortable with UML) may find it familiar. Second, a reader can determine where an element originated by reading the diagram, and does not have to look it up on a map.

Open diagram properties (F5) and click the Diagram tab. Check the Show Namespace box and close the dialog.

I believe that EA will remember this setting - it will become the default for new diagrams. Note that it will not retroactively change diagrams that you have already created.

HTH, David
No, you can't have it!