Book a Demo

Author Topic: Displaying icons in classes  (Read 2660 times)

darrenw

  • EA Novice
  • *
  • Posts: 7
  • Karma: +0/-0
    • View Profile
Displaying icons in classes
« on: August 01, 2005, 09:03:53 pm »
Is there a way to display icons instead of + and - symbols to distinguish public and private elements in a class?

Also is it possible to separate public properties and public methods with a line in a class rather than them both appearing in the bottom section of the class box? I assume not because it is not UML-compliant.

Thanks,
Darren.

sargasso

  • EA Practitioner
  • ***
  • Posts: 1406
  • Karma: +1/-2
  • 10 COMFROM 30; 20 HALT; 30 ONSUB(50,90,10)
    • View Profile
Re: Displaying icons in classes
« Reply #1 on: August 01, 2005, 11:16:41 pm »
In EA, no and no.

Visibility symbols defined in The Standard are not icons they are +-/~.  Certain commercial products that feature iconic visibility symbols such as padlocks and the like may wish they were the standard but they aint.

There are many words in these forums on the property/method dichotomy/conundrum.  I'm not sure of the score at the moment but I think it's of the order of 35012 to 34088 in favour of the "properties are methods" team  ;)  (Guess whose side I'm on)  The standard which takes more of a legacy view of the world seems, IMO, to favour the same view i.e. there is no difference between a property and a method.

bruce

p.s.  In fact, I'm getting even more convinced... properties are naught but a constrained method.  N.B. Constrained not "constraint'ed".  They are constrained in the fact that they offer a limited set of accesses to a single characteristic (real or derived) of the class. Whereas general methods may, if the designer so choses, offer access to an operate on mulitple charatceristics.
(Oh well, Paolo, guess I'll have to dig Meyer out again  :-/)
« Last Edit: August 01, 2005, 11:24:54 pm by sargasso »
"It is not so expressed, but what of that?
'Twere good you do so much for charity."

Oh I forgot, we aren't doing him are we.

Paolo F Cantoni

  • EA Guru
  • *****
  • Posts: 8626
  • Karma: +259/-129
  • Inconsistently correct systems DON'T EXIST!
    • View Profile
Re: Displaying icons in classes
« Reply #2 on: August 02, 2005, 12:43:13 am »
Quote
[size=13][SNIP][/size]
p.s.  In fact, I'm getting even more convinced... properties are nought but a constrained method.  N.B. Constrained not "constraint'ed".  They are constrained in the fact that they offer a limited set of accesses to a single characteristic (real or derived) of the class. Whereas general methods may, if the designer so choses, offer access to an operate on multiple characteristics.
(Oh well, Paolo, guess I'll have to dig Meyer out again  :-/)
Funny you should say that bruce...  I was just (today) refactoring my XML emitter and I came to the conclusion that I wanted to preserve a certain degree of referential integrity between about half-a-dozen attributes of a class and so I took away the methods and replaced them with a set of properties.  Set one, the others get set accordingly - no access to the methods, just the property setters and getters!  Complete control!

So effectively I constrained the methods to operate only in certain ways... Exactly as you postulated...  8)

Scary, Huh?

Paolo
Inconsistently correct systems DON'T EXIST!
... Therefore, aim for consistency; in the expectation of achieving correctness....
-Semantica-
Helsinki Principle Rules!