Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Next »

This page describes how layout options are applied by KIML during the layout process. After having read this, you should be able to answer the following questions:

  • What is a layout configuration?
  • How do layout options end up in KGraph elements?
  • How can I set layout options on elements programmatically?

This page does not list the available layout options, and neither does it explain any of them. You can find a list of layout options provided by KIML over here.

 

Contents

Layout Options and What They're Good For

Even the most basic layout algorithm has some settings for you to play with. This might be something as simple as the space left between different nodes, or something as complex as changing how node labels are placed and how that influences the size of each node. Each such setting must be registered with KIML as a layout option, and each algorithm must specify exactly which of these options it supports. Registering a layout option is done through one of KIML's extension points and can look like this:

<extension point="de.cau.cs.kieler.kiml.layoutProviders">
    <layoutOption
        id="de.cau.cs.kieler.nodeLabelPlacement"
        name="Node Label Placement"
        description="Hints for where node labels are to be placed; if empty, the node label's position is not modified."
        advanced="true"
        appliesTo="nodes"
        type="enumset"
        class="de.cau.cs.kieler.kiml.options.NodeLabelPlacement"
        default="">
     </layoutOption>
</extension>

Let's walk through the parameters of layout options:


Options usually only make sense for a subset of objects. For example, the amount of space to be left around a diagram should be configured on the diagram's root element, not on a label; how node labels are placed should be set on each node, but not on edges. Therefor

  • No labels