Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Tip

The KIML page 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. (smile)Plus, there's a nice picture that took Miro quite some time to create.

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.

...

Code Block
languagejava
public interface ILayoutConfig {
    int getPriority();
    
    void enrich(LayoutContext context);
    
    Object getValue(LayoutOptionData<?> optionData, LayoutContext context);
    
    void transferValues(KLayoutData layoutData, LayoutContext context);
} 

...