The Wiert Corner – irregular stream of stuff

Jeroen W. Pluimers on .NET, C#, Delphi, databases, and personal interests

  • My badges

  • Twitter Updates

  • My Flickr Stream

  • Pages

  • All categories

  • Enter your email address to subscribe to this blog and receive notifications of new posts by email.

    Join 2,100 other followers

Some PlantUML links I needed for complex component diagram editing

Posted by jpluimers on 2020/08/18

A while ago, I had to create a bit more complex component diagrams than the simple ones I used to create in PlantUML.

Some links that helped me:

UML2 style examples for skinparam that are equivalent:

skinparam component {
  Style uml2
}
skinparam {
  componentStyle uml2
}

Styling

  • [WayBack] Choosing colors has become easier using

    @startuml
    colors
    @enduml

  • skinparam are implemented in [WayBackplantuml/SkinParam.java at master · plantuml/plantuml · GitHub where you can find these interesting parts:
    • the functiongetPossibleValue returns the set of global setting names
    • The Default prefix out of the ones below leads to loads of permutations
      (later I found out it is way easier to find them using java -jar plantuml.jar -language):

      • result.add("DefaultFontName");
        result.add("DefaultFontStyle");
        result.add("DefaultFontSize");
        result.add("DefaultFontColor");
        result.add("DefaultTextAlignment");
        result.add("DefaultMonospacedFontName");
      • replace Default with any of these to get the permutations (the ones with * also have a ...StereoType equivalent):
        • Activity
        • ActivityArrow
        • ActivityDiamond
        • Actor *
        • Agent *
        • Artifact *
        • Boundary *
        • CircledCharacter
        • ClassAttribute
        • Class *
        • Cloud *
        • Component *
        • Control *
        • Database *
        • Entity *
        • Folder *
        • Footer *
        • Frame *
        • GenericArrow
        • Header
        • Interface *
        • Legend
        • Node *
        • Note
        • ObjectAttribute
        • Object *
        • Package
        • Participant
        • Rectangle *
        • Sequence[Arrow|Box|Delay|Divider|Group|GroupHeader|LifeLine|Reference|Title]
        • StateAttribute
        • State
        • Storage *
        • Title *
        • Usecase
    • The end of that function has a few interesting tidbits as well:
      •        for (FontParam p : EnumSet.allOf(FontParam.class)) {
                    final String h = humanName(p.name());
                    result.add(h + "FontStyle");
                    result.add(h + "FontName");
                    result.add(h + "FontSize");
                    result.add(h + "FontColor");
                }
                for (ColorParam p : EnumSet.allOf(ColorParam.class)) {
                    final String h = capitalize(p.name());
                    result.add(h + "Color");
                }
                for (LineParam p : EnumSet.allOf(LineParam.class)) {
                    final String h = capitalize(p.name());
                    result.add(h + "Thickness");
                }
        

mrhaki: PlantUML Pleasantness

More PlantUML Pleasantness from [WayBack] Messages from mrhaki -` PlantUML:Pleasantness:

mrhaki: PlantUML

More PlantUML from [Archive.is] Messages from mrhaki: PlantUML:

–jeroen

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.

 
%d bloggers like this: