Is it possible to stack objects in an object diagram with PUML?

32 Views Asked by At

Is it possible to stack multiple objects in a PUML object diagram? Or give them a kind of "shadow"?

I want to achieve a visual effect like so:

    +------------+
    |            |
  +------------+ |
  |            | |
+------------+ | |
|            | | |
| Some text  | |-+
|    here    | |
|            |-+
|            |
+------------+

or a bit denser:

  +------------+
 +------------+|
+------------+||
|            |||
| Some Text  |||
|    here    ||+
|            |+
+------------+
1

There are 1 best solutions below

3
Bastian On BEST ANSWER

I think this is not possible, but you can use "collections" as the object type with additional shadow.

The code

@startuml
allowmixing
skinparam shadowing true
object firstObject

collections collection [
  This is a **long** description
  with a bullet list
  * foo
  * bar
]
@enduml

will create

enter image description here

or try it online here:

https://www.plantuml.com/plantuml/uml/HOv13eD024Ntd8BrdC8RTDDTqmNggBGu6C3OunTDan8MBvz7yZiFijXN0HBHO-KFjndypMqZenLzeL6Fp31ihm3Ql-eGEB5vt2u665GaWRKv_XaVW3dtXHrp2KiHRNCfE5OVZBTJkfI3Oybxl-TheB375HUSL7_Kay4Jkjh6i-eN