|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectde.cau.cs.kieler.kiml.config.SemanticLayoutConfig
public abstract class SemanticLayoutConfig
An abstract layout configuration that is able to consider semantic model properties.
Field Summary | |
---|---|
static int |
PRIORITY
the default priority for semantic layout configurations. |
Fields inherited from interface de.cau.cs.kieler.kiml.config.IMutableLayoutConfig |
---|
OPT_RECURSIVE |
Constructor Summary | |
---|---|
SemanticLayoutConfig()
|
Method Summary | |
---|---|
void |
clearValues(LayoutContext context)
Clear all layout option values that have been set for the given context. |
void |
enrich(LayoutContext context)
Enrich the given context with additional information that can be derived from what is already contained. |
protected abstract 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 abstract Object |
getSemanticValue(EObject semanticElem,
LayoutOptionData<?> layoutOption)
Determine the value of the given layout option from the semantic element. |
Object |
getValue(LayoutOptionData<?> optionData,
LayoutContext context)
Get the current value for a layout option in the given context. |
boolean |
isSet(LayoutOptionData<?> optionData,
LayoutContext context)
Determine whether the given layout option is set, not considering any default values. |
protected abstract void |
setSemanticValue(EObject semanticElem,
LayoutOptionData<?> layoutOption,
Object value)
Set a layout option value for the semantic element. |
void |
setValue(LayoutOptionData<?> optionData,
LayoutContext context,
Object value)
Set a new value for a layout option in the given context. |
void |
transferValues(KGraphData graphData,
LayoutContext context)
Transfer all non-default values that are managed by this layout configuration to the given graph data holder. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int PRIORITY
Constructor Detail |
---|
public SemanticLayoutConfig()
Method Detail |
---|
public int getPriority()
getPriority
in interface ILayoutConfig
protected abstract IProperty<?>[] getAffectedOptions(EObject semanticElem)
semanticElem
- a semantic model element
null
if there are noneprotected abstract Object getSemanticValue(EObject semanticElem, LayoutOptionData<?> layoutOption)
semanticElem
- a semantic model elementlayoutOption
- a layout option
null
if no specific value is determinedprotected abstract void setSemanticValue(EObject semanticElem, LayoutOptionData<?> layoutOption, Object value)
semanticElem
- a semantic model elementlayoutOption
- a layout optionvalue
- a value for the layout option, or null
if the currently set
value shall be deletedpublic void enrich(LayoutContext context)
enrich
in interface ILayoutConfig
context
- a context for layout configurationpublic final Object getValue(LayoutOptionData<?> optionData, LayoutContext context)
getValue
in interface ILayoutConfig
optionData
- a layout option descriptorcontext
- a context for layout configuration
null
if the option has no value in this contextpublic final void transferValues(KGraphData graphData, LayoutContext context)
transferValues
in interface ILayoutConfig
graphData
- a graph data instance that can hold layout optionscontext
- a context for layout configurationpublic void clearValues(LayoutContext context)
clearValues
in interface IMutableLayoutConfig
context
- a context for layout configurationpublic final void setValue(LayoutOptionData<?> optionData, LayoutContext context, Object value)
setValue
in interface IMutableLayoutConfig
optionData
- a layout option descriptorcontext
- a context for layout configurationvalue
- the new layout option value, or null
if the current value shall be removedpublic final boolean isSet(LayoutOptionData<?> optionData, LayoutContext context)
isSet
in interface IMutableLayoutConfig
optionData
- a layout option descriptorcontext
- a context for layout configuration
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |