de.cau.cs.kieler.kiml.graphviz.dot.transformations
Class KGraphDotTransformation

java.lang.Object
  extended by de.cau.cs.kieler.kiml.graphviz.dot.transformations.KGraphDotTransformation

public class KGraphDotTransformation
extends Object

This class implements a transformation from the KGraph metamodel to the Dot metamodel. Furthermore it contains functionality to apply layout information attached to a Dot model to a KGraph model.

Rating red

Nested Class Summary
static class KGraphDotTransformation.Command
          definition of Graphviz commands.
 
Field Summary
static float DEF_SPACING_LARGE
          large default value for minimal spacing.
static float DEF_SPACING_SMALL
          small default value for minimal spacing.
static float DEF_SPACING_XLARGE
          extra-large default value for minimal spacing.
static IProperty<Float> LABEL_DISTANCE
          label distance property.
static String LABEL_DISTANCE_ID
          layout option identifier for label distance.
 
Constructor Summary
KGraphDotTransformation(KNode parent)
          Constructs a KGraphDotTransformation for a given KGraph instance.
 
Method Summary
 void applyLayout(GraphvizModel model, IKielerProgressMonitor monitor)
          Applies the layout information attached to the given Dot instance to the KGraph instance using the mapping created by a previous call to transform.
 GraphvizModel transform(KGraphDotTransformation.Command command, IKielerProgressMonitor monitor)
          Transforms the KGraph instance to a Dot instance using the given command.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

LABEL_DISTANCE_ID

public static final String LABEL_DISTANCE_ID
layout option identifier for label distance.

See Also:
Constant Field Values

LABEL_DISTANCE

public static final IProperty<Float> LABEL_DISTANCE
label distance property.


DEF_SPACING_SMALL

public static final float DEF_SPACING_SMALL
small default value for minimal spacing.

See Also:
Constant Field Values

DEF_SPACING_LARGE

public static final float DEF_SPACING_LARGE
large default value for minimal spacing.

See Also:
Constant Field Values

DEF_SPACING_XLARGE

public static final float DEF_SPACING_XLARGE
extra-large default value for minimal spacing.

See Also:
Constant Field Values
Constructor Detail

KGraphDotTransformation

public KGraphDotTransformation(KNode parent)
Constructs a KGraphDotTransformation for a given KGraph instance.

Parameters:
parent - the KGraph instance
Method Detail

transform

public GraphvizModel transform(KGraphDotTransformation.Command command,
                               IKielerProgressMonitor monitor)
Transforms the KGraph instance to a Dot instance using the given command.

Parameters:
command - the command
monitor - the progress monitor
Returns:
the Dot instance

applyLayout

public void applyLayout(GraphvizModel model,
                        IKielerProgressMonitor monitor)
Applies the layout information attached to the given Dot instance to the KGraph instance using the mapping created by a previous call to transform. Has to be called after a call to transform.

Parameters:
model - the Dot instance
monitor - the progress monitor