Sunday, 10 December 2023

PlantUML: interface element in deployment diagram

Interface element can be created using interface keyword or with ()

interface interface1
interface "my interface 2" as interface2
() interface3
() "my interface 4" as interface4

 

You can add description to the interface element using brackets []

interface interface5 [
This is interface5, 
<b>HTML</b> styling is supported
]

 

You can add colors to the interface at the time of definition.

interface interface6 #palegreen;line:blue;line.bold;text:blue[
This is interface 6
]

 

interface.txt

@startuml

title "interface element"

interface interface1
interface "my interface 2" as interface2
() interface3
() "my interface 4" as interface4

interface interface5 [
This is interface5, 
<b>HTML</b> styling is supported
]

interface interface6 #palegreen;line:blue;line.bold;text:blue[
This is interface 6
]

' Use this staement to model the interface as circle
' Otherwise PlantUML can't deduce it as deployment diagram
label "\t\t\t\t\t\t\t\t\t<b>interface example</b>"

@enduml

 

Above snippet generate below diagram.

 


 

 

Previous                                                    Next                                                    Home

No comments:

Post a Comment