How do I add empty (white) space between lines in my PlantUML Sequence Diagram?
Asked Answered
M

1

9

I'm creating some notes and images to help me better understand Builder Patterns in Java.

Strictly for design purposes, I've been attempting to input additional white space between some message lines I have in a PlantUML Sequence Diagram.

More specifically ... I want additional white space between the LibraryController -> Book.Builder : init line and LibraryController -> Book.Builder : isbn(String isbn).

1

enter image description here

I've tried using \n at the end of the init statement, but that only added extra white space between the init text and its line.

I'm looking to add extra space between the init line and the following text + isbn(String isbn) line.

Any suggestions?

Muckrake answered 23/2, 2023 at 3:18 Comment(1)
Please don't post images of code. Instead copy the code as text in your question.Feu
I
13

The sequence diagram syntax has this feature with vertical bars:

@startuml

Alice -> Bob: message 1
Bob --> Alice: ok
|||
Alice -> Bob: message 2
Bob --> Alice: ok
||45||
Alice -> Bob: message 3
Bob --> Alice: ok

@enduml

enter image description here

Another way is to add the \n before the message, e.g.,

@startuml
Alice --> Bob: whazzup?
Bob --> Alice: \n\n\n\n\n\nyo
@enduml

enter image description here

Industrialism answered 23/2, 2023 at 7:29 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.