Changes for page Configuring Automatic Layout
Last modified by Alexander Schulz-Rosengarten on 2023/07/11 10:33
Summary
-
Page properties (1 modified, 0 added, 0 removed)
-
Objects (1 modified, 0 added, 0 removed)
Details
- Page properties
-
- Content
-
... ... @@ -5,7 +5,6 @@ 5 5 This page describes how automatic layout can be configured for a given application. This includes how layout options can be set on graph elements, and how they are applied by KIML during the layout process. After having read this, you should be able to answer the following questions: 6 6 7 7 * What are //layout options//? 8 -* How do layout algorithms support layout options? 9 9 * How do layout options end up in KGraph elements? 10 10 * How can I set layout options on elements programmatically? 11 11 ... ... @@ -81,7 +81,7 @@ 81 81 (% style="line-height: 1.4285715;" %)By now, we have an idea of what layout options do and why they are important in the first place. However, we haven't looked at how layout options end up on KGraph elements yet. This is where the [[{{code language="none"}}LayoutOptionsManager{{/code}}>>url:http://git.rtsys.informatik.uni-kiel.de/projects/KIELER/repos/pragmatics/browse/plugins/de.cau.cs.kieler.kiml.ui/src/de/cau/cs/kieler/kiml/ui/service/LayoutOptionManager.java||shape="rect"]] comes in. 82 82 83 83 {{tip}} 84 -The [[KIML page>>doc:Infrastructure for Meta Layout (KIML)]] has a high-level explanation of what happens when during the layout process. To take a look at it if you haven't already – it will make the following concepts easier to understand. Plus, there's a nice picture that took Miro quite some time to create.83 +The [[KIML page>>doc:Infrastructure for Meta Layout (KIML)]] has a high-level explanation of what happens when during the layout process. To take a look at it if you haven't already – it will make the following concepts easier to understand. 85 85 {{/tip}} 86 86 87 87 (% style="line-height: 1.4285715;" %)After a layout manager has finished turning a given diagram into its KGraph representation, the layout options manager is asked to enrich the KGraph elements with layout options. The option values can come from different sources: the user might have set some using the layout view; there might be some defaults for certain kinds of diagrams; or the programmer might have decided to attach some layout options to certain elements for just this one layout run. Whatever the source, the options manager is in charge of collecting all these layout option values and making sure they find their way to the correct KGraph element. To start off with a clean plate, it first makes sure there are no layout options attached to the KGraph elements. It then does two things: collect every eligible source of layout options, and transfer layout options to the correct KGraph elements. Sounds easy enough. ... ... @@ -107,8 +107,11 @@ 107 107 {{code language="java"}} 108 108 public interface ILayoutConfig { 109 109 int getPriority(); 109 + 110 110 void enrich(LayoutContext context); 111 + 111 111 Object getValue(LayoutOptionData<?> optionData, LayoutContext context); 113 + 112 112 void transferValues(KLayoutData layoutData, LayoutContext context); 113 113 } 114 114 {{/code}}
- Confluence.Code.ConfluencePageClass[0]
-
- Id
-
... ... @@ -1,1 +1,1 @@ 1 -770 10101 +7700958 - URL
-
... ... @@ -1,1 +1,1 @@ 1 -https://rtsys.informatik.uni-kiel.de/confluence//wiki/spaces/KIELER/pages/770 1010/Configuring Automatic Layout1 +https://rtsys.informatik.uni-kiel.de/confluence//wiki/spaces/KIELER/pages/7700958/Configuring Automatic Layout