Class InitialPointsOfRequestDataManager

java.lang.Object
org.yakindu.base.xtext.utils.gmf.routing.InitialPointsOfRequestDataManager

public class InitialPointsOfRequestDataManager extends Object
This manager is used to store the initial points of an edge before the feedback is used. These initial points are stored in the request.
The method #storeInitialPointsInRequest(LocationRequest, ConnectionEditPart, Connection) must be called in the corresponding policy before drawing the feedback.
And the method eraseInitialPoints(Connection) must be called at the end of the feedback drawing (eraseConnection*Feedback methods of Policy classes).
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    eraseInitialPoints(org.eclipse.draw2d.Connection connection)
    Reset the initial points stored in this manager and also erase the feedback data from all the EdgeLabelLocator of the labels of the current connection.
    static org.eclipse.draw2d.geometry.PointList
    getOriginalPoints(org.eclipse.gef.requests.LocationRequest request)
    Get the initial points list of the edge stored in the request.
    void
    storeInitialPointsInRequest(org.eclipse.gef.requests.LocationRequest request, org.eclipse.gef.ConnectionEditPart connectionEditPart)
    Store the initial points of the edge in the request (before feedback drawing).

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • InitialPointsOfRequestDataManager

      public InitialPointsOfRequestDataManager()
  • Method Details

    • storeInitialPointsInRequest

      public void storeInitialPointsInRequest(org.eclipse.gef.requests.LocationRequest request, org.eclipse.gef.ConnectionEditPart connectionEditPart)
      Store the initial points of the edge in the request (before feedback drawing). This data can be used later for computing the location of the labels of this edge in the command construction.
      This method also set the feedback data of the EdgeLabelLocator of the labels of the current connection to correctly draw the label feedback during the label move.
      Parameters:
      request - the request in which to store the original points of the edge.
      connectionEditPart - the editPart of the edge
    • eraseInitialPoints

      public void eraseInitialPoints(org.eclipse.draw2d.Connection connection)
      Reset the initial points stored in this manager and also erase the feedback data from all the EdgeLabelLocator of the labels of the current connection.
      Parameters:
      connection - The connection from which to erase feedback data
    • getOriginalPoints

      public static org.eclipse.draw2d.geometry.PointList getOriginalPoints(org.eclipse.gef.requests.LocationRequest request)
      Get the initial points list of the edge stored in the request.
      Parameters:
      request - The request to query
      Returns:
      the original points list or null if no original points are stored in this request.