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

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

public class HVLayoutConfig
extends SemanticLayoutConfig

A layout configuration that applies alternating horizontal / vertical layout when an annotation "HVLayout" is present.

Rating red

Field Summary
static String HV_ANNOTATION
          the name of the annotation that must be present to activate this config.
 
Constructor Summary
HVLayoutConfig()
           
 
Method Summary
protected  List<LayoutOptionData<?>> getOptionData(EObject semanticElem)
          Returns a list of options that are affected by this layout configuration.
protected  Object getSemanticProperty(EObject semanticElem, LayoutOptionData<?> layoutOption)
          Determine the value of the given layout option from the semantic element.
protected  void setSemanticProperty(EObject semanticElem, LayoutOptionData<?> layoutOption, Object value)
          Set a layout option value for the semantic element.
 
Methods inherited from class de.cau.cs.kieler.kiml.SemanticLayoutConfig
clearProperties, copyProperties, getAllProperties, getContainerLayouterData, getContentLayouterData, getLayouterData, getOptionData, getProperty, isDefault, makeList, setDiagramDefault, setFocus, setProperty
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

HV_ANNOTATION

public static final String HV_ANNOTATION
the name of the annotation that must be present to activate this config.

See Also:
Constant Field Values
Constructor Detail

HVLayoutConfig

public HVLayoutConfig()
Method Detail

getOptionData

protected List<LayoutOptionData<?>> getOptionData(EObject semanticElem)
Returns a list of options that are affected by this layout configuration.

Specified by:
getOptionData in class SemanticLayoutConfig
Parameters:
semanticElem - a semantic model element
Returns:
the affected options

getSemanticProperty

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

Specified by:
getSemanticProperty 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

setSemanticProperty

protected void setSemanticProperty(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:
setSemanticProperty 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