Class KNodeExtensions
java.lang.Object
de.cau.cs.kieler.klighd.krendering.extensions.KNodeExtensions
Provides some helpful extension methods for simplifying the composition of KGraph/KRendering-based view models.
In order to employ them beyond KLighD diagram syntheses you best declare a field of type
Make sure to bind the
By means of that
In order to employ them beyond KLighD diagram syntheses you best declare a field of type
KNodeExtensions in your class and annotate it with Inject.Make sure to bind the
ViewSynthesisShared annotation in the employed
Injector to a Scope, e.g. by calling
Guice.createInjector(KRenderingExtensionsPlugin.createSingletonScopeBindingModule()); or
Guice.createInjector(KRenderingExtensionsPlugin.createNoScopeBindingModule());.By means of that
Injector you may get a new instance of your class,
or you may inject the above mentioned attribute within instances of your class, e.g. by calling
injector.injectMembers(this) in the constructor of your class.- Author:
- chsch, nre
- This class contains Xtend extension methods.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription<T> KNodeaddLayoutParam(KNode node, org.eclipse.elk.graph.properties.IProperty<? super T> property, T value) Configures labels on this node to be inside bottom centrally-aligned labels by defaultConfigures labels on this node to be inside bottom left-aligned labels by defaultConfigures labels on this node to be inside bottom right-aligned labels by defaultConfigures labels on this node to be inside centrally-aligned labels by defaultConfigures labels on this node to be inside top centrally-aligned labels by defaultConfigures labels on this node to be inside top left-aligned labels by defaultConfigures labels on this node to be inside top right-aligned labels by defaultConfigures labels on this node to be outside bottom centrally-aligned labels by defaultConfigures labels on this node to be outside bottom left-aligned labels by defaultConfigures labels on this node to be outside bottom right-aligned labels by defaultConfigures labels on this node to be outside top centrally-aligned labels by defaultConfigures labels on this node to be outside top left-aligned labels by defaultConfigures labels on this node to be outside top right-aligned labels by defaultA convenience method to create a KNode without relating it to a business object.createNode(Object o) An alias ofgetNode(java.lang.Object)allowing to express in business that the KNode will be created at this place.createNode(Object... os) An alias ofgetNode(java.lang.Object)allowing to express in business that the KNode will be created at this place.createNode(Object o1, Object o2) An alias ofgetNode(java.lang.Object)allowing to express in business that the KNode will be created at this place.floatA convenient getter preserving the element image relation by a create extension.A convenient getter preserving the element image relation by a create extension.A convenient getter preserving the element image relation.getNodeSize(KNode node) floatIs used in KPortExtensionsbooleannodeExists(Object... os) A convenient test method to check whether or not a specific node exists in the create extensionregisterExistingNode(KNode node, Object... os) A convenient method to register a node that was not created via the create extension.setMinimalNodeSize(KNode node, float width, float height) setNodeSize(KNode node, float width, float height)
-
Constructor Details
-
KNodeExtensions
public KNodeExtensions()
-
-
Method Details
-
nodeExists
A convenient test method to check whether or not a specific node exists in the create extension -
registerExistingNode
A convenient method to register a node that was not created via the create extension.- Returns:
- the previous node associated with the given object(s), or
nullif there was no node.
-
getNode
A convenient getter preserving the element image relation by a create extension. -
getNode
A convenient getter preserving the element image relation. -
getNode
A convenient getter preserving the element image relation by a create extension. -
createNode
A convenience method to create a KNode without relating it to a business object. -
createNode
An alias ofgetNode(java.lang.Object)allowing to express in business that the KNode will be created at this place. It is just syntactic sugar. -
createNode
An alias ofgetNode(java.lang.Object)allowing to express in business that the KNode will be created at this place. It is just syntactic sugar. -
createNode
An alias ofgetNode(java.lang.Object)allowing to express in business that the KNode will be created at this place. It is just syntactic sugar. -
getNodeSize
-
getHeight
-
getWidth
Is used in KPortExtensions -
setNodeSize
-
setWidth
-
setHeight
-
setMinimalNodeSize
-
addLayoutParam
-
configureOutsideBottomLeftNodeLabelPlacement
Configures labels on this node to be outside bottom left-aligned labels by default -
configureOutsideBottomCenteredNodeLabelPlacement
Configures labels on this node to be outside bottom centrally-aligned labels by default -
configureOutsideBottomRightNodeLabelPlacement
Configures labels on this node to be outside bottom right-aligned labels by default -
configureOutsideTopLeftNodeLabelPlacement
Configures labels on this node to be outside top left-aligned labels by default -
configureOutsideTopCenteredNodeLabelPlacement
Configures labels on this node to be outside top centrally-aligned labels by default -
configureOutsideTopRightNodeLabelPlacement
Configures labels on this node to be outside top right-aligned labels by default -
configureInsideBottomLeftNodeLabelPlacement
Configures labels on this node to be inside bottom left-aligned labels by default -
configureInsideBottomCenteredNodeLabelPlacement
Configures labels on this node to be inside bottom centrally-aligned labels by default -
configureInsideBottomRightNodeLabelPlacement
Configures labels on this node to be inside bottom right-aligned labels by default -
configureInsideCenteredNodeLabelPlacement
Configures labels on this node to be inside centrally-aligned labels by default -
configureInsideTopLeftNodeLabelPlacement
Configures labels on this node to be inside top left-aligned labels by default -
configureInsideTopCenteredNodeLabelPlacement
Configures labels on this node to be inside top centrally-aligned labels by default -
configureInsideTopRightNodeLabelPlacement
Configures labels on this node to be inside top right-aligned labels by default
-