de.cau.cs.kieler.synccharts.diagram.custom
Class AnnotationsLayoutConfig

java.lang.Object
  extended by de.cau.cs.kieler.kiml.config.SemanticLayoutConfig
      extended by de.cau.cs.kieler.synccharts.diagram.custom.AnnotationsLayoutConfig
All Implemented Interfaces:
ILayoutConfig, IMutableLayoutConfig

public class AnnotationsLayoutConfig
extends SemanticLayoutConfig

A semantic layout configurations for annotations.

Rating red

Field Summary
static int PRIORITY
          the priority for annotations layout configurations.
 
Fields inherited from interface de.cau.cs.kieler.kiml.config.IMutableLayoutConfig
OPT_RECURSIVE
 
Constructor Summary
AnnotationsLayoutConfig()
           
 
Method Summary
protected  IProperty<?>[] getAffectedOptions(EObject semanticElem)
          Returns the options that are affected by this layout configuration.
 int getPriority()
          Return the priority of this layout configuration, which is relevant when multiple configurations are applied.
protected  Object getSemanticValue(EObject semanticElem, LayoutOptionData<?> layoutOption)
          Determine the value of the given layout option from the semantic element.
protected  void setSemanticValue(EObject semanticElem, LayoutOptionData<?> layoutOption, Object value)
          Set a layout option value for the semantic element.
 
Methods inherited from class de.cau.cs.kieler.kiml.config.SemanticLayoutConfig
clearValues, enrich, getValue, isSet, setValue, transferValues
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

PRIORITY

public static final int PRIORITY
the priority for annotations layout configurations.

See Also:
Constant Field Values
Constructor Detail

AnnotationsLayoutConfig

public AnnotationsLayoutConfig()
Method Detail

getPriority

public int getPriority()
Return the priority of this layout configuration, which is relevant when multiple configurations are applied.

Specified by:
getPriority in interface ILayoutConfig
Overrides:
getPriority in class SemanticLayoutConfig
Returns:
the priority

getAffectedOptions

protected IProperty<?>[] getAffectedOptions(EObject semanticElem)
Returns the options that are affected by this layout configuration.

Specified by:
getAffectedOptions in class SemanticLayoutConfig
Parameters:
semanticElem - a semantic model element
Returns:
the affected options, or null if there are none

getSemanticValue

protected Object getSemanticValue(EObject semanticElem,
                                  LayoutOptionData<?> layoutOption)
Determine the value of the given layout option from the semantic element.

Specified by:
getSemanticValue in class SemanticLayoutConfig
Parameters:
semanticElem - a semantic model element
layoutOption - a layout option
Returns:
the corresponding value, or null if no specific value is determined

setSemanticValue

protected void setSemanticValue(EObject semanticElem,
                                LayoutOptionData<?> layoutOption,
                                Object value)
Set a layout option value for the semantic element. This feature is optional, so subclasses may leave the implementation empty.

Specified by:
setSemanticValue in class SemanticLayoutConfig
Parameters:
semanticElem - a semantic model element
layoutOption - a layout option
value - a value for the layout option, or null if the currently set value shall be deleted