de.cau.cs.kieler.kiml
Interface ILayoutConfig

All Superinterfaces:
IPropertyHolder
All Known Implementing Classes:
ActionLayoutConfig, AnnotationsLayoutConfig, AnnotationsLayoutConfig, DefaultLayoutConfig, EclipseLayoutConfig, GmfLayoutConfig, GraphitiLayoutConfig, HVLayoutConfig, HypernodeLayoutConfig, SemanticLayoutConfig, TypeLayoutConfig, VolatileLayoutConfig

public interface ILayoutConfig
extends IPropertyHolder

Layout option configuration interface for default values and configuration of specific diagram elements. getProperty() is used to get the stored or default value for a layout option, while setProperty() is used to change the stored option value.

Rating proposed yellow
(2011-01-13) msp

Method Summary
 void clearProperties()
          Remove all stored layout options.
 LayoutAlgorithmData getContainerLayouterData()
          Returns the layout algorithm descriptor for the container of the associated element.
 LayoutAlgorithmData getContentLayouterData()
          Returns the layout algorithm descriptor for the content of the associated element.
 LayoutAlgorithmData getLayouterData(String layoutHint, String diagramType)
          Returns the most appropriate layout algorithm for the given layout hint and diagram type.
 List<LayoutOptionData<?>> getOptionData()
          Returns a list of available layout option descriptors.
 boolean isDefault(LayoutOptionData<?> optionData)
          Returns true if the given option has its default value.
 void setDiagramDefault(LayoutOptionData<?> optionData, Object value)
          Sets the given option as default value for all elements of the associated diagram.
 void setFocus(Object element)
          Set the focus of this layout configuration on the given element.
 
Methods inherited from interface de.cau.cs.kieler.core.properties.IPropertyHolder
copyProperties, getAllProperties, getProperty, setProperty
 

Method Detail

setFocus

void setFocus(Object element)
Set the focus of this layout configuration on the given element. If null is passed, the current focus is cleared.

Parameters:
element - a diagram element for which layout options shall be analyzed, or null

isDefault

boolean isDefault(LayoutOptionData<?> optionData)
Returns true if the given option has its default value.

Parameters:
optionData - a layout option data
Returns:
whether the option has a default value

getOptionData

List<LayoutOptionData<?>> getOptionData()
Returns a list of available layout option descriptors.

Returns:
list of available layout options

getContentLayouterData

LayoutAlgorithmData getContentLayouterData()
Returns the layout algorithm descriptor for the content of the associated element.

Returns:
the layout algorithm data for the element's content

getContainerLayouterData

LayoutAlgorithmData getContainerLayouterData()
Returns the layout algorithm descriptor for the container of the associated element.

Returns:
the layout algorithm data for the element's container

clearProperties

void clearProperties()
Remove all stored layout options.


setDiagramDefault

void setDiagramDefault(LayoutOptionData<?> optionData,
                       Object value)
Sets the given option as default value for all elements of the associated diagram.

Parameters:
optionData - layout option data
value - new default value

getLayouterData

LayoutAlgorithmData getLayouterData(String layoutHint,
                                    String diagramType)
Returns the most appropriate layout algorithm for the given layout hint and diagram type.

Parameters:
layoutHint - identifier of either a layout provider or a layout type
diagramType - identifier of a diagram type
Returns:
the most appropriate layout algorithm, or null