Class KEdgeExtensions

java.lang.Object
de.cau.cs.kieler.klighd.krendering.extensions.KEdgeExtensions

public class KEdgeExtensions extends Object
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 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, ssm, nre
This class contains Xtend extension methods.
  • Constructor Details

    • KEdgeExtensions

      public KEdgeExtensions()
  • Method Details

    • edgeExists

      public boolean edgeExists(Object o1)
      A convenient test method to check whether or not a specific edge exists in the create extension
    • edgeExists

      public boolean edgeExists(Object o1, Object o2)
      A convenient test method to check whether or not a specific edge exists in the create extension
    • edgeExists

      public boolean edgeExists(Object o1, Object o2, Object o3)
      A convenient test method to check whether or not a specific edge exists in the create extension
    • edgeExists

      public boolean edgeExists(Object o1, Object o2, Object o3, Object o4)
      A convenient test method to check whether or not a specific edge exists in the create extension
    • edgeExists

      public boolean edgeExists(Object... os)
      A convenient test method to check whether or not a specific edge exists in the create extension
    • getEdge

      public KEdge getEdge(Object o1)
      A convenient port getter based on a single business object preserving the element image relation by a create extension.
    • getEdge

      public KEdge getEdge(Object o1, Object o2)
      A convenient port getter based on a two business objects preserving the element image relation by a create extension.
    • getEdge

      public KEdge getEdge(Object o1, Object o2, Object o3)
      A convenient port getter based on a three business objects preserving the element image relation by a create extension.
    • getEdge

      public KEdge getEdge(Object o1, Object o2, Object o3, Object o4)
      A convenient port getter based on a four business objects preserving the element image relation by a create extension.
    • getEdge

      public KEdge getEdge(Object... os)
      A convenient port getter based on a single business object preserving the element image relation by a create extension.
    • createEdge

      public KEdge createEdge()
      A convenience method to create a KEdge without relating it to a business object.
    • createEdge

      public KEdge createEdge(Object o1)
      An alias of getEdge(Object o1) allowing to express in business that the KEdge will be created at this place. It is just syntactic sugar.
    • createEdge

      public KEdge createEdge(Object o1, Object o2)
      An alias of getEdge(Object o1, Object o2) allowing to express in business that the KEdge will be created at this place. It is just syntactic sugar.
    • createEdge

      public KEdge createEdge(Object o1, Object o2, Object o3)
      An alias of getEdge(Object o1, Object o2, Object o3) allowing to express in business that the KEdge will be created at this place. It is just syntactic sugar.
    • createEdge

      public KEdge createEdge(Object o1, Object o2, Object o3, Object o4)
      An alias of getEdge(Object o1, Object o2, Object o3, Object o4) allowing to express in business that the KEdge will be created at this place. It is just syntactic sugar.
    • createEdge

      public KEdge createEdge(Object... os)
      An alias of getEdge(Object o1) allowing to express in business that the KEdge will be created at this place. It is just syntactic sugar.
    • createNewEdge

      public KEdge createNewEdge(Object o1)
      Similar to createEdge, createNewEdge creates a new edge related to an object. Furthermore, the method makes sure a new edge is created and stored in the create extensions.
    • createNewEdge

      public KEdge createNewEdge(Object o1, Object o2)
      Similar to createEdge, createNewEdge creates a new edge related to an object. Furthermore, the method makes sure a new edge is created and stored in the create extensions.
    • createNewEdge

      public KEdge createNewEdge(Object o1, Object o2, Object o3)
      Similar to createEdge, createNewEdge creates a new edge related to an object. Furthermore, the method makes sure a new edge is created and stored in the create extensions.
    • getAllEdges

      public List<KEdge> getAllEdges(Object o1)
      The method getAllEdges retrieves all edges linked to a specific (semantic) object.
    • getAllEdges

      public List<KEdge> getAllEdges(Object o1, Object o2)
      The method getAllEdges retrieves all edges linked to a specific (semantic) object.
    • getAllEdges

      public List<KEdge> getAllEdges(Object o1, Object o2, Object o3)
      The method getAllEdges retrieves all edges linked to a specific (semantic) object.
    • getSemanticObject

      public Object getSemanticObject(KEdge edge)
      getSemanticObject returns the primary (semantic) object of an edge.
    • addLayoutParam

      public <T> KEdge addLayoutParam(KEdge edge, org.eclipse.elk.graph.properties.IProperty<? super T> property, T value)
    • addPolyline

      public KPolyline addPolyline(KEdge e)
    • addPolyline

      public KPolyline addPolyline(KEdge e, float lineWidth)
    • addRoundedBendsPolyline

      public KRoundedBendsPolyline addRoundedBendsPolyline(KEdge e, float bendRadius)
    • addRoundedBendsPolyline

      public KRoundedBendsPolyline addRoundedBendsPolyline(KEdge e, float bendRadius, float lineWidth)
    • addSpline

      public KSpline addSpline(KEdge e)
    • addSpline

      public KSpline addSpline(KEdge e, float lineWidth)