{"id":26024,"date":"2021-11-11T14:36:09","date_gmt":"2021-11-11T14:36:09","guid":{"rendered":"https:\/\/ropley.com\/?page_id=26024"},"modified":"2021-11-11T14:36:09","modified_gmt":"2021-11-11T14:36:09","slug":"viewing-class-diagrams","status":"publish","type":"page","link":"https:\/\/ropley.com\/?page_id=26024","title":{"rendered":"Viewing Class Diagrams"},"content":{"rendered":"\n<div style=\"height:20px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"module153\">Viewing Class Diagrams<\/h2>\n\n\n\n<p>The Use Case Editor autogenerates a data model diagram as a UML class diagram from the types, entities and associations you provide when constructing your domain data model. This diagram can be viewed by selecting the &#8216;Domain data model&#8217; node in the treeview, then selecting the &#8216;Class diagram&#8217; tab in the right hand panel. An example of a class diagram is shown below:<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"815\" height=\"536\" src=\"https:\/\/ropley.com\/wp-content\/uploads\/2021\/11\/classdiagram.png\" alt=\"\" class=\"wp-image-26025\" srcset=\"https:\/\/ropley.com\/wp-content\/uploads\/2021\/11\/classdiagram.png 815w, https:\/\/ropley.com\/wp-content\/uploads\/2021\/11\/classdiagram-300x197.png 300w, https:\/\/ropley.com\/wp-content\/uploads\/2021\/11\/classdiagram-768x505.png 768w\" sizes=\"auto, (max-width: 815px) 100vw, 815px\" \/><figcaption>Viewing the class diagram<\/figcaption><\/figure><\/div>\n\n\n\n<h5 class=\"wp-block-heading\">Manipulating class diagrams<\/h5>\n\n\n\n<p>Although the content of the diagrams can only be set by editing the data model descriptions, the layout can be adjusted from within the diagram pane.<\/p>\n\n\n\n<p>If you click on a class or a type in the diagram, the corresponding item changes colour to red to indicate it has been selected. The item can now be dragged to a different location on the screen. Any connectors that link to the dragged item will be adjusted so that they remain connected to the dragged item.<\/p>\n\n\n\n<p>If you double-click a class or an association, the Use Case Editor will jump to the editing page for the corresponding class or association.<\/p>\n\n\n\n<p>It is possible to reroute the connectors between items. If you click on a connection, the connection line will become red to indicate it has been selected. You may now right click on the connector and a pop-up menu will appear:<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"813\" height=\"535\" src=\"https:\/\/ropley.com\/wp-content\/uploads\/2021\/11\/cdlayout.png\" alt=\"\" class=\"wp-image-26026\" srcset=\"https:\/\/ropley.com\/wp-content\/uploads\/2021\/11\/cdlayout.png 813w, https:\/\/ropley.com\/wp-content\/uploads\/2021\/11\/cdlayout-300x197.png 300w, https:\/\/ropley.com\/wp-content\/uploads\/2021\/11\/cdlayout-768x505.png 768w\" sizes=\"auto, (max-width: 813px) 100vw, 813px\" \/><figcaption>Adjusting the class diagram layout<\/figcaption><\/figure><\/div>\n\n\n\n<p>Note that if the right mouse button is clicked on a corner selection grip (the red rectangle at the bend in the connector), the &#8216;Insert bend&#8217; menu item is replaced with &#8216;Remove bend&#8217;.&nbsp;<strong>Select all<\/strong>&nbsp;will highlight the whole diagram in red, allowing you to drag everything on the page.&nbsp;<strong>Insert bend<\/strong>&nbsp;will allow you to introduce new bends to the connector so that it can be routed around obstacles on the diagram.&nbsp;<strong>Auto Layout<\/strong>&nbsp;lets the Use Case Editor automatically layout the diagram using an internal default algorithm. Note if you select this, any manual layouts you made will be lost. There is no &#8216;undo&#8217; for this layout window! As a rule, it is best to use auto layout until you are convinced your model is stable. Then as a last finessing step, adjust the layout of the class diagrams before publication of output documents. The layout algorithm for class diagrams is particularly difficult to automate, so you are encouraged to tidy up the diagram layout once your data model is pretty final.<\/p>\n\n\n\n<p>Note too that once a connector has been highlighted, the line itself may be dragged, or by dragging the rectangular grips you can relocate the ends of each line segment. Experiment with dragging connectors, and with inserting or removing bends to familiarise yourself with the layout tools.<\/p>\n\n\n\n<h5 class=\"wp-block-heading\">Snap to grid<\/h5>\n\n\n\n<p>By default the layout tool snaps graphical elements to a grid that has 16 pixel resolution. This makes it easy to keep lines horizontal and vertical, as well as helps to align actors and use case symbols. The grid resolution can be changed to 8, 16, 24, or 32 pixel resolution as well as being switched off altogether. To change the grid resolution select&nbsp;<strong>Edit | Grid spacing &#8230;<\/strong>&nbsp;from the main menu, or click the corresponding toolbar button as shown in the screenshot below:<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"550\" height=\"360\" src=\"https:\/\/ropley.com\/wp-content\/uploads\/2021\/11\/cdgrid.png\" alt=\"\" class=\"wp-image-26027\" srcset=\"https:\/\/ropley.com\/wp-content\/uploads\/2021\/11\/cdgrid.png 550w, https:\/\/ropley.com\/wp-content\/uploads\/2021\/11\/cdgrid-300x196.png 300w\" sizes=\"auto, (max-width: 550px) 100vw, 550px\" \/><figcaption>Enabling snap-to-grid<\/figcaption><\/figure><\/div>\n","protected":false},"excerpt":{"rendered":"<p>Viewing Class Diagrams The Use Case Editor autogenerates a data model diagram as a UML class diagram from the types, entities and associations you provide when constructing your domain data model. This diagram can be viewed by selecting the &#8216;Domain data model&#8217; node in the treeview, then selecting the &#8216;Class diagram&#8217; tab in the right [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"om_disable_all_campaigns":false,"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"site-sidebar-layout":"no-sidebar","site-content-layout":"plain-container","ast-site-content-layout":"default","site-content-style":"default","site-sidebar-style":"default","ast-global-header-display":"","ast-banner-title-visibility":"","ast-main-header-display":"disabled","ast-hfb-above-header-display":"","ast-hfb-below-header-display":"","ast-hfb-mobile-header-display":"disabled","site-post-title":"disabled","ast-breadcrumbs-content":"","ast-featured-img":"","footer-sml-layout":"disabled","ast-disable-related-posts":"","theme-transparent-header-meta":"default","adv-header-id-meta":"","stick-header-meta":"","header-above-stick-meta":"","header-main-stick-meta":"","header-below-stick-meta":"","astra-migrate-meta-layouts":"default","ast-page-background-enabled":"default","ast-page-background-meta":{"desktop":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"ast-content-background-meta":{"desktop":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"footnotes":""},"class_list":["post-26024","page","type-page","status-publish","hentry"],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/ropley.com\/index.php?rest_route=\/wp\/v2\/pages\/26024","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/ropley.com\/index.php?rest_route=\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/ropley.com\/index.php?rest_route=\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/ropley.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/ropley.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=26024"}],"version-history":[{"count":1,"href":"https:\/\/ropley.com\/index.php?rest_route=\/wp\/v2\/pages\/26024\/revisions"}],"predecessor-version":[{"id":26029,"href":"https:\/\/ropley.com\/index.php?rest_route=\/wp\/v2\/pages\/26024\/revisions\/26029"}],"wp:attachment":[{"href":"https:\/\/ropley.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=26024"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}