How to use STARTUML under the 2018.4.15 Mac System (same for Windows)

Source: Internet
Author: User

How Mac uses startuml (same for Windows) 1. How to draw the interface class?

In UML class diagrams, there are 2 ways to represent interfaces

(1)分为两层,第一层接口名,顶端有<>标识,第二层是接口方法,也就是俗称的两层矩形框表示;(2)和类图表示一样,区别为第二层为空,在矩形框上有一个棒棒糖的标识,俗称棒棒糖表示法;

Below we explain in detail how to turn the interface into a two-layer rectangular box representation

1、选中需要修改的接口图,右键“Format”→“Stereotype Display”→“Textual”(Mac下是没有Textual 但是可以转化为Icon或者Decration.....   这两种模式是有区别的,前者当一个类去实现接口的时候会显示实线,后者则会显示虚线跟我们平时看的结果一样)经过上面的设置,可以发现接口的表示方法已经由棒棒糖表示法变成两层矩形框表示了,但还有一个问题,就是方法名和属性不显示,让接口显示方法名和属性,请按照以下步骤设置:“Format”去掉“Suppress Attributes”和“Suppress Operations”。然后接口哪里会显示两行矩形出来,还有在接口哪里写方法的时候注意只需要写出方法名就行了,不需要写  +   -  这些只需要前面的下拉框选择就行了。void  在这里表示的是type最终,进过设置,接口的表示如所示,成功的把接口由棒棒糖表示法变成两层矩形框表示法拓展添加类和接口的关系l            可以通过从toolbox中选择表示“Realization”的箭头,并从Circle拖拽向IShape,使Circle实现接口IShape。重复同样的过程,为Rectangle添加实现关系。这是添加了Circle 和 Rectangle对于IShape接口的实现关系。n      如果想使连接线表现为直角的方式,右击连接线,并选择" Format/Line Style/Rectilinear"菜单。你通过这种方式,使箭头重叠在一起,可以使你的图看起来更整洁。
2. How to generate Java code from STARTUML
生成Java stub代码:l        点击主菜单的“Tools->Java”菜单,选择“Generate Code”。从对话框中选择你的模块(这里可能Model1),点击“Next”。l        为了使你的模块或者图标的所有类都生成stub code,选择“Select All”然后按“Next”。l        选择一个有效的输出目录,“Next”。l        In the "Options Setup", be sure to check both "Generate the Documentation by JavaDoc" and "Generate empty JavaDoc".  All other checkboxes should be unchecked.  Then press "Next".在“Options Setup” ,请务必选中“Generate the Documentation by JavaDoc”,“Generate empty JavaDoc”,所有其他复选框不选中,“Next”。l        现在StarUML将从你的图产生代码,点击“Finish”退出对话框。l        现在,您可以编辑生成的代码,以增加应用。
3. How to draw a time series diagram

The steps to create the sequence diagram are as follows: model– "Add diagram–" Sequence Diagram

4. How to draw abstract classes

How to use STARTUML under the 2018.4.15 Mac System (same for Windows)

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.