Class KPortExtensions
java.lang.Object
de.cau.cs.kieler.klighd.krendering.extensions.KPortExtensions
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> KPortaddLayoutParam(KPort port, org.eclipse.elk.graph.properties.IProperty<? super T> property, T value) createLabeledEPort(KNode node, String label, Object o1) Creates a port and a related port figure as well as a port label onto the east side of a given node with the port label text 'label'.createLabeledEPort(KNode node, String label, Object o1, Object o2) createLabeledNPort(KNode node, String label, Object o1) Creates an anchor and a related port figure as well as a port label onto the north side of a given shape with the port label text 'label'.createLabeledNPort(KNode node, String label, Object o1, Object o2) createLabeledSPort(KNode node, String label, Object o1) Creates an anchor and a related port figure as well as a port label onto the south side of a given shape with the port label text 'label'.createLabeledSPort(KNode node, String label, Object o1, Object o2) createLabeledWPort(KNode node, String label, Object o1) Creates an anchor and a related port figure as well as a port label onto the west side of a given shape with the port label text 'label'.createLabeledWPort(KNode node, String label, Object o1, Object o2) A convenience method to create a KPort without relating it to a business object.createPort(Object o1) An alias ofgetPort(Object o1)allowing to express in business that the KPort will be created at this place.createPort(Object... os) An alias ofgetPort(Object o1)allowing to express in business that the KPort will be created at this place.createPort(Object o1, Object o2) An alias ofgetPort(Object o1, Object o2)allowing to express in business that the KPort will be created at this place.createPort(Object o1, Object o2, Object o3) An alias ofgetPort(Object o1, Object o2, Object o3)allowing to express in business that the KPort will be created at this place.createPort(Object o1, Object o2, Object o3, Object o4) An alias ofgetPort(Object o1, Object o2, Object o3, Object o4)allowing to express in business that the KPort will be created at this place.getFirstText(KPort port) Reveals the first KText element of a port KRendering, which is assumed to be the port label.A convenient port getter based on a single business object preserving the element image relation by a create extension.A convenient port getter based on a single business object preserving the element image relation by a create extension.A convenient port getter based on a two business objects preserving the element image relation by a create extension.A convenient port getter based on a three business objects preserving the element image relation by a create extension.A convenient port getter based on a four business objects preserving the element image relation by a create extension.getShapeLayout(KPort port) nextEPortYPosition(KNode node) nextNPortYPosition(KNode node) nextSPortYPosition(KNode node) nextWPortYPosition(KNode node) org.eclipse.elk.core.util.Maybe<Float>booleanportExists(Object... os) A convenient test method to check whether or not a specific port exists in the create extensionregisterExistingPort(KPort port, Object... os) A convenient method to register a port that was not created via the create extension.voidvoidsetPortPos(KPort port, float x, float y) setPortSize(KPort port, float with, float height) voidvoid
-
Constructor Details
-
KPortExtensions
public KPortExtensions()
-
-
Method Details
-
portExists
A convenient test method to check whether or not a specific port exists in the create extension -
registerExistingPort
A convenient method to register a port that was not created via the create extension.- Returns:
- the previous port associated with the given object(s), or
nullif there was no port yet.
-
getPort
A convenient port getter based on a single business object preserving the element image relation by a create extension. -
getPort
A convenient port getter based on a two business objects preserving the element image relation by a create extension. -
getPort
A convenient port getter based on a three business objects preserving the element image relation by a create extension. -
getPort
A convenient port getter based on a four business objects preserving the element image relation by a create extension. -
getPort
A convenient port getter based on a single business object preserving the element image relation by a create extension. -
createPort
A convenience method to create a KPort without relating it to a business object. -
createPort
An alias ofgetPort(Object o1)allowing to express in business that the KPort will be created at this place. It is just syntactic sugar. -
createPort
An alias ofgetPort(Object o1, Object o2)allowing to express in business that the KPort will be created at this place. It is just syntactic sugar. -
createPort
An alias ofgetPort(Object o1, Object o2, Object o3)allowing to express in business that the KPort will be created at this place. It is just syntactic sugar. -
createPort
An alias ofgetPort(Object o1, Object o2, Object o3, Object o4)allowing to express in business that the KPort will be created at this place. It is just syntactic sugar. -
createPort
An alias ofgetPort(Object o1)allowing to express in business that the KPort will be created at this place. It is just syntactic sugar. -
createLabeledEPort
Creates a port and a related port figure as well as a port label onto the east side of a given node with the port label text 'label'. The port is related to the given EObjects. The create nature of these extensions avoids the relocation the an already created port due to the recall of the initializer extension. -
createLabeledEPort
-
createLabeledEPort
-
createLabeledEPort
-
createLabeledNPort
Creates an anchor and a related port figure as well as a port label onto the north side of a given shape with the port label text 'label'. The anchor is related to the given EObjects. The create nature of these extensions avoids the relocation the an already created port due to the recall of the initializer extension. -
createLabeledNPort
-
createLabeledNPort
-
createLabeledNPort
-
createLabeledSPort
Creates an anchor and a related port figure as well as a port label onto the south side of a given shape with the port label text 'label'. The anchor is related to the given EObjects. The create nature of these extensions avoids the relocation the an already created port due to the recall of the initializer extension. -
createLabeledSPort
-
createLabeledSPort
-
createLabeledSPort
-
createLabeledWPort
Creates an anchor and a related port figure as well as a port label onto the west side of a given shape with the port label text 'label'. The anchor is related to the given EObjects. The create nature of these extensions avoids the relocation the an already created port due to the recall of the initializer extension. -
createLabeledWPort
-
createLabeledWPort
-
createLabeledWPort
-
getFirstText
Reveals the first KText element of a port KRendering, which is assumed to be the port label. This is useful for additionally linking it with the business element represented by the port. -
setPortSize
-
setPortPos
-
addLayoutParam
-
getShapeLayout
-
portLabelFontSize
-
portEdgeLengthMemo
-
getPortEdgeLength
-
setPortEdgeLength
-
getPortTopOffset
-
setPortTopOffset
-
getVerticalPortSpacing
-
setVerticalPortSpacing
-
getInlyingPortLabels
-
setInlyingPortLabels
-
nextEPortYPosition
-
nextNPortYPosition
-
nextSPortYPosition
-
nextWPortYPosition
-