19

I'm just using StarUML to create my UML Class diagram and something is bothering me. I create an interface representation, which is a circle, however, there is no room to add which methods and attributes the interface defines. Is this normal UML practice?

If not, how do you know (say a class implements this interface and has 4 methods defined) which of the 4 methods came from the interface and which didnt?

Solved:

Ok just incase someone else has this problem- there are two notations, both are possible in StarUML but only one explicitly (the dot notation). To create the <> notation, enter the name as <> IInterface_Name and then draw a realisation line between the implementing classes. Be sure to manually delete the old (wrong) relationship you had by right clicking the class, collection editor and then relations.

Jean
  • 721
  • 3
  • 9
  • 14

1 Answers1

47

It is very simple:

  1. If you need just show method of interface - right click on interface and un-select Format/Suppress operation (see blue circle on picture)
  2. If you need to display instead of circle just squared form of interface (on my picture it is ISome) use Format/Stereotype Display/Decoration (see red circle on picture bellow)

enter image description here

Dewfy
  • 23,277
  • 13
  • 73
  • 121
  • Thanks, i found another way- just to show the non-dot notation method, along with a realisation association – Jean Jul 22 '11 at 11:33
  • Thanks, I had the same issue and didn't know you could change the shape. However it won't let me add any method declarations to the Interface. I've tried 'Add > Operation' but it just does nothing. How did you add the Operation2 to your ISome? I'm using v2.0.0 mac. – scipilot Feb 20 '15 at 23:46
  • DOH! You already answered that in point 1. I hadn't unticked Suppress Operations. Serious case of RTFSO. – scipilot Feb 20 '15 at 23:51
  • Coming a bit too late to the party but wondered if it is possible to make it default interface to be drawn in squared <> shape... This should be standard no? I was surprised to see circle for interface – Ewoks Mar 17 '18 at 11:07
  • @Ewoks may be I don't get you question right, but if mean "Can I change <> onto smthng else" - then yes, you can. It is called stereotype. For some reason StarUML allows modify it for regular classes, but Interfaces are displayed with fixed – Dewfy Mar 20 '18 at 15:27
  • on your screenshot I see it under menu as circle, and next to it,not covered ISome with Operation2(), is how I would expect interface to be represented by default (instead of default circle that StarUML offers) – Ewoks Mar 20 '18 at 15:36
  • @Ewoks - yes, go to Menu\Tools\Options, select Environment\Specific View and scroll to "Interface View". For my version I can see "Show Stereotype = Icon" (or whatever you select) – Dewfy Mar 22 '18 at 10:38