PlantUML Class 图 - field/method 在图例中的可见性
PlantUML Class Diagram - field/method visibility in legend
是否可以使用真实图标在图例中找到 class 图表的 field/method 可见性标签?
即在下图 table 中获取真正的图标
@startuml
class Dummy {
-field1
#field2
~method1()
+method2()
}
legend
|= field |= method |= |
| - | - | private |
| # | # | protected |
| ~ | ~ | package private |
| + | + | public |
endlegend
@enduml
我尝试过但没有成功的事情:
- 正在寻找suitable openiconic图标(好像没有)
- 根据 http://plantuml.com/class-diagram 上的文件名链接到图像(不存在)
这很好(对我来说肯定足够好了):
@startuml
class Dummy {
-field1
#field2
~method1()
+method2()
}
skinparam legendBackgroundColor #ffffff
legend
|= field |= method |= |
| <img:http://s.plantuml.com/private-field.png> | <img:http://s.plantuml.com/private-method.png> | private |
| <img:http://s.plantuml.com/protected-field.png> | <img:http://s.plantuml.com/protected-method.png> | protected |
| <img:http://s.plantuml.com/package-private-field.png> | <img:http://s.plantuml.com/package-private-method.png> | package private |
| <img:http://s.plantuml.com/public-field.png> | <img:http://s.plantuml.com/public-method.png> | public |
endlegend
@enduml
是否可以使用真实图标在图例中找到 class 图表的 field/method 可见性标签?
即在下图 table 中获取真正的图标
@startuml
class Dummy {
-field1
#field2
~method1()
+method2()
}
legend
|= field |= method |= |
| - | - | private |
| # | # | protected |
| ~ | ~ | package private |
| + | + | public |
endlegend
@enduml
我尝试过但没有成功的事情:
- 正在寻找suitable openiconic图标(好像没有)
- 根据 http://plantuml.com/class-diagram 上的文件名链接到图像(不存在)
这很好(对我来说肯定足够好了):
@startuml
class Dummy {
-field1
#field2
~method1()
+method2()
}
skinparam legendBackgroundColor #ffffff
legend
|= field |= method |= |
| <img:http://s.plantuml.com/private-field.png> | <img:http://s.plantuml.com/private-method.png> | private |
| <img:http://s.plantuml.com/protected-field.png> | <img:http://s.plantuml.com/protected-method.png> | protected |
| <img:http://s.plantuml.com/package-private-field.png> | <img:http://s.plantuml.com/package-private-method.png> | package private |
| <img:http://s.plantuml.com/public-field.png> | <img:http://s.plantuml.com/public-method.png> | public |
endlegend
@enduml