# 图

> For the complete documentation index, see [llms.txt](https://www.jetbrains.com.cn/help/idea/llms.txt).

> **TL;DR**
> `文件 | 设置 | 工具 | 图表`  适用于 Windows 和 Linux
>
>
>
> `%instance% | 设置 | 工具 | 图表`  适用于 macOS
>
>
>
> `Ctrl+Alt+S` (Windows), `⌘ Comma` (macOS), `⌘ Comma` (IntelliJ IDEA Classic (macOS)), `⌘ Comma` (macOS System Shortcuts), `Ctrl+Alt+S` (XWin), `Ctrl+Alt+S` (GNOME), `Ctrl+Alt+S` (KDE), `Ctrl+Alt+S` (Emacs), `Ctrl+Alt+S` (Sublime Text), `⌘ Comma` (Sublime Text (macOS)), `Ctrl+Alt+S` (Visual Studio), `⌘ Comma` (Visual Studio (macOS)), `Ctrl+Alt+S` (NetBeans), `Ctrl+Alt+S` (Eclipse), `⌘ Comma` (Eclipse (macOS)) !["设置"图标](https://resources.jetbrains.com.cn/help/img/idea/2026.3/app.expui.general.settings.svg)

在   图   菜单中，您可以配置图表的默认可见性设置和布局。

有关如何创建类图的信息，请参阅 [UML 类图](class-diagram.html)。

[Video](https://resources.jetbrains.com.cn/help/img/idea/2026.3/js_ts_building_module_dependency_diagram.mp4)

## 内容窗格

请勾选图表中要显示的元素。

|  条目  |  描述  |
| --- | --- |
|    显示差异    |
|  详细信息  |  如果选中此复选框，则在修订版的 UML 类图中将显示元素的所有指定详细信息。 如果未选中此复选框，则图表中只会包含节点元素。  |
|    Java 类图    |
|  类元素  |     选中复选框，以在节点元素内显示成员（字段、构造函数、方法、属性和内部类）：      ![umlShowMembers.png](https://resources.jetbrains.com.cn/help/img/idea/2026.3/umlShowMembers.png)    在图表上，使用工具栏按钮 ![节点字段](https://resources.jetbrains.com.cn/help/img/idea/2026.3/app.nodes.field.svg)、 ![方法](https://resources.jetbrains.com.cn/help/img/idea/2026.3/app.nodes.method.svg)、 ![构造函数](https://resources.jetbrains.com.cn/help/img/idea/2026.3/uml-support.icons.constructor.svg)、 ![Properties](https://resources.jetbrains.com.cn/help/img/idea/2026.3/app.nodes.property.svg) 和 ![内部类](https://resources.jetbrains.com.cn/help/img/idea/2026.3/uml-support.icons.innerclass.svg)。     |
|  依赖项  |  选中以下复选框以在图表中显示依赖链接。  |
|    数据库图表    |
|  密钥列  |     要在图表打开时显示主键列，请选择此复选框。       在编辑器中查看图表视图时，使用工具栏上的 ![“密钥列”按钮](https://resources.jetbrains.com.cn/help/img/idea/2026.3/database-plugin.icons.colGoldKey.svg) 显示或隐藏相应列。     |
|  列  |     要在图表打开时显示除主键列以外的其他列，请选中此复选框。       在编辑器中查看图表视图时，使用工具栏上的 ![“列”按钮](https://resources.jetbrains.com.cn/help/img/idea/2026.3/database-plugin.icons.col.svg) 显示或隐藏相应列。     |
|    图形化解释方案图    |
|  属性  |     切换查询图上查询属性的显示。 这些特性可以是行数、索引名称或有关查询的任何其他附加信息。      已启用:    ![查询计划中启用和禁用的属性](https://resources.jetbrains.com.cn/help/img/idea/2026.3/db_query_plan_attributes_enabled.png)   已禁用:    ![在查询计划中禁用和失效属性](https://resources.jetbrains.com.cn/help/img/idea/2026.3/db_query_plan_attributes_disabled.png)    |
|    项目模块    |
|  库  |  如果选中此复选框，库将显示在模块的 UML 图中。  |
|    JPA ER 图    |
|  Properties  |     如果选中此复选框，则在打开 JPA ER 图时会显示实体类的属性。       在编辑器中查看图表时，您可以通过使用工具栏上的 ![Properties](https://resources.jetbrains.com.cn/help/img/idea/2026.3/app.icons.javaee.gutter.persistenceAttribute.svg)来显示或隐藏这些属性。     |
|  可嵌入对象  |     如果选中此复选框，则在打开 JPA ER 图时会显示可嵌入对象。       在编辑器中查看图表时，您可以通过使用工具栏上的 ![Embeddable](https://resources.jetbrains.com.cn/help/img/idea/2026.3/app.icons.javaee.newui.persistenceEmbeddable.svg) 来显示或隐藏嵌入元素。     |
|  超类  |     如果选中此复选框，当 JPA ER 图打开时将显示实体类的超类。       在编辑器中查看图表时，您可以使用工具栏上的 ![超类](https://resources.jetbrains.com.cn/help/img/idea/2026.3/app.javaee.persistenceEntity.svg) 来显示或隐藏超类。     |
|    BPMN 2.0 图表    |
|  详细信息  |  要在 BPMN 图表打开时显示元素详细信息，请勾选此复选框。  |
|    CDI 依赖关系图    |
|  @Inject  |     如果勾选此复选框，将在打开 CDI 依赖图时显示注入点。       在编辑器中查看图表时，您可以通过使用工具栏上的 ![@Inject](https://resources.jetbrains.com.cn/help/img/idea/2026.3/JE_ShowInjectionPointsIcon.png) 来显示或隐藏注入点。     |
|  @Produces  |     如果选中此复选框，则在打开 CDI 依赖关系图时将显示生产者方法和字段。       在编辑器中查看图表时，您可以通过使用工具栏上的 ![@Produces](https://resources.jetbrains.com.cn/help/img/idea/2026.3/JE_ShowProducersIcon.png)来显示或隐藏生产者方法和字段。     |
|  @Decorator  |     如果选中此复选框，则在打开 CDI 依赖图时将显示装饰器 bean 类。       在编辑器中查看图表时，您可以使用工具栏上的 ![@Decorator](https://resources.jetbrains.com.cn/help/img/idea/2026.3/app.icons.cdi.decorator.svg) 来显示或隐藏装饰器。     |
|    Spring    |
|  本地上下文  |  如果选中此复选框，本地上下文将在图表中显示。 为了在编辑器中的   图表  选项卡中显示本地上下文，点击 ![本地上下文](https://resources.jetbrains.com.cn/help/img/idea/2026.3/spring.icons.fileSet.svg)。  |
|  Properties  |  如果选中此复选框，属性文件将在图表中显示。 若要在编辑器中显示属性文件的   图表  选项卡，请点击 ![Properties](https://resources.jetbrains.com.cn/help/img/idea/2026.3/spring.icons.springProperty.svg)。  |
|    Spring 集成    |
|  显示标签  |  如果选中此复选框，标签将显示在图表中。 要在编辑器的   图表  选项卡中显示标签，请点击 ![显示标签](https://resources.jetbrains.com.cn/help/img/idea/2026.3/SpringIntegrationDiagramLabels.png)。  |

> **Note:**
> 根据安装和启用的插件，此窗格中会显示更多节点。

## 控制

|  条目  |  描述  |
| --- | --- |
|  默认布局  |  请从   默认布局   列表中选择所需的布局。 新创建图中的节点元素将根据所选布局进行排列。  |
|  默认范围  |  从   默认范围   列表中选择范围。 指定范围有助于避免在图表中显示不必要的层次结构。 可以为项目定义作用域，位置是 [作用域页面](settings-scopes.html)，位于   设置  （ `Ctrl+Alt+S` (Windows), `⌘ Comma` (macOS), `⌘ Comma` (IntelliJ IDEA Classic (macOS)), `⌘ Comma` (macOS System Shortcuts), `Ctrl+Alt+S` (XWin), `Ctrl+Alt+S` (GNOME), `Ctrl+Alt+S` (KDE), `Ctrl+Alt+S` (Emacs), `Ctrl+Alt+S` (Sublime Text), `⌘ Comma` (Sublime Text (macOS)), `Ctrl+Alt+S` (Visual Studio), `⌘ Comma` (Visual Studio (macOS)), `Ctrl+Alt+S` (NetBeans), `Ctrl+Alt+S` (Eclipse), `⌘ Comma` (Eclipse (macOS))）对话框中。  |
|  布局后适应内容  |  如果选中此复选框，则在应用图表上下文菜单中选择的布局后，所有图表元素都将调整大小以适应当前图表区域。 在图表中，使用 ![内容适应图标](https://resources.jetbrains.com.cn/help/img/idea/2026.3/app-client.expui.image.fitContent.svg)工具栏按钮。  |
|  添加新元素后重新布局  |  如果选中此复选框，在添加新元素后将自动执行图表布局。  |

