Class InitialPointsOfRequestDataManager
java.lang.Object
org.yakindu.base.xtext.utils.gmf.routing.InitialPointsOfRequestDataManager
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
And the method
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
-
Method Summary
Modifier and TypeMethodDescriptionvoid
eraseInitialPoints
(org.eclipse.draw2d.Connection connection) Reset the initial points stored in this manager and also erase the feedback data from all theEdgeLabelLocator
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 therequest
.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).
-
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 theEdgeLabelLocator
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 theEdgeLabelLocator
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 therequest
.- Parameters:
request
- The request to query- Returns:
- the original points list or null if no original points are stored in this request.
-